Repository navigation
Add bounded greedy completion to incremental search - #2
Merged
Merged
Conversation
Poll the public termination callback while scanning and greedily assigning variables. Backtrack an interrupted partial candidate before leaving probing mode so an incremental caller can resume safely. Expose the capability in the public header for callers that run a budgeted disposable candidate pass. Add cancellation and resume coverage that fails when the greedy pass never consults the callback. Assisted-by: OpenAI Codex (GPT-6), via Codex
Some incremental SAT calls admit quick greedy models when replayed into a fresh solver, but copying a large formula can erase that benefit. Try the same assignment orders in the persistent solver after a work trigger. Preserve every assumption decision and never analyze greedy conflicts. Failed walks restore the complete assumption prefix before CDCL resumes, so no conditional fact becomes a permanent root unit. Bound optional work and back off after an inconclusive attempt until substantial CNF growth. Keep the experiment disabled by default, including a matched prefix restart mode to distinguish restarting from the greedy search itself. Assisted-by: OpenAI Codex (GPT-6), via Codex
A Release build with warnings treated as errors drops LOG and leaves this existing counter set but unused. Preserve its diagnostic count while making the disabled-logging build warning-clean. Assisted-by: OpenAI Codex (GPT-6), via Codex
Compare greedy completion above the current decision level with a walk that first returns to the assumption prefix. Inconclusive current-trail walks restore every existing CDCL decision. Also allow successful greedy models to seed saved phases, since probing suppresses the ordinary phase updates. Keep both sensitivities optional and disabled in the existing configurations. Assisted-by: OpenAI Codex (GPT-6), via Codex
A large persistent formula may need only a few new decisions after a small assertion change. Allow experiments to skip full greedy scans in that case while retaining the work-triggered walk on harder contexts. Keep the threshold zero by default to preserve existing configurations. Assisted-by: OpenAI Codex (GPT-6), via Codex
Permit local experiments to retry a failed greedy walk when the assumption vector changes or after smaller clause growth. Keep the existing fourfold growth backoff and context policy by default. Assisted-by: OpenAI Codex (GPT-6), via Codex
Identify the optional greedy search through a header capability so that clients can reject an older incremental library instead of silently ignoring its options. Describe the protected prefixes, bounded work and retry controls independently of the STP experiment interface. Assisted-by: OpenAI Codex (GPT-6), via Codex
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 optional greedy SAT completion above the assumption prefix or the current CDCL trail. Conflicting choices are flipped once, unsuccessful walks restore their protected prefix without learning conditional root units, and ordinary search continues. Attempts share termination polling, have a soft time allowance, and back off after failure until the formula grows. The native default is disabled.
Expose work thresholds, retry growth, optional phase caching and a header capability for clients. Carry the already published cancellation fix
b639548, which STP currently pins, and the Release warning fix needed by this library build.The STP integration and scoped automatic profiles are proposed in stp/stp#1358.
Performance evidence
The selected policy still loses 26 sessions completed by existing Kissat and 63 completed by CaDiCaL. QF_ABV regresses from 3.3540 s to 3.4273 s mean PAR2, so the proposed STP integration preserves its existing QF_ABV defaults. CaDiCaL also retains the lower QF_BV PAR2.
The final experiment used 22,833 complete incremental sessions per configuration, a 24 s whole-session wall limit, 8 GiB address-space limit and 18 workers on a shared 24-core host. Every timeout, error, unknown or incomplete session costs 48 s. All observations and failures are retained.
The policy without copying has 2.43% lower aggregate PAR2 than the strongest measured CaDiCaL configuration and 5.38% lower than existing Kissat. It recovers 64 existing-Kissat losses; it completes 71 sessions that CaDiCaL does not. Across the four configurations there are 91,332 observations, 39 memory failures, 0 known wrong answers and 0 answer disagreements. The memory failures remain penalized in the table.
These results come from frozen experimental solver/adapter revisions, not a fresh benchmark of this publication branch. Settings were selected during the investigation, so this is not an unseen holdout. Shared-host timing and per-file losses limit the conclusion. The copy/restoration policy is reported as experimental evidence; the native greedy mechanism here uses the persistent solver.
Verification
-Wall -Wextra -Werror, and clang 21.1.6 RelWithDebInfo with UBSan instrumentation and the same warning policy.