Skip to main content

A Usage Analysis with Bounded Usage Polymorphism and Subtyping

  • Conference paper
  • First Online:

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

Abstract

Usage analysis aims to predict the number of times a heap allocated closure is used. Previously proposed usage analyses have proved not to scale up well to large programs. In this paper we presen a powerful and accurate ype based analysis designed to scale up for large programs. The key features of the ype system are usage subtyping and bounded usage polymorphism. Bounded polymorphism can lead to huge constrain sets so to express constraints compactly we introduce a new expressive form of constraints which allows constraints to be represented compactly through calls to constraint abstractions.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. U. Boquist and T. Johnsson. The grin project:A highly optimising back end for lazy functional languages. In Proc. of IFL’ 96, Bad Godesberg, Germany. Springer Verlag LNCS 1268, 1996.

    Google Scholar 

  2. E. Barendsen and S. Smetsers. Uniqueness Typing for Functional Languages with Graph Rewriting Semantics. Mathematical Structures in Computer Science, 6:579–612, 1996.

    MATH  MathSciNet  Google Scholar 

  3. D. Dussart, F. Henglein, and C. Mossin. Polymorphic recursion and subtype qualifications: Polymorphic binding-time analysis in polynomial time. In proceedings of 2nd Static Analysis Symposium, September 1995.

    Google Scholar 

  4. Karl-Filip Faxén. Optimizing lazy functional programs using flow inference. In Proc.of SAS’ 95, pages 136–153. Springer-Verlag, LNCS 983, September 1995.

    Google Scholar 

  5. Karl-Filip Faxén. Analysing, Transforming and Compiling Lazy Functional Programs. PhD thesis, Royal Institute of Technology, Sweden, June 1997.

    Google Scholar 

  6. J. Fairbairn and S. Wray. TIM: A Simple, Lazy Abstract Machine to Execute Supercombinators. In Proc. of FPCA’ 87, pages 34–45. Springer Verlag LNCS 274, September 1987.

    Google Scholar 

  7. Jean-Yves Girard. Linear logic. Theoretical Computer Science, 50:1–102, 1987.

    Article  MATH  MathSciNet  Google Scholar 

  8. J. Gustavsson and D. Sands. A foundation for space-safe transformations of call-by-need programs. In Proc.of HOOTS’ 99, volume 26 of ENTCS. Elsevier, 1999.

    Google Scholar 

  9. J. Gustavsson and J. Svenningsson. Constrain abstractions. In Proc.of Second Symposium on Programs as Data Objects, LNCS.Springer Verlag, 2001.To Appear.

    Google Scholar 

  10. J. Gustavsson. A Type Based Sharing Analysis for Update Avoidance and Optimisation. In Proc.of CFP’ 98, pages 39–50, Baltimore, Maryland, September 1998.

    Google Scholar 

  11. J. Gustavsson. A Type Based Sharing Analysis for Update Avoidance and Optimisation. Licentiate thesis, May 1999.

    Google Scholar 

  12. J. Launchbury. A Natural Semantics for Lazy Evaluation. In Proc. of POPL’ 93, Charleston, N.Carolina, 1993.

    Google Scholar 

  13. J. Launchbury, A. Gill, J. Hughes, S. Marlow, S.L. Peyton Jones, and P. Wadler. Avoiding Unnecessary Updates. In J. Launchbury and P.M. Sansom,editors, Functional Programming, Workshops in Computing, Glasgow, 1992.

    Google Scholar 

  14. S. Marlow.Update Avoidance Analysis by Abstract Interpretation. In Proc. 1993 Glasgow Workshop on Functional Programming, Workshops in Computing. Springer-Verlag, 1993.

    Google Scholar 

  15. T. Mogensen. Types for 0,1 or many uses. In Proc.of IFL’ 97, pages 112–122. Springer-Verlag, LNCS 1467, September 1997.

    Google Scholar 

  16. C. Mossin. Flow Analysis of Typed Higher-Order Programs (Revised Version). PhD thesis, University of Copenhagen, Denmark, August 1997.

    Google Scholar 

  17. Simon L. Peyton Jones. Implementing lazy functional languages on stock hardware:the spineless tagless g-machine. Journal of Functional Programming, 2(2):127–202, July 1992.

    Article  MATH  Google Scholar 

  18. S. Peyton Jones, W. Partain, and A. Santos. Let-floating: moving bindings to give faster programs. In Proc.of CFP’ 96, pages 1–12. ACM, May 1996.

    Google Scholar 

  19. R. Peña and C. Segura. Non-determinism analysis in a parallel-functional language. In Proceedings of the 12th International Workshop of Functional Languages, LNCS, September 2000. Also in this volume.

    Google Scholar 

  20. Jakob Rehof and Manuel Fändrich. Type-Based Flow Analysis: From Polymorphic Subtyping to CFL-Reachability. In Proceedings of 2001 Symposium on Principles of Programming Languages, 2001. To appear.

    Google Scholar 

  21. P. Sestoft. Analysis and Efficient Implementation of Functional Programs. PhD thesis, DIKU, University of Copenhagen, Denmark, October 1991.

    Google Scholar 

  22. P. Sestoft. Deriving a lazy abstract machine. Journal of Functional Programming, 7(3):231–264, May 1997.

    Article  MATH  MathSciNet  Google Scholar 

  23. Josef Svenningsson. An efficient algorithm for a sharing analysis with polymorphism and subtyping. Masters thesis, June 2000.

    Google Scholar 

  24. J.-P. Talpin and P. Jouvelot. The ype and effiect discipline. Information and Computation, 111(2), 1994.

    Google Scholar 

  25. D.N. Turner, P. Wadler, and C. Mossin.Once upon a type. In Proc. of FPCA, La Jolla, 1995.

    Google Scholar 

  26. Keith Wansbrough and Simon Peyton Jones. Once Upon a Polymorphic Type. Technical Report TR-1998-19, Departmen of Computing Science, University of Glasgow, December 1998.

    Google Scholar 

  27. Keith Wansbrough and Simon Peyton Jones. Once Upon a Polymorphic Type. In Proc.of POPL’ 99, January 1999.

    Google Scholar 

  28. Keith Wansbrough and Simon Peyton Jones. Simple Usage Polymorphism. In ACM SIGPLAN Workshop on Types in Compilation, September 2000.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gustavsson, J., Svenningsson, J. (2001). A Usage Analysis with Bounded Usage Polymorphism and Subtyping. In: Mohnen, M., Koopman, P. (eds) Implementation of Functional Languages. IFL 2000. Lecture Notes in Computer Science, vol 2011. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45361-X_9

Download citation

  • DOI: https://doi.org/10.1007/3-540-45361-X_9

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-41919-8

  • Online ISBN: 978-3-540-45361-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics