use of org.sosy_lab.java_smt.api.FloatingPointFormulaManager in project java-smt by sosy-lab.
the class UfElimination method makeEqual.
@SuppressWarnings("unchecked")
@CheckReturnValue
private BooleanFormula makeEqual(Formula pLhs, Formula pRhs) {
BooleanFormula t;
if (pLhs instanceof BooleanFormula && pRhs instanceof BooleanFormula) {
t = bfmgr.equivalence((BooleanFormula) pLhs, (BooleanFormula) pRhs);
} else if (pLhs instanceof IntegerFormula && pRhs instanceof IntegerFormula) {
t = fmgr.getIntegerFormulaManager().equal((IntegerFormula) pLhs, (IntegerFormula) pRhs);
} else if (pLhs instanceof StringFormula && pRhs instanceof StringFormula) {
t = fmgr.getStringFormulaManager().equal((StringFormula) pLhs, (StringFormula) pRhs);
} else if (pLhs instanceof NumeralFormula && pRhs instanceof NumeralFormula) {
t = fmgr.getRationalFormulaManager().equal((NumeralFormula) pLhs, (NumeralFormula) pRhs);
} else if (pLhs instanceof BitvectorFormula) {
t = fmgr.getBitvectorFormulaManager().equal((BitvectorFormula) pLhs, (BitvectorFormula) pRhs);
} else if (pLhs instanceof FloatingPointFormula && pRhs instanceof FloatingPointFormula) {
FloatingPointFormulaManager fpfmgr = fmgr.getFloatingPointFormulaManager();
t = fpfmgr.equalWithFPSemantics((FloatingPointFormula) pLhs, (FloatingPointFormula) pRhs);
} else if (pLhs instanceof ArrayFormula<?, ?> && pRhs instanceof ArrayFormula<?, ?>) {
ArrayFormula<?, ?> lhs = (ArrayFormula<?, ?>) pLhs;
@SuppressWarnings("rawtypes") ArrayFormula rhs = (ArrayFormula) pRhs;
t = fmgr.getArrayFormulaManager().equivalence(lhs, rhs);
} else {
throw new IllegalArgumentException("Not supported interface");
}
return t;
}
Aggregations