Abstract
Adapting a strictness analyser to have it take into account explicit strictness annotations can be a tricky business. Straightforward extensions of analyses based on relevance typing are likely to either be unsafe or fail to pick the fruits of increases in strictness that are introduced through annotations. We propose a more involved adaptation of relevance typing, that can be used to derive strictness analyses that are both safe and effective in the presence of explicit strictness annotations. The resulting type system provides a firm foundation for implementations of type-based strictness analysers in compilers for lazy programming languages such as Haskell and Clean.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
Amtoft, T.: Minimal thunkification. In: Cousot, P., Falaschi, M., Filé, G., Rauzy, A. (eds.) Static Analysis, Third International Workshop, WSA’93, Proceedings, Padova, Italy, 22–24 September 1993. Lecture Notes of Computer Science, vol. 724, pp. 218–229. Springer, Berlin (1993)
Anderson, A.R., Belnap, N.D. Jr.: Entailment: The Logic of Relevance and Necessity, vol. 1. Princeton University Press, Princeton (1975)
Anderson, A.R., Belnap, N.D. Jr., Dunn, J.M.: Entailment: The Logic of Relevance and Necessity, vol. 2. Princeton University Press, Princeton (1992)
Baker-Finch, C.A.: Relevant logic and strictness analysis. In: Billaud, M., Castéran, P., Corsini, M.-M., Musumbu, K., Rauzy, A. (eds.) Actes WSA’92 Workshop on Static Analysis (Bordeaux), Laboratoire Bordelais de Recherche en Informatique (LaBRI), Proceedings, 23–25 September 1992. Series Bigre, vols. 81–82, pp. 221–228. Atelier Irisa, Rennes (1992)
Barendregt, H.P., Kennaway, R., Klop, J.W., Sleep, M.R.: Needed reduction and spine strategies for the lambda calculus. Inf. Comput. 75(3), 191–231 (1987)
Benton, N.: Strictness analysis of lazy functional programs. Ph.D. thesis, University of Cambridge (1992)
Burn, G.L., Hankin, C., Abramsky, S.: The theory of strictness analysis for higher order functions. In: Ganzinger, H., Jones, N.D. (eds.) Programs as Data Objects, Proceedings of a Workshop, Copenhagen, Denmark, 17–19 October 1985. Lecture Notes in Computer Science, vol. 217, pp. 42–62. Springer, Berlin (1986)
Cervesato, I., Pfenning, F.: A linear logical framework. Inf. Comput. 179(1), 19–75 (2002)
Coppo, M., Damiani, F., Giannini, P.: Strictness analysis, totality, and non-standard-type inference. Theor. Comput. Sci. 272(1–2), 69–112 (2002)
Davis, K., Wadler, P.: Backwards strictness analysis: Proved and improved. In: Davis, K., Hughes, J. (eds.) Functional Programming, Proceedings of the 1989 Glasgow Workshop, Workshops in Computing, 21–23 August 1989, Fraserburgh, Scotland, UK, pp. 12–30. Springer, Berlin (1990)
van Eekelen, M., de Mol, M.: Proof tool support for explicit strictness. In: Butterfield, A., Grelck, C., Huch, F. (eds.) Implementation and Application of Functional Languages, 17th International Workshop, Revised Selected Papers, IFL 2005, Dublin, Ireland, September 19–21. Lecture Notes in Computer Science, vol. 4015, pp. 37–54. Springer, Berlin (2006)
Gill, A., Launchbury, J., Jones, S.P.: A short cut to deforestation. In: FPCA’93 Conference on Functional Programming and Computer Architecture, Copenhagen, Denmark, 9–11 June 1993, pp. 223–232. ACM Press, New York (1993)
Glynn, K., Stuckey, P.J., Sulzmann, M.: Effective strictness analysis with HORN constraints. In: Cousot, P. (ed.) Static Analysis, 8th International Symposium, SAS 2001, Proceedings, Paris, France, 16–18 July 2001. Lecture Notes in Computer Science, vol. 2126, pp. 73–92. Springer, Berlin (2001)
Hage, J., Holdermans, S.: Heap recycling for lazy languages. In: Hatcliff, J., Glück, R., de Moor, O. (eds.) Proceedings of the 2008 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, PEPM’08, San Francisco, California, USA, 7–8 January 2008, pp. 189–197. ACM Press, New York (2008)
Hage, J., Holdermans, S., Middelkoop, A.: A generic usage analysis with subeffect qualifiers. In: Hinze, R., Ramsey, N. (eds.) Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, ICFP 2007, Freiburg, Germany, 1–3 October 2007, pp. 235–246. ACM Press, New York (2007)
Hinze, R.: Projection-based strictness analysis: theoretical and practical aspects. Ph.D. thesis, Bonn University (1995)
Holdermans, S., Hage, J.: Making “stricterness” more relevant. In: Gallagher, J.P., Voigtländer, J. (eds.) Proceedings of the 2010 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2010, Madrid, Spain, 18–19 January 2010, pp. 121–130. ACM Press, New York (2010)
Hudak, P., Hughes, J., Jones, S.P., Wadler, P.: A history of Haskell: Being lazy with class. In: Ryder, B.G., Hailpern, B. (eds.) Proceedings of the Third ACM SIGPLAN History of Programming Languages Conference, HOPL-III, San Diego, California, USA, 9–10 June 2007, pp. 1–55. ACM Press, New York (2007)
Hughes, J.: Backwards analysis of functional programs. In: Björner, A., Jones, N.D., Ershov, A.P. (eds.) Partial Evaluation and Mixed Computation: Proceedings of the IFIP TC2 Workshop, Gammel Avernaes, Denmark, 18–24 Oct. 1987, pp. 187–208. North-Holland, Amsterdam (1988)
Hughes, J.: Why functional programming matters. Comput. J. 32(2), 98–107 (1989)
Jensen, T.P.: Strictness analysis in logical form. In: Hughes, J. (ed.) Functional Programming Languages and Computer Architecture, 5th ACM Conference, Proceedings, Cambridge, MA, USA, 26–30 August 1991, pp. 352–366. Springer, Berlin (1991)
Jensen, T.P.: Inference of polymorphic and conditional strictness properties. In: POPL’98, Proceedings of the 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 19–21 January 1998, San Diego, CA, USA, pp. 209–221. ACM Press, New York (1998)
Johann, P., Voigtländer, J.: The impact of seq on free theorems-based program transformations. Fundam. Inform. 69(1–2), 63–102 (2006)
Kahn, G.: Natural semantics. In: Brandenburg, F.-J., Vidal-Naquet, G., Wirsing, M. (eds.) STACS 87, 4th Annual Symposium on Theoretical Aspects of Computer Science, Proceedings, Passau, Germany, 19–21 February 1987. Lecture Notes in Computer Science, vol. 247, pp. 22–39 (1987)
Kuo, T.-M., Mishra, P.: Strictness analysis: A new perspective based on type inference. In: FPCA’89, Conference on Functional Programming Languages and Computer Architecture, Imperial College, London, England, 11–13 September 1989, pp. 260–272. ACM Press, New York (1989)
Morris, J.: Lambda-calculus models of programming languages. Ph.D. thesis, Massachusetts Institute of Technology (1968)
Mycroft, A.: The theory and practice of transforming call-by-need into call-by-value. In: Robinet, B. (ed.) International Symposium on Programming, Proceedings of the Fourth ‘Colloque International sur la Programmation’, Paris, France, 22–24 April 1980. Lecture Notes in Computer Science, vol. 83, pp. 269–281. Springer, Berlin (1980)
Nielson, F., Nielson, H.R.: Type and effect systems. In: Olderog, E.-R., Steffen, B. (eds.) Correct System Design, Recent Insight and Advances (to Hans Langmaack on the occasion of his retirement from his professorship at the University of Kiel). Lecture Notes in Computer Science, vol. 1710, pp. 114–136. Springer, Berlin (1999)
Nöcker, E.: Strictness analysis using abstract reduction. In: FPCA’93 Conference on Functional Programming Languages and Computer Architecture, Copenhagen, Denmark, 9–11 June 1993, pp. 255–265. ACM Press, New York (1993)
Orlov, I.E.: Ischislenie sovmestimosti predlozhenii. Mat. Sb. 35(3–4), 263–286 (1928)
Jones, S.P. (ed.): Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, Cambridge (2003)
Plasmeijer, R., van Eekelen, M.: Concurrent Clean language report—version 1.3. Technical Report CSI-R9816, University of Nijmegen (1998)
Schmidt-Schauß, M., Sabel, D., Schütz, M.: Safety of Nöcker’s strictness analysis. J. Funct. Program. 18(4), 503–551 (2008)
Seidel, D., Voigtländer, J.: Refined typing to localize the impact of forced strictness on free theorems. Acta Inform. 48(3), 191–211 (2011)
Gasser, K.L.S., Nielson, H.R., Nielson, F.: Strictness and totality analysis. Sci. Comput. Program. 31(1), 113–145 (1998)
Talpin, J.-P., Jouvelot, P.: Polymorphic type, region and effect inference. J. Funct. Program. 2(3), 245–271 (1992)
de Vries, E.: Making uniqueness typing less unique. Ph.D. thesis, Trinity College Dublin (2008)
de Vries, E., Plasmeijer, R., Abrahamson, D.: Uniqueness typing simplified. In: Chitil, O., Horváth, Z., Zsók, V. (eds.) Implementation and Application of Functional Languages, 19th International Symposium, Revised Selected Papers, IFL 2007, Freiburg, Germany, September 2007. Lecture Notes in Computer Science, vol. 5083, pp. 201–218. Springer, Berlin (2008)
Wadler, P.: Strictness analysis on non-flat domains (by abstract interpretation over finite domains). In: Abramsky, S., Hankin, C. (eds.) Abstract Interpretation of Declarative Languages, pp. 266–275. Ellis Horwood, Chichester (1987)
Wadler, P.: Theorems for free! In: FPCA’89 Conference on Functional Programming and Computer Architecture, Imperial College, London, England, 11–13 September 1989, pp. 347–359. ACM Press, New York (1989)
Walker, D.: Substructural type systems. In: Pierce, B.C. (ed.) Advanced Topics in Types and Programming Languages. The MIT Press, Cambridge (2005)
Wright, D.A.: A new technique for strictness analysis. In: Abramsky, S., Maibaum, T. (eds.) TAPSOFT’91: Proceedings of the International Joint Conference on Theory and Practice of Software Development. Vol. 2: Advances in Distributed Computing (ADC) and Colloquium on Combining Paradigms for Software Development (CCPSD), Brighton, UK, 8–12 April 1991. Lecture Notes in Computer Science, vol. 494, pp. 235–258. Springer, Berlin (1991)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Open Access This is an open access article distributed under the terms of the Creative Commons Attribution Noncommercial License (https://creativecommons.org/licenses/by-nc/2.0), which permits any noncommercial use, distribution, and reproduction in any medium, provided the original author(s) and source are credited.
About this article
Cite this article
Holdermans, S., Hage, J. Making “stricterness” more relevant. Higher-Order Symb Comput 23, 315–335 (2010). https://doi.org/10.1007/s10990-011-9079-7
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10990-011-9079-7