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

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


        for(Sig s:sigs) {
           while (s.isOne!=null && s.getFieldDecls().size()==2 && s.getFields().size()==2 && s.getFacts().size()==1) {
              // Let's check whether this is a total ordering on an enum...
              Expr fact = s.getFacts().get(0).deNOP(), b1 = s.getFieldDecls().get(0).expr.deNOP(), b2 = s.getFieldDecls().get(1).expr.deNOP(), b3;
              if (!(fact instanceof ExprList) || !(b1 instanceof ExprUnary) || !(b2 instanceof ExprBinary)) break;
              ExprList list = (ExprList)fact;
              if (list.op!=ExprList.Op.TOTALORDER || list.args.size()!=3) break;
              if (((ExprUnary)b1).op!=ExprUnary.Op.SETOF) break; else b1 = ((ExprUnary)b1).sub.deNOP();
              if (((ExprBinary)b2).op!=ExprBinary.Op.ARROW) break; else { b3 = ((ExprBinary)b2).right.deNOP(); b2 = ((ExprBinary)b2).left.deNOP(); }
              if (!(b1 instanceof PrimSig) || b1!=b2 || b1!=b3) break;
              PrimSig sub = (PrimSig)b1;
View Full Code Here

TOP

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

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.