Advertisement

The implementation of lazy narrowing

  • Manuel M. T. Chakravarty
  • Hendrik C. R. Lock
Session: Narrowing
Part of the Lecture Notes in Computer Science book series (LNCS, volume 528)

Abstract

Lazy narrowing has been proposed as the operational model of functional logic languages. This paper presents a new abstract machine which implements lazy narrowing. The core of this machine consists of a conventional stack based architecture like the one used for imperative languages. Almost orthogonal extensions of this core implement the different concepts of functional logic languages. This simplifies the machine design to a great deal and reduces the instruction set which has been particularly designed to support the application of standard code generation techniques. By its orthogonality, it is achieved that unused features introduce only minimal overhead. As a result, when performing ground term reduction the machine enjoys the same characteristics as efficient graph reduction machines.

Keywords

Logic Program Activation Record Function Definition Logical Variable Choice Point 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [AK90]
    Hassan Ait-Kaci. The WAM: a real tutorial. Technical report, DEC research center, Paris, 1990.Google Scholar
  2. [ASU86]
    Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers — Principles, Techniques and Tools. Addison-Wesley, 1986.Google Scholar
  3. [BCM89]
    P.G. Bosco, C. Cecchi, and C. Moiso. An extension of WAM for K-LEAF: a WAM-based compilation of conditional narrowing. In Proceedings of the 6th Int. Conf. on Logic Programming, page ?, 1989.Google Scholar
  4. [BGM89]
    P.G. Bosco, E. Giovanetti, and C. Moiso. Narrowing vs. SLD-resolution. J. of Theoretical Comp. Sci., Vol. 59, No. 1–2 pages 3–23, 1988.Google Scholar
  5. [BL86]
    Marco Bellia and Giorgio Levi. The Relation Between Logic and Functional Languages: a Survey. Journal of Logic Programming, 3(3), Oct. 1986.Google Scholar
  6. [DFP86]
    J. Darlington, A.J. Field, and H. Pull. The unification of functional and logic languages. In D. DeGroot and G. Lindstrom, editors, Logic Programming, pages 37–70. Prentice-Hall, Engle-Wood Cliffs, New Jersey, 1986.Google Scholar
  7. [DG89]
    John Darlington and Yi-ke Guo. Narrowing and unification in functional programming — an evaluation mechanism for absolute set abstraction. In Int. Conf. on Term Rewriting. LNCS 355, 1989.Google Scholar
  8. [Fay79]
    M. Fay. First-order unification in an equational theory. In “CADE” '79, pages 161–167, 1979.Google Scholar
  9. [FW87]
    Jon Fairbairn and Stuart Wray. TIM — A Simple Machine to Execute Supercombinators. In Conference on Functional Programming Languages and Computer Architecture, LNCS 274, 1987.Google Scholar
  10. [Han90]
    Michael Hanus. Compiling logic programs with equality. In PLILP, LNCS 348, Springer Verlag, pages 387–401, 1990.Google Scholar
  11. [Hul80]
    Jean-Marie Hullot. Canonical forms and unification. In 5th Conf. on Automated Deduction. LNCS 87, 1980.Google Scholar
  12. [Loc91]
    Hendrik C.R. Lock. The implementation of functional logic programming languages, April 1991. manuscript of a forthcoming dissertation, Universität Karlsruhe.Google Scholar
  13. [Loo91]
    Rita Loogen. From reduction machines to narrowing machines. In CCPSD, TAPSOFT, LNCS 494, pages 438–454, 1991.Google Scholar
  14. [Mei88]
    Erik Meijer. The Dump Environment Mix Machine. Informatics Department, University of Nijmegen, Nov. 1988. unpublished manuscript.Google Scholar
  15. [MKLR90]
    Juan J. Moreno-Navarro, Herbert Kuchen, Rita Loogen, and Mario Rodriguez-Artalejo. Lazy narrowing in a graph machine. In Conf. on Algebraic and Logic Programming, LNCS 463, 1990. also appeared as report N o 90-11 at RWTH Aachen.Google Scholar
  16. [MP90]
    Erik Meijer and Ross Patterson. Down with λ-lifting. University of Nijmegen and Imperial College, London, Sept. 1990. unpublished manuscript.Google Scholar
  17. [MR88]
    Juan J. Moreno-Navarro and Mario Rodriguez-Artalejo. BABEL: A functional and logic programming language based on constructor discipline and narrowing. In First Int. Workshop on Algebraic and Logic Programming, number 343 in LNCS, pages 223–232, 1988.Google Scholar
  18. [Müc90]
    A. Mück. How to compile narrowing. In PLILP, LNCS 348, pages 16–39, 1990.Google Scholar
  19. [PS88]
    Simon L. Peyton-Jones and J. Salkild. The Spineless Tagless G-Machine. In workshop on Implementations of Lazy Functional Languages, Aspenas,Sweden Sept. 1988. appeared also in 1989 ACM Conf. on Functional Progr. Languages and Computer Architecture.Google Scholar
  20. [Red85]
    Uday S. Reddy. Narrowing as the operational semantics of functional languages. In IEEE Int. Symposium on Logic Programming, pages 138–151. IEEE, 1985.Google Scholar
  21. [Red86]
    Uday S. Reddy. Functional Logic Languages, Part 1. In J.H. Fasel and R.M. Keller, editors, Proceedings of a Workshop on Graph Reduction, Santa Fee, LNCS 279, pages 401–425, 1986.Google Scholar
  22. [Sch91]
    Carlo Scharnhorst. Entwurf eines übersetzenden Narrowing-Systems basierend auf der WAM. Universität Karlsruhe, April 1991. Diplomarbeit.Google Scholar
  23. [War83]
    D.H.D Warren. An abstract Prolog instruction set. Techn. Note 309, SRI International,Menlo Park,Calif., October 1983.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Manuel M. T. Chakravarty
    • 1
  • Hendrik C. R. Lock
    • 1
  1. 1.GMD Forschungsstelle an der Universität KarlsruheKarlsruhe 1FRG

Personalised recommendations