Repository navigation
feat: refute with any input the interpreter replays (stage 11e) - #103
Merged
Merged
Conversation
Decision 5 of the 2026-11-13 second set (#83): an input that meets requires and, run by the interpreter, breaks a clause refutes it, whichever solver or the enumeration found it. The planted fault in find's contract, undecided since 11d, is now expected refuted, and so is a false all over a list of texts, which Z3 answers unknown and cvc5 refutes. Refs #83
Decisions 5 and 6 of the 2026-11-13 second set (#83). A refutation used to need both solvers' sat, so a fault the fuel axioms hide, or a false all over a list of texts that Z3 answers unknown, stayed undecided though one solver, or a small input, showed it. Now an input that the interpreter replays settles the obligation whichever solver gave it, including the values cvc5 prints with an unknown answer; a sat against an unsat stays a disagreement. Where neither solver answered unsat and no model settled it, the compiler tries small typed inputs in a fixed order, up to 20,000, and reports how many met requires; finding none proves nothing. Refs #83
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.
A refutation needed both solvers to answer
sat, so a fault that one solver couldn't settle stayed undecided, even when the other solver, or a small input, showed it plainly. Two known cases: the planted fault infind's contract through a recursive spec function (11d), where neither solver can build a model of the fuel axioms, and a falseallover aList<Text>, which Z3 answersunknownand cvc5 refutes.Slice 11e of stage 11 (#83) applies decisions 5 and 6 of the 2026-11-13 second set: an input that meets
requiresand that the interpreter replays breaking a clause refutes it, whichever solver or the enumeration found it. The conformance cases come in their own commit, before the code.Where to start reading:
crates/accord/src/solver/combine.rs(settle, the rule), thencrates/accord/src/interpret/enumerate.rs.What changes
unknownbut still prints values (cvc5 does), the answer keeps them (Answer::Guess). The solver claims nothing of them; only the interpreter's replay can make them count.unsatfrom either solver, each model in turn is replayed: the first that reproduces as the code runs refutes a universal obligation or proves an existential one. A second solver'ssatadds nothing; a second model that doesn't reproduce takes nothing away.unsatprove (or refute an existential);satagainstunsatis a disagreement, undecided, even if the model replays; a counterexample that needs a callee's contract isweak_callee.unsatand nothing settled the obligation, the compiler tries small inputs of each parameter's type in one fixed order, up to 20,000: integers 0, ±1, ±2, 3 and the width's ends; eight texts; lists of up to 3 elements over 4 values of their type; records and variants over 3 values of each field. Each is replayed as a model is, indices of quantifiers included. Finding none proves nothing; the undecided reason says how many metrequires. Only function obligations enumerate; machines, mutation, open-case search andaccord diffdon't.Decisions taken within the slice
satwhose model doesn't reproduce still is.Verification
On Windows with the pinned Z3 5.3.3 and cvc5 1.4.2:
cargo fmt --all --check: passed.cargo clippy --workspace --all-targets --locked -- -D warnings: passed.cargo test --workspace --locked: 124 passed, 0 failed, 1 ignored (already ignored on main).score.py --self-testandmaterials.py target/debug/accord: passed (52 s).spec-fn-recursive-fault'sensuresgoes from undecided to refuted; the newlist-text-faultrefutes falseall,anyandcountcontracts over aList<Text>(allwas undecided on main, checked before the code). No other case's outcome changed.settle(disagreement survives a replaying model, a guess againstunsatstays undecided, either solver's replayed input settles it, a failed guess keeps its solver's reason, weak callees); reading a guess from cvc5'sunknown; enumeration finds[""]against a falseall, finds no input against a true contract and counts what metrequires, and findsn = -2reaching a row guarded byn * n == 4 and n < 0.tests/timeout.rs: Fermat's cubes stay undecided with the solver's timeout as the reason, within the time bound.full-ci).Not established
Risk note
Two-way door: a change to how outcomes are settled, behind conformance cases and unit tests; the receipt schema doesn't change. Blast radius: obligations that were undecided can now be refuted, or proved when existential, only by an input the interpreter replays; nothing proved or refuted before changes, as the unchanged suite shows. Every undecided function obligation costs up to 20,000 interpreter replays. Evidence: the checks above.
Refs #83
Atrium: 01a1e493-5c94-7ec3-9866-c6caa515b26e
Atrium-Closes: 01a1f241-1078-705e-a75a-5ac91418c430