Prolog Extensions Based on Tableau Calculus

Wolfgang SchönfeldIJCAI 1985

Abstract

Traditional Prolog is restricted to Horn clause logic, which limits its expressiveness in domains requiring complex negations and disjunctions. This paper presents a proof procedure based on tableau calculus that extends Prolog to full first-order logic. By utilizing a goal-oriented, depth-first search strategy called SEARCH, the proposed method maintains the efficiency of resolution-based Prolog for Horn clauses while providing a complete and correct framework for more complex logical structures.

Introduction

In the mid-1980s, Prolog emerged as a dominant language for logic programming. However, its reliance on Horn clauses—rules with only a single conclusion—presented a significant hurdle for complex knowledge representation. For instance, in the LEX legal expert system project, approximately 20% of legal knowledge could not be expressed in standard Prolog due to the need for disjunctions and negations (e.g., "Either A or B is true, but not both").

While standard resolution calculus can handle full first-order logic, it often lacks a disciplined search strategy, leading to an exponential explosion of the search space. This paper proposes a middle ground: leveraging the power of tableau calculus within a goal-oriented framework to achieve the expressiveness of full logic with the search efficiency of Prolog.

Methodology: Tableau Calculus and the SEARCH Algorithm

The core of the proposed extension is a Gentzen-type proof procedure based on tableau calculus. Unlike resolution, which derives new clauses, tableau calculus seeks a counterexample to a formula by decomposing it into a tree of literals.

Tableau as a Tree Structure

A tableau is constructed as a tree where each node represents a literal. A branch is "closed" if it contains a contradiction (a literal and its negation). If every possible branch in the tree can be closed, the original formula is proven to be a tautology.

Figure 1: A standard tableau tree showing branching and closed paths (indicated by double bars).

The SEARCH Algorithm

To implement this efficiently, the author introduces the SEARCH algorithm. Key features include:

  1. Goal-Oriented Depth-First Search: The algorithm follows a strategy similar to Prolog, exploring branches deeply before backtracking.
  2. Linking Strategy: To constrain the search space, the algorithm only expands formulas that are "linked" to the current branch—meaning they contain literals capable of closing the branch.
  3. Unification: The procedure incorporates unification to handle variable substitutions in predicate logic, avoiding the inefficiencies of level saturation.
Figure 2: Visualization of the SEARCH algorithm's expansion steps and goal-oriented sub-problems.

Key Insights

  • Prolog as a Special Case: A significant theoretical insight is that standard Prolog can be viewed as a restricted version of this tableau procedure. When applied to Horn clauses, the SEARCH algorithm performs the same sequence of operations as a standard Prolog interpreter.
  • Inherent Loop Checking: Standard Prolog can fall into infinite loops with recursive rules. The SEARCH algorithm naturally mitigates this by tracking "crossed" formulas on a branch, providing a built-in mechanism for loop detection.
  • Top-Down vs. Bottom-Up: The author characterizes resolution as a "bottom-up" theory-generating approach, whereas tableau is a "top-down" model-generating approach. The paper suggests that a hybrid of these methods mirrors human mathematical reasoning.

Results and Performance

The SEARCH strategy is proven to be both correct and complete. Crucially, it maintains functional parity with Prolog: for any atomic goal provable in a Horn clause database, the algorithm finds the proof with the same efficiency as a standard interpreter. Furthermore, it successfully handles non-Horn logic, such as rules with disjunctions in the head, which are inaccessible to traditional Prolog.

Limitations and Future Directions

While the theoretical framework is robust, the implementation was still in progress at the time of publication. The author noted that in very large knowledge bases, even a linked search strategy faces a massive set of formulas. Future work involves integrating more advanced heuristics and extending the system to handle "discourse representation structures" for better natural language processing.

Summary updated

BibTeX
@inproceedings{schonfeld1985prolog,
  author = {Wolfgang Schönfeld},
  title = {{Prolog Extensions Based on Tableau Calculus}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1985},
}
Figure