// TODO this method is a duplicate( from VanillaTypeChecker). Should be
  // placed in a common utils lib
  private static void runOnFile(File f) throws IOException {
    // set file name
    PSource source = prepareSource(f);

    // generate POs
    ProofObligationGenerator cmlPOG = new ProofObligationGenerator();
    try {
      cmlPOG.generatePOs(source.getParagraphs());
    } catch (AnalysisException e) {
      System.out.println(
          "The Symphony Proof Obligation Generator failed on this cml-source. Please submit it for investigation to [email protected].\n");
      e.printStackTrace();
    }

    // Report success
    System.out.println("Proof Obligation Generation is complete for the given CML Program");
  }
  @Override
  public PExp getContextNode(PExp stitch) {

    PExp r = null;
    try {
      if (first) {
        r = stitch.apply(visitor, subLast);
        first = false;
      } else {
        r = stitch.apply(visitor, sub);
      }
      return r;
    } catch (AnalysisException e) {
      e.printStackTrace();
      return null;
    }
  }
Exemple #3
0
  public STypeCG toIrType(IRInfo info) {
    try {
      STypeCG irType = type.apply(info.getTypeVisitor(), info);

      if (irType != null) {
        irType.setOptional(optional);
      }

      return irType;
    } catch (AnalysisException e) {
      Logger.getLog()
          .printErrorln(
              "Problems encountered while attempting "
                  + "to construct the IR type from a VDM type: "
                  + e.getMessage()
                  + " in '"
                  + this.getClass().getSimpleName()
                  + "'");
      e.printStackTrace();
    }

    return null;
  }