Package edu.mit.csail.sdg.alloy4compiler.ast

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Type.toExpr()


       Type type = expr.type();
       if (!type.hasTuple()) return false;
       if (sol!=null) {
          // Check to see if the tupleset is *really* fully contained inside "type".
          // If not, then grow "type" until the tupleset is fully contained inside "type"
          Expr sum = type.toExpr();
          int lastSize = (-1);
          while(true) {
             A4TupleSet ts = (A4TupleSet)(sol.eval(expr.minus(sum)));
             int n = ts.size();
             if (n<=0) break;
View Full Code Here


             if (n<=0) break;
             if (lastSize>0 && lastSize<=n) throw new ErrorFatal("An internal error occurred in the evaluator.");
             lastSize=n;
             Type extra = ts.iterator().next().type();
             type = type.merge(extra);
             sum = sum.plus(extra.toExpr());
          }
          // Now, write out the tupleset
          A4TupleSet ts = (A4TupleSet)(sol.eval(expr));
          for(A4Tuple t: ts) {
             if (prefix.length()>0) { out.print(prefix); prefix=""; }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.