本文整理汇总了Java中ap.parser.IFormulaITE类的典型用法代码示例。如果您正苦于以下问题:Java IFormulaITE类的具体用法?Java IFormulaITE怎么用?Java IFormulaITE使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IFormulaITE类属于ap.parser包,在下文中一共展示了IFormulaITE类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mkIte
import ap.parser.IFormulaITE; //导入依赖的package包/类
public ProverExpr mkIte(ProverExpr cond, ProverExpr thenExpr,
ProverExpr elseExpr) {
if (thenExpr instanceof TermExpr)
return new TermExpr(new ITermITE(((FormulaExpr) cond).formula,
((TermExpr) thenExpr).term, ((TermExpr) elseExpr).term),
thenExpr.getType());
else
return new FormulaExpr(new IFormulaITE(
((FormulaExpr) cond).formula,
((FormulaExpr) thenExpr).formula,
((FormulaExpr) elseExpr).formula));
}
示例2: ifThenElse
import ap.parser.IFormulaITE; //导入依赖的package包/类
@Override
public IExpression ifThenElse(IExpression condition, IExpression t1, IExpression t2) {
if (t1 instanceof IFormula) {
return new IFormulaITE((IFormula) condition, (IFormula) t1, (IFormula) t2);
} else {
return new ITermITE((IFormula) condition, (ITerm) t1, (ITerm) t2);
}
}
示例3: getName
import ap.parser.IFormulaITE; //导入依赖的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());
}
}