Lazy evaluation in logic

  • Sergio Antoy
Session: Integration Of Programming Concepts II
Part of the Lecture Notes in Computer Science book series (LNCS, volume 528)


We generalize, simplify, and optimize the technique for doing lazy evaluation in logic programming proposed in [10]. Our approach is based on term rewriting and a strategy for the design of rewrite rules proposed in [1]. We describe a novel transformation scheme from a rewriting system \(\mathcal{R}\) to a logic program \(\mathcal{H}\), characterized by the fact that a reduction step is performed by \(\mathcal{H}\) only when needed. Improvements over [10] include: our approach can be applied to any constructor-based data type, the soundness and completeness conditions of the reduce rules are automatically provided for deterministic computations, the complexity of a logic computation is bounded by a simple function of the reduction being performed, and backtracking never occurs.


Normal Form Logic Program Logic Programming Definitional Tree Completeness Condition 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Sergio Antoy. Design strategies for rewrite rules. In CTRS'90, Montreal, Canada, June 10–14 1990.Google Scholar
  2. [2]
    Sergio Antoy. Lazy evaluation in logic. Technical Report 90-17, Rev. 1, Portland State University, Portland, OR, March 1990.Google Scholar
  3. [3]
    L. G. Bouma and H. R. Walters. Implementing algebraic specifications. In J. A. Bergstra, J. Heering, and P. Klint, editors, Algebraic Specifications, chapter 5. Addison-Wesley, Workingham, England, 1989.Google Scholar
  4. [4]
    Doug DeGroot and Gary Lindstrom, editors. Logic Programming: Functions, Relations, and Equations, Englewood Cliffs, NJ, 1986. Prentice-Hall.Google Scholar
  5. [5]
    Joseph A. Goguen and Timothy Winkler. Introducing OBJ3. Technical Report SRI-CSL-88-9, SRI International, Menlo Park, CA, 1988.Google Scholar
  6. [6]
    S. Hölldobler. Foundation of Equational Logic Programming. Springer-Verlag, Berlin, 1989. Lect. Notes in Artificial Intelligence, Vol. 353.Google Scholar
  7. [7]
    Paul Hudak. Conception, evolution, and application of functional programming languages. Computing Surveys, 21:359–411, 1989.Google Scholar
  8. [8]
    Gérard Huet and Jean-Jacques Lévy. Call by need computations in non-ambiguous linear term rewriting systems. Technical Report 359, INRIA, Le Chesnay, France, 1979.Google Scholar
  9. [9]
    Jan Willem Klop and Aart Middledorp. Sequentiality in orthogonal term rewriting systems. Technical Report CS-R8932, Stichting Mathematisch Centrum, Amsterdam, 1989.Google Scholar
  10. [10]
    Sanjai Narain. A technique for doing lazy evaluation in logic. The Journal of Logic Programming, 3:259–276, 1986.Google Scholar
  11. [11]
    Michael J. O'Donnell. Computing in systems described by equations. Springer-Verlag, 1977. Lect. Notes in Comp. Sci., Vol. 58.Google Scholar
  12. [12]
    Michael J. O'Donnell. Equational Logic as a Programming Language. MIT Press, 1985.Google Scholar
  13. [13]
    H. Petzsch. Automatic prototyping of algebraic specifications using Prolog. In Recent Trends in Data Type Specification, pages 207–223. 3rd Workshop on Theory and Applications of Abstract Data Types, Springer-Verlag, 1985.Google Scholar
  14. [14]
    Leon Sterling and Ehud Shapiro. The Art of Prolog. The MIT Press, Cambridge, MA, 1986.Google Scholar
  15. [15]
    Maarten H. van Emden and Keitaro Yukawa. Logic programming with equations. The Journal of Logic Programming, 4:265–288, 1987.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Sergio Antoy
    • 1
  1. 1.Department of Computer Science and Center for Software Quality ResearchPortland State UniversityPortland

Personalised recommendations