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.
Preview
Unable to display preview. Download preview PDF.
References
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.
Lennart Augustsson. Implementing haskell overloading. In Proceedings of the Functional Programming Languages and Computer Architecture Conference, Copenhagen, Denmark, June 1993.
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.
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.
Cousot and Cousot. Static determination of dynamic properties of recursive procedures. In E.J. Neuhold, editor, Formal Description of Programming Concepts. North-Holland, 1978.
Charles Consel. Fast strictness analysis via symbolic fixpoint iteration. Unpublished. Yale University, Department of Computer Science, September 1991.
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.
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.
Sebastian Hunt and Chris Hankin. Fixed points and frontiers: a new perspective. Journal of Functional Programming, 1(1):91–120, January 1991.
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.
John Hughes and John Launchbury. Projections for polymorphic first-order strictness analysis. In Mathematical Structures in Computer Science, volume 2, pages 301–326, 1992.
C. L. Hankin and D. Le Métayer. Deriving algorithms from type inference systems: Application to strictness analysis. In Proceedings of POPL'94, 1994.
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.
Sebastian Hunt. Abstract Interpretation of Functional Languages: From Theory to Practice. PhD thesis, Imperial College, University of London, 1991.
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.
Mark P. Jones. Partial evaluation for dictionary-free overloading. Technical Report RR-959, Department of Computer Science, Yale University, April 1993.
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.
Christopher Charles Martin. Algorithms for Finding Fixpoints in Abstract Interpretation. PhD thesis, Imperial College, University of London, June 1992.
George C. Nelan. Firstification. PhD thesis, Arizona State University, 1991.
F. Nielson and H.R. Nielson. Finiteness conditions for fixed point iteration. Technical report, Computer Science Department, Aarhus University, Denmark, February 1992.
Eric Nocker. Strictness analysis using abstract reduction. In Proceedings of FPCA93, Copenhagen, Denmark, June 1993.
Will Partain. The nof ib benchmark suite of haskell programs. In Fifth Annual Glasgow Workshop on Functional Programming, Ayr, 1992.
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.
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.
Mads Rosendahl. Higher-order chaotic iteration sequences. In PLILP'93, pages 332–345, Tallinn, Estonia, 1993. Springer-Verlag LNCS714.
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.
Julian Seward. Abstract Interpretation: A Quantitative Assessment. PhD thesis, Department of Computer Science, University of Manchester, Oxford Road, Manchester M13 9PL, UK, October 1994.
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.
Author information
Authors and Affiliations
Editor information
Rights 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