Wrap MCSAT as a Nelson-Oppen theory solver in CDCL(T) architecture#611
Draft
Wrap MCSAT as a Nelson-Oppen theory solver in CDCL(T) architecture#611
Conversation
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.
This is a first draft wrapping MCSAT as a Nelson-Oppen theory solver in CDCL(T) architecture.
As a Nelson-Oppen theory solver, it is a satellite theory of the e-graph. It completes the CDCL(T) theory support, aligning it with MCSAT's, by covering non-linear arithmetic and finite fields. Technically, the wrapper is called as the last theory solver, just before reconciliation and quantifiers, but after the simplex, so that the simplex has a chance to trigger a backjump without resorting to MCSAT. If we do end up calling MCSAT, it is on a conjunction of literals + equalities/disequalities from the e-graph, and if we get UNSAT, we extract a theory lemma by asking MCSAT to produce an unsat core (this integration relies on the recently added unsat core functionality of MCSAT).
The top-level MCSAT solver is unchanged.
In CDCL(T) mode, formulas that previously failed with
FORMULA_NOT_LINEAR/CONTEXT_UNSUPPORTED_THEORYare now detected up front and routed to the dedicated MCSAT satellite context for consistency checking and conflict explanation.Main Changes
src/solvers/mcsat_satellite.csrc/solvers/mcsat_satellite.hARITH_ROOT_ATOMdegree > 1)div/mod/dividesformsmcsat-supplement-check = both | final-only(defaultboth)ctx->mcsatsemantics pure-MCSAT-only; supplemental path is via egraph satellite state.--dplltforcing and regression harness support for dual-mode runs intests/regress/both.CLI/Option Semantics
--mcsatand--dplltare now treated as mutually exclusive top-level architecture selectors inyices_smt2.Test/Regression Notes
tests/regress/both/scaffold and harness support to run selected tests under both modes.check-sat-assuming-model, unsat-model interpolant requests) are rejected early.Scope / Draft Status
CTX_ARCH_MCSATflow remains intact.