Skip to content

Refactor AbstractProver flags#679

Draft
baierd wants to merge 26 commits into
masterfrom
refactor_abstractProver_flags
Draft

Refactor AbstractProver flags#679
baierd wants to merge 26 commits into
masterfrom
refactor_abstractProver_flags

Conversation

@baierd

@baierd baierd commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

The AbstractProver tracks the last results of satisfiability queries and whether the prover state was changed since then. This allows us to accurately tell whether model generation, interpolant generation etc. is allowed or not.

We tracked this with 2 booleans up until now. This PR proposes to switch to a single variable that is the optional of an enum. If the optional exists, the enum returns the SAT/UNSAT state. If it does not exist, then generating models/interpolants etc. are not allowed, as the state of the prover was changed since the last query returned SAT/UNSAT.

This branch is based on the branch from #674 and should only be merged after it.

baierd added 26 commits June 9, 2026 17:19
…erforms common checks before delegating to a new implementation method getUnsatCoreImpl() (that is implemented by all solvers that can generate unsat cores)
…rover that performs common checks before delegating to a new implementation method unsatCoreOverAssumptionsImpl() (that is implemented by all solvers) a default impl for unsatCoreOverAssumptionsImpl() is not possible due to javac complaining wrongly in the CI
…llSatImpl after all common checks. AllSatImpl now handles all AllSat implementations and redundant checks are removed
…hecks and a delegate method that can be implemented by the solvers
…stractProver + add common checks and flag modification to the implementation of isUnsatWithAssumptions() calling the delegate and add more doc
…twuzlaAbstractProver + rename method that interprets SAT/UNSAT results to better explain what it returns and add JavaDoc
…oolector, CVC4/5, OpenSMT2, Princes and Z3OptimizationProver
…athSAT5, Yices2, Z3 and Z3Legacy + removing the now redundant checks from them
…MTInterpol + adding doc and a FIXME to unsatCoreOverAssumptionsImpl() as it fails to call isUnsat()
…king UNSAT for unsatCoreOverAssumptions() and add more doc to it and isUnsatWithAssumptionsImpl()
…bout what flag to set so that a solver impl is actually used
…mptionsWrapper by moving it (and its subclasses) up 1 package into the same package as AbstractProver + get the nested AbstractProver from other delegates if needed
… a common source that allows always getting the AbstractProver and switch common checks to be in those delegates (the helper delegates, e.g. debug/tracer etc. are not included yet)
…ented by a common source that allows always getting the AbstractProver and switch common checks to be in those delegates (the helper delegates, e.g. debug/tracer etc. are not included yet)"

Due to it adding a lot of complexity that we most likely don't need. We will first try to work around this, but maybe come back to this later.
This reverts commit 55f0f68.
…WithAssumptionsWrapper by moving it (and its subclasses) up 1 package into the same package as AbstractProver + get the nested AbstractProver from other delegates if needed"

Due tthe solution that was worked towards was adding a lot of complexity that we most likely don't need. We will first try to work around this, but maybe come back to this later.
This reverts commit bff027d.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant