Skip to main content

Compile-time garbage collection for lazy functional languages

  • Conference paper
  • First Online:
Memory Management (IWMM 1995)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 986))

Included in the following conference series:

Abstract

In this paper, it is shown how information obtained by static analysis can be used to annotate lazy functional programs for compile-time garbage collection. Three different methods for compile-time garbage collection are presented; compile-time garbage marking, explicit deallocation and destructive allocation.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Augustsson, L.: Compiling Pattern Matching. Lecture Notes in Computer Science 201 (1985) 368–381

    Google Scholar 

  2. Baker-Finch, C.A.: Relevance and Contraction: A Logical Basis for Strictness and Sharing Analysis. Submitted to the Journal of Functional Programming (1992)

    Google Scholar 

  3. Barth, J.M.: Shifting Garbage Collection Overhead to Compile Time. Communications of the ACM 20(7) (1977) 513–518

    Google Scholar 

  4. Deutsch, L.P., Bobrow, D.G.: An Efficient, Incremental, Automatic Garbage Collector. Communications of the ACM 19(9) (1976) 522–526

    Google Scholar 

  5. Guzmán, J.C., Hudak, P.: Single Threaded Polymorphic Lambda Calculus. Fifth IEEE Symposium on Logic in Computer Science (1990)

    Google Scholar 

  6. Hamilton, G.W.: Compile-Time Optimisation of Store Usage in Lazy Functional Programs. PhD Thesis, University of Stirling (1993)

    Google Scholar 

  7. Hamilton, G.W., Jones, S.B.: Compile-Time Garbage Collection by Necessity Analysis. Technical Report TR 67, Dept. of Computing Science and Mathematics, University of Stirling (1990)

    Google Scholar 

  8. Hudak, P.: A Semantic Model of Reference Counting and its Abstraction. In S. Abramsky and C. Hankin, editors, Abstract Interpretation of Declarative Languages (1987) 45–62

    Google Scholar 

  9. Hughes, S.: Static Analysis of Store Use in Functional Programs. PhD Thesis, Imperial College, University of London (1991)

    Google Scholar 

  10. Inoue, K., Seki, H., Yagi, H.: Analysis of Functional Programs to Detect Run-Time Garbage Cells. ACM Transactions on Programming Languages and Systems 10(4) (1988) 555–578

    Google Scholar 

  11. Jensen, T.P., Mogensen, T.Æ.: A Backwards Analysis for Compile-Time Garbage Collection. Lecture Notes in Computer Science 432 (1990) 227–239

    Google Scholar 

  12. Jensen, T.P.: Context Analysis of Functional Programs. Master's Thesis, University of Copenhagen (1990)

    Google Scholar 

  13. Johnsson, T.: Lambda Lifting: Transforming Programs to Recursive Equations. Proceedings of the Workshop on Implementation of Functional Languages (1985) 165–180

    Google Scholar 

  14. Jones, S.B., Le Métayer, D.: Compile-Time Garbage Collection by Sharing Analysis. Proceedings of the Fourth International Conference on Functional Programming Languages and Computer Architecture (1989) 54–74

    Google Scholar 

  15. Launchbury, J., Gill, A., Hughes, J., Marlow, S., Peyton Jones, S.L., Wadler, P.: Avoiding Unnecessary Updates. Proceedings of the Fifth Annual Glasgow Workshop on Functional Programming (1992) 144–153

    Google Scholar 

  16. Marlow, S.: Update Avoidance Analysis by Abstract Interpretation. Draft Proceedings of the Sixth Annual Glasgow Workshop on Functional Programming (1993)

    Google Scholar 

  17. Mycroft, A.: Abstract Interpretation and Optimising Transformations for Applicative Programs. PhD Thesis, University of Edinburgh (1981)

    Google Scholar 

  18. Schwarz, J.: Verifying the Safe Use of Destructive Operations in Applicative Programs. Proceedings of the Third International Symposium on Programming (1978) 395–411

    Google Scholar 

  19. Smetsers, S., Barendsen, E., van Eekelen, M., Plasmeijer, R.: Guaranteeing Safe Destructive Updates through a Type System with Uniqueness Information for Graphs. Technical Report 93-4, University of Nijmegen (1993)

    Google Scholar 

  20. Wadler, P.: Efficient Compilation of Pattern Matching. In S. L. Peyton Jones, editor, The Implementation of Functional Programming Languages (1987) 78–103

    Google Scholar 

  21. Wadler, P.: Deforestation: Transforming Programs to Eliminate Trees. Theoretical Computer Science 73 (1990) 231–248

    Google Scholar 

  22. Wadler, P.: Linear Types Can Change the World!. In M. Broy and C. Jones, editors, IFIP Working Conference on Programming Concepts and Methods (1990)

    Google Scholar 

  23. Wakeling, D., Runciman, C: Linearity and Laziness. Lecture Notes in Computer Science 523 (1991) 215–240

    Google Scholar 

  24. Wright, D.A., Baker-Finch, C.A.: Usage Analysis With Natural Reduction Types. Third International Workshop on Static Analysis (1993)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Henry G. Baler

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag

About this paper

Cite this paper

Hamilton, G.W. (1995). Compile-time garbage collection for lazy functional languages. In: Baler, H.G. (eds) Memory Management. IWMM 1995. Lecture Notes in Computer Science, vol 986. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60368-9_21

Download citation

  • DOI: https://doi.org/10.1007/3-540-60368-9_21

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-60368-9

  • Online ISBN: 978-3-540-45511-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics