Types for 0, 1 or many uses

  • Torben Æ. Mogensen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1467)


This paper will present an analysis for detecting single uses of values in functional programs during call-by-need reduction. There are several reasons why such information can be useful. The Clean language uses a uniqueness type system for detecting single-threaded uses which allow destructive updating. Single-use information has also been proposed for compile-time garbage collection. Turner, Wadler and Mossin have presented a single-use analysis which is intended to detect cases where call-by-need can safely be replaced by call-by-name.

This paper will focus on this last application of single-use analysis and present a type-based analysis which overcomes some limitations present in the abovementioned analysis.


Program analysis storage management functional programming types constraints 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Erik Barendsen and Sjaak Smetsers. Uniqueness type inference. In PLILP'95, Utrecht, The Netherlands (Lecture Notes in Computer Science, vol. 982), pages 189–206. Springer-Verlag LNCS 982, 1995.Google Scholar
  2. [2]
    W.F. Dowling and J.H. Gallier. Linear-time algorithms for testing the satisfiability of propositional horn formulae. Journal of Logic Programming, 3: 267–284, 1984.MathSciNetCrossRefGoogle Scholar
  3. [3]
    Thomas P. Jensen and Torben Æ. Mogensen. A backwards analysis for compiletime garbage collection. In ESOP '90, Copenhagen, Denmark (Lecture Notes in Computer Science, vol. 432), pages 227–239. Springer-Verlag LNCS 432, 1990.Google Scholar
  4. [4]
    Simon L. Peyton Jones and David Lester. Implementing Functional Languages. Prentice Hall Series in Computer Science. Prentice Hall, New York, London, Toronto, Syney, Tokyo, Signapore, 1 edition, 1992.Google Scholar
  5. [5]
    G. Kildall. A unified approach to global program optimization. In Proceedings of the 19th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 194–206. ACM Press, January 1993.Google Scholar
  6. [6]
    M.J. Plasmeijer and M.C.J.D. van Eekelen. Concurrent clean 1.0 language report. Technical report, Computing Science Institute, University of Nijmegen, 1995.Google Scholar
  7. [7]
    Jakob Rehof and Torben Æ. Mogensen. Tractable constraints in finite semilattices. In R. Cousot and D.A. Sscmidt, editors, Third International Static Analysis Symposium (SAS), volume 1145 of Lecture Notes in Computer Science, pages 285–301. Springer, September 1996.Google Scholar
  8. [8]
    Mads Tofte, Lars Birkedal, Martin Elsman, Niels Hallenberg, Tommy Højfeld Olesen, Peter Sestoft, and Peter Bertelsen. Programming with regions in the ML Kit. Technical report, Dept. of Computer Science, University of Copenhagen, 1997.Google Scholar
  9. [9]
    Mads Tofte and Jean-Pierre Talpin. Implementing the call-by-value lambda-calculus using a stack of regions. In Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, January 1994.Google Scholar
  10. [10]
    David N. Turner, Philip Wadler, and Christian Mossin. Once upon a type. In 1th International Conference on Functional Programming and Computer Architecture, pages 1–11, La Jolla, California, June 1995. ACM Press.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Torben Æ. Mogensen
    • 1
  1. 1.DIKUCopenhagen ODenmark

Personalised recommendations