New feature: Add incremental refinement to &scorr command#506
Open
zxxr1113 wants to merge 1 commit intoberkeley-abc:masterfrom
Open
New feature: Add incremental refinement to &scorr command#506zxxr1113 wants to merge 1 commit intoberkeley-abc:masterfrom
zxxr1113 wants to merge 1 commit intoberkeley-abc:masterfrom
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.
Summary
Adds an
-iswitch to the&scorrcommand that turns on incrementalrefinement of the speculative-reduction miter (SRM): instead of rebuilding
the full SRM and re-proving every candidate pair on each iteration, the new
mode reuses UNSAT proofs from previous iterations and re-proves only those
pairs whose SRM cone overlaps the transitive fanout (TFO) of a node whose
class representative changed since the last snapshot.
The default behaviour of
&scorris unchanged; users opt in with-i.Algorithm
On each refinement iteration, the incremental manager:
pReprsandpNextsafter every SRM construction.changed; performs a forward-TFO BFS across
nFramesunrollings (RIfanouts cross frames via
Gia_ObjRiToRo) to mark every candidate nodereachable from a seed.
(
Gia_ManCorrSpecReduce_Active/Gia_ManCorrSpecReduceInit_Active)that emits a candidate PO
(a, b)only whenpTfoMark[a] || pTfoMark[b].tail → head closing edge) and forces them to be emitted even when neither
endpoint is in the TFO — this preserves soundness when only
pNextschanges between iterations.
active_pairs / total_pairs > 70%,the ratio at which the active-filter overhead exceeds the work it saves.
The same active-list filter is also wired into the BMC pre-refinement
loop (
Cec_ManLSCorrespondenceBmc); the BMC SRM is non-ring so only thepReprs-based filter is used there.Usage
abc 01> &r design.aig; &scorr -i
abc 01> &r design.aig; &scorr -i -v # print Incr time / fallback stats
abc 01> &r design.aig; &scorr -i -r # ring mode + incremental
-iis compatible with-c(CBS solver),-r(ring classes),Files changed
src/base/abci/abc.c-iflag; add usage line and contributor note.src/proof/cec/cec.hCec_ParCor_t::fIncrementalfield.src/proof/cec/cecInt.hCec_IncrMgr_tstruct + 11 extern declarations.src/proof/cec/cecCorr.csrc/proof/cec/cecCorrIncr.c_ActiveSRM builders.src/proof/cec/module.makePerformance
Tested on the public HWMCC‘25 benchmark set
(N cases, end-to-end
&r file; &scorr [-i]; &ps):&scorr&scorr -iAcross the full set, the average speedup is 1.5x, and the max speedup is 7x.
Soundness notes
One main correctness concerns identified and handled during development:
pReprs-only seed set misses rewiredring edges whose endpoints' representatives did not change. Detected
on
level_16.aig. Fixed by also snapshottingpNextsand adding theexplicit/closing edge check in
Cec_IncrMgrRingEdgeChanged.Acknowledgments
The core strategy for this incremental refinement, specifically the concept of only rechecking the nodes that is in the TFO of seeds to prune the speculative-reduction miter, was proposed by Alan Mishchenko.