Exemplo n.º 1
0
 public static void main(String[] argv) {
   try {
     IAPI m = Factory.makeAPI(new String[] {});
     JCTree.JCExpression expr = m.parseExpression("a <==> \\result", true);
     String s = m.prettyPrint(expr);
     System.out.println(s);
   } catch (Exception e) {
     System.out.println(e);
   }
 }
Exemplo n.º 2
0
 public static void main(String[] argv) {
   try {
     java.io.File f1 = new java.io.File("src/demo/A.java");
     java.io.File f2 = new java.io.File("src/demo/B.java");
     IAPI m = Factory.makeAPI("-noPurityCheck");
     List<JmlTree.JmlCompilationUnit> asts = m.parseFiles(f1, f2);
     int ret = m.typecheck(asts);
     System.out.println("Trees: " + asts.size() + "  Errors: " + ret);
   } catch (Exception e) {
     System.out.println(e);
   }
 }