Closed AdrienChampion closed 4 years ago
cvc4 doesnt work out of the box at least. probably because interactive mode echoes back?
Error(ParseError("expected `sat` or `unsat`", "(declare-const n Int)"),
@aep yeah originally rsmt2
supported cvc4, but it was quite tedious to maintain and until now no one really asked for it.
There used to be a way to remove the prompt completely, but I'm not sure that's the case anymore. I will take a look at adding support for cvc4 back. I will most likely only add support for the latest version, which will provide a template for supporting other versions that behave differently.
its "--no-interactive", see my PR
any idea how i can run the tests against the other solvers to find the problems?
i could search and replace SmtConf::z3 but that's a temporary solution
Right, the idea is to extend SmtConf
to add a cvc4 "driver" that handles the specifics of interacting with cvc4. Just give me a bit of time, I'll work on it this afternoon to add support for the latest cvc4 I have access to. (Hopefully.)
Once that's done, it will provide a guideline for submitting drivers for other solvers, such as yices or other versions of cvc4.
the zz compiler self test suite has half a million lines of smt2.
yices2 works as expected with my PR
Alright, so cvc4 is actually already supported, at least as far as declarations/assertions/get-model are concerned. Also, get-value
segfaults on my version (1.4.2
).
Yices 2 mostly works out of the box, but differs in how it outputs models. That is, it writes (= <symbol> <value>)
where z3 would write (define-fun <symbol> (<args>) <sort> <value>)
. (Which implies that Yices 2 does not seem to plan to provide values for non-nullary function symbols.) This forces me to change a few things in the API. Nothing big, but I need a bit more time. This should be taken care of tomorrow.
In any case, thank you for #11 as it makes it very fast for me to add support for Yices 2 :D
Done, I released the new version of rsmt2 as beta for now: https://crates.io/crates/rsmt2/0.11.0-beta.0
I think we can close this issue, feel free to open new ones if you run into problems with this beta version.
Thank you again :)
how would i use this with yices2-mt?
after fixing those its working
Solver::set_custom_logic
to make it easier to set your own logic.cvc4 needs to --no-interactive as --interactive will echo
you're correct about the yices binary release. no idea why the source build is different. Possibly about to change
still missing --incremental for yices
any progress on adding --incremental to yices? i'd like to get rid of the downstream fork
--no-interactive
for cvc4 as you recommended, which allowed to remove prompt parsing (no visible change for users)SmtConf::incremental
on your solver configurationyices
I'm about to publish rsmt2 0.11.0 which is currently beta. Note that nothing has changed from the user's perspective compared to the beta version from January. (Except the default name for yices' binary.)
I would really appreciate it if you could take the time to give it a try and let me know if you run into any problems before I release 0.11.0. Using rsmt2 = { git = "https://github.com/kino-mc/rsmt2" }
.
I think it would be better to have that feedback in a different issue though, if that's ok with you. If you encounter problems for a specific solver, remember to include your operating system and the solver's version :)
Thank you again for your feedback!