java-smt icon indicating copy to clipboard operation
java-smt copied to clipboard

Allow uninterpreted functions with boolean arguments

Open PhilippWendler opened this issue 6 years ago • 1 comments

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();
  }

PhilippWendler avatar Jun 17 '19 05:06 PhilippWendler

It is actually an interesting question which solvers do have support for wich argument types. At least Integer is supported by all solvers.

kfriedberger avatar Jun 26 '19 10:06 kfriedberger