Advertisement

A safe approach to parallel combinator reduction (extended abstract)

  • Chris L. Hankin
  • Geoffrey L. Burn
  • Simon L. Peyton Jones
Functional Programming Language Implementation
Part of the Lecture Notes in Computer Science book series (LNCS, volume 213)

Abstract

In this paper we present the results of two pieces of work which, when combined, allow us to go from a program text in a functional language to a parallel implementation of that program. We present techniques for discovering sources of parallelism in a program at compile time, and then show how this parallelism is naturally mapped into a parallel combinator set that we will define.

To discover sources of parallelism in a program, we use abstract interpretation. 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. 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.

Having identified the sources of parallelism at compile-time it is necessary to communicate these to the run-time system. In the second part of the paper we use an extended set of combinators, including a pair of parallel combinators that achieve this purpose.

Keywords

Combinators Strictness Analysis Functional Languages Parallel Reduction Director Strings 

7. References

  1. Abramsky, S., Abstract Interpretation, Logical Relations and Kan Extensions, Draft Manuscript, 1985.Google Scholar
  2. 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, Department of Computing, Research Report DoC 85/6, April 1985.Google Scholar
  3. Hankin, C.L., Osmon, P.E., and Shute, M.J., COBWEB: A Combinator Reduction Architecture, in: Proceedings of IFIP International Conference on Functional Programming Languages and Computer Architecture, Nancy, France, 16–19 September, 1985, Jouannaud, J.-P. (ed.), Springer-Verlag LNCS 201, pp. 99–112.Google Scholar
  4. Hughes, J., The Design and Implementation of Programming Languages, PhD Thesis, Oxford University, 1983. (Published as Oxford University Computing Laboratory, Programming Research Group, Technical Monograph PRG-40, September, 1984.)Google Scholar
  5. Hughes, J., Strictness Detection in Non-Flat Domains Workshop on Programs as Data Objects, Copenhagen, Denmark, 17–19 October, 1985. (Proceedings to be published in Springer Verlag LNCS series.)Google Scholar
  6. Joy, M.S., Rayward-Smith, V.J. and Burton, F.W., Efficient Combinator Code, Computer Languages 10 3, 1985, pp.211–223.Google Scholar
  7. Kennaway, J.R., and Sleep, M.R., Director Strings as Combinators, University of East Anglia Report, 1981.Google Scholar
  8. Maurer, D., Strictness Computation Using Generalised λ-expressions, Workshop on Programs as Data Objects, Copenhagen, Denmark, 17–19 October, 1985. (Proceedings to be published in Springer Verlag LNCS series.)Google Scholar
  9. Meira, S.R. de L., On the Efficiency of Applicative Algorithms, PhD Thesis, The University of Kent at Canterbury, March 1985.Google Scholar
  10. Mycroft, A., Abstract Interpretation and Optimising Transformations for Applicative Programs, PhD. Thesis, University of Edinburgh, 1981.Google Scholar
  11. Oberhauser, H.-G., Wilhelm, R., Flow Analysis in Combinator Implementation of Functional Programming Languages, Technical Report, Universitat des Saarlandes, D-6600 Saarbrucken, 1984.Google Scholar
  12. Scott, D., Lectures on a Mathematical Theory of Computation, Tech. Monograph PRG-19, Oxford Univ. Computing Lab., Programming Research Group, 1981.Google Scholar
  13. Turner, D.A., Another Algorithm For Bracket Abstraction, The Journal of Symbolic Logic 44 2, June 1979, pp. 267–270.Google Scholar
  14. Wadler, P., Strictness Analysis on Non-Flat Domains (by Abstract Interpretation over Finite Domains), Draft Manuscript, 1985.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1986

Authors and Affiliations

  • Chris L. Hankin
    • 1
  • Geoffrey L. Burn
    • 2
  • Simon L. Peyton Jones
    • 3
  1. 1.Department of ComputingImperial College of Science and TechnologyLondonUnited Kingdom
  2. 2.GEC Research Ltd, Hirst Research Centre, East LaneWembleyUnited Kingdom
  3. 3.Department of Computer ScienceUniversity College LondonLondonUnited Kingdom

Personalised recommendations