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

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


                   if (!cform(ExprList.makeDISJOINT(null, null, d.names))) return "Fields must be disjoint.";
                }
                if (d.disjoint2!=null) for(ExprHasName f: d.names) {
                   Decl that = s.oneOf("that");
                   Expr formula = s.decl.get().equal(that.get()).not().implies(s.decl.get().join(f).intersect(that.get().join(f)).no());
                   if (!cform(formula.forAll(that).forAll(s.decl))) return "Fields must be disjoint.";
                }
             }
             for(Expr f: s.getFacts()) {
                if (!cform(f.forAll(s.decl))) {
                   f = f.deNOP(); if (f instanceof ExprUnary) {
View Full Code Here


         for(Decl d: s.getFieldDecls()) {
            k2pos_enabled = false;
            for(ExprHasName n: d.names) {
               Field f = (Field)n;
               Expr form = s.decl.get().join(f).in(d.expr);
               form = s.isOne==null ? form.forAll(s.decl) : ExprLet.make(null, (ExprVar)(s.decl.get()), s, form);
               frame.addFormula(cform(form), f);
               // Given the above, we can be sure that every column is well-bounded (except possibly the first column).
               // Thus, we need to add a bound that the first column is a subset of s.
               if (s.isOne==null) {
                   Expression sr = a2k(s), fr = a2k(f);
View Full Code Here

               }
            }
            if (s.isOne==null && d.disjoint2!=null) for(ExprHasName f: d.names) {
               Decl that = s.oneOf("that");
               Expr formula = s.decl.get().equal(that.get()).not().implies(s.decl.get().join(f).intersect(that.get().join(f)).no());
               frame.addFormula(cform(formula.forAll(that).forAll(s.decl)), d.disjoint2);
            }
            if (d.names.size()>1 && d.disjoint!=null) {  frame.addFormula(cform(ExprList.makeDISJOINT(d.disjoint, null, d.names)), d.disjoint)}
         }
         k2pos_enabled = true;
         for(Expr f: s.getFacts()) {
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.