Deciding Separation Formulas with SAT

Ofer Strichman, Sanjit A. Seshia, Randal E. Bryant

Abstract

This paper presents a method for deciding separation formulas—mathematical inequalities of the form $v_i \ge v_j + c$—by translating them into propositional logic (SAT). While traditional theorem provers struggle with complex Boolean combinations of these predicates, modern SAT solvers can leverage advanced pruning and learning to achieve significant speedups. The authors introduce a reduction technique using graph triangulation (chordal graphs) to efficiently add transitivity constraints, preventing exponential explosion in cycle enumeration. Evaluation on hardware verification and timed-system benchmarks demonstrates orders-of-magnitude performance improvements over existing tools.

Introduction

In formal verification, researchers frequently encounter formulas containing separation predicates, also known as "difference logic." These predicates typically take the form $v_i \ge v_j + c$, where $v_i, v_j$ are variables and $c$ is a constant. They are essential for modeling scheduling problems, timed systems, and hardware designs with ordered data structures.

While simple conjunctions of these inequalities can be solved efficiently using algorithms like Bellman-Ford, real-world verification involves complex Boolean combinations—formulas rich with AND, OR, and NOT operators. Traditional theorem provers often handle these through "case-splitting," which can lead to an exponential explosion of sub-problems, significantly hindering performance.

Methodology

The authors propose a two-step reduction to translate separation formulas into pure propositional logic (SAT).

Boolean Encoding and Transitivity

First, every unique inequality (e.g., $x > y + 5$) is replaced by a fresh Boolean variable. However, this "blind" replacement loses the underlying mathematical semantics. To restore this logic, the authors analyze a "constraint graph" where variables are nodes and inequalities are edges. They identify cycles in this graph that represent mathematically impossible states and add specific SAT clauses to forbid them.

Encoding rules for cycles and transitive sub-graphs into SAT clauses.

Graph Triangulation and Chordal Graphs

Enumerating every possible cycle in a graph is computationally expensive. To address this, the authors utilize graph triangulation. By adding "chord" edges until the graph is chordal, they prove that constraints only need to be added for small cycles (triangles and pairs) to maintain correctness. This significantly reduces the number of constraints required.

Illustration of a cycle (a) and a transitive sub-graph (b) created by adding a chord edge.

Experimental Evaluation

The approach was evaluated using three benchmark suites:

  1. Diamond-Shaped Graphs: Artificial benchmarks designed to create an exponential number of simple cycles, specifically intended to stress-test cycle enumeration.
  2. Hardware Verification (UCLID): Formulas generated from symbolic simulation of hardware designs, including load-store units and cache coherence protocols.
  3. Timed Systems: Models of standard "railroad crossing gate controllers."

Results and Key Insights

The SAT-based approach demonstrated dramatic performance gains, particularly on hard problems. On "Diamond" benchmarks, the traditional ICS theorem prover timed out at 10,000 seconds, while the SAT-based approach (using the Chaff solver) often finished in less than one second.

Key insights include:

  • Efficiency of SAT Solvers: SAT solvers are superior at exploring search spaces due to mechanisms like pruning, learning, and variable selection heuristics.
  • Bottleneck Shift: The primary computational cost shifts from the "solving" phase to the "encoding" phase (generating transitivity constraints).
  • Unified Theory: Reducing mixed theories to propositional logic allows verification tasks to benefit from decades of SAT solver optimization.

Conclusion

The proposed method offers a scalable solution for deciding separation formulas by leveraging the power of modern SAT solvers. While the worst-case complexity of graph triangulation remains a theoretical concern, practical results show significant speedups and improved scalability for hardware and timed-system verification. Future work includes further optimizing the encoding process through techniques like conjunction matrices to reduce redundant constraints.

Summary updated

BibTeX
@inproceedings{strichman2002deciding,
  author = {Ofer Strichman and Sanjit A. Seshia and Randal E. Bryant},
  title = {{Deciding Separation Formulas with SAT}},
  booktitle = {CAV},
  year = {2002},
  doi = {10.1007/3-540-45657-0\_16},
}
Figure