Abstract
ASSAT (Answer Set Solving by SAT) is a breakthrough system that enables standard Boolean Satisfiability (SAT) solvers to compute answer sets for logic programs. By incrementally adding "loop formulas" to a program's completion, ASSAT bridges the gap between Answer Set Programming (ASP) and SAT. This approach avoids the state-space explosion typical of previous translation methods and allows ASP to benefit directly from high-performance SAT search engines. Experimental results on NP-hard benchmarks like Blocks World and Hamiltonian Circuit show that ASSAT frequently outperforms specialized ASP solvers.
Introduction
Answer Set Programming (ASP) is a powerful paradigm for modeling complex combinatorial problems. Historically, solving ASP problems required specialized tools like smodels or dlv. While the relationship between ASP and Propositional Logic (SAT) was known, translating ASP to SAT is complicated by the "loop problem." In logic programming, rules can have circular dependencies (e.g., $a \leftarrow b$ and $b \leftarrow a$). A standard SAT translation, such as Clark’s completion, might incorrectly validate solutions where atoms support each other without external justification. Previous attempts to solve this by adding extra variables to track justifications led to an explosion in the search space.
Methodology: Incremental Loop Formulas
ASSAT introduces a novel incremental translation method that avoids adding extra variables. The process begins with Clark’s completion of the logic program. To handle circular dependencies, the authors define "loop formulas." A loop formula for a set of atoms (a loop) states that if any atom in the loop is true, at least one rule from outside the loop must justify it.
Since a program can have an exponential number of loops, ASSAT employs a "lazy" incremental approach:
- Clark’s Completion: Start with the standard propositional translation.
- SAT Solving: Find a model using a standard SAT solver (e.g., Chaff or Walksat).
- Verification: Check if the model is a valid answer set.
- Incremental Addition: If invalid, identify the "maximal loops" responsible, add their specific loop formulas to the SAT instance, and repeat.
This strategy keeps the formula size manageable, as most loops do not interfere with the search in practice.
Experimental Evaluation
The authors evaluated ASSAT against specialized solvers on three NP-hard domains: Graph Coloring, Blocks World Planning, and Hamiltonian Circuit (HC).
Blocks World Planning
In the Blocks World domain, ASSAT demonstrated significant scalability. As shown in Figure 1, ASSAT(Chaff2) consistently outperformed smodels as the number of blocks and steps increased. For the largest instance (bw.32), ASSAT(Chaff2) completed the task in 132.06 seconds, whereas smodels took 187.54 seconds. Specialized solvers like dlv were unable to solve these larger instances within the time limit.
Hamiltonian Circuits
The performance gap was even more pronounced in Hamiltonian Circuit problems. On a set of 43 random Hamiltonian graphs, ASSAT solved all instances, while specialized solvers struggled significantly.
As summarized in Figure 4, smodels only solved 33 out of 43 instances, and dlv solved only 24. In contrast, both the systematic solver Chaff2 and the stochastic solver Walksat (WC) solved all 43 instances within the time limit, often with significantly lower average runtimes and standard deviations.
Discussion and Conclusion
The success of ASSAT highlights the benefits of leveraging SAT research for ASP. By creating a solver-agnostic bridge, ASP researchers can immediately utilize advancements in SAT technology. The authors found that different SAT solvers excel at different tasks—Walksat performed exceptionally well on Hamiltonian Circuits, while Chaff was superior for planning problems.
Despite its success, ASSAT faces limitations, such as potential exponential loop formula addition in worst-case scenarios and grounding bottlenecks for extremely large problems. Future work includes extending the system to compute all answer sets and directly encoding advanced language features like cardinality constraints into SAT.
Summary updated