A Logic Program Schema and Its Applications

TL;DR

This paper introduces "recursive-schema programs," a subclass of Horn logic programs, demonstrating their sufficient expressive power to compute any recursively enumerable language. This provides a simpler proof for the computational power of Horn logic programs and suggests new avenues for program transformation and synthesis.

What Problem Does This Paper Address?

The paper delves into the theoretical underpinnings of logic programming languages, particularly Horn clause programs, which have gained significant traction due to their applications in AI and their non-procedural nature. While it's known that Horn logic programs can compute any Turing computable function, the paper aims to explore a specific, simpler class of these programs—recursive-schema programs—and prove their equivalent computational power. This exploration is motivated by the desire for more concise and understandable program representations, akin to how concepts like "transitive closure" can be elegantly expressed. The authors also seek to demonstrate how these recursive-schema programs can be leveraged for program transformation and synthesis.

Methods

The core of the paper is the definition of "recursive-schema" and "recursive-schema programs." A recursive-schema is defined by two logical clauses that capture a recursive pattern of computation involving predicates and mappings. A class of programs, REC, is then formally defined recursively, including primitive predicates, negation, conjunction, and crucially, the recursive-schema construct. The paper then proves that any program in REC can be expressed using a single fixed recursive-schema rule and a set of assertions (facts). This is achieved by showing how various program structures, like "or" and "append," can be transformed into this recursive-schema format. The paper also leverages existing results from formal language theory (Lemmas 1 and 2) to prove the main theorem.

Datasets

Not discussed in the paper.

Key Insights and Ideas

  • Expressive Power of Simplicity: The paper highlights that a seemingly simple recursive structure ("recursive-schema") is powerful enough to capture the full computational power of Turing machines (via recursively enumerable languages). This suggests that complex computations can often be distilled into elegant, recursive forms.
  • Alternative Proof for Horn Clause Power: The result that recursive-schema programs can compute any recursively enumerable language offers a new, simpler proof for the established fact that Horn logic programs are Turing-complete.
  • Program Transformation and Synthesis: The authors propose that recursive-schema programs can serve as a basis for program transformation and synthesis. By representing programs in this schema, one can potentially simplify complex programs into a fixed rule plus facts, or synthesize new programs by applying transformations to existing ones.
  • Database Efficiency: The paper illustrates how representing data and queries using recursive-schema programs can lead to more efficient database representations, as they are "demand-driven" and only embodied when called.

Key Results

  • The class of recursive-schema programs (REC) is shown to have sufficient expressive capability to compute any recursively enumerable language.
  • Any Turing computable logic program can be expressed as a conjunctive formula of three recursive-schema programs.
  • A program transformation example demonstrates how "plus" can be derived from "append" using a mapping on their respective recursive-schema representations, suggesting a systematic way to transform programs across related domains.

Limitations and Future Work

The paper acknowledges that the proposed methods can be implemented in Prolog and incorporated into database design. Future work could explore further applications in program transformation and synthesis, potentially leading to automated program generation tools. The authors also implicitly suggest that the elegance of the recursive-schema representation could lead to more maintainable and understandable logic programs.

Summary updated

BibTeX
@inproceedings{1985logic,
  title = {{A Logic Program Schema and Its Applications}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1985},
}
Figure