Parsing as Deduction

Fernando C. N. Pereira, David H. D. WarrenACL 1983

Introduction

In the early 1980s, computational linguistics faced a divide between two primary methodologies. On one hand, chart parsing (exemplified by the Earley algorithm) provided efficient processing for context-free grammars but struggled with the complex constraints required for semantic interpretation. On the other, logic programming (using Prolog) offered a powerful way to represent grammars as "definite clauses" but was hampered by top-down backtracking searches that often fell into infinite loops when encountering left-recursive rules.

This paper bridges that gap by reframing parsing as a formal process of logical inference. The authors introduce Earley Deduction, a unified framework that generalizes traditional chart parsing to handle complex, unification-based grammars while naturally managing linguistic "gaps."

The Earley Deduction Framework

Earley Deduction is a proof procedure for definite clauses that mimics the behavior of the Earley context-free parsing algorithm. Instead of a simple stack, the system maintains a "state" consisting of a set of derived logical clauses. The process is governed by two primary inference rules:

  1. Instantiation: This rule is analogous to the "predictor" in chart parsing. It identifies a required symbol and searches the grammar for rules that could satisfy it.
  2. Reduction: This rule acts as the "scanner" and "completer." It uses a proven fact (a unit clause) to satisfy a requirement in an existing rule, thereby generating a new, more complete rule.
A chart representation of the sentence 'Agatha's husband hit Ulrich', illustrating the spanning constituents and the 'chart' aspect of the algorithm.

Key Insights: Parsing as Logic

The most profound insight of this work is the equivalence between parsing structures and logical states. In this framework, a "passive edge" in a chart is simply a proven logical fact (a unit clause), while an "active edge" represents a hypothesis (a non-unit clause). The traditional "dot" used in Earley parsing to track progress is generalized as the boundary between literals that have been proven and those still required.

The sequence of logical deductions used to derive the sentence structure, showing the step-by-step instantiation and reduction process.

Handling Gaps and Recursion

By utilizing logic, the system handles "gaps" or "unbounded dependencies" (e.g., "Which book did you read?") without specialized machinery; they are treated as variables in logical clauses that are bound during deduction.

Crucially, the authors introduce subsumption to solve the problem of infinite recursion. Before adding a new clause to the state, the system checks if a more general version already exists. This ensures that the parser remains stable and terminates for any grammar with a valid context-free backbone, a significant improvement over standard Prolog-based parsers.

Conclusion and Future Work

The paper successfully demonstrates that Definite Clause Grammars (DCGs) and Lexical-Functional Grammars (LFG) can be handled by the same deductive machinery. While the framework provides a robust and expressive parsing mechanism, the authors acknowledge that the computational cost of subsumption and the memory management of a growing deductive state remain challenges for future implementation. Nevertheless, "Parsing as Deduction" remains a foundational concept in unifying linguistic theory with formal logic.

Summary updated

BibTeX
@inproceedings{pereira1983parsing,
  author = {Fernando C. N. Pereira and David H. D. Warren},
  title = {{Parsing as Deduction}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {1983},
  doi = {10.3115/981311.981338},
}
Figure