Abstract
Building high-quality automated theorem provers (ATPs) has historically been a monumental task requiring years of expert effort. This paper introduces SEQUEL, a specialized functional programming language designed to simplify the creation of ATPs and proof assistants. By treating logic specification as a type-definition problem and utilizing a novel "priority rewrite" system, SEQUEL allows researchers to implement complex logical systems in weeks rather than years.
Introduction: The Challenge of Logical Diversity
In the early 1990s, the formal methods community faced a significant hurdle: the lack of a "universal logic." Researchers were divided between first-order logic, constructive type theory, and other formalisms. Consequently, every new experiment required "reinventing the wheel"—reimplementing symbolic manipulation and proof-search machinery from scratch. Landmark systems like NuPrL or the Boyer-Moore prover involved hundreds of thousands of lines of code. SEQUEL addresses this by providing a high-level "shell" that makes implementing any logic efficient and accessible.
The SEQUEL Language Architecture
SEQUEL bridges the gap between functional programming (Standard ML) and logic programming (Prolog). Its design is centered on several core innovations:
- Backtracking on Demand: Unlike Prolog's default backtracking, SEQUEL uses a "priority rewrite" system. It only backtracks when explicitly signaled by the
<-operator, offering better control over non-deterministic algorithms. - Logic as Type Theory: SEQUEL defines logics using sequent calculus notation. Proving a "type" is inhabited effectively finds a proof within that logic.
- The SLAM Virtual Machine: To maintain performance, SEQUEL compiles into Common Lisp via the SequeL Abstract Machine (SLAM), achieving speeds comparable to hand-written Lisp.
- Tactical Inference: The language provides eight primitive "tactics" (e.g.,
REFINE,REWRITE,LEMMA) as building blocks for automated reasoning.
Comparative Evaluation
To evaluate SEQUEL's effectiveness, the author compared the implementation effort of various leading ATPs of the era. Rather than traditional datasets, the study focused on "Code Profiles"—the lines of code and the underlying logic of established systems.
As shown in Figure 4, traditional systems like NuPrL and Boyer-Moore required over 100,000 lines of code. In contrast, systems like Oyster and LLAMA, while smaller, were still substantial undertakings. SEQUEL aims to reduce this overhead significantly.
Key Results and Productivity Gains
The most significant outcome of SEQUEL is the dramatic leap in productivity. The author implemented six different ATPs—ranging from first-order logic to spatial relations—in just six working weeks. This task would typically require a three-person team working for at least a year in conventional languages.
Other key results include:
- Self-Hosting: SEQUEL is largely implemented in itself. Only 600 lines of a 22,000-line system were written in raw Common Lisp; the rest was generated from 4,000 lines of SEQUEL code.
- Performance: The system achieved over 2,000 Tactical Inferences Per Second (TIPS) on a SPARC II workstation.
- User Interface: A C-based graphical interface allowed for "point and click" proof driving, modernizing the user experience beyond text commands.
Limitations and Future Work
Despite its successes, SEQUEL has areas for improvement. The classification of tactics does not yet formally include "Type 3" (conservative) tactics—those where the output is provable if and only if the input was. Additionally, the system's reliance on specific Lisp environments (Lucid and Kyoto) posed portability challenges. Finally, the core type system (XTT) leaves the definition of "terms" and variable substitution to the user, placing the burden of ensuring signature preservation on the implementer.
Conclusion
SEQUEL demonstrates that high-level abstraction in logic implementation does not necessitate a sacrifice in execution speed. By separating declarative rules from procedural tactics, it provides a powerful framework for rapid experimentation in formal logic.
Summary updated