How to reference sorts and functions imported from an SMT2 file/string in the C++ API? #7500
Unanswered
tschuchortdev
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a file generated by a third-party program that contains sort definitions and function definitions but no assertions:
How can I import this into the Z3 C++ API and then reference the imported definitions?
I'm importing the file as follows:
The call to
solver.to_smt2()
however, is only printing an empty file:I assume that
z3::solver
is simply optimizing away all the definitions, since they are never referenced in an assertion... not great for debugging.In
z3::ctx
I can not find any methods that would allow me to reference declarations without defining them myself. If I create uninterpreted definitions with the same name, they just seem to overwrite everything that was imported from the file:prints
Before anyone asks: I can not redefine the sorts and functions in C++, since the whole point of the exercise is that I don't know in advance what they will be.
Beta Was this translation helpful? Give feedback.
All reactions