Repository navigation
pdr2: justification-frontier (jftr) search in GipSAT - #617
Merged
Merged
Conversation
Add an optional search mode (gipJftr.c). Its decisions are backward justification from the assumptions on the CNF of the circuit, and a solve may answer SAT early with a partial assignment plus a register completion. On request a justification walk selects the leaves that imply the assumptions, and a shrink keeps only those assigned. A solver created with a positive PDR2_JFTR_CONFS has the mode. A solve uses it when requested with Gip_SolverSetJftr() and continues as the ordinary search after that many conflicts. A request is ignored for a solver or a context the mode is not defined for. PDR2_JFTR_CHECK checks every early answer. Nothing changes when the option is unset; no caller requests the mode yet.
Request the mode for the bad-state, blocking, generalization, push, propagation and infinity queries, with the justification walk wherever the model may become a predecessor. Consumers that need a state read the register completion of an early answer. The ordinary query functions keep their signatures; the requesting call sites use Pdr2_ManSolveRelativeJftr() and Pdr2_ManTryDropJftr(). PDR2_JFTR_SCOPE selects the query kinds (default: all), and manager configurations the mode does not support use the ordinary search. The budget can also be given as "pdr2 --set JFTR_CONFS=<n>". Nothing changes when the budget is unset or zero.
Give eligible GipSAT queries eight JFTR conflicts in the tuned structural schedule (-B 4). Plans opening with abstraction or dynamic abstraction use ordinary search throughout. This opening rule is a development-set heuristic. Direct -B 2 still requires an explicit budget. Use -O N to override the JFTR budget for one command (0 disables it). Use repeatable -O NAME=value in place of --set for advanced settings. Bare -O retains the existing obligation toggle. Credit Wei-Hsu (Wish) Chen in the command help for contributing justification-frontier search. Reuse the lemma cover across ordinary handovers and detect unsupported clause layouts once per context. Count fallbacks, rebuilds, early-SAT checks and check failures. Keep policy option storage within bounds. With frozen 900-second runs, the ordinary/selective/always-on solve counts on the development sets were 394/385/377 of 411 on pdrsolves and 281/299/299 of 315 on pdrhards. The selective counts there were reconstructed from the measured arms. On the HWMCC24 holdout the counts were 159/165/166 of 267. On the 111 abstraction-opening case/seed pairs they were 59/59/60. The holdout supports the feature but does not distinguish the opening rule in its favor.
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.
pdr2: justification-frontier (jftr) search in GipSAT
This PR adds an opt-in search mode to GipSAT, the justification-frontier
(jftr) mode, and lets pdr2 use it for its SAT queries. It is off by default.
pdr2 --set JFTR_CONFS=<n>(or the variablePDR2_JFTR_CONFS=<n>for thedirect schedules
-B 0..2) enables it with a budget of<n>conflicts persolve.
Why. Many SAT queries of PDR are easy and satisfiable. In a profile of
the PDR engine alone with the mode off (pdrsolves137, seed 0, the cases
both variants solve, previous base), 86-94% of the generalization and
infinity-frame queries are satisfiable, with 0.6-2.3 conflicts on average.
The ordinary search still completes the assignment over the query domain
before it answers SAT. For such queries a search that stops as soon as the
assumptions are justified is enough; in that profile the mode reduced the
propagations per query, over all queries, from 1241 to 705.
How. In the mode the decisions are backward justification from the
assumptions. A solve answers SAT as soon as the assigned nodes are
justified, the lemma clauses are covered and the round constraints hold; the
partial answer stands for one completed register state. Conflicts are
analysed and learnt as usual, and after
<n>conflicts the solve continuesas the ordinary GipSAT search. For predecessors, a justification walk
selects the leaves that imply the target. The variable
PDR2_JFTR_SCOPE(bit mask, default all kinds; read by the direct schedules) selects the
query kinds. Solver configurations the mode does not support (structural
CNF encodings, variable elimination, unused-input compaction, CNF
justification, lifting memo, initial-state predicates, shared solvers) use
the ordinary search.
Results. Base: upstream
be1101681, unmodified. jftr: this PR, the same command plus--set JFTR_CONFS=8; every other option at its default. 300 s and 40 GB per run.-B 2(default of the previous base08e513034)-B 4(current default)-B 4(current default)geometric mean. Below 1 means jftr is faster.
-B 2: the direct schedule, three PDR runs in alternation, the same for every circuit. It is the defaultschedule of the previous base, upstream
08e513034; here it is run onbe1101681with an explicit-B 2.-B 4: the current default sincebe1101681, the tuned structural schedule. It chooses a sequence of stagesfor each circuit from its features; a stage is one engine (BMC, BDD, induction, or a PDR variant) with its own
options and time budget.
foldwith constraints;logic; undc; strash; foldwith constraints and uninitialized latches); one job perperformance core, pinned; pdr2's own solve time.
-B 4uses its tuned schedule only for circuits whose initialvalues are all 0; on the other 111 cases (no constraints, latches starting at 1 or uninitialized) it runs the
direct schedule, as
-B 2does.Analysis.
Previous default (
-B 2, upstream08e513034). On pdrsolves137 jftr solves 16 more runs (286 against 270) and the runs botharms solve take about half the time (geo-mean 0.54).
Current default (
-B 4) on pdrsolves137. jftr is still faster on the common runs (geo-mean 0.79), but it solves14 fewer runs (373 against 387).
Where jftr acts under
-B 4. jftr only changes PDR's SAT queries. 152 of the 411 base runs end in a stagewhere jftr does not run: a non-PDR engine (BMC, BDD reachability, induction; 102 runs), or a PDR stage whose
options conflict with jftr (50 runs): CNF justification (
input-search), variable elimination(
elimination), or an initial-state constraint on the register inputs (reverse). There jftr is requestedbut not applicable, and pdr2 uses the ordinary search. In these 152 runs both arms solve the same runs, with
time ratios near 1 (geo-mean 0.97 and 1.00); pdr2 is deterministic, and both arms print the same search statistics
in all but 6 of them (where an earlier stage of the run used jftr). This is why the overall geo-mean is closer to 1
under
-B 4than under-B 2. All of the difference lies in the other 259 runs, where jftr is applicable:221 against 235 solved (+6 / −20), geo-mean 0.72.
HWMCC25 under
-B 4. The solved counts differ by one case (232 against 233, +3 / −4), and the common runsare faster (geo-mean 0.84). Split the same way: 60 cases end where jftr does not run (39 non-PDR, 21 not
applicable) and are identical in both arms; in the 159 jftr-applicable cases of the tuned schedule jftr solves
102 against 102 (geo-mean 0.74); in the 111 cases on the direct schedule it solves 70 against 71 (geo-mean 0.86). The loss
of solved runs seen on pdrsolves137 under
-B 4does not recur on HWMCC25.Summary. jftr makes the commonly solved runs faster in every setting: geo-mean 0.54 (pdrsolves137,
-B 2), 0.79 (pdrsolves137,-B 4) and 0.84 (HWMCC25,-B 4). Under the previous default (-B 2, upstream08e513034) it also solves more runs on pdrsolves137 (+16). Under the latest default (-B 4) it solves fewerruns on pdrsolves137 (−14), while on HWMCC25 it solves about the same number (232 against 233).