Sequential implementation of lenient programming languages

Abstract : In non-strict functional languages, a data structure may be read before all its components are written, and a function may return a value before finishing all its computation or even before all its arguments have been evaluated. Such flexibility gives expressive power to the programmer, but makes life difficult for the compiler because it may not be possible to totally order instructions at compile time; the correct order can vary dramatically with the input data. Presently, compiler for non-strict languages rely on lazy evaluation, in which a subexpression is not evaluated until known (at run time) to contribute to the final answer. By scheduling each subexpression separately, lazy evaluation automatically deals with the varying orderings required by non- strictness, but at the same time incurs a great deal of overhead. Recent research has employed strictness analysis and/or annotations to make more scheduling decisions at compile time, and thereby reduce the overhead, but because these techniques seek to retain laziness, they are limited in effectiveness. The author discusses his strategy in the context of both sequential implementations and parallel implementations where the object code is partially sequentialized.

[1]  F. Warren Burton,et al.  Annotations to Control Parallelism and Reduction Order in the Distributed Evaluation of Functional Programs , 1984, TOPL.

[2]  F. Warren Burton Functional Programming for Concurrent and Distributed Computing , 1987, Comput. J..

[3]  Frances E. Allen,et al.  Control-flow analysis , 2022 .

[4]  Paul Hudak,et al.  A combinator-based compiler for a functional language , 1984, POPL '84.

[5]  Paul Hudak,et al.  Para-functional programming: a paradigm for programming multiprocessor systems , 1986, POPL '86.

[6]  Lennart Augustsson,et al.  A compiler for lazy ML , 1984, LFP '84.

[7]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[8]  Robert A. Iannucci,et al.  A dataflow/von Neumann hybrid architecture , 1988 .

[9]  Gregory J. Chaitin,et al.  Register allocation & spilling via graph coloring , 1982, SIGPLAN '82.

[10]  Paul Hudak,et al.  Path Semantics , 1987, MFPS.

[11]  Simon L. Peyton Jones,et al.  The four-stroke reduction engine , 1986, LFP '86.

[12]  Thomas Johnsson,et al.  Efficient compilation of lazy evaluation , 1984, SIGPLAN '84.

[13]  Chris Hankin,et al.  The theory of strictness analysis for higher order functions , 1985, Programs as Data Objects.

[14]  Paul Hudak A semantic model of reference counting and its abstraction (detailed summary) , 1986, LFP '86.

[15]  Simon L. Peyton Jones,et al.  Strictness Analysis - A Practical Approach , 1985, FPCA.

[16]  David E. Culler,et al.  Dataflow architectures , 1986 .

[17]  Peter Henderson,et al.  Functional programming - application and implementation , 1980, Prentice Hall International Series in Computer Science.

[18]  Alfred V. Aho,et al.  The Transitive Reduction of a Directed Graph , 1972, SIAM J. Comput..

[19]  Paul Hudak,et al.  Higher-order strictness analysis in untyped lambda calculus , 1986, POPL '86.

[20]  Jon Fairbairn,et al.  TIM: A simple, lazy abstract machine to execute supercombinatorics , 1987, FPCA.

[21]  David E. Culler,et al.  Managing resources in a parallel machine , 1986 .

[22]  Paul Hudak,et al.  Pomset interpretations of parallel functional programs , 1987, FPCA.

[23]  Hendrik Pieter Barendregt,et al.  Needed Reduction and Spine Strategies for the Lambda Calculus , 1987, Inf. Comput..

[24]  Cordelia V. Hall,et al.  Compiling strictness into streams , 1987, POPL '87.

[25]  Paul Hudak,et al.  Serial Combinators: "Optimal" Grains of Parallelism , 1985, FPCA.

[26]  Paul Hudak,et al.  The aggregate update problem in functional programming systems , 1985, POPL.

[27]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[28]  Jon Fairbairn,et al.  Code generation techniques for functional languages , 1986, LFP '86.

[29]  Ron Cytron,et al.  Interprocedural dependence analysis and parallelization , 1986, SIGP.