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

Examples of edu.mit.csail.sdg.alloy4compiler.ast.ExprBinary


                if (!cform(f.forAll(s.decl))) {
                   f = f.deNOP(); if (f instanceof ExprUnary) {
                      ExprUnary u = (ExprUnary)f;
                      f = u.sub.deNOP();
                      if (f instanceof ExprBinary) {
                         ExprBinary b = (ExprBinary)f;
                         if (b.op == ExprBinary.Op.JOIN && b.left.isSame(s.decl.get()) && b.right.deNOP() instanceof Field) {
                            String n = ((Field)(b.right.deNOP())).label;
                            if (u.op == ExprUnary.Op.SOME) return "The "+n+" cannot be empty.";
                            if (u.op == ExprUnary.Op.LONE) return "The "+n+" cannot have more than one value.";
                            if (u.op == ExprUnary.Op.ONEreturn "The "+n+" must have exactly one value.";
View Full Code Here


           ExprUnary u = (ExprUnary)ex;
           if (u.op!=ExprUnary.Op.NOOP && u.op!=ExprUnary.Op.EXACTLYOF) break;
           ex = u.sub;
        }
        if (ex instanceof ExprBinary) {
           ExprBinary b = (ExprBinary)ex;
           if (b.op==ExprBinary.Op.ARROW || b.op==ExprBinary.Op.PLUS || b.op==ExprBinary.Op.JOIN) {
              Expression left = sim(b.left)if (left==null) return null;
              Expression right = sim(b.right); if (right==null) return null;
              if (b.op==ExprBinary.Op.ARROW) return left.product(right);
              if (b.op==ExprBinary.Op.PLUS) return left.union(right); else return left.join(right);
View Full Code Here

TOP

Related Classes of edu.mit.csail.sdg.alloy4compiler.ast.ExprBinary

Copyright © 2018 www.massapicom. 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.