Repository navigation
Conversation
…and add some tests for them, as simplifiers can't be used with unsat-cores or assumption solving currently
…ment. Tactics can not be used with engine/logic options or the user propagator
Z3 only accepts user propagators for tactics ending with 'smt', and the tactic 'smt' uses them only in the first satisfiability check after their registration. Other tactics make Z3 fail with an error that its Java API does not report, and the state of Z3 after such errors is not guaranteed to be safe. registerUserPropagator() now returns false for provers that use tactics. Document this in the option solver.z3.tactics and in the JavaDoc of registerUserPropagator().
registerUserPropagator() now throws a SolverException if the solver fails to register the user propagator, instead of returning false and thereby hiding the error. For Z3, this happens e.g. for the logic QF_FD, whose solver does not support user propagators (and currently also rejects the parameter 'logic' that we set). Returning false is still used for solvers and configurations that do not support user propagators at all, e.g. Z3 with tactics. This adds a checked exception to the public API.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Z3 tactics via a context based option to the Z3
ProverEnvironment(TheoremProver).The new option
solver.z3.tacticstakes a list of Z3 tactic names that are combined in the given order into the solving strategy of eachProverEnvironment.Unknown tactics, as well as combinations with
solver.z3.logicorsolver.z3.engine(which Z3 rejects for most tactics), cause anInvalidConfigurationException.Provers based on tactics do not set the per-solver random seed, as Z3 rejects it for tactics without randomness; the global seed still applies to e.g. 'smt'.
Z3's
Native.propagateInitignores errors, e.g., for tactics without support foruser propagators. We therefore do not allow user propagators if tactics are used.
registerUserPropagatorreturns false in such cases, and the JavaDoc has been extended to explain it to users.
We also throw
SolverExceptions now fromregisterUserPropagatorfor critical errors, e.g. for some logics in Z3.This PR depends on #747 being merged first.