Abstract
We introduce a constraint-based framework for strictness analysis applicable to ML style languages supporting higher-order functions, let-style polymorphism and algebraic data types. The analysis produces strictness types for expressions in a program. A strictness type is defined using Boolean constraints. Perhaps surprisingly, the Boolean constraints that arise during analysis are in HORN, which makes the operations on them amenable to efficient implementation. We have implemented the approach within a highly optimising Haskell compiler (GHC) and give a comparison with the current strictness analyser of GHC.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
G. L. Burn, C. L. Hankin, and S. Abramsky. The theory and practice of strictness for higher order functions. Science of Computer Programming, 7:249–278, 1986.
D. Dussart, F. Henglein, and C. Mossin. Polymorphic recursion and subtype qualifications: Polymorphic binding-time analysis in polynomial time. In A. Mycroft, editor, Proc. Second Int. Symp. Static Analysis, volume 983 of LNCS, pages 118–135. Springer-Verlag, 1995.
K. Glynn, P. J. Stuckey, M. Sulzmann, and H. Søndergaard. Boolean constraints for binding-time analysis. To appear in Second Symposium on Programs as Data Objects (PADO-II), volume 2053 of LNCS. Springer-Verlag, 2001.
K. Jensen, P. Hjæresen, and M. Rosendahl. Efficient strictness analysis for haskell. In Proceedings of the First International Static Analysis Symposium, volume 864 of LNCS, pages 346–362. Springer-Verlag, 1994.
T. Jensen. Disjunctive program analysis for algebraic data types. ACM Trans. on Programming Languages and Systems, 19(5):751–803, 1997.
T. Jensen. Inference of polymorphic and conditional strictness properties. In Proc. Twenty-Fifth ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages. ACM Press, 1998.
T. Kuo and P. Mishra. Strictness analysis: A new perspective based on type inference. In Functional Programming Languages and Computer Architecture, pages 260–272, September 1989.
A. Mycroft. Abstract Interpretation and Optimising Transformations for Applicative Programs. PhD thesis, University of Edinburgh, 1981.
E. Nocker. Strictness analysis using abstract reduction. In Proceedings Conference on Functional Programming Languages and Computer Architectures (FPCA’ 93). ACM Press, 1993.
S. Peyton Jones and W. Partain. Measuring the effectiveness of a simple strictness analyser. In Hammond and O’Donnell, editors, Functional Programming, Glasgow 1993, Springer Workshops in Computer Science, pages 201–220, 1993.
J. Seward. Beyond prototype implementations: Polymorphic projection analysis for glasgow haskell. In Proceedings of the Second International Static Analysis Symposium, volume 983 of LNCS, pages 382–399. Springer-Verlag, 1995.
P. Wadler. Strictness analysis on non-flat domains. In S. Abramsky and C.L. Hankin, editors, Abstract Interpretation of Declarative Languages, pages 266–275. Ellis Horwood, 1987.
P. Wadler and J. Hughes. Projections for strictness analysis. In Proceedings of the 3rd International Conference on Functional Programming Languages and Computer Architecture, volume 274 of LNCS, pages 385–407. Springer, 1987.
D.A. Wright. A new technique for strictness analysis. In Proceedings of TAPSOFT, volume 494 of LNCS, pages 235–258. Springer, 1991.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Glynn, K., Stuckey, P.J., Sulzmann, M. (2001). Effective Strictness Analysis with HORN Constraints. In: Cousot, P. (eds) Static Analysis. SAS 2001. Lecture Notes in Computer Science, vol 2126. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-47764-0_5
Download citation
DOI: https://doi.org/10.1007/3-540-47764-0_5
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42314-0
Online ISBN: 978-3-540-47764-8
eBook Packages: Springer Book Archive