Skip to content

And revise vivification 20260304#302

Merged
shnarazk merged 5 commits into
chrono-BT-20250512from
and-revise-vivification-20260304
Mar 6, 2026
Merged

And revise vivification 20260304#302
shnarazk merged 5 commits into
chrono-BT-20250512from
and-revise-vivification-20260304

Conversation

@shnarazk
Copy link
Copy Markdown
Owner

@shnarazk shnarazk commented Mar 4, 2026

  • replace rank_old which definition is unclear and DERIVE20 flag with a new usage counter used. It works!
  • refine vivification target. Clause reduction eliminates huge or unused clauses. Clause vivification refine small and used clauses. Much better complement flow.
# ~/.cargo/bin/splr (0.18.0-dev1) @ 2026-03-05T10:29:50
solver,       num,                       target,     time
"splr",         1,                 "UF250(100)",   39.794
"splr",         2,                "UUF250(100)",  113.452
"splr",         3,   "3SAT/360  S722433227-030",   70.413
"splr",         4,   "3SAT/360 S2032263657-035",    2.898
"splr",         5,   "3SAT/360  S368632549-051",   50.696
"splr",         6,   "3SAT/360 S1684547485-073",    0.732
"splr",         7,   "3SAT/360 S1711406314-093",    6.815
"splr",         8,   "3UNS/360 S1369720750-015",   61.612
"splr",         9,   "3UNS/360  S367138237-029",  147.674
"splr",        10,   "3UNS/360  S680239195-053",   84.519
"splr",        11,   "3UNS/360  S253750560-086",   65.771
"splr",        12,   "3UNS/360 S1028159446-096",   61.271
"splr",        13,   "[SAT] SR2015/m283,  3553",   21.691
"splr",        14,   "[SAT] SR2015/38b,    448",    0.835
"splr",        15,   "[SAT] SR2015/44b,    609",   41.234
"splr",        16,   "[SAT] SC21/b04_s_unknown",   13.831
"splr",        17,   "[SAT] SC21/quad_r21_m22 ",   87.598
"splr",        18,   "[SAT] SC21/toughsat_895s",  192.606
"splr",        19,   "[UNS] SC21/assoc_mult_e3",   63.016
"splr",        20,   "[UNS] SC21/dist4.c      ",  102.837
"splr",        21,   "[UNS] SC21/p01_lb_05    ",   10.898
"splr",        22,   "[UNS] SC21/shift1add    ",   30.355
med:    55.983, max:   192.606,           total: 1270.548
  • trail_saving on M1
# ~/.cargo/bin/splr (0.18.0-dev1) @ 2026-03-05T18:59:10
solver,       num,                       target,     time
"splr",         1,                 "UF250(100)",   64.622
"splr",         2,                "UUF250(100)",  220.107
"splr",         3,   "3SAT/360  S722433227-030",   70.066
"splr",         4,   "3SAT/360 S2032263657-035",    1.464
"splr",         5,   "3SAT/360  S368632549-051",  286.976
"splr",         6,   "3SAT/360 S1684547485-073",    2.403
"splr",         7,   "3SAT/360 S1711406314-093",    6.227
"splr",         8,   "3UNS/360 S1369720750-015",  183.173
"splr",         9,   "3UNS/360  S367138237-029",  457.535
"splr",        10,   "3UNS/360  S680239195-053",  258.873
"splr",        11,   "3UNS/360  S253750560-086",  205.395
"splr",        12,   "3UNS/360 S1028159446-096",  171.279
"splr",        13,   "[SAT] SR2015/m283,  3553",   44.417
"splr",        14,   "[SAT] SR2015/38b,    448",    2.492
"splr",        15,   "[SAT] SR2015/44b,    609",  277.326
"splr",        16,   "[SAT] SC21/b04_s_unknown",   73.779
"splr",        17,   "[SAT] SC21/quad_r21_m22 ",   22.336
"splr",        18,   "[SAT] SC21/toughsat_895s",  345.601
"splr",        19,   "[UNS] SC21/assoc_mult_e3",  330.987
"splr",        20,   "[UNS] SC21/dist4.c      ",  324.656
"splr",        21,   "[UNS] SC21/p01_lb_05    ",  134.439
"splr",        22,   "[UNS] SC21/shift1add    ",   55.247
med:   152.859, max:   457.535,           total: 3539.400
  • chrono_BT on M1
