Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninterpreted functions and interactive solving #12

Merged
merged 27 commits into from
Aug 26, 2023
Merged

Uninterpreted functions and interactive solving #12

merged 27 commits into from
Aug 26, 2023

Conversation

elsoroka
Copy link
Owner

@uNinterpreted macro introduces uninterpreted functions
Interact with an open SMT solver using the InteractiveSolver struct and new methods assert!, push! and pop! (push and pop the solver assertion stack), assign! (to propagate a satisfying assignment to expressions), and sat!(interactive_solver, exprs...). When exprs are provided in sat!(interactive_solver), this is equivalent to the SMT-LIB (check-sat-assuming exprs...) command.

comparison to x != y which must use not(x == y) due to the way != is defined
in Julia.
…fixed save() to use IO like sat! and added options for start and end commands to enable adding (get-info) etc.
2. adding options to get and set solver options, push and pop for
interactive mode. All tests pass; no concurrency bugs introduced to my
knowledge.
1. Added InteractiveSolver object which corrals the Base.Process and its
pipes, along with a command_history.
2. Added open() and close() methods to open and close an InteractiveSolver process
from a Solver.
3. Added assert!, sat!(interactive_solver, exprs...), push and pop. This
allows the instantiation of an interactive solver, pushing and popping
assertion levels, and equivalent behavior to check-sat-assuming.
4. Cleaned up docstrings and usage for parse_model and assign!, which
are now user-facing to enable processing the results of low-level
interactions with InteractiveSolvers.
5. Discovered some trouble with Base.process Pipes, see Julia issue
24717 and 24526. So I can't make (get-option) or (set-option) work right
now due to problems receiving the solver response.
interactive behavior, including documentation.
@uninterpreted_func, generator syntax for and(), or(), distinct(), etc.
distinct(x,y) and x != y now do the same thing, when previously x != y
generated the SMT-LIB expression (not (= x y)) instead of (distinct x
y).
@uninterpreted_func, generator syntax for and(), or(), distinct(), etc.
distinct(x,y) and x != y now do the same thing, when previously x != y
generated the SMT-LIB expression (not (= x y)) instead of (distinct x
y).
-functions. This generates smaller SMT files and models, thus allowing
faster solve times.
functions and solving is faster with z3. All tests pass and all examples
run.
@elsoroka elsoroka merged commit b70e24a into main Aug 26, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant