java-smt
java-smt copied to clipboard
Allow uninterpreted functions with boolean arguments
AbstractUFManager currently forbids boolean arguments for UFs:
https://github.com/sosy-lab/java-smt/blob/8fd9bff46bb6d1741b900a9d61fb02cd9045c582/src/org/sosy_lab/java_smt/basicimpl/AbstractUFManager.java#L53-L55
Why is that the case? Can it be allowed?
If I remove that check, and run the following test, it works on all solvers except MathSAT:
@Test
public void testBooleanUF() throws SolverException, InterruptedException {
BooleanFormula f = fmgr.declareAndCallUF("f", FormulaType.BooleanType, bmgr.makeVariable("a"));
assertThatFormula(bmgr.equivalence(f, bmgr.makeVariable("a"))).isSatisfiable();
}
It is actually an interesting question which solvers do have support for wich argument types.
At least Integer is supported by all solvers.