# ~/.cargo/bin/splr (0.18.0-dev1) @ 2026-03-05T20:37:08
solver,       num,                       target,     time
"splr",         1,                 "UF250(100)",   77.346
"splr",         2,                "UUF250(100)",  219.085
"splr",         3,   "3SAT/360  S722433227-030",  185.792
"splr",         4,   "3SAT/360 S2032263657-035",    7.197
"splr",         5,   "3SAT/360  S368632549-051",  131.657
"splr",         6,   "3SAT/360 S1684547485-073",    1.565
"splr",         7,   "3SAT/360 S1711406314-093",   17.102
"splr",         8,   "3UNS/360 S1369720750-015",  162.240
"splr",         9,   "3UNS/360  S367138237-029",  435.818
"splr",        10,   "3UNS/360  S680239195-053",  261.517
"splr",        11,   "3UNS/360  S253750560-086",  213.110
"splr",        12,   "3UNS/360 S1028159446-096",  195.080
"splr",        13,   "[SAT] SR2015/m283,  3553",   66.255
"splr",        14,   "[SAT] SR2015/38b,    448",    2.807
"splr",        15,   "[SAT] SR2015/44b,    609",  132.940
"splr",        16,   "[SAT] SC21/b04_s_unknown",   39.883
"splr",        17,   "[SAT] SC21/quad_r21_m22 ",  277.806
"splr",        18,   "[SAT] SC21/toughsat_895s",  495.750
"splr",        19,   "[UNS] SC21/assoc_mult_e3",  210.422
"splr",        20,   "[UNS] SC21/dist4.c      ",  304.820
"splr",        21,   "[UNS] SC21/p01_lb_05    ",   28.525
"splr",        22,   "[UNS] SC21/shift1add    ",   76.153
med:   147.590, max:   495.750,           total: 3542.870

2922d3c on M3

# ~/.cargo/bin/splr (0.18.0-dev1) @ 2026-03-05T21:17:45
solver,       num,                       target,     time
"splr",         1,                 "UF250(100)",   33.947
"splr",         2,                "UUF250(100)",  113.069
"splr",         3,   "3SAT/360  S722433227-030",   26.268
"splr",         4,   "3SAT/360 S2032263657-035",    0.627
"splr",         5,   "3SAT/360  S368632549-051",   95.506
"splr",         6,   "3SAT/360 S1684547485-073",    1.042
"splr",         7,   "3SAT/360 S1711406314-093",    2.504
"splr",         8,   "3UNS/360 S1369720750-015",   62.754
"splr",         9,   "3UNS/360  S367138237-029",  161.277
"splr",        10,   "3UNS/360  S680239195-053",   85.804
"splr",        11,   "3UNS/360  S253750560-086",   74.444
"splr",        12,   "3UNS/360 S1028159446-096",   65.291
"splr",        13,   "[SAT] SR2015/m283,  3553",   17.548
"splr",        14,   "[SAT] SR2015/38b,    448",    0.936
"splr",        15,   "[SAT] SR2015/44b,    609",   98.155
"splr",        16,   "[SAT] SC21/b04_s_unknown",   32.586
"splr",        17,   "[SAT] SC21/quad_r21_m22 ",    7.450
"splr",        18,   "[SAT] SC21/toughsat_895s",  124.940
"splr",        19,   "[UNS] SC21/assoc_mult_e3",  118.584
"splr",        20,   "[UNS] SC21/dist4.c      ",  114.585
"splr",        21,   "[UNS] SC21/p01_lb_05    ",   47.536
"splr",        22,   "[UNS] SC21/shift1add    ",   30.332
med:    55.145, max:   161.277,           total: 1315.185

@shnarazk shnarazk self-assigned this Mar 4, 2026
@shnarazk shnarazk changed the base branch from main to chrono-BT-20250512 March 4, 2026 19:26
@shnarazk shnarazk merged commit 7d479f5 into chrono-BT-20250512 Mar 6, 2026
1 check passed
shnarazk added a commit that referenced this pull request Mar 6, 2026
* Bump version to 0.18.0-dev0

* Remove feature 'incremental_solver'

* modified:   Cargo.toml

* Fix f64 ordering (401fa3c)

* Fix `Ord::cmp` for `OrderedProxy<T>` (see #277)

* Fix bugs in an unused function

* 20250202 refactor primitive types (#288)

* Bump version to 0.18.0-dev1
* Reorganize types/*

* modified:   Cargo.lock

* cargo cllipy: replace args().last() with args().next_back()

* Activate "chrono_BT"

* modified:   Cargo.toml

* Fix accesing level
-	modified:   src/assign/propagate.rs
-	modified:   src/assign/stack.rs
-	modified:   src/solver/conflict.rs

* Comment out debug_assert! calls

* Lower CBT threshold to force chrono backtracking

Change default c_cbt_thr from 100 to 4
Force chronobt to true when chrono_BT feature is enabled by removing
original conditional check

* WIP(debug) Simplify chrono_BT conflict handling with if let

* Add debug assertion for decision level consistency

* tiny changes

* Simplify assign_by_implication signature and logic

* Better message for assertion errors.

* Support BinaryLink in conflict resolution

Match on AssignReason to handle BinaryLink and Implication cases
separately. Introduce a `chbt` flag to track chrono_BT cancellation
logic and enhance debug assertions for the l0 assignment.

* Add debug logging for propagation and conflicts

* Simplify conflict logic

Comment out conflicting_level assignment and cancel_until call in handle_conflict,
using a direct assert for level equality. In conflict_analyze, filter out
assigned literals when inspecting clauses, simplify the validate_vi! invocation,
and clarify the panic println message.

* Allow dead code for is_empty and ignore cid

* Compute conflicting_level from correct literal

Remove redundant conflicting_level reset and adjust its assignment in
BinaryLink and Implication to use the higher decision level.
Comment out stale debug asserts in conflict_analyze, add doc comments
for macros, and simplify literal mapping by dropping unused fields.

* Correct spelling errors in comments

* Apply implication logic in BinaryLink case

Comment out the assert_eq! comparing decision levels and add a note
to align with the Implication case logic

* cargo clippy (1.87)

* WIP: (conflict_analyze)
handle cases on biclause.
Add debug logs and ANSI color constants

* Push negated literal for chrono-BT

Ensure that during conflict analysis for chronological
backtracking, the negated literal (!l) is pushed to the learnt clause rather than l

* Disable hardcoded debug prints and add debug panic

Clear magic var-index filters to suppress conditional debug
prints in propagation. Comment out leftover printlns in
handle_conflict and add panic with debug output on unexpected
assignment.

* Remove commented code in conflict handler

* Inline chrono_BT checks and remove chronobt

Remove chronobt definitions and the assert in handle_conflict,
using compile-time cfg!(feature = "chrono_BT") checks instead.

* Simplify cancel_until logic and remove chbt

Inline conditional in cancel_until call to choose the rollback
level and remove the chbt flag and its associated debug assertion.

* Inline cancel_until logic and remove chbt flag

* Track and report chronological backtrack rate

* Raise CBT threshold and use exp backtrack check

* Add chronological backtrack percentage to status

Replace the exploration rate metric with chronological backtrack
percentage (cbt%) in the status output.
Compute cbt% as 100 * num_chrono_bt / num_conflicts and add a new
LogF64Id::ChronologicalBacktrackPercentage variant.

* Use tb_lits_ema to control chrono backtracking

Add a tb_lits_ema field to State and initialize it in Default. In
handle_conflict compute num_bt_lits as the difference in assigned
literals, update the EMA, and replace the old chrono_BT threshold
check with a condition comparing num_bt_lits against 3×tb_lits_ema.

* Use a new counter for STM stage checks

Compute stage_counter as the difference between total learnt and
chronological backtracks, and use it for stage_ended and
prepare_new_stage calls to ensure correct stage management.

* (Exp) Refine conflict backtracking and stage counter

Import cdb and compute cfl_lvl_lits via asg.stack_len(). Update
chrono_BT backtracking to use CDB entanglement EMA and c_lvl, and
enforce assign_level+8 < conflicting_level. Simplify stage_counter by
removing subtraction of num_chrono_bt.

* parameter tuning

* cargo clippy

* Add Zed debug task for building and running splr

* add an alternative chronoBT threshold as comment

* clean up debug code

* chore: add `.cargo` to .gitignore

* a new implementation of chronoBT threshold

* optimize (chronoBT): set threshold to 1.6

* optimize (chronoBT): set threshold to 1.65

* optimize(chronoBT): set to 1.6 back

* chore: cargo update

* feat(chronoBT): revise implementation

* a snapshot

* feat(chronoBT): implement valid propgation after (current - 1) jump and implement (assign - 1) jump

* chore(trail_saving): fix compile errors

* chore: cargo clippy

* optimize(chrono_BT): tune bt_drift condition

* ditto

* ditto

* optimize(chronoBT): use the number of vars instead of the level gap

* optimize(chronoBT): got 1270.409

* optimize(bt_drift): use code in bt-drift-20260301

* optimize(chronoBT): remove idling time

* fix: cargo test

* And revise vivification 20260304 (#302)

* exp: use vivification to reduce redundant *small* clauses
* feat(clause): substitute rank_old and DERIVE20 with a counter
* fix(trail_saving): give a valid livel to assign_by_implication
* refactor(BT_drift): add as feature
* chore: use trail_saving feature
shnarazk added a commit that referenced this pull request Mar 14, 2026
* Chrono_BT 2025 (#296)
* Remove feature 'incremental_solver'
* Fix f64 ordering (401fa3c)
* Fix `Ord::cmp` for `OrderedProxy<T>` (see #277)
* 20250202 refactor primitive types (#288)
* Simplify assign_by_implication signature and logic
* Support BinaryLink in conflict resolution
* Push negated literal for chrono-BT
* Inline cancel_until logic and remove chbt flag
* Use tb_lits_ema to control chrono backtracking
* Use a new counter for STM stage checks
* Add Zed debug task for building and running splr
* feat(chronoBT): implement valid propgation after (current - 1) jump and implement (assign - 1) jump
* And revise vivification 20260304 (#302)
* feat(clause): substitute rank_old and DERIVE20 with a counter
* fix(trail_saving): give a valid level to assign_by_implication
* chore: switch to edition 2024; cargo check
* feat(log): remove Glucose-style log option
* feat(debug): add ClauseDBIF::clause_heatmap
* Rename feature `BT_drift` to `BT_deepen`
* feat(UI): Show bt_drift rate instead of chrono_BT rate
* feat(UI): better coloring for changes of float values
* feat(cdb_heatmap): add option `--hide-heatmap`; merge it into `progress`
* feat(UI): replace `--hide-heatmap` with `--heatmap`
* chore: clean up based on AI previews; add option `--rst-lbd-thr`
* fix(CLI): emit an error if '--long-option=value' style is used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant