Add dynamic SRM and incremental simulation into &scorr -i ; Fix a bug of &scorr -i ;#529
Merged
alanminko merged 1 commit intoJul 2, 2026
Conversation
f341207 to
f8faf43
Compare
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.
Summary
This PR adds three optimizations to the
&scorr -iincremental refinement loop:-D(dynamic SRM construction),-I(persistent event-driven resimulation), and-s(skip fail-only resimulation). It also fixes a correctness bug in-i's TFO traversal caused by missing speculative alias dependencies.-D: Dynamic SRM Construction-Dreplaces per-round SRM rebuild with a persistent, CO-lesspCore. The core is append-only — new AND gates are added only on cache misses, and existing gates are never rewired. A literal cache maps(frame, host object)topCoreliterals and is invalidated per round by the TFO mask. Proof roots are solved directly on the resident Cbs manager without per-round view allocation or CO construction. Compaction cold-rebuilds the core when it grows beyond 4× the post-rebuild baseline.-I: Persistent Event-Driven Resimulation-Imaintains persistent simulation state across rounds and propagates only changes from new CEX lanes through an event queue, rather than sweeping the full unrolled AIG each round. A class-cone filter limits propagation scope. When the local event path is too wide, shape-incompatible, or coverage is incomplete, the implementation falls back to full resimulation, preserving correctness.-s: Skip Fail-Only ResimulationWhen the current round's CEX store contains only trivial SAT or fail/timeout entries with no real CEX patterns, resimulation is skipped. Trivial SAT entries are still handled by direct splitting, and fail entries are handled conservatively by
Gia_ManCheckRefinements.-iBug Fix: Alias DependencyThe old incremental TFO traversal followed only physical AIG fanout edges, missing implicit
representative → memberalias edges from speculative reduction. When a representative's literal changed due to class refinement, members referencing it and their fanout cones were incorrectly treated as unaffected. The fix adds adjacency from each representative to all class members, so TFO BFS covers the full speculative SRM dependency graph.Algorithm
-D: Persistent pCore with Speculative Literal Cache-I: Persistent Event-Driven Resimulation-s: CEX-Guided Resimulation GatePerformance
High-Impact Cases (scorr runtime > 1.0s)
&scorr(s)&scorr -i(s)Performance Verification
~95% of optimized cases pass the existing dsec equivalence check. The remaining ~5% of cases cannot complete dsec runs due to dsec limits. A dedicated self-check algorithm for the incremental path is under active development.
Acknowledge
The core strategy for this new implementation was guided by Alan Mishchenko.