Introduction
In the early 1970s, Artificial Intelligence research was characterized by a fundamental tension between the expressive power of formal logic and the practical requirements of computational efficiency. Erik Sandewall’s work, "Conversion of Predicate-Calculus Axioms, Viewed as Non-Deterministic Programs, to Corresponding Deterministic Programs," addresses this divide. The paper proposes a systematic methodology for "compiling" declarative predicate-calculus axioms into efficient, deterministic procedural code, bridging the gap between high-level logical representation and machine-level execution.
The Problem: Logic vs. Efficiency
Early AI researchers primarily navigated three paradigms for problem-solving:
- Resolution-style Theorem Proving: Mathematically elegant and general, but notoriously difficult to control and computationally expensive.
- Non-deterministic Programming Languages: Systems like Planner or QA4 allowed for high-level goal-directed search but were often "opaque" to developers and resource-intensive.
- The Supervisor Approach: Exemplified by the General Problem Solver (GPS), this model used a central manager to coordinate fixed "operators." While efficient—as operators could be compiled to machine code—it was often too rigid to handle recursion or complex variable bindings across search branches.
Sandewall sought a middle ground: a system that retained the flexibility of logical axioms while adopting the efficiency of the supervisor-operator model.
Methodology: From Axioms to Closures
The core of Sandewall’s contribution is a transformation process that converts logical axioms into procedural "rules." This process involves several key technical components:
1. Axiom Transformation to Lambda Expressions
Logical statements are converted into lambda expressions. For instance, a transitivity axiom such as $R(x,y) \land R(y,z) \implies R(x,z)$ is reimagined as a program. When the system is queried about $R(x,z)$, the program initiates a lookup for $y$ and subsequently generates a sub-query regarding $R(y,z)$.
2. Procedure Closures (FUNARG)
To overcome the rigidity of traditional operators, Sandewall utilizes procedure closures, historically known as FUNARG-expressions. When a program must pause its search to request assistance from the central supervisor, it does not merely send a query. Instead, it passes a "remainder procedure"—a closure containing the necessary code and the current environment (variable bindings). This allows the search to be resumed seamlessly once the supervisor provides an answer.
3. Controlled vs. Immediate Statements
The framework distinguishes between "short" searches (immediate database lookups) and "big" searches (managed by the supervisor). At compile-time, the developer or compiler determines which parts of an axiom should be "controlled." This distinction allows for parallel search branches and more granular resource management.
4. Chains of Sub-questions
By passing remainder procedures as arguments, the system constructs a "chain of closures." When a terminal answer is found, it triggers a cascade of returns through this chain, effectively simulating deep recursion at the supervisor level without the overhead of a standard recursive call stack.
Key Insights
Sandewall’s approach offers several profound insights into the nature of automated reasoning:
- Logic as a Compilation Target: Rather than interpreting logic at runtime, axioms should be treated as source code to be compiled into procedural representations before execution.
- The Supervisor as a Scheduler: By centralizing non-determinism in a supervisor, the system can manage search priorities and resources more effectively than decentralized search algorithms.
- State Management via Closures: The realization that the "environment" of a search (the specific variable bindings at a given node) can be captured as data within a closure allows a flat supervisor to manage what is conceptually a deep, recursive search tree.
Implementation and Results
The concepts were implemented in the PCDB (Predicate Calculus Data Base) system. Sandewall demonstrated that the supervisor model, previously considered too inflexible for complex logic, could indeed support sophisticated deduction when paired with functional programming constructs like closures.
However, the method introduced specific challenges:
- Manual Decision Making: The programmer must manually designate which statements are "controlled." An incorrect designation could lead to system hangs if a supposedly "short" search becomes exhaustive.
- Language Requirements: The approach necessitates a language with first-class closures (e.g., LISP, Simula 67, or POP-2), which were not universally available at the time.
- Completeness: Unlike pure resolution theorem provers, this method does not strictly guarantee logical completeness. Sandewall suggests this is an acceptable trade-off for the gains in execution speed and control.
Conclusion
Sandewall’s work remains a landmark in the evolution of logic programming. By viewing axioms as non-deterministic programs and providing a path to their deterministic compilation, he laid the groundwork for more efficient AI systems that do not sacrifice the expressive power of formal logic.
Summary updated