本文整理匯總了Java中ap.parser.IPlus類的典型用法代碼示例。如果您正苦於以下問題:Java IPlus類的具體用法?Java IPlus怎麽用?Java IPlus使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IPlus類屬於ap.parser包,在下文中一共展示了IPlus類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getName
import ap.parser.IPlus; //導入依賴的package包/類
private String getName(IExpression input) {
if (input instanceof IAtom || input instanceof IConstant) {
return input.toString();
} else if (input instanceof IBinFormula) {
return ((IBinFormula) input).j().toString();
} else if (input instanceof IFormulaITE || input instanceof ITermITE) {
// in princess ite representation is the complete formula which we do not want here
return "ite";
} else if (input instanceof IIntFormula) {
return ((IIntFormula) input).rel().toString();
} else if (input instanceof INot) {
// in princess not representation is the complete formula which we do not want here
return "not";
} else if (input instanceof IFunApp) {
return ((IFunApp) input).fun().name();
} else if (input instanceof IPlus) {
// in princess plus representation is the complete formula which we do not want here
return "+";
} else if (input instanceof ITimes) {
// in princess times representation is the complete formula which we do not want here
return "*";
} else if (input instanceof IEpsilon) {
// in princess epsilon representation is the complete formula which we do not want here
return "eps";
} else {
throw new AssertionError("Unhandled type " + input.getClass());
}
}
示例2: mkPlus
import ap.parser.IPlus; //導入依賴的package包/類
public ProverExpr mkPlus(ProverExpr left, ProverExpr right) {
return new TermExpr(new IPlus(((TermExpr) left).term,
((TermExpr) right).term), getIntType());
}
示例3: mkMinus
import ap.parser.IPlus; //導入依賴的package包/類
public ProverExpr mkMinus(ProverExpr left, ProverExpr right) {
return new TermExpr(new IPlus(((TermExpr) left).term,
((TermExpr) right).term.unary_$minus()), getIntType());
}