Abstract
Since the mid '80s, compiler writers for functional languages (especially lazy ones) have been writing papers about identifying and exploiting thunks and lambdas that are used only once. However it has proved difficult to achieve both power and simplicity in practice. We describe a new, modular analysis for a higher-order language, which is both simple and effective, and present measurements of its use in a full-scale, state of the art optimising compiler. The analysis finds many single-entry thunks and one-shot lambdas and enables a number of program optimisations.
Supplemental Material
- Erik Barendsen and Sjaak Smetsers. Uniqueness typing for functional languages with graph rewriting semantics. Mathematical Structures in Computer Science, 6(6):579--612, 1996.Google Scholar
Cross Ref
- Andy Gill. Cheap Deforestation for Non-strict Functional Languages. PhD thesis, University of Glasgow, Department of Computer Schence, 1996.Google Scholar
- Andy Gill, John Launchbury, and Simon Peyton Jones. A Short Cut to Deforestation. In Proceedings of the Sixth ACM Conference on Functional Programming Languages and Computer Architecture, pages 223--232, 1993. Google Scholar
Digital Library
- Jean-Yves Girard. Linear logic: its syntax and semantics. In Proceedings of the workshop on Advances in linear logic, pages 1--42. Cambridge University Press, 1995. Google Scholar
Digital Library
- Benjamin Goldberg. Detecting sharing of partial applications in functional programs. In Functional Programming Languages and Computer Architecture, volume 274 of LNCS, pages 408--425. Springer-Verlag, 1987. Google Scholar
Digital Library
- Jörgen Gustavsson. A type based sharing analysis for update avoidance and optimisation. In Proceedings of the Third ACM SIGPLAN International Conference on Functional Programming (ICFP'98), pages 39--50. ACM, 1998. Google Scholar
Digital Library
- Jörgen Gustavsson and Josef Sveningsson. A usage analysis with bounded usage polymorphism and subtyping. In Implementation of Functional Languages (IFL 2000), Selected Papers, volume 2011 of LNCS, pages 140--157. Springer, 2001. Google Scholar
Digital Library
- Jurriaan Hage, Stefan Holdermans, and Arie Middelkoop. A generic usage analysis with subeffect qualifiers. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming (ICFP'07), pages 235--246. ACM, 2007. Google Scholar
Digital Library
- Ralf Hinze. Projection-based strictness analysis - theoretical and practical aspects. PhD thesis, Bonn University, 1995.Google Scholar
- Stefan Holdermans and Jurriaan Hage. Making "stricternes" more relevant. In PEPM'10: Proceedings of the 2010 ACM SIGPLAN workshop on Partial evaluation and program manipulation, pages 121--130. ACM, 2010. Google Scholar
Digital Library
- Paul Hudak. A semantic model of reference counting and its abstraction. In Proceedings of the 1986 ACM Conference on Lisp and Functional Programming, pages 351--363. ACM, 1986. Google Scholar
Digital Library
- Richard Jones. Tail recursion without space leaks. J. Funct. Program., 2 (1):73--79, 1992.Google Scholar
Cross Ref
- John Launchbury, Andy Gill, John Hughes, Simon Marlow, Simon Peyton Jones, and PhilipWadler. Avoiding unnecessary updates. In Proceedings of the 1992 GlasgowWorkshop on Functional Programming,Workshops in Computing, pages 144--153. Springer, 1993. Google Scholar
Digital Library
- Simon Marlow and Simon Peyton Jones. Making a fast curry: push/enter vs. eval/apply for higher-order languages. J. Funct. Program., 16(4-5): 415--449, 2006. Google Scholar
Digital Library
- Matthew Might and Olin Shivers. Improving flow analyses via ΓCFA: abstract garbage collection and counting. In Proceedings of the Eleventh ACM SIGPLAN International Conference on Functional Programming (ICFP'06), pages 13--25. ACM, 2006. Google Scholar
Digital Library
- Andrew Moran and David Sands. Improvement in a Lazy Context: An Operational Theory for Call-by-Need. In POPL'99: Proceedings of the 26th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 43--56. ACM, 1999. Google Scholar
Digital Library
- Will Partain. The nofib benchmark suite of Haskell programs. In Proceedings of the 1992 Glasgow Workshop on Functional Programming, Workshops in Computing, pages 195--202. Springer, 1993. Google Scholar
Digital Library
- Simon Peyton Jones. Implementing Lazy Functional Languages on Stock Hardware: The Spineless Tagless G-Machine. J. Funct. Program., 2(2): 127--202, 1992.Google Scholar
Cross Ref
- Simon Peyton Jones andWill Partain. Measuring the effectiveness of a simple strictness analyser. In Proceedings of the 1993 Glasgow Workshop on Functional Programming, pages 201--220. Springer, 1994.Google Scholar
Cross Ref
- Simon Peyton Jones and André Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1-3):3--47, 1998. Google Scholar
Digital Library
- Simon Peyton Jones, Will Partain, and André Santos. Let-floating: Moving Bindings to Give Faster Programs. In Proceedings of the First ACM SIGPLAN International Conference on Functional Programming (ICFP'96), pages 1--12. ACM, 1996. Google Scholar
Digital Library
- Amr Sabry and Matthias Felleisen. Reasoning about programs in continuation-passing style. In Proceedings of the 1992 ACM Conference on Lisp and Functional Programming, pages 288--298. ACM, 1992. Google Scholar
Digital Library
- Ilya Sergey, Dimitrios Vytiniotis, and Simon Peyton Jones. Modular, Higher-Order Cardinality Analysis in Theory and Practice. Extended version. Technical Report MSR-TR-2013--112, Microsoft Research, 2013. Available at http://research.microsoft.com/apps/pubs/?id=204260.Google Scholar
- Peter Sestoft. Deriving a lazy abstract machine. J. Funct. Program., 7(3): 231--264, 1997. Google Scholar
Digital Library
- David N. Turner and Philip Wadler. Operational interpretations of linear logic. Theor. Comput. Sci., 227(1-2):231--248, 1999. Google Scholar
Digital Library
- David N. Turner, Philip Wadler, and Christian Mossin. Once upon a type. In Proceedings of the Seventh ACM Conference on Functional Programming Languages and Computer Architecture, pages 1--11. ACM, 1995. Google Scholar
Digital Library
- David Van Horn and Matthew Might. Abstracting abstract machines. In Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming(ICFP'10), pages 51--62. ACM, 2010. Google Scholar
Digital Library
- Philip Wadler and John Hughes. Projections for strictness analysis. In Functional Programming Languages and Computer Architecture, volume 274 of LNCS, pages 385--407. Springer-Verlag, 1987. Google Scholar
Digital Library
- Keith Wansbrough. Simple Polymorphic Usage Analysis. PhD thesis, Computer Laboratory, University of Cambridge, 2002.Google Scholar
- Keith Wansbrough and Simon Peyton Jones. Once Upon a Polymorphic Type. In POPL'99: Proceedings of the 26th annual ACM SIGPLANSIGACT symposium on Principles of programming languages, pages 15--28. ACM, 1999. Google Scholar
Digital Library
Index Terms
Modular, higher-order cardinality analysis in theory and practice
Recommendations
Modular, higher-order cardinality analysis in theory and practice
POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesSince the mid '80s, compiler writers for functional languages (especially lazy ones) have been writing papers about identifying and exploiting thunks and lambdas that are used only once. However it has proved difficult to achieve both power and ...
Functional programming languages for verification tools: a comparison of Standard ML and Haskell
We compare Haskell with Standard ML as programming languages for verification tools based on our experience developing the verification platform Truth in Haskell and the Edinburgh Concurrency Workbench (CWB) in Standard ML. We review not only technical ...
Layout-sensitive language extensibility with SugarHaskell
Haskell '12: Proceedings of the 2012 Haskell SymposiumProgrammers need convenient syntax to write elegant and concise programs. Consequently, the Haskell standard provides syntactic sugar for some scenarios (e.g., do notation for monadic code), authors of Haskell compilers provide syntactic sugar for more ...







Comments