Closed bruderj15 closed 3 days ago
Z3 just expands it as they share terms before anyways: https://github.com/Z3Prover/z3/issues/6732#issuecomment-1560704954
As of above implementation in https://github.com/bruderj15/Hasmtlib/commit/d28c2319fb76590de8db3f4cce7e56e70e0d6ee3 we now need to traverse the entire formula on every assert.
Previously we just had to do that if logic was with quantifiers (not starting with QF
).
As we handle the let identical to the quantifiers by creating a scoped var before asserting, we now need to traverse every formula.
Significant (5x) ghc-runtime increase on a bigger instance of mine. There is no other way than that if we want to remain pure.
That runtime increase does not seem worth it for a in my opinion useless let-binding.
This can be done equivalently to quantifiers.
Do the solvers use it to share terms?
Standard does not make it sound like:
But what do the solvers do?