Skip to main content

Beyond prototype implementations: Polymorphic projection analysis for Glasgow Haskell

  • Contributed Papers
  • Conference paper
  • First Online:
Static Analysis (SAS 1995)

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

Included in the following conference series:

Abstract

Building effective abstract interpreters requires careful attention to both theory and engineering issues. The theory of abstract interpretation is well developed, but the engineering side has fallen behind somewhat, an unfortunate event given that abstract interpretation is potentially a key technology for declarative language compilation. This paper shows the thinking behind the design and implementation of a first-order, polymorphic projection analyser for Haskell, capable of detecting head strictness, and therefore suitable for supporting all known strictness-related transformations. Development culminated in a successful trial installation in version 0.19 of the Glasgow Haskell Compiler, and the system has been used to analyse a range of Haskell programs, including an earlier version of itself, 13000 lines long.

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. Zena Ariola, Matthias Felleisen, John Maraist, Martin Odersky, and Philip Wadler. A call-by-need lambda calculus. In 22nd Symposium on Principles of Programming Languages, San Francisco, California, January 1995. ACM Press.

    Google Scholar 

  2. Lennart Augustsson. Implementing haskell overloading. In Proceedings of the Functional Programming Languages and Computer Architecture Conference, Copenhagen, Denmark, June 1993.

    Google Scholar 

  3. Gebreselassie Baraki. Abstract Interpretation of Polymorphic Higher-Order Functions. PhD thesis, Department of Computer Science, University of Glasgow, Lilybank Gardens, Glasgow G12 8QQ, UK, February 1993. Also available as a Glasgow Tech Report FP-93-07.

    Google Scholar 

  4. G.L. Burn, C.L. Hankin, and S. Abramsky. The theory of strictness analysis for higher-order functions. In Proceedings of the Workshop on Programs as Data Objects, pages 42–62, DIKU, Copenhagen, Denmark, 17–19 October 1985. Springer-Verlag LNCS 217.

    Google Scholar 

  5. Cousot and Cousot. Static determination of dynamic properties of recursive procedures. In E.J. Neuhold, editor, Formal Description of Programming Concepts. North-Holland, 1978.

    Google Scholar 

  6. Charles Consel. Fast strictness analysis via symbolic fixpoint iteration. Unpublished. Yale University, Department of Computer Science, September 1991.

    Google Scholar 

  7. Alex Ferguson and John Hughes. Fast abstract interpretation using sequential algorithms. In Proceedings of the Chalmers Programming Methodology Group Winter Meeting, January 1993. Department of Computer Sciences, Chalmers University of Technology.

    Google Scholar 

  8. Cordelia V. Hall. Using strictness analysis in practice for data structures. In John T. O'Donnell and Kevin Hammond, editors, Glasgow Workshop on Functional Programming, Workshops in Computing, Ayr, Scotland, July 1993. Springer-Verlag.

    Google Scholar 

  9. Sebastian Hunt and Chris Hankin. Fixed points and frontiers: a new perspective. Journal of Functional Programming, 1(1):91–120, January 1991.

    Google Scholar 

  10. Pieter H. Hartel and Koen G. Langendoen. Benchmarking implementations of lazy functional languages. Technical report, Department of Computer Systems, Faculty of Mathematics and Computer Science, University of Amsterdam, December 1992.

    Google Scholar 

  11. John Hughes and John Launchbury. Projections for polymorphic first-order strictness analysis. In Mathematical Structures in Computer Science, volume 2, pages 301–326, 1992.

    Google Scholar 

  12. C. L. Hankin and D. Le Métayer. Deriving algorithms from type inference systems: Application to strictness analysis. In Proceedings of POPL'94, 1994.

    Google Scholar 

  13. John Hughes. Compile-time analysis of functional programs. In David A. Turner, editor, Research Topics in Functional Programming. Addison-Wesley Publishing Company, 1990. From the 1987 Year of Programming, University of Texas, Austin, Texas.

    Google Scholar 

  14. Sebastian Hunt. Abstract Interpretation of Functional Languages: From Theory to Practice. PhD thesis, Imperial College, University of London, 1991.

    Google Scholar 

  15. Neil D. Jones and Alan Mycroft. Data flow analysis of applicative programs using minimal function graphs: Abridged version. In Thirteenth ACM Symposium on Principles of Programming Languages, St. Petersburg, Florida, pages 296–306, 1986.

    Google Scholar 

  16. Mark P. Jones. Partial evaluation for dictionary-free overloading. Technical Report RR-959, Department of Computer Science, Yale University, April 1993.

    Google Scholar 

  17. R. Kubiak, J. Hughes, and J. Launchbury. A prototype implementation of projection-based first-order polymorphic strictness analysis. In R. Heldal, editor, Draft Proceedings of Fourth Annual Glasgow Workshop on Functional Programming, pages 322–343, Skye, August 13–15 1991.

    Google Scholar 

  18. Christopher Charles Martin. Algorithms for Finding Fixpoints in Abstract Interpretation. PhD thesis, Imperial College, University of London, June 1992.

    Google Scholar 

  19. George C. Nelan. Firstification. PhD thesis, Arizona State University, 1991.

    Google Scholar 

  20. F. Nielson and H.R. Nielson. Finiteness conditions for fixed point iteration. Technical report, Computer Science Department, Aarhus University, Denmark, February 1992.

    Google Scholar 

  21. Eric Nocker. Strictness analysis using abstract reduction. In Proceedings of FPCA93, Copenhagen, Denmark, June 1993.

    Google Scholar 

  22. Will Partain. The nof ib benchmark suite of haskell programs. In Fifth Annual Glasgow Workshop on Functional Programming, Ayr, 1992.

    Google Scholar 

  23. Simon Peyton Jones and Chris Clack. Finding fixpoints in abstract interpretation. In S. Abramsky and C.L. Hankin, editors, Abstract Interpretation of Declarative Languages, Computers and Their Applications, chapter 11, pages 246–265. Ellis Horwood, 1987.

    Google Scholar 

  24. Will Partain and Simon L. Peyton Jones. Measuring the effectiveness of a simple strictness analyser. In John T. O'Donnell and Kevin Hammond, editors, Glasgow Workshop on Functional Programming, Workshops in Computing, Ayr, Scotland, July 1993. Springer-Verlag.

    Google Scholar 

  25. Mads Rosendahl. Higher-order chaotic iteration sequences. In PLILP'93, pages 332–345, Tallinn, Estonia, 1993. Springer-Verlag LNCS714.

    Google Scholar 

  26. Julian Seward. Towards a strictness analyser for haskell: Putting theory into practice. Master's thesis, University of Manchester, Department of Computer Science, 1991. Available as University of Manchester Technical Report UMCS-92-2-2.

    Google Scholar 

  27. Julian Seward. Abstract Interpretation: A Quantitative Assessment. PhD thesis, Department of Computer Science, University of Manchester, Oxford Road, Manchester M13 9PL, UK, October 1994.

    Google Scholar 

  28. P.L. Wadler. Strictness analysis on non-flat domains (by abstract interpretation over finite domains). In S. Abramsky and C.L. Hankin, editors, Abstract Interpretation of Declarative Languages, chapter 12, pages 266–275. Ellis Horwood Ltd., Chichester, West Sussex, England, 1987.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Alan Mycroft

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Seward, J. (1995). Beyond prototype implementations: Polymorphic projection analysis for Glasgow Haskell. In: Mycroft, A. (eds) Static Analysis. SAS 1995. Lecture Notes in Computer Science, vol 983. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60360-3_51

Download citation

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

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-60360-3

  • Online ISBN: 978-3-540-45050-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics