Narrowing grammar: theory, implementation, and applications

https://doi.org/10.1016/0743-1066(92)90013-SGet rights and content
Under an Elsevier user license
open archive

Abstract

This paper describes Narrowing Grammar, a new kind of grammar that combines concepts from logic programming, rewriting, lazy evaluation, and logic grammar formalisms such as Definite Clause Grammar (DCG). A Narrowing Grammar is a finite set of rewrite rules. The semantics of Narrowing Grammar is defined by a specialized kind of outermost rewriting strategy called NU-narrowing.

Narrowing Grammar is directly executable, like many logic grammars. In fact, Narrowing Grammar rules can be compiled to Prolog and executed by existing Prolog interpreters as generators or acceptors. Unlike many logic grammars, Narrowing Grammar also permits higher-order specification and modular composition, and it provides lazy evaluation by virtue of its rewriting strategy. Lazy evaluation is important in certain languageacceptance situations, such as in coroutined matching of multiple patterns against a stream.

We compare Narrowing Grammar with several established logic grammars: Definite Clause Grammar, Metamorphosis Grammar, Extraposition Grammar and Gapping Grammar, showing how these logic grammars can be transformed to Narrowing Grammar. We also investigate the versatility of Narrowing Grammar in language analysis by applying it to several natural-language examples.

Cited by (0)

Earlier versions of portions of this paper appeared in [4,5,6]. This work was supported by DARPA contract F29601-87-C-0072. D. S. Parker was also supported by NSF grant IRI-8917907.