Generating efficient code from strictness annotations

  • Gary Lindstrom
  • Lal George
  • Dowming Yeh
Session CFLP 3 Implementation Techniques
Part of the Lecture Notes in Computer Science book series (LNCS, volume 250)


Normal order functional languages (NOFLs) offer conceptual simplicity, expressive power, and attractiveness for parallel execution. However, current implementations of NOFLs on conventional von Neumann machines are not competitive with those of imperative languages. The central reasons for this poor performance include the high control overhead (e.g. demand evaluation) and fine object code granularity (e.g. SKI combinators) used in most NOFL implementations. Strictness analysis gathers information that helps to overcome these inefficiencies through optimized compilation. We propose here a rule-based strategy for such compilation, working from a new textual representation for strictness analyzed source programs. This representation offers readability and ease of manipulation, while expressing all essential strictness information, including basic block structure and block dominance and disjunction relationships. The rules presented here show how to compile this intermediate form into optimized single processor G-machine code. In addition, this representation appears to be useful for a number of other execution methods, including interpretation, compilation into conventional Lisp with “promises”, and mapping into “supercombinators” for parallel architectures.


Basic Block Textual Representation Function Application Intermediate Representation Block Number 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. [1]
    Burn, G. L., C. L. Hankin, and S. Abramsky. Theory and practice of strictness analysis for higher order functions. April 1985. Dept. of Computing, Imperial College of Science and Technology.Google Scholar
  2. [2]
    Clocksin, W.F. and Mellish, C.S. Programming in Prolog. Springer-Verlag, 1984. 2nd Edition.Google Scholar
  3. [3]
    Fairbairn, Jon, and Stuart C. Wray. Code generation techniques for functional languages. In Proc. Symp. on Lisp and Func. Pgmming., pages 94–104. ACM, 1986.Google Scholar
  4. [4]
    Hudak, P., and J. Young. A set-theoretic characterization of function strictness in the lambda calculus. In Proc. Workshop on Implementations of Functional Languages. Chalmers Univ., Aspenas, Sweden, February, 1985.Google Scholar
  5. [5]
    Hughes, R. J. M. Super Combinators. In Lisp and Functional Programming Conference, pages 1–10. ACM, 1982.Google Scholar
  6. [6]
    Hughes, J. Strictness detection in non-flat domains. Programming Research Group, Oxford.Google Scholar
  7. [7]
    Johnsson, T. Efficient compilation of lazy evaluation. In Proc. Symp. on Compiler Const. ACM SIGPLAN, Montreal, 1984.Google Scholar
  8. [8]
    Kieburtz, R. B., and M. Napierala. A studied laziness — strictness analysis with structured data types. 1985. Extended abstract, Oregon Graduate Center.Google Scholar
  9. [9]
    Kernighan, B.W. and Ritchie, D.M. Software Series: The C Programming Language. Prentice-Hall, Englewood Cliffs, New Jersey 07632, 1978.Google Scholar
  10. [10]
    Kieburtz, R. B. Abstract interpretations over infinite domains cannot terminate uniformly. February 17, 1986. Unpublished note, Dept. of Computer Science, Oregon Graduate Center.Google Scholar
  11. [11]
    Kuo, T.-M., and P. Mishra. On Strictness and its Analysis. In Proc. Symp. on Princ. of Pgmming. Lang.. ACM, Munich, West Germany, March, 1987. To appear.Google Scholar
  12. [12]
    Lindstrom, Gary. Static evaluation of functional programs. In Proc. Symposium on Compiler Construction, pages 196–206. ACM SIGPLAN, Palo Alto, CA, June, 1986.Google Scholar
  13. [13]
    Lindstrom, Gary, Lal George and Dowming Yeh. Optimized compilation of functional programs through strictness analysis. August 4, 1986. Technical summary.Google Scholar
  14. [14]
    Mycroft, A. The theory and practice of transforming call-by-need into call-by-value. In Int. Symp. on Prgmming. Springer, April, 1980. Lecture Notes in Computer Science, vol. 83.Google Scholar
  15. [15]
    Sheeran, Mary. Designing regular array architectures using higher order functions. In Proc. Conf. on Functional Programming Languages and Computer Architectures, pages 220–237. Springer Verlag, 1985. Lecture Notes in Computer Science, vol. 201.Google Scholar
  16. [16]
    Wadler, Phil. Strictness analysis on non-flat domains (by abstract interpretation over finite domains). November 10, 1985. Unpublished note, Programming Research Group, Oxford Univ.Google Scholar
  17. [17]
    Warren, David H. D. Applied logic: its use and implementation as a programming tool. Technical Report, SRI, Inc., 1983. Note 290.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1987

Authors and Affiliations

  • Gary Lindstrom
    • 1
  • Lal George
    • 1
  • Dowming Yeh
    • 1
  1. 1.Department of Computer ScienceUniversity of UtahSalt Lake City

Personalised recommendations