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

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


       final int n = x.count();
       final ExprVar v = x.get(i);
       final Expr bound = x.getBound(i);
       final SimTupleset e = cset(bound);
       final Iterator<SimTupleset> it;
       switch(bound.mult()) {
         case LONEOF: it = e.loneOf(); break;
         case ONEOF:  it = e.oneOf()break;
         case SOMEOF: it = e.someOf(); break;
         default:     it = e.setOf();
       }
View Full Code Here


      }
      if (op == ExprQt.Op.ONE || op == ExprQt.Op.LONE) {
         boolean ok = true;
         for(int i=0; i<xvars.size(); i++) {
            Expr v = addOne(xvars.get(i).expr).deNOP();
            if (v.type().arity()!=1 || v.mult()!=ExprUnary.Op.ONEOF) { ok=false; break; }
         }
         if (op==ExprQt.Op.ONE && ok) return ((Expression) visit_qt(ExprQt.Op.COMPREHENSION, xvars, sub)).one();
         if (op==ExprQt.Op.LONE && ok) return ((Expression) visit_qt(ExprQt.Op.COMPREHENSION, xvars, sub)).lone();
      }
      if (op == ExprQt.Op.ONE) {
View Full Code Here

           final kodkod.ast.Decl newd;
           env.put((ExprVar)dex, v);
           if (dex.type().arity()!=1) {
              guards.add(isIn(v, dexexpr));
              newd = v.setOf(dv);
           } else switch(dexexpr.mult()) {
              case SETOF: newd = v.setOf(dv); break;
              case SOMEOF: newd = v.someOf(dv); break;
              case LONEOF: newd = v.loneOf(dv); break;
              default: newd = v.oneOf(dv);
           }
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.