Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
644a0a8
chore: open PR
shnarazk Mar 14, 2026
266408b
feat(Luby): implement LubySequence
shnarazk Mar 14, 2026
6939364
fix: bump version to 0.19.0-rc1
shnarazk Mar 14, 2026
89e5afe
fix: add `LubySegment::as_n`
shnarazk Mar 14, 2026
9e2481d
refactor(luby): update stage and search (WIP)
shnarazk Mar 14, 2026
24bf7ac
feat(search): revise the search engine based on the new Luby iterator
shnarazk Mar 16, 2026
6a5e21b
Restart NG 20260317 (#308)
shnarazk Mar 17, 2026
773f324
refactor(luby): remove the old Luby implementation
shnarazk Mar 17, 2026
04f0542
bump version to 0.19.0-rc2
shnarazk Mar 18, 2026
7fe2ce0
chore(flake): add drat-trim
shnarazk Mar 19, 2026
b2035c8
chore(flake): add kissat
shnarazk Mar 19, 2026
a778070
chore: update flake.lock
shnarazk Mar 19, 2026
3b3adda
chore: ignore `*.cnf*`
shnarazk Mar 19, 2026
2aa4ee9
chore(direnv): add .envrc
shnarazk Mar 19, 2026
c50f100
chore: add `proof.drat` to .gitignore
shnarazk Mar 19, 2026
9c19858
refactor: simplify RuductionType
shnarazk Mar 19, 2026
e08063d
refactor: define local vars
shnarazk Mar 19, 2026
6418663
doc: wording
shnarazk Mar 20, 2026
ca81944
optimize(reduce): add a variation as comment
shnarazk Mar 20, 2026
4d83d4a
refactor: remove feature 'two_mode_reduction'
shnarazk Mar 20, 2026
71c4973
refactor: remove `ReductionType`
shnarazk Mar 20, 2026
1207b8f
docs: mention `BT_deepen` at features
shnarazk Mar 20, 2026
20564d2
refactor: rename `reverse_activity_sum` to `inactivity_sum`
shnarazk Mar 20, 2026
43aab98
fix(trail_saving): clear saved_trail if an implication clause is reduced
shnarazk Mar 20, 2026
3323fd9
chore: delete obsolete comment
shnarazk Mar 20, 2026
bb830aa
refactor(search): fix compilation error; changes on lbd calculation
shnarazk Mar 21, 2026
e5893f3
refactor(search, cdb.ema, state): reduce complexity, simplify, more r…
shnarazk Mar 21, 2026
ee14429
refactor: remove feature 'dynamic_restart_threshold'
shnarazk Mar 21, 2026
a7c54c7
refactor: remove feature 'reward_annealing
shnarazk Mar 21, 2026
bea24fa
refactor: remove `FlagClause::USED` and feature 'just_used'
shnarazk Mar 21, 2026
3233692
refactor: remove feature 'maintain_watch_cache'
shnarazk Mar 21, 2026
ad170bd
Remove boundary_check and EVSIDS features
shnarazk Mar 21, 2026
6beb6fd
chore(feature): remove 'bi_clause_completion'; rename 'debug_propagat…
shnarazk Mar 21, 2026
5c76a45
refactor: remove feature 'assign_rate' and 'support_user_assumption'
shnarazk Mar 21, 2026
f95cfc2
refactor: remove feature 'suppress_reason_chain'
shnarazk Mar 21, 2026
2ac6aff
feat(search): WIP: big changes for real problems
shnarazk Mar 22, 2026
65a6a95
exp: change reduce + no rephase + maintain cdb.lbd
shnarazk Mar 23, 2026
359eb69
exp: +rephase
shnarazk Mar 23, 2026
17a2188
exp: ~rephase +extend Clause.used only for propagation
shnarazk Mar 23, 2026
f6082d9
exp: mut cooling_length, reduce based on inactivity_sum
shnarazk Mar 24, 2026
78b9579
exp: !lbd updste, very short cooling, constant restart threshod
shnarazk Mar 24, 2026
0dd81ba
exp: slow ldb for the threshold
shnarazk Mar 25, 2026
9aece1b
chore: update flake.lock
shnarazk Mar 29, 2026
172f8fd
feat(focused-mode): plumbing
shnarazk Mar 29, 2026
083f62c
chore: update flake.lock
shnarazk Mar 29, 2026
7e95868
chore: snapshot
shnarazk Mar 30, 2026
08949f3
exp: quad plane model
shnarazk Mar 31, 2026
a488fba
exp: a good snapshot
shnarazk Mar 31, 2026
b7a404b
chore: clean up
shnarazk Mar 31, 2026
97cb999
chore(refactor): remove `State.restart`
shnarazk Mar 31, 2026
e53773c
chore(refactor): add State.search_mode_ratio`
shnarazk Mar 31, 2026
03df408
bump version to 0.19.0-rc3: hotspot-seeker
shnarazk Mar 31, 2026
5729eab
chore(refactor): remove src/solver/restart.rs
shnarazk Mar 31, 2026
8a47121
docs(Changelog): add entries
shnarazk Mar 31, 2026
f2097ee
refactor: rename 'var decay rate' to 'var learning rate'
shnarazk Mar 31, 2026
7b4ff02
refactor: rename 'var decay rate' to 'var learning rate'
shnarazk Mar 31, 2026
7b7d53f
feat(progress): show stats on conflict distances in `progress`
shnarazk Apr 1, 2026
fe88c98
refactor: rename 'activity_diffusion' to 'conflict_distance_average' …
shnarazk Apr 1, 2026
d759748
fix(progress): tiny changes
shnarazk Apr 1, 2026
9825e88
ditto
shnarazk Apr 1, 2026
c04d03c
exp: search mode transitions
shnarazk Apr 1, 2026
8c8a45b
feat(conflict_distance): use two EMAs to detect plateaus
shnarazk Apr 1, 2026
450b47e
exp: mode switch thresholds
shnarazk Apr 1, 2026
07769e8
exp: stable condition; rename method
shnarazk Apr 2, 2026
e245c9d
exp: stable condition again
shnarazk Apr 2, 2026
887706d
fix(conflict_distance): fix the values of conflicting literals
shnarazk Apr 2, 2026
5d79f6a
exp: stable condition
shnarazk Apr 2, 2026
a33b7bf
feat(conflict_distance): evaluate only conflicting literals
shnarazk Apr 2, 2026
7c2d7d1
chore(refactor): rename 'conflict distance' to 'conflict interval'
shnarazk Apr 2, 2026
a8cb8b4
exp: longer tail for focused mode
shnarazk Apr 2, 2026
affdd97
feat(focused-mode): use both plateaus
shnarazk Apr 3, 2026
d678328
feat(focused-mode): relax thresholds
shnarazk Apr 3, 2026
89d7d44
refactor: revise search mode names
shnarazk Apr 3, 2026
c5b5f91
docs: use typst
shnarazk Apr 3, 2026
e52c1bf
chore(direnv): clean up
shnarazk Apr 3, 2026
36ff02c
optimize(conflict-frequency): longer EMAs, wider focus, apply log2 to…
shnarazk Apr 4, 2026
0cc096a
chore: update flake.lock
shnarazk Apr 4, 2026
e873141
exp(conflict_interval): use log2
shnarazk Apr 4, 2026
9966090
fix(trail_saving): fix another broken path emmited by BT_deepen
shnarazk Apr 5, 2026
7cc714d
chore: update flake
shnarazk Apr 24, 2026
a0dc3ac
chore: update depedabot settings
shnarazk Apr 24, 2026
6b0e836
refactor: nemane decay and anti_decay to stay_rate and learning_rate
shnarazk Apr 24, 2026
b911b5c
refactor: swicth EmaView and Ema to Default initialization
shnarazk Apr 24, 2026
6c5c8d0
refactor: swicth other EMAs to Default initialization
shnarazk Apr 24, 2026
0ad442a
feat (restart): restart in focus mode
shnarazk Apr 24, 2026
41ca444
feat: implement AssignIF::literal_block_distance
shnarazk Apr 28, 2026
7fe094c
chore: remove `ClauseDB::new_clause_sandbox
shnarazk Apr 28, 2026
8135c8e
chore: handle_conflict returns DecisionLevel
shnarazk Apr 28, 2026
0719396
chore: handle_conflict returns ClauseId
shnarazk Apr 28, 2026
a6cd5a8
feat: remove Clause::rank
shnarazk Apr 29, 2026
0a702e5
feat: remove ProgressLBD
shnarazk Apr 29, 2026
7219441
chore: version 0.19.0-rc4; update flake and cargo
shnarazk Apr 29, 2026
c59148b
refactor: learning_rate.rs
shnarazk Apr 29, 2026
74ccc5b
fix: bus error introduced by 0719396
shnarazk Apr 29, 2026
3d71130
feat: implement VarActivityScheme
shnarazk Apr 29, 2026
4ab27be
fix: handle lbd of learnt clause correctly
shnarazk Apr 29, 2026
7ba37c3
refactor: lbd calculation is moved out of new_clause
shnarazk Apr 29, 2026
6850c56
exp: switch to no cooling restart
shnarazk Apr 29, 2026
bcd82d1
chore: fix a typo and refactor
shnarazk Apr 29, 2026
cfa21a8
feat(vivify): count literals instead of clauses
shnarazk Apr 30, 2026
15c06d7
feat(ema): add Ema::set_to
shnarazk Apr 30, 2026
c9a00b8
feat: use very short EMA
shnarazk May 1, 2026
01db7f1
fix: fix calculation of restart condition
shnarazk May 1, 2026
03bfe6b
feat(rephase): activate
shnarazk May 1, 2026
da16d5b
refactor: simplify select.rs
shnarazk May 1, 2026
35cc89c
feat(rephase): add methods set
shnarazk May 1, 2026
de3e3fd
feat(rephase): implement Kissat-like rephase mechanism
shnarazk May 2, 2026
3dfa156
feat: introduce Kissat-like phase-rotation combined with var activity…
shnarazk May 4, 2026
4f1cd87
feat(phase-rotation): a snapshot
shnarazk May 6, 2026
5153e09
feat: prettey good fundamentals
shnarazk May 6, 2026
3494b60
feat: just Luby restarts
shnarazk May 7, 2026
254776a
chore: bump to 0.19.0-dev5
shnarazk May 7, 2026
76ba255
chore: update flake
shnarazk May 7, 2026
66d3884
chore: remove unused field and method
shnarazk May 7, 2026
c8a7b9a
feat(tuning): tiny changes
shnarazk May 7, 2026
ab802e4
chore(docs): update ChangeLog.md
shnarazk May 7, 2026
d1784a2
chore: use unicode symbols for PhaseRotation mnemonic
shnarazk May 9, 2026
ed321bb
feat: remove feature `clause_rewarding` and add `FlagClause::PROPAGA…
shnarazk May 9, 2026
70db29d
feat(clause_rewarding): implement acurate clause activation counter
shnarazk May 9, 2026
a51df64
feat: probably in the right direction to reduce much like kissat
shnarazk May 14, 2026
f43dfd5
exp: tuning
shnarazk May 14, 2026
8a74ab3
feat(vivify): revise for fewer clauses
shnarazk May 15, 2026
bfa4844
exp: a snapshot
shnarazk May 15, 2026
548e6be
ditto
shnarazk May 15, 2026
e36d8c9
chore: revise documents
shnarazk May 15, 2026
16066c9
refactor: rename `OrderedProxy` to `SortKey`
shnarazk May 15, 2026
ea77632
feat(vivification): simplify
shnarazk May 15, 2026
8ba2365
feat(reduction): redefine `FlagClause::YOUNG`
shnarazk May 17, 2026
013a024
feat(vivify): skip young clauses
shnarazk May 18, 2026
2953a81
feat: quick rotation of rephase, set learning rate based on Luby span
shnarazk May 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# shellcheck shell=bash
source $HOME/.config/direnv/envrc
use flake
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
interval: "weekly"
- package-ecosystem: "nix" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
# These are backup files generated by rustfmt
**/*.rs.bk

*.cnf
*.cnf*
.ans_*
.vscode
*.ipynb
/result
.cargo
proof.drat
68 changes: 53 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 10 additions & 37 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "splr"
version = "0.18.0"
version = "0.19.0-rc5"
authors = ["Narazaki Shuji <shujinarazaki@protonmail.com>"]
description = "A modern CDCL SAT solver in Rust"
edition = "2024"
Expand All @@ -11,7 +11,7 @@ homepage = "https://github.com/shnarazk/splr"
keywords = ["SAT", "SAT-solver", "logic", "satisfiability"]
categories = ["science", "mathematics"]
default-run = "splr"
rust-version = "1.94"
rust-version = "1.95"

[dependencies]
bitflags = "^2.8"
Expand All @@ -23,67 +23,40 @@ default = [
"unsafe_access",
# "chrono_BT",
"trail_saving",
"BT_deepen",
# "BT_deepen",

### Heuristics
# "bi_clause_completion",
# "clause_rewarding",
"dynamic_restart_threshold",
"LRB_rewarding",
"reason_side_rewarding",
"rephase",
"reward_annealing",
# "stochastic_local_search",
# "suppress_reason_chain",
"two_mode_reduction",

### Logic formula processor
"clause_elimination",
"clause_vivification",

### For DEBUG
# "boundary_check",
# "maintain_watch_cache",

### platform dependency
# "platform_wasm"
]
assign_rate = [] # for debug and study
best_phases_tracking = [] # save the best-so-far assignment, used by 'rephase'
bi_clause_completion = [] # this will increase memory pressure
boundary_check = [] # for debug

BT_deepen = [] # backtrack drift
chrono_BT = [] # NOT WORK
clause_elimination = [] # pre(in)-processor setting
clause_rewarding = [] # clauses have activities w/ decay rate
clause_vivification = [] # pre(in)-processor setting
debug_propagation = [] # for debug
dynamic_restart_threshold = [] # control restart spans like Glucose
EMA_calibration = [] # each exponential moving average has a calbration value
EVSIDS = [] # Exponential Variable State Independent Decaying Sum
just_used = [] # Var and clause have 'just_used' flags
LRB_rewarding = [] # Learning Rate Based rewarding, a new var activity criteria
maintain_watch_cache = [] # for DEBUG
no_IO = [] # to embed Splr into non-std environments
platform_wasm = [
"instant", # use instant::Duration instead of std::time::Duration
]
reason_side_rewarding = [] # an idea used in Learning-rate based rewarding
rephase = [ # search around the best-so-far candidate repeatedly
"best_phases_tracking",
]
reward_annealing = [] # use bigger and smaller decay rates cycliclly
stochastic_local_search = [ # since 0.17
# "reward_annealing",
"rephase",
]
support_user_assumption = [] # NOT WORK (defined in Glucose)
suppress_reason_chain = [] # make direct links between a dicision var and its implications
rephase = [] # search around the best-so-far candidate repeatedly
# stochastic_local_search = [ # since 0.17
# "rephase",
# ]

trace_analysis = [] # for debug
trace_elimination = [] # for debug
trace_equivalency = [] # for debug
trace_propagation = [] # for debug
trail_saving = [] # reduce propagation cost by reusing propagation chain
two_mode_reduction = [] # exploration mode and exploitation mode since 0.17
unsafe_access = [] # access elements of vectors without boundary checking

[profile.release]
Expand Down
25 changes: 25 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
## 0.19.0, 2026-0X-XX

- Adopt decision literal select heuristics:
- *Variable Move To queue First*
- *LearningRate-Based Rewarding*
- Adopt rephasing modes: Walk, Best, False(Original), True(Inverted), Random, Flipped
- Revise `ClauseDB::reduce` to remove much more clauses
- Switch to the O(1) Luby iterator. Now Luby sequence is used for
- trigger for restarts, clause elimination, and clause vivification
- clause DB size after clause reduction
- `ClauseDBIF::reduce` can run at any decision level, and runs every 40,000 conflicts
- Remove feature 'assign_rate'
- Remove feature 'bi_clause_completion'
- Remove feature 'boundary_check'
- Remove feature 'dynamic_restart_threshold'
- Remove feature 'EVSIDS'
- Remove feature 'just_used'
- Remove feature 'maintain_watch_cache'
- Remove feature 'reward_annealing'
- Remove feature 'suppress_reason_chain'
- Remove feature 'trace_equivalency'
- Remove feature 'two_mode_reduction'
- rename feature 'debug_propagation' to 'trace_propagation'
- Remove src/solver/restart.rs

## 0.18.0, 2026-03-14

This would be no better than the previous implementations.
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
## A modern SAT Solver for Propositional Logic in Rust

Splr is a modern SAT solver in [Rust](https://www.rust-lang.org), based on [Glucose 4.1](https://www.labri.fr/perso/lsimon/glucose/).
Splr is a modern SAT solver in [Rust](https://www.rust-lang.org), based on [Glucose 4.1](https://www.labri.fr/perso/lsimon/glucose/), inspired by [Kissat](https://github.com/arminbiere/kissat).
It adopts, or adopted, various research results on modern SAT solvers:

- _CDCL_, _watch literals_, _LBD_ and so on from Glucose, [Minisat](http://minisat.se) and the ancestors
- Luby series based restart control
- _CDCL_, _watch literals_, _LBD_ and so on from Kissat, Glucose, [Minisat](http://minisat.se) and the ancestors
- Luby series based restart control. The current implementation has $O(1)$ time complexity and $O(1)$ space complexity.
- Glucose-like _dynamic blocking/forcing restarts_
- pre/in-processor to simplify the given CNF
- branching variable selection based on _Learning Rate Based Branching_ with _Reason Side Rewarding_ or EVSIDS
- [CaDiCaL](https://github.com/arminbiere/cadical)-like extended phase saving
- _restart stabilization_ inspired by CadiCaL
- branching variable selections based on _Learning Rate Based Branching_ with _Reason Side Rewarding_ or EVSIDS and _Variable Move To the quest First_, VMTF
- Kissat-like various rephasing scheme rotation
- _clause vivification_
- _trail saving_

Expand Down
Loading