Skip to main content

Efficient strictness analysis of Haskell

  • Conference paper
  • First Online:
Static Analysis (SAS 1994)

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

Included in the following conference series:

Abstract

Strictness analysis has been a living field of investigation since Mycroft's original work in 1980, and is getting increasingly significant with the still wider use of lazy functional programming languages. This paper focuses on an actual implementation of a strictness analyser for Haskell. The analyser uses abstract interpretation with chaotic fix-point iteration. The demand-driven nature of this iteration technique allows us to use large domains including function domains in the style of Burn et al. [BHA86] and Wadler [Wad87] and retain reasonable efficiency.

The implementation, furthermore, allows us to introduce a new way of handling polymorphism by parameterizing the strictness functions with domain-variables.

Finally we present some results of efficiency and precision and compare them to other works.

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. S Abramsky, Strictness Analysis And Polymorphic Invariance. LNCS 217, H Ganzinger & N D Jones (ed.): “Programs as Data Objects”, Springer Verlag 1986.

    Google Scholar 

  2. S Abramsky & C Hankin, Abstract interpretation of declarative languages. Ellis-Horwood 1987.

    Google Scholar 

  3. G Baraki, A Note on Abstract Interpretation of Polymorphic Functions. LNCS 523, J Hughes (ed): FPCA'91, Springer Verlag 1991.

    Google Scholar 

  4. G L Burn, C Hankin & S Abramsky, Strictness Analysis for Higher Order Functions. Science of Computer Programming vol. 7, pp. 249–278.

    Google Scholar 

  5. C Clack & S L Peyton Jones, Strictness Analysis — A Practical Approach. LNCS 201, FPCA'85, Springer Verlag 1985.

    Google Scholar 

  6. P Cousot & R Cousot, Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction of Approximations of Fixpoints. 4th POPL, Los Angeles, CA.

    Google Scholar 

  7. P Cousot & R Cousot, Static Determination of Dynamic Properties of Recursive Procedures. In E J Neuhold: “Formal Description of Programming Concepts”. North-Holland 1978.

    Google Scholar 

  8. A Ferguson & J Hughes, Fast Abstract Interpretation Using Sequential Algorithms. LNCS 724, P Cousot et al.: WSA'93, Springer Verlag 1993.

    Google Scholar 

  9. The GRASP Team, The Glorious Haskell Compilation System. User's Guide. Version 0.16 1992.

    Google Scholar 

  10. C Hankin & D Le Metayer, Lazy Type Inference for the Strictness Analysis of Lists. ESOP'94, LNCS 788, Springer-Verlag.

    Google Scholar 

  11. P F Hjæresen & K D Jensen, Strikthedsanalyse af Haskell, Master's Thesis. DIKU, University of Copenhagen, Denmark, 1994.

    Google Scholar 

  12. P Hudak et al., Report on the Programming Language Haskell, version 1.2. SIGPLAN Notices 27.

    Google Scholar 

  13. S Hunt & C Hankin, Fixed Points and Frontiers: A New Perspective. Journal of Functional Programming vol. 1, no. 1.

    Google Scholar 

  14. N D Jones & A Mycroft, Dataflow Analysis of Applicative Programs Using Minimal Function Graphs. 13th POPL, St. Petersburg, Florida. 1986.

    Google Scholar 

  15. N D Jones & M Rosendahl, Higher Order Functional Graphs. ALP'94, LNCS, Springer-Verlag 1994.

    Google Scholar 

  16. A Mycroft, The theory and practise of transforming call-by-need into call-by-value. International symposium on programming '80, Paris, France.

    Google Scholar 

  17. A Mycroft & M Rosendahl, Minimal function graphs are not instrumented. WSA'92, Bordeaux, France.

    Google Scholar 

  18. F Nielson & H R Nielson, The Tensor Product in Wadlers Analysis of Lists. ESOP'92

    Google Scholar 

  19. M Rosendahl, Higher Order Chaotic Iteration Sequences. LNCS 714, PLILP'93, Springer Verlag 1993.

    Google Scholar 

  20. M Rosendahl, Higher order fixpoint iteration. Unpublished 1993.

    Google Scholar 

  21. M Rosendahl & A Mycroft, Minimal Function Graph Semantics for a Lazy Language, Unpublished 1993.

    Google Scholar 

  22. J Seward, Towards a Strictness Analyser for Haskell: Putting Theory into Practice. 1991, Master's Thesis, University of Manchester.

    Google Scholar 

  23. J Seward, Polymorphic Strictness Analysis Using Frontiers, PEPM'93, Copenhagen, Denmark.

    Google Scholar 

  24. P Wadler Strictness analysis on non-flat domains (by Abstract interpretation over finite domains). In [AH87].

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Baudouin Le Charlier

Rights and permissions

Reprints and permissions

Copyright information

© 1994 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Jensen, K.D., Hjæresen, P., Rosendahl, M. (1994). Efficient strictness analysis of Haskell. In: Le Charlier, B. (eds) Static Analysis. SAS 1994. Lecture Notes in Computer Science, vol 864. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58485-4_51

Download citation

  • DOI: https://doi.org/10.1007/3-540-58485-4_51

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

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

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics