A generalized Greibach Normal Form for definite clause grammars

  • Authors:
  • Marc Dymetman

  • Affiliations:
  • CCRIT, Communications Canada, Laval, Québec, Canada

  • Venue:
  • COLING '92 Proceedings of the 14th conference on Computational linguistics - Volume 1
  • Year:
  • 1992

Quantified Score

Hi-index 0.00

Visualization

Abstract

An arbitrary definite clause grammar can be transformed into a so-called Generalized Greibach Normal Form (GGNF), a generalization of the classical Greibach Normal Form (GNF) for context-free grammars.The normalized definite clause grammar is declaratively equivalent to the original definite clause grammar, that is, it assigns the same analyses to the same strings. Offline-parsability of the original grammar is reflected in an elementary textual property of the transformed grammar. When this property holds, a direct (top-down) Prolog implementation of the normalized grammar solves the parsing problem: all solutions are enumerated on backtracking and execution terminates.When specialized to the simpler case of context-free grammars, the GGNF provides a variant to the GNF, where the transformed context-free grammar not only generates the same strings as the original grammar, but also preserves their degrees of ambiguity (this last property does not hold for the GNF).The GGNF seems to be the first normal form result for DCGs. It provides an explicit factorization of the potential sources of undecidability for the parsing problem, and offers valuable insights on the computational structure of unification grammars in general.