Abstract
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.
Preview
Unable to display preview. Download preview PDF.
References
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mogensen, T.Æ. (1998). Types for 0, 1 or many uses. In: Clack, C., Hammond, K., Davie, T. (eds) Implementation of Functional Languages. IFL 1997. Lecture Notes in Computer Science, vol 1467. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0055427
Download citation
DOI: https://doi.org/10.1007/BFb0055427
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-64849-9
Online ISBN: 978-3-540-68528-9
eBook Packages: Springer Book Archive