Automatic Programming Using Abstract Data Types

Gérard D. GuihoIJCAI 1983

Introduction

In the early 1980s, computer science researchers sought to bridge the gap between high-level mathematical logic and practical software engineering. Gerard Guiho's work during this era redefined "automatic programming" not as a black-box code generator, but as a sophisticated AI-driven environment where programs are derived from and proven against Algebraic Abstract Data Types (ADTs). This approach aimed to address the "correctness gap"—the inherent difficulty in ensuring that a program's implementation faithfully adheres to its formal specification.

A Four-Pillar Framework for Formal Construction

Guiho proposed a structured methodology to manage the complexity of formal verification. This framework is built upon four distinct but interrelated components that separate the abstract definition from the concrete implementation for both data and procedures.

The relationship between data types and procedures in Guiho's framework, defining the roles of DS, DI, PS, and PI.
  1. Data Type Specification (DS): Defining data (e.g., integers) through algebraic signatures and axioms.
  2. Data Implementation (DI): The concrete representation of that data within a computational environment.
  3. Procedure Specification (PS): A formal contract defining the expected behavior of a function.
  4. Procedure Implementation (PI): The actual algorithmic code.

The innovation lies in using Program Schemes—structural templates that guide the decomposition of problems based on the underlying data's algebraic structure. For instance, axioms for integers might suggest specific recursive patterns for algorithms operating on them.

Bridging the Correctness Gap

The core challenge in software engineering is ensuring that the Procedure Implementation (PI) satisfies the Procedure Specification (PS). Guiho's methodology emphasizes that "automatic programming" should assist the human developer in this proof process, rather than replacing them entirely.

The workflow of deriving procedure specifications and implementations from problem ideas and data specifications, culminating in a formal proof.

A significant insight from this work is the "Proof-Error Paradox": the process of formal verification often reveals errors not just in the code, but in the specification itself. This iterative refinement forces designers to clarify their understanding of the problem from both a mathematical and an algorithmic perspective.

Key Innovations and Results

To handle real-world complexities, such as error states (e.g., division by zero), the paper introduced multioperators. These are algebraic constructs capable of producing multiple types of outputs, allowing for a robust treatment of exceptions within a formal framework. The paper also defined a complete syntax and semantic set for a verified programming language supporting exception handling and non-deterministic evaluation.

The primary benchmark for this methodology was the derivation of the Greatest Common Divisor (GCD) algorithm. Starting from algebraic axioms for positive integers, Guiho demonstrated a step-by-step construction of a verified GCD program. This exercise highlighted both the power of the method and its complexity; even for a relatively simple algorithm, the resulting formal proof was remarkably sophisticated, underscoring the necessity for automated theorem-proving assistance.

Limitations and Future Outlook

While foundational, the approach faced significant scalability challenges. Guiho acknowledged that the methodology was primarily suited for "toy problems" and restricted domains. The state of the art in the 1980s lacked fully autonomous theorem provers capable of discovering necessary lemmas without human intervention. Consequently, the vision for "automatic programming" remained a human-in-the-loop process, where tools acted as "proof checkers" and heuristic assistants rather than independent creators. Despite these limitations, the paper laid the groundwork for modern formal methods and the ongoing pursuit of software that is "correct by construction."

Summary updated

BibTeX
@inproceedings{guiho1983automatic,
  author = {Gérard D. Guiho},
  title = {{Automatic Programming Using Abstract Data Types}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1983},
}
Figure