Unlimp uniqueness as a leitmotiv for implementation

  • Stefan Kahrs
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 631)


When evaluation in functional programming languages is explained using λ-calculus and/or term rewriting systems, expressions and function definitions are often defined as terms, that is as trees. Similarly, the collection of all terms is defined as a forest, that is a directed, acyclic graph where every vertex has at most one incoming edge. Concrete implementations usually drop the last restriction (and sometimes acyclicity as well), i.e. many terms can share a common subterm, meaning that different paths of subterm edges reach the same vertex in the graph.

Any vertex in such a graph represents a term. A term is represented uniquely in such a graph if there are no two different vertices representing it. Such a representation can be established by using hashconsing for the creation of heap objects. We investigate the consequences of adopting uniqueness in this sense as a leitmotiv for implementation (called Unlimp), i.e. not allowing any two different vertices in a graph to represent the same term.


Garbage Collection Graph Reduction Pairing Program Programming Style Functional Programming Language 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Marianne Baudinet and David MacQueen. Tree pattern matching for ML. In Conference on Functional Programming Languages and Computer Archtitecture, 1987. LNCS 274.Google Scholar
  2. 2.
    Richard Bird. Lectures on Constructive Functional Programming. Technical Monograph PRG-69, Programming Research Group, Oxford University Computing Laboratory, 1988.Google Scholar
  3. 3.
    Reinhard Enders, Thomas Filkorn, and Dirk Taubner. Generating BDDs for symbolic model checking in CCS. In Third Workshop on Computer Aided Verification, pages 263–278, Aalborg, 1991.Google Scholar
  4. 4.
    A. J. Field and P. G. Harrison. Functional Programming. Addison-Wesley, 1988.Google Scholar
  5. 5.
    G. H. Gonnet. Handbook of Algorithms and Data Structures. Addison-Wesley, 1984.Google Scholar
  6. 6.
    Annegret Habel, Hans-Jörg Kreowski, and Detlef Plump. Jungle Evaluation. Fundamentae Informaticae, 15(1):37–60, 1991.Google Scholar
  7. 7.
    Berthold Hoffmann. Term Rewriting with Sharing and MemoÏzation, 1992. (to appear in: Proceedings, Algebraic and Logic Programming 1992).Google Scholar
  8. 8.
    Berthold Hoffmann and Detlef Plump. Jungle Evaluation for Efficient Term Rewriting. Technical Report 4/88, Universität Bremen, Studiengang Informatik, 1988. (short version in LNCS 343).Google Scholar
  9. 9.
    Berthold Hoffmann and Detlef Plump. Implementing Term Rewriting by Jungle Evaluation. Informatique théorique et Applications, 25(5):445–472, 1991.Google Scholar
  10. 10.
    P. Hudak, S. Peyton Jones, and P. Wadler. Report on the Programming Language Haskell, a Non-strict, Purely Functional Language. Technical report, University of Glasgow, 1991. (version 1.2 to appear in SIGPLAN notices).Google Scholar
  11. 11.
    R. J. M. Hughes. Lazy memo functions. In Conference on Functional Programming and Computer Architecture, pages 129–146. Springer, 1985. LNCS 201.Google Scholar
  12. 12.
    Jan Willem Klop and Roel de Vrijer. Extended Term Rewriting Systems. Technical Report CS-R9107, Centrum voor Wiskunde en Informatica, January 1991.Google Scholar
  13. 13.
    D. Michie. Memo functions and machine learning. Nature, 218:19–22, 1968.Google Scholar
  14. 14.
    Laurence C. Paulson. ML for the Working Programmer. Cambridge University Press, 1991.Google Scholar
  15. 15.
    Simon Peyton Jones. The Implementation of Functional Programming Languages. Prentice-Hall, 1987.Google Scholar
  16. 16.
    William Pugh and Tim Teitelbaum. Incremental computation via function caching. In Symposion on Principles of Programming Languages, pages 315–328, 1989.Google Scholar
  17. 17.
    Masataka Sassa and Eiichi Goto. A hashing method for fast set operations. Information Processing Letters, 5(2):31–34, June 1976.Google Scholar
  18. 18.
    Robert Sedgewick. Algorithms. Addison-Wesley, 1988.Google Scholar
  19. 19.
    Stefan Sokolowski. Applicative High Order Programming. Chapman & Hall Computing, 1991.Google Scholar
  20. 20.
    Philip Wadler. How to replace failure by a list of successes. In Functional Programming Languages and Computer Architecture, pages 113–128, 1985. LNCS 201.Google Scholar
  21. 21.
    Ben Wegbreit and Jay M. Spitzen. Proving properties of complex data structures. Journal of the ACM, 23(2):389–396, 1976.Google Scholar
  22. 22.
    Burkhart Wolff. Sharing-Analyse in funktionalen Sprachen. Technical Report 6/91, Universität Bremen, Studiengang Informatik, 1991. (in German).Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Stefan Kahrs
    • 1
  1. 1.Laboratory for Foundations of Computer ScienceUniversity of EdinburghUK

Personalised recommendations