Logic programming with recurrence domains

  • Hong Chen
  • Jieh Hsiang
Logic Programming (Session 1)
Part of the Lecture Notes in Computer Science book series (LNCS, volume 510)


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 {(a n , b n , c n ) : 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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [BJ88]
    M. Bruynooghe and G. Janssens. An Instance of Abstract Interpretation Integrating Type and Mode Inference. In Proc. 5th Int. Conf. on Logic Programming, pages 669–683, K.A. Bowen and R.A. Kowalski(eds), MIT Press, Aug. 1988.Google Scholar
  2. [CH85]
    A. Chandra and D. Harel. Horn Clause Queries and Generalizations. J. Logic Programming, 2(1):1–16, April 1985.Google Scholar
  3. [CH90]
    Hong Chen and Jieh Hsiang. Logic Programming with Recurrence Domains. Technical Report 49, Department of Computer Science, SUNY at Stony Brook, Oct 1990.Google Scholar
  4. [CI89]
    J. Chomicki and T. Imielinski. Relational Specification of Infinite Query Answers. In Proc. of the 1989 ACM SIGMOD Int. Conf. on the Management of Data, pages 174–183, Portland, Oregon, June 1989. Vol. 18, No. 2.Google Scholar
  5. [Col82]
    A. Colmerauer. Prolog and Infinite Trees. In Logic Programming, Academic Press, 1982.Google Scholar
  6. [Com89]
    Hubert Comon. Inductive Proofs by Specifications Transformation. In Proc. Rewriting Techniques and Applications, pages 76–91, Springer Verlag, 4 1989. LNCS 355.Google Scholar
  7. [Com90]
    Hubert Comon. Equational Formulas in Order-Sorted Algebras. In ICALP 90, pages 674–688, July 1990.Google Scholar
  8. [GM84]
    J.A. Goguen and J. Meseguer. Equalities, Types Modules and Generics for Logic Programming. Journal of Logic Programming, 1, 1984.Google Scholar
  9. [GM85]
    J.A. Goguen and J. Meseguer. Order-Sorted Algebra I, Partial and Overloaded Operators, Error and Inheritance. Technical Report 000, SRI, 1985.Google Scholar
  10. [HJ90]
    N. Heintze and J. Jaffar. A Finite Presentation Theorem for Approximating Logic Programs. In POPL-90, pages 197–209, Feb. 1990.Google Scholar
  11. [JL87]
    J. Jaffar and J.L. Lassez. Constraint Logic Programming. In Proceedings of 14th ACM Symposium on Principles of Programming languages, pages 111–119, 1987.Google Scholar
  12. [MR85]
    P. Mishra and U. Reddy. Declaration-Free Type Checking. In ACM Sym. on Principles of Programming Languages, pages 7–21, ACM, 1985.Google Scholar
  13. [NO80]
    C. G. Nelson and D.C. Oppen. Fast Decision Algorithms based on Congruence Closure. Journal of the ACM, 27(2), 1980.Google Scholar
  14. [Sch89]
    M. Schmidt-Schaub. Computational Aspects of an Order-Sorted Logic with Term Declarations. Springer-Verlag, 1989. Lecture Notes in Artificial Intelligence, 395.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Hong Chen
    • 1
  • Jieh Hsiang
    • 1
  1. 1.Department of Computer ScienceState University of New York at Stony BrookStony Brook

Personalised recommendations