This paper introduces an interpreter for a programming language based on predicate logic, aiming to bridge the gap between human reasoning and machine computation. It details the language's syntax, a novel proof procedure based on connection graphs, and mechanisms for controlling computation, including procedure evocation and goal variation.
TL;DR
This paper presents an interpreter for a predicate logic programming language, offering a structured way to translate human problem-solving into machine execution. It introduces a connection graph proof procedure and control mechanisms like procedure evocation and goal variation to enhance computational efficiency and programmer control.
What Problem Does This Paper Address?
The paper addresses the challenge of making predicate logic, a powerful formalism for human reasoning, directly executable on computers. While predicate logic offers an abstract way to express thoughts and problems, its direct implementation for practical programming requires a robust interpreter. Existing implementations were limited, prompting the authors to develop their own interpreter in LISP 1.6. The goal is to enable programmers to focus on problem-solving rather than low-level machine details, leveraging the declarative nature of predicate logic.
Methods
The core of the interpreter is built around Kowalski's connection graph system for proof procedures. This system represents programs as graphs where nodes are atoms and edges represent potential matches (unifications) between atoms. The interpreter uses this graph to resolve goals by activating links, aiming to reach an empty clause.
Key novelties include:
- Syntax: Extends Kowalski's procedural form with ordered procedures and computational consequences, allowing for explicit control structures.
- Proof Procedure: Based on the connection graph, which is independent of the order of program statements, facilitating different programming styles (top-down, middle-out, bottom-up).
- Procedure Evocation: Introduces mechanisms like "bottom-up pre-processing" to make programs more deterministic by structuring data, and "one-link evocation" to prune the search space by identifying and activating single-link atoms.
- Control Structure: Employs ordered procedures (delimited by
<<and>>) to give programmers explicit control over the execution order of subgoals, moving decision-making from the search strategy to the programmer. - Goal Variations: Explores problem generalization and specialization using logical consequence to potentially simplify or refine goals for more efficient computation.
- Built-in Procedures: Integrates LISP functions as built-in predicates for efficiency and to handle numerical computations.
Datasets
Not discussed in the paper. The paper uses example programs and data structures (like binary trees and tower configurations) to illustrate the interpreter's functionality and performance.
Key Insights and Ideas
- Predicate Logic as a Programming Language: The paper strongly advocates for predicate logic's suitability for programming, highlighting its declarative nature and alignment with human thought processes.
- Connection Graphs for Efficiency: The connection graph representation is shown to be powerful, allowing for flexible programming styles and providing a visual basis for the proof procedure.
- Explicit Control for Determinism: Introducing ordered procedures and bottom-up pre-processing are crucial for managing the inherent non-determinism of logic programs, leading to significant performance gains.
- One-Link Evocation as a Pruning Strategy: The "one-link rule" is a clever way to simplify the search space by identifying and immediately resolving atoms with only one possible connection.
- Heuristics for Goal Selection: Instantiation evocation (prioritizing more instantiated subgoals) and goal variations (generalization/specialization) demonstrate how programmer intuition and logical inference can guide the search.
Key Results
The paper demonstrates the interpreter's effectiveness through several examples:
- Delete Program: A program to delete a node from a binary tree, which was executed on Allen & Luckham's theorem prover in 2.6 seconds.
- Tower Program: Two versions of a tower program are presented. The second version, utilizing a more structured data representation (
t(x,y)), is shown to be 15 times faster than the first version. This program was run on the Stanford theorem-prover in 7.4258 seconds. - General Performance: The authors report positive experiences with predicate logic programming, noting that programs become structured, transparent, and easier to debug due to the logical nature of each computation step.
Limitations and Future Work
- Heuristic Assumptions: The paper acknowledges that some control strategies, like assuming a logical consequence (e.g., Rectangle(x) implies Parallelogram(x)), are heuristic and might lead to wasted computation if false.
- Variable and Type Declarations: The authors suggest that simplifying reasoning about data types would be beneficial if variables and their types were declared.
- Further Optimization: While significant speedups are demonstrated, the paper implies that further optimizations and refinements of the interpreter and control mechanisms are possible. The interactive control features are presented as a means for programmers to improve programs, hinting at ongoing development.
Summary updated