Papers
Topics
Authors
Recent
Search
2000 character limit reached

StalmarckSAT: Modern Stålmarck SAT Solver

Updated 12 July 2026
  • StalmarckSAT is a Rust-based SAT solver employing the Stålmarck Procedure with normalized implication triplets for CNF formulas.
  • It utilizes seven simple deduction rules combined with a complete dilemma branching rule, offering an alternative to conventional CDCL methods.
  • Heuristics like Cardinality Driven Branching and Deductive Priority Ordering enhance variable selection and propagation to improve solver performance.

StalmarckSAT is a modern Rust re-implementation of the classical Stålmarck Procedure for SAT solving, presented as an open, research-oriented platform together with two heuristics, Cardinality Driven Branching (CDB) and Deductive Priority Ordering (DPO). It targets CNF formulas, but it does so through a Stålmarck-style proof architecture built around normalized implication form, implication triplets, local deduction rules, and branch-and-deduce reasoning via the dilemma rule, rather than through clause learning, conflict analysis, watched literals, and restarts in the usual CDCL sense (Leonov et al., 19 Sep 2025).

1. Historical and methodological position

The motivation for StalmarckSAT is the relative neglect of the Stålmarck Procedure within modern SAT implementation work. The procedure has long been known as a distinctive propositional proof method with reported strength on certain industrial verification tasks, yet it has seen little implementation and optimization work compared with mainstream SAT methods, especially CDCL. StalmarckSAT is therefore positioned not as an industrial-strength solver, but as a vehicle for reviving research on this proof style.

The underlying historical claim emphasized in the work is that the Stålmarck Procedure was said to be more sensitive to problem difficulty than to problem size. The authors interpret this as a reason the method may still be valuable on classes of instances for which standard CDCL behavior is not ideal. This suggests a methodological niche rather than a direct attempt to supplant clause-learning solvers across the board.

Implementation-wise, the solver is written in Rust, is open source on GitHub, supports the baseline Stålmarck Procedure plus the two new heuristics, and is explicitly acknowledged as not yet competitive with modern SAT solvers. Its significance is therefore primarily architectural and experimental: it provides a contemporary codebase for studying a proof procedure that differs substantially from the dominant CDCL lineage (Leonov et al., 19 Sep 2025).

Recent SAT work has explored different directions, including proof-producing symmetry breaking for CDCL via unit-only preprocessing (Anders et al., 23 Jan 2026) and symmetry-constrained Boolean encodings for algebraic search using Z3 (Yang, 2024). StalmarckSAT occupies a different position in this landscape: it is not a preprocessing layer for CDCL and not merely a SAT encoding for an external domain, but a solver architecture centered on implication triplets and the dilemma rule.

2. Normalization into implication triplets

The procedure operates on formulas converted into a normalized implication form. The rewrite rules are stated to run in linear time:

  1. AB¬ABA \lor B \Rightarrow \neg A \rightarrow B
  2. AB¬(A¬B)A \land B \Rightarrow \neg (A \rightarrow \neg B)
  3. ¬¬AA\neg \neg A \Rightarrow A
  4. ¬AAFalse\neg A \Rightarrow A \rightarrow \text{False}

After normalization, formulas are encoded as implication triplets, where a formula

xyzx \leftrightarrow y \rightarrow z

is represented as the tuple (x,y,z)(x,y,z). The triplet representation is the core internal object of the solver.

Intermediate bridge variables are introduced to represent subexpressions. The example given is that the formula

(p¬q)r(p \land \neg q) \lor r

may be stored as

{(b1,q,r),(b2,p,b1)}.\{(b_1,q,r),(b_2,p,b_1)\}.

This encoding makes the distinction between original variables and bridge variables operationally relevant, because later heuristics treat these two classes differently.

The paper gives limited engineering detail beyond this representation. It does not describe exact parsing infrastructure or input syntax, does not mention DIMACS explicitly, and does not specify memory layout, indexing structures, backtracking representation, or equivalence-class data structures. What is specified is the representational core: normalized implication form, triplets, and bridge variables (Leonov et al., 19 Sep 2025).

3. Simple deduction rules and incomplete analysis

The proof process begins with what the paper calls incomplete analysis, based on a fixed family of local deduction rules derived from the implication truth table:

