Open kfriedberger opened 1 year ago
This actually seems to be the Rational version of https://github.com/uuverifiers/princess/issues/17. Here the Epsilon term is created indirectly by the division:
test("epsilon rational") {
Debug.enableAllAssertions(withAssertions)
SimpleAPI.withProver(enableAssert = withAssertions) { p =>
import ap.theories.rationals.Rationals._
import p._;
val x = createConstant("x", dom)
val f = div(x, int(2))
// We now have:
// f = EPS Rat. EX (((Rat_denom = _0) & ((_0 + -1) >= 0)) & (mul(_0, _1[Rat]) = mul(x, Rat_frac(1, 2))))
checkSat(true)
assertResult(1: ITerm)(partialModel.evalToTerm(f))
}
}
Are there any news on that issue?
The JavaSMT developers are currently trying to improve their support for Rational theory with the SMT solver Princess (see https://github.com/sosy-lab/java-smt/pull/257). There are some smaller issues in Princess (version 2023-06-19) that block us from a good integration.
The following issue appeared in model evaluation:
Description:
We want to evaluate a rational division in a model, completely unrelated to any pushed assertions.
The division in the last line is a rational division, not the integer-based one. The result is not relevant for us and can be any arbitrary value, except a crashing program :-)
Code / Junit test:
Stacktrace:
The term
(/ x 2)
that is used for the model evaluation can be printed asEPS Rat. EX (((Rat_denom = _0) & ((_0 + -1) >= 0)) & (mul(_0, _1[Rat]) = mul(x, Rat_frac(1, 2))))
. I assume that the symbol_0
comes from this notation.@pruemmer Could you take a look?