Logic Programming with Recurrence Domains
Journal
18th International Conference on Automata,Languages and Programming
Pages
20-34
Date Issued
1991
Author(s)
Abstract
In this paper we present a formalism for finitely representing infinite sets of terms. This formalism, called ω-terms, enables us to reason finitely about certain recursive types. We present an extension of Horn logic programs, called ω-Prolog, which allows a finite schematization of infinitely many clauses via predicates with ω-terms as arguments. We show that for every ω-Prolog program there is an equivalent Horn logic program. That is, incorporating ω-terms into first order logic programming does not change its denotational semantics. Computationally, however, ω-Prolog has the advantages of (1) representing infinitely many answers finitely, (2) avoiding repetition in computation and thus achieving better efficiency, (3) allowing infinite queries, and (4) avoiding certain non-termination of Prolog programs. The ω-terms play a similar role as regular-trees [MR85] and sort-expressions [Com90] in explicitly defining abstract data types. It differs from the others in that it allows us to define certain non-regular-tree languages such as {(an, bn, cn): n ∈ N}. We present a finite and complete algorithm for unification between ω-terms, with which we can also compute the intersection of the languages defined by ω-terms.
Type
conference paper
