Skip to main content

An inference algorithm for strictness

  • Conference paper
  • First Online:
Typed Lambda Calculi and Applications (TLCA 1997)

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

Included in the following conference series:

Abstract

In this paper we introduce an algorithm for detecting strictness information in typed functional programs. Our algorithm is based on a type inference system which allows to exploit the type structure of the language for the investigation of program properties. The detection of strictness information can be performed in a complete way, by reducing it to the solution of a set of constraints involving type variables. A key feature of our method is that it is compositional and there is a notion of principal type scheme. Even though the language considered in the paper is the simply typed lambda-calculus with a fixpoint constructor and arithmetic constants we can generalize our approach to polymorphic languages like Lazy ML. Although focused on strictness our method can also be applied to the investigation of other program properties, like dead code and binding time.

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. H. P. Barendregt, M. Coppo, and M. Dezani-Ciancaglini. A filter lambda model and the completeness of type assignment. Journal of Symbolic Logic, 48:931–940, 1983.

    Google Scholar 

  2. P. N. Benton. Strictness Analysis of Lazy Functional Programs. PhD thesis, University of Cambridge, Pembroke College, 1992.

    Google Scholar 

  3. G. L. Burn, C. Hankin, and S. Abramsky. Strictness Analysis for Higher-Order Functions. Science of Computer Programming, 7:249–278, 1986.

    Google Scholar 

  4. M. Coppo, F. Damiani, and P. Giannini. On Strictness and Totality. Internal report. Dipartimento di Informatica, Universitá di Torino, 1996.

    Google Scholar 

  5. M. Coppo, F. Damiani, and P. Giannini. Refinement Types for Program Analysis. In SAS'96, LNCS 1145, pages 143–158. Springer, 1996.

    Google Scholar 

  6. M. Coppo and M. Dezani-Ciancaglini. An extension of basic functional theory for lambda-calculus. Notre Dame Journal of Formal Logic, 21(4):685–693, 1980.

    Google Scholar 

  7. M. Coppo and A. Ferrari. Type inference, abstract interpretation and strictness analysis. Theoretical Computer Science, 121:113–145, 1993.

    Google Scholar 

  8. D. Dussart and F. Henglein and C. Mossin. Polymorphic Recursion and Subtype Qualifications: Polymorphic Binding-Time Analysis in Polynomial Time. In SAS'95, LNCS 983, pages 118–135. Springer, 1995.

    Google Scholar 

  9. M. J. C. Gordon, R. Milner, and C. P. Wadsworth. Edinburg LCF. LNCS 78. Springer, 1979.

    Google Scholar 

  10. C. Hankin and D. Le Métayer. A Type-Based Framework for Program Analysis. In SAS'94, LNCS 864, pages 380–394. Springer, 1994.

    Google Scholar 

  11. C. Hankin and D. Le Métayer. Deriving algorithms for type inference systems: Applications to strictness analysis. In POPL'94, pages 202–212. ACM, 1994.

    Google Scholar 

  12. C. Hankin and D. Le Métayer. Lazy type inference and program analysis. Science of Computer Programming, 25:219–249, 1995.

    Google Scholar 

  13. R. Hindley. The principal types schemes for an object in combinatory logic. Transactions of American Mathematical Society, 146:29–60, 1969.

    Google Scholar 

  14. T. P. Jensen. Abstract Interpretation in Logical Form. PhD thesis, University of London, Imperial College, 1992.

    Google Scholar 

  15. G. Kahn. Natural semantics. In K. Fuchi and M. Nivat, editors, Programming Of Future Generation Computer. Elsevier Sciences B.V. (North-Holland), 1988.

    Google Scholar 

  16. T. M. Kuo and P. Mishra. Strictness analysis: a new perspective based on type inference. In Functional Programming Languages and Computer Architecture, pages 260–272. ACM, 1989.

    Google Scholar 

  17. R. Milner. A Theory of Type Polymorphism in Programming. Journal of Computer and System Science, 17:348–375, 1978.

    Google Scholar 

  18. J. Palsberg and P. O'Keefe. A Type System Equivalent to Flow Analysis. In POPL'95, pages 367–378. ACM, 1995.

    Google Scholar 

  19. A. M. Pitts. Operationally-Based Theories of Program Equivalence. Summer School on Semantics and Logics of Computation, Cambridge UK, 25–29 Sep 1995.

    Google Scholar 

  20. K. L. Solberg. Annotated Type Systems for Program Analysis. PhD thesis, Aarhus University, Denmark, 1995.

    Google Scholar 

  21. K. L. Solberg, H. R. Nielson, and F. Nielson. Strictness and Totality Analysis. In SAS'94, LNCS 864, pages 408–422. Springer, 1994.

    Google Scholar 

  22. S. van Bakel. Intersection Type Disciplines in Lambda Calculus and Applicative Term Rewriting Systems. PhD thesis, Katholieke Universiteit Nijmegen, 1993.

    Google Scholar 

  23. D. A. Wright. Reduction Types and Intensionality in the Lambda-Calculus. PhD thesis, University of Tasmania, 1992.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Philippe de Groote J. Roger Hindley

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Damiani, F., Giannini, P. (1997). An inference algorithm for strictness. In: de Groote, P., Roger Hindley, J. (eds) Typed Lambda Calculi and Applications. TLCA 1997. Lecture Notes in Computer Science, vol 1210. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-62688-3_33

Download citation

  • DOI: https://doi.org/10.1007/3-540-62688-3_33

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-62688-6

  • Online ISBN: 978-3-540-68438-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics