Skip to main content

The theory of strictness analysis for higher order functions

  • Conference paper
  • First Online:

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

Abstract

Abstract interpretation is a compile-time technique which is used to gain information about a program that may then be used to optimise the execution of the program. A particular use of abstract interpretation is in strictness analysis of functional programs. This provides the key to the exploitation of parallelism in the evaluation of programs written in functional languages. In a language that has lazy semantics, the main potential for parallelism arises in the evaluation of operands of strict operators. A function is strict in an argument if its value is undefined whenever the argument is undefined. If we can use strictness analysis to detect which arguments a function is strict in, we then know that these arguments can be safely evaluated in parallel because this will not affect the lazy semantics. Experimental results suggest that this leads to significant speed-ups.

Mycroft was the first person to apply abstract interpretation to the strictness analysis of functional programs. His framework only applies to first-order functions on flat domains. Several workers have proposed practical approaches to strictness analysis of higher-order functions over flat base domains but their work has not been accompanied by extensions to Mycroft's theoretical framework. In this paper we give sound mathematical foundations for this work and discuss some of the practical issues involved. The practical approach is proved correct in relation to the theoretical framework.

This author was partially supported by ESPRIT project 415 : Parallel Architectures and Languages for AIP — A VLSI Directed Approach.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abramsky, S., Strictness Analysis and Polymorphic Invariance, Workshop on Programs as Data Objects, DIKU, Denmark, 17–19 October, 1985.

    Google Scholar 

  2. Arbib, M.A., and Manes, E.G., Arrows, Structures and Functors: The Categorical Imperative, Academic Press, New York and London, 1975.

    Google Scholar 

  3. Burn, G.L., Hankin, C.L., and Abramsky, S., Strictness Analysis for Higher-Order Functions, To appear in Science of Computer Programming. Also Imperial College of Science and Technology, Deprartment of Computing, Research Report DoC 85/6, April 1985.

    Google Scholar 

  4. Clack, C., and Peyton Jones, S.L., Generating Parallelism From Strictness Analysis, Department of Computer Science, University College London, Internal Note 1679, February, 1985.

    Google Scholar 

  5. Cousot, P., and Cousot, R., Systematic Design of Program Analysis Frameworks, Conference Record of the 6th ACM Symposium on Principles of Programming Languages, pp. 269–282, 1979.

    Google Scholar 

  6. Gierz, G., Hofmann, K.H., Keimel, K., Lawson, J.D., Mislove, M. and Scott, D.S., A Compendium of Continuous Lattices, Springer-Verlag, 1980.

    Google Scholar 

  7. Hennessy, M., and Plotkin, G.D., Full Abstraction for a Simple Parallel Programming Language, Proceedings MFCS '79, Becvar, J. (ed.), Springer Verlag LNCS 74, 1979.

    Google Scholar 

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

    Google Scholar 

  9. Mycroft, A., Abstract Interpretation and Optimising Transformations for Applicative Programs, PhD. Thesis, University of Edinburgh, 1981.

    Google Scholar 

  10. Mycroft, A., and Nielson, F., Strong Abstract Interpretation Using Power Domains (Extended Abstract) Proc. 10th International Colloquium on Automata, Languages and Programming: Springer Verlag LNCS 154, Diaz, J. (ed.), Barcelona, Spain, 18th–22nd July, 1983, 536–547.

    Google Scholar 

  11. Plotkin, G.D., A Powerdomain Construction, SIAM J. Comput. 5 3 (Sept 1976) 452–487.

    Google Scholar 

  12. Plotkin, G.D., A Power Domain For Countable Non-Determinism (Extended Abstract), Proc. 9th International Colloquium on Automata, Languages and Programming: Springer Verlag LNCS 140, Nielson, M, and Schmidt, E.M. (eds.), 1982, 418–428.

    Google Scholar 

  13. Scott, D., Lectures on a Mathematical Theory of Computation, Tech. Monograph PRG-19, Oxford Univ. Computing Lab., Programming Research Group, 1981.

    Google Scholar 

  14. Scott, D., Domains for Denotational Semantics, Automata, Languages and Programming, Proceedings of the 10th International Colloquium, Nielsen M, and Schmidt, E.M., (eds.), Springer-Verlag Lecture Notes in Computer Science, vol. 140, 1982, 577–613.

    Google Scholar 

  15. Stoy, J.E., Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory, MIT Press, Cambridge Massachusetts, 1977.

    Google Scholar 

  16. Wadsworth, C.P., Semantics and Pragmatics of the Lambda Calculus (Chapter 4), PhD Thesis, University of Oxford, 1971.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Harald Ganzinger Neil D. Jones

Rights and permissions

Reprints and permissions

Copyright information

© 1986 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Burn, G., Hankin, C., Abramsky, S. (1986). The theory of strictness analysis for higher order functions. In: Ganzinger, H., Jones, N.D. (eds) Programs as Data Objects. Lecture Notes in Computer Science, vol 217. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-16446-4_3

Download citation

  • DOI: https://doi.org/10.1007/3-540-16446-4_3

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-16446-3

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics