Improving First-order Model Searching by Propositional Reasoning and Lemma Learning

Zhuo Huang, Hantao Zhang, Jian ZhangSAT 2004

Introduction

Finding finite models for first-order logic (FOL) is a cornerstone of automated reasoning, essential for proving the consistency of logical statements or discovering counterexamples to conjectures. Traditionally, researchers have relied on two distinct paths: "flattening" FOL problems into massive propositional satisfiability (SAT) problems, or using direct search methods that treat the problem as a Constraint Satisfaction Problem (CSP). While SAT solvers are highly optimized, flattening often leads to a memory-intensive explosion of clauses. Conversely, direct search methods like SEM are memory-efficient but often lack the "memory" to avoid repeating the same mistakes across different branches of a search tree.

This paper introduces a hybrid approach that bridges this gap. By integrating the direct search capabilities of the SEM model generator with the propositional reasoning of the SATO solver, the authors implement "lemma learning"—a technique that allows the searcher to learn from its failures and prune the search space dynamically.

Methodology: Hybrid Search and Lemma Learning

The core innovation lies in adding intelligent backtracking to the direct search process without the overhead of a full SAT translation. In a standard direct search, the solver attempts to fill "multiplication tables" that represent the functions and relations of the first-order theory.

A multiplication table representing a function f in a finite model search, illustrating the discrete values assigned during the search process.

The hybrid system follows a structured workflow to optimize this process:

  1. Conflict Analysis: When the search encounters a contradiction, the system identifies the False Assignment Set (FAS)—the specific set of variable assignments responsible for the failure.
  2. Lemma Generation: This FAS is converted into a "lemma" (a propositional clause) that explicitly forbids that specific combination of assignments in future branches.
  3. Propositional Reasoning: These lemmas are managed by the SATO solver. If the accumulated lemmas imply that a specific cell in a multiplication table must take a certain value, the system performs an immediate deduction, skipping thousands of redundant search steps.
  4. FAS Enhancement: The authors utilize an algorithm to "shrink" these lemmas, making them more general and significantly more powerful at pruning the search tree.

Experimental Results

The researchers evaluated the "New SEM" (equipped with lemma learning) against the original "Old SEM" and other state-of-the-art tools like MACE2 and MACE4. Testing was conducted on standard benchmarks from the TPTP (Thousands of Problems for Theorem Provers) library and challenging combinatorial problems like LatinZ.

Performance comparison of New SEM (with lemma learning) against Old SEM, MACE2, and MACE4 across various logic problems.

As shown in the results table, the integration of lemma learning yielded dramatic speedups:

  • Robbins Algebra (ROB12-2): Search time was slashed from 33.77 seconds to 2.26 seconds, representing a more than 10x improvement.
  • LatinZ: The number of search "rounds" was nearly halved, reducing the time from 10.32 seconds to 7.71 seconds.
  • Robustness: On several problems where MACE2 or the original SEM timed out (e.g., BOO020 or SYN305-1), the New SEM found solutions in a fraction of the time.

Discussion and Future Work

The results demonstrate that hybridization is a powerful strategy; one does not need to translate an entire problem to SAT to benefit from SAT technology. By using a SAT solver specifically to manage the "learned memory" of the search, the system avoids redundant work while maintaining the syntactic simplicity of propositional clauses.

However, the authors noted some limitations. Lemma learning can occasionally interfere with existing variable-ordering heuristics, leading to slightly longer search times on very simple problems where the overhead of lemma management outweighs the benefits. Future work will focus on a more modular and tightly integrated interface between the model searcher and the SAT solver to further minimize implementation overhead and improve heuristic coordination.

Summary updated

BibTeX
@inproceedings{huang2004improving,
  author = {Zhuo Huang and Hantao Zhang and Jian Zhang},
  title = {{Improving First-order Model Searching by Propositional Reasoning and Lemma Learning}},
  booktitle = {SAT},
  year = {2004},
}
Figure