Abstract
In the mid-1970s, the SYN system introduced a novel approach to automatic program synthesis by generalizing recursive programs from single execution traces. By observing a problem-solver (LAWALY) navigate specific example cases, SYN identifies patterns and "spins off" subroutines to create general-purpose solutions for classes of symbolic logic problems, such as robot navigation and tree traversals.
Introduction: The Challenge of Program Synthesis
During the 1970s, program synthesis—the automated generation of code—faced a significant divide. One approach required users to provide exhaustive formal proofs, a task often too complex for contemporary theorem provers. The alternative required manual step-by-step execution logs (traces), which were tedious and error-prone for human users.
Siklossy and Sykes proposed a middle ground: a system where a user provides a sample problem description. The system then determines a specific solution and generalizes it into a recursive program capable of handling any instance within that problem class.
Methodology: The LAWALY and SYN Pipeline
The authors developed a two-stage pipeline to bridge the gap between specific examples and general code:
- LAWALY (The Problem Solver): This component receives a specific problem instance and a set of elementary operators (e.g.,
climb,plant-flag). It searches for a sequence of actions to reach the goal, producing a detailed execution trace. - SYN (The Synthesizer): SYN analyzes the trace to identify recursive patterns. When it detects the same operator applied to different objects in similar contexts, it generalizes the step into a recursive call.
The resulting programs are written in ODBOL, a LISP-flavored language supporting recursion and subroutines. SYN is notably capable of creating its own subroutines to handle incidental tasks discovered during analysis.
Experimental Domains
The system was evaluated on several classic symbolic logic domains:
- Robot Tasks: Climbing stacks of boxes to plant flags and returning to the ground.
- Extended Robot Tasks: Handling prerequisites like picking up a backpack or managing multiple flags.
- Binary Tree Traversals: Generating programs for postorder and preorder traversals.
- Object Manipulation: Moving multiple objects between rooms.
Key Insights: Recursion as Generalization
The core innovation of SYN is treating recursion as a form of generalization. By comparing steps in a trace—such as climbing box B after climbing box A—SYN identifies the recursive structure.
Interestingly, the authors found that SYN often produced more elegant solutions than humans. In the robot flag-planting example, humans typically suggest an iterative "loop up, then loop down" approach. SYN instead generated a recursive solution where the "climb down" actions were naturally handled as the recursion unrolled. Furthermore, SYN effectively separates "one-off" setup tasks (like picking up a backpack) into auxiliary functions, keeping the main recursive logic clean.
Results and Limitations
SYN successfully generated fully functional recursive ODBOL programs for all test cases, demonstrating an ability to write subroutines without user intervention. This marked a significant advancement over contemporary systems that primarily produced simple loops.
However, several limitations remain:
- Solver Dependency: SYN's performance is strictly bound by LAWALY's ability to solve the initial example.
- Trace Generalization: Generalizing from a single trace may not capture all logical branches required for more complex programs.
- Axiomatization: Users must still provide a robust set of operators and predicates, a common bottleneck in symbolic AI.
- Verification: The system does not formally prove the correctness of the generated programs for all possible future inputs.
Despite these constraints, SYN represents a pioneering effort in "show, don't tell" programming, moving toward a future where computers learn general procedures from specific demonstrations.
Summary updated