本文整理匯總了Java中edu.mit.csail.sdg.alloy4compiler.ast.ExprList類的典型用法代碼示例。如果您正苦於以下問題:Java ExprList類的具體用法?Java ExprList怎麽用?Java ExprList使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ExprList類屬於edu.mit.csail.sdg.alloy4compiler.ast包,在下文中一共展示了ExprList類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: t
import edu.mit.csail.sdg.alloy4compiler.ast.ExprList; //導入依賴的package包/類
private Expr t(Pos pos, Pos oldClosing, Expr left, Expr right, Pos close) throws Err {
if (right instanceof ExprVar) {
String n = ((ExprVar)right).label;
if (n.equals("int")) return ExprUnary.Op.CAST2INT.make(pos, left);
if (n.equals("disj")) return ExprList.makeDISJOINT(pos, close, Util.asList(left));
if (n.equals("pred/totalOrder")) return ExprList.makeTOTALORDER(pos, close, Util.asList(left));
}
else if (right instanceof ExprList) {
return ((ExprList)right).addArg(left);
}
return ExprBadJoin.make(pos, oldClosing, left, right);
}
示例2: recursiveAddFormula
import edu.mit.csail.sdg.alloy4compiler.ast.ExprList; //導入依賴的package包/類
/** Break up x into conjuncts then add them each as a fact. */
private void recursiveAddFormula(Expr x) throws Err {
if (x instanceof ExprList && ((ExprList)x).op==ExprList.Op.AND) {
for(Expr e: ((ExprList)x).args) recursiveAddFormula(e);
} else {
frame.addFormula(cform(x), x);
}
}
示例3: visit
import edu.mit.csail.sdg.alloy4compiler.ast.ExprList; //導入依賴的package包/類
/** {@inheritDoc} */
@Override public Expr visit(ExprList x) throws Err {
TempList<Expr> temp = new TempList<Expr>(x.args.size());
for(int i=0; i<x.args.size(); i++) temp.add(visitThis(x.args.get(i)));
return ExprList.make(x.pos, x.closingBracket, x.op, temp.makeConst());
}
示例4: getAllReachableFacts
import edu.mit.csail.sdg.alloy4compiler.ast.ExprList; //導入依賴的package包/類
/** Return the conjunction of all facts in this module and all reachable submodules (not including field constraints, nor including sig appended constraints) */
public Expr getAllReachableFacts() {
ArrayList<Expr> facts = new ArrayList<Expr>();
for(CompModule m: world.getAllReachableModules()) for(Pair<String,Expr> f: m.facts) facts.add(f.b);
if (facts.size()==0) return ExprConstant.TRUE; else return ExprList.make(null, null, ExprList.Op.AND, facts);
}
示例5: visit
import edu.mit.csail.sdg.alloy4compiler.ast.ExprList; //導入依賴的package包/類
/** {@inheritDoc} */
@Override public Expr visit(ExprList x) { return x; }