Examples of resolve_as_formula()


Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.resolve_as_formula()

            Decl dd = new Decl(d.isPrivate, d.disjoint, d.disjoint2, n.makeConst(), exp);
            for(ExprHasName newname: dd.names) put(newname.label, newname);
            decls.add(dd);
         }
         Expr sub = visitThis(x.sub);
         if (x.op==ExprQt.Op.SUM) sub=sub.resolve_as_int(warns); else sub=sub.resolve_as_formula(warns);
         for(Decl d: decls.makeConst()) for(ExprHasName v: d.names) remove(v.label);
         return x.op.make(x.pos, x.closingBracket, decls.makeConst(), sub);
      }

      /** {@inheritDoc} */
 
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.resolve_as_formula()

      for(ArrayList<Func> entry: funcs.values()) for(Func ff: entry) {
         Context cx = new Context(this, warns);
         cx.rootfunbody = ff;
         for(Decl d: ff.decls) for(ExprHasName n: d.names) cx.put(n.label, n);
         Expr newBody = cx.check(ff.getBody());
         if (ff.isPred) newBody = newBody.resolve_as_formula(warns); else newBody = newBody.resolve_as_set(warns);
         errors = errors.make(newBody.errors);
         if (!newBody.errors.isEmpty()) continue;
         try { ff.setBody(newBody); } catch(Err er) {errors = errors.make(er); continue;}
         if (warns!=null && ff.returnDecl.type().hasTuple() && newBody.type().hasTuple() && !newBody.type().intersects(ff.returnDecl.type()))
            warns.add(new ErrorWarning(newBody.span(),
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.