$\begin{array}{rlrlrl} (1)\; & \cfrac{(0, y, z)}{\substack{y / 1 \quad z / 0}} & (2)\; & \cfrac{(x, y, 1)}{\substack{x / 1}} & (3)\; & \cfrac{(x, 0, z)}{\substack{x / 1}} \[1.2ex] (4)\; & \cfrac{(x, 1, z)}{\substack{x / z}} & (5)\; & \cfrac{(x, y, 0)}{\substack{x / \neg y}} & (6)\; & \cfrac{(x, x, z)}{\substack{x / 1 \quad z / 1}} \[1.2ex] (7)\; & \cfrac{(x, y, y)}{\substack{x / 1}} & & & & \end{array}$

These rules serve as the local propagation mechanism. In the paper’s notation, x/1x/1 means that AB¬(A¬B)A \land B \Rightarrow \neg (A \rightarrow \neg B)0 is assigned true; AB¬(A¬B)A \land B \Rightarrow \neg (A \rightarrow \neg B)1 means that AB¬(A¬B)A \land B \Rightarrow \neg (A \rightarrow \neg B)2 is assigned false; AB¬(A¬B)A \land B \Rightarrow \neg (A \rightarrow \neg B)3 expresses an equality or identification between variables or literals; and AB¬(A¬B)A \land B \Rightarrow \neg (A \rightarrow \neg B)4 expresses complementation.

The operational semantics therefore combines assignment propagation with equivalence propagation. The work does not separately formalize a union-find–style engine or equivalent data structure, but equivalence handling is implicit in rules such as

AB¬(A¬B)A \land B \Rightarrow \neg (A \rightarrow \neg B)5

Contradiction detection is also described operationally rather than through a separate proof-theoretic formalization. A contradiction arises when a triplet becomes instantiated in a way inconsistent with implication semantics. In the dilemma example, both branches are said to contradict Rule 1 because AB¬(A¬B)A \land B \Rightarrow \neg (A \rightarrow \neg B)6. The intended invariant is that assignments and equalities derived from the simple rules are repeatedly propagated until a fixed point is reached or a contradiction is detected.

The term incomplete analysis is central. The seven rules are not complete on their own, and their incompleteness is precisely what necessitates the search mechanism provided by the dilemma rule (Leonov et al., 19 Sep 2025).

When no simple rule applies, the procedure branches using the dilemma rule. This is the mechanism that makes the procedure complete. The solver branches on a chosen literal in both polarities and continues propagation in each branch.

The paper’s canonical example is the triplet set

AB¬(A¬B)A \land B \Rightarrow \neg (A \rightarrow \neg B)7

If one branches on AB¬(A¬B)A \land B \Rightarrow \neg (A \rightarrow \neg B)8, then when AB¬(A¬B)A \land B \Rightarrow \neg (A \rightarrow \neg B)9 the triplets become ¬¬AA\neg \neg A \Rightarrow A0 and ¬¬AA\neg \neg A \Rightarrow A1, and when ¬¬AA\neg \neg A \Rightarrow A2 they become ¬¬AA\neg \neg A \Rightarrow A3 and ¬¬AA\neg \neg A \Rightarrow A4. In both branches an inconsistency is reached with the implication meaning of the triplets, so both branches contradict.

Three outcomes of a dilemma split are explicitly distinguished:

  1. Both branches contradict: there is no counterexample to the original formula, so the negation of the original formula is valid.
  2. Exactly one branch contradicts: exploration continues with the surviving branch after further simple-rule propagation.
  3. Neither branch contradicts: the current assignment is a counterexample, so the negation of the original formula is not valid.

The operative solver workflow is correspondingly straightforward. A SAT instance is parsed and converted into normalized implication representation; bridge variables are introduced as needed; the formula is stored as triplets; simple rules are repeatedly applied; derived assignments, equalities, and complement relations are propagated to a fixed point; contradictions terminate the current branch; and whenever deduction stalls without contradiction, the solver chooses a branching variable and applies the dilemma rule. The paper does not provide explicit pseudocode, but this operational sequence is clearly described in the text (Leonov et al., 19 Sep 2025).

5. Cardinality Driven Branching and Deductive Priority Ordering

The first optimization, Cardinality Driven Branching, is a branching heuristic for the dilemma rule. Its stated principle is to prioritize variables appearing with greater frequency within the normalized triplet representation, in a way that mirrors the spirit of branching heuristics such as VSIDS. The preprocessing stage performs a single pass over all triplets, constructs a frequency map counting occurrences of each variable, and sorts variables in descending order of cardinality.

The selection rule is specific: when no simple rule applies, the solver chooses the highest-cardinality unassigned original variable; only if all original variables are already assigned does it choose the highest-cardinality unassigned bridge variable. The paper does not discuss polarity selection, only variable choice. The intended rationale is that highly frequent variables participate in more constraints and are therefore more likely to trigger useful propagation or contradictions quickly.

The second optimization, Deductive Priority Ordering, changes the order in which simple rules are attempted. Instead of scanning triplets in an arbitrary or static structural order, DPO assigns each triplet a static deductive potential score before the main solving loop. The score combines two ingredients: a base frequency score and a rule-specific bonus reflecting likely deductive strength.

The base score is the sum of the frequencies of the triplet’s constituent variables, reusing the frequencies computed during CDB preprocessing. The bonus structure is pattern-specific. A triplet ¬¬AA\neg \neg A \Rightarrow A5, corresponding to rule 6, receives a bonus multiplier of 3 because it deduces two variable assignments. A triplet ¬¬AA\neg \neg A \Rightarrow A6, corresponding to rule 7, receives a bonus multiplier of 2 because it deduces one variable assignment. All other triplet structures receive no bonus.

As an explanatory reconstruction, the description is naturally summarized by

¬¬AA\neg \neg A \Rightarrow A7

and

¬¬AA\neg \neg A \Rightarrow A8

with

¬¬AA\neg \neg A \Rightarrow A9

After scoring, the solver sorts all triplets in descending order and applies simple rules to the highest-scoring triplets first (Leonov et al., 19 Sep 2025).

The two heuristics are complementary. CDB targets the dilemma rule by improving branching-variable choice, whereas DPO targets simple-rule application by changing propagation order. They also interact, because DPO reuses the variable frequencies computed during CDB preprocessing. The paper further notes that DPO is static rather than dynamically updated during search, and explicitly identifies dynamic re-evaluation of deductive potential as future work.

6. Empirical evaluation, limitations, and significance

The evaluation uses 1000 KSAT benchmarks, specifically random 3-KSAT instances with 50 variables and 218 clauses. Machine conditions are stated as a server with 2.6-GHz AMD CPUs, 4 CPU cores allocated per benchmark, a 30 minute time limit per benchmark, and a 32 GB memory limit (Leonov et al., 19 Sep 2025).

The four configurations compared are the baseline Stålmarck Procedure, DPO only, CDB only, and DPO + CDB.

Configuration Solved instances Average solve time (seconds)
Baseline 503 650.37
DPO only 612 557.63
CDB only 797 376.68
DPO + CDB 864 290.56

Several trends are explicit. Both heuristics improve performance independently. DPO increases solved instances from 503 to 612 and reduces average solve time from 650.37s to 557.63s. CDB has a substantially larger standalone effect, increasing solved instances from 503 to 797 and reducing average solve time to 376.68s. The combined configuration is best overall, reaching 864/1000 solved instances with an average solve time of 290.56s. The cactus plot, according to the text, visually confirms that both heuristics solve more instances faster, with the combination dominating the other configurations (Leonov et al., 19 Sep 2025).

The evaluation is deliberately narrow. It is confined to a fixed-size random 3-SAT testbed rather than a broad industrial benchmark suite. The work does not compare against modern CDCL solvers such as CaDiCaL, does not compare against any previous Stålmarck implementation, and does not report SAT/UNSAT splits, per-instance variance, or ablations beyond the four basic configurations. No failure analysis is provided beyond the fact that many instances remain unsolved within the limit, especially for the baseline. The authors also explicitly acknowledge that the solver is not yet competitive with modern SAT solvers.

The broader significance of StalmarckSAT lies in showing that the Stålmarck Procedure is still amenable to modern heuristic refinement. The paper’s practical interpretation is that the framework consists of normalization into implication form, triplet encoding ¬AAFalse\neg A \Rightarrow A \rightarrow \text{False}0, repeated application of seven simple deduction rules, contradiction detection by falsified implication configurations, and complete search through the dilemma rule. Within that framework, branching quality appears especially important, since CDB yields the larger standalone improvement, while DPO contributes an additional propagation-ordering gain. Future directions proposed in the work are to refine CDB beyond simple frequency counting, possibly using learning-based heuristics or lookahead heuristics, and to make DPO dynamic rather than relying on static pre-scoring.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (3)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to StalmarckSAT.