## Partitioning Non-strict Languages for Multi-threaded Code Generation (1994)

Venue: | Master's thesis, Dept. of EECS, MIT |

Citations: | 5 - 1 self |

### BibTeX

@TECHREPORT{Coorg94partitioningnon-strict,

author = {Satyan R. Coorg and Frederic R. Morgenthaler},

title = {Partitioning Non-strict Languages for Multi-threaded Code Generation},

institution = {Master's thesis, Dept. of EECS, MIT},

year = {1994}

}

### OpenURL

### Abstract

In a non-strict language, functions may return values before their arguments are available, and data structures may be defined before all their components are defined. Compiling such languages to conventional hardware is not straightforward; instructions do not have a fixed compile time ordering. Such an ordering is necessary to execute programs efficiently on current microprocessors. Partitioning is the process of compiling a non-strict program into threads (i.e., a sequence of instructions). This process involves detecting data dependencies at compile time and using these dependencies to "sequentialize" parts of the program. Previous work on partitioning did not propagate dependence information across recursive procedure boundaries. Using a representation known as Paths we are able to represent dependence information of recursive functions. Also, we incorporate them into a known partitioning algorithm. However, this algorithm fails to make use of all the information contained in pat...

### Citations

11781 |
Computers and Intractability: A Guide to the Theory of NP-Completeness
- Garey, Johnson
- 1979
(Show Context)
Citation Context ... edges) is acyclic. A minimal feedback vertex set is a feedback vertex set such that no proper subset of it is a feedback vertex set. Note: Though computing the minimum feedback vertex set is NP-hard =-=[14]-=-, computing a minimal set can be accomplished by Depth First Search [12]. The algorithm to convert a block with cycles to an acyclic block is given below. Algorithm C Given an arbitrary block b = fst ... |

9279 | Introduction to Algorithms
- Cormen, Leiserson, et al.
- 2009
(Show Context)
Citation Context ...et such that no proper subset of it is a feedback vertex set. Note: Though computing the minimum feedback vertex set is NP-hard [14], computing a minimal set can be accomplished by Depth First Search =-=[12]-=-. The algorithm to convert a block with cycles to an acyclic block is given below. Algorithm C Given an arbitrary block b = fst in (se 1 ; se 2 ; : : : ; se n )g, we partition it as follows: 1. G db i... |

351 |
Denotational Semantics: a Methodology for Language Development, Allyn
- Schmidt
- 1986
(Show Context)
Citation Context ...al Powerset construction) to model a set of paths. Unlike the powerset construction there is no "right" powerdomain construction; one has to choose the powerdomain suited for his/her applica=-=tion. See [39]-=- for an introduction to powerdomains. We use the Egli-Milner (EM) Powerdomain construction to model sets of paths, as it is capable of reasoning with sets containing ? p . For a flat pointed complete ... |

243 | I-structures: Data structures for parallel computing - Arvind, Pingali - 1989 |

232 | Report on the Programming Language Haskell. A Non-strict Purely Functional Language
- Hudak, Jones, et al.
- 1992
(Show Context)
Citation Context ...layed until their evaluation was possible -- strict evaluation would try to evaluate them too early, leading to a deadlock. Lazy evaluation, the evaluation strategy followed by languages like Haskell =-=[17]-=-, delays expressions until the last possible moment, i.e., when the execution cannot proceed without it. All the examples given produce correct answer under lazy evaluation, since lazy evaluation will... |

209 | Implementing lazy functional languages on stock hardware: The spineless tagless g-machine
- Jones
- 1992
(Show Context)
Citation Context ...t cause such unevaluated expressions to be evaluated. Techniques which have emerged for lazy evaluation are Turner's combinators [41], Henderson's force-delay transformation [15], and Graph Reduction =-=[45, 22, 31]-=-. One thing common to these implementations is that they can produce more efficient code if they can evaluate an argument directly, instead of passing an unevaluated expression. However, given the con... |

208 |
A New Implementation Technique for Applicative Languages
- Turner
- 1979
(Show Context)
Citation Context ...ocedures unevaluated, and that primitives like arithmetic operators must cause such unevaluated expressions to be evaluated. Techniques which have emerged for lazy evaluation are Turner's combinators =-=[41]-=-, Henderson's force-delay transformation [15], and Graph Reduction [45, 22, 31]. One thing common to these implementations is that they can produce more efficient code if they can evaluate an argument... |

151 | Fine-grain Parallelism with Minimal Hardware Support: A Compiler-Controlled Threaded Abstract Machine
- Culler, Sah, et al.
- 1991
(Show Context)
Citation Context ...lel multithreaded hardware (e.g., Monsoon [30, 29], and *T [28, 3]). They also yield efficient implementations on conventional architectures when combined with a suitable abstract machine such as TAM =-=[13]-=-. In a later chapter, we formalize this notion of a thread and cast it into an operational semantic framework. 1.2 Id and its Compilation Our thesis is targeted toward producing a partitioning algorit... |

131 | Efficient compilation of lazy evaluation
- Johnsson
- 1984
(Show Context)
Citation Context ...t cause such unevaluated expressions to be evaluated. Techniques which have emerged for lazy evaluation are Turner's combinators [41], Henderson's force-delay transformation [15], and Graph Reduction =-=[45, 22, 31]-=-. One thing common to these implementations is that they can produce more efficient code if they can evaluate an argument directly, instead of passing an unevaluated expression. However, given the con... |

121 |
Semantics and pragmatic of the lambda-calculus
- WADSWORTH
- 1971
(Show Context)
Citation Context ...t cause such unevaluated expressions to be evaluated. Techniques which have emerged for lazy evaluation are Turner's combinators [41], Henderson's force-delay transformation [15], and Graph Reduction =-=[45, 22, 31]-=-. One thing common to these implementations is that they can produce more efficient code if they can evaluate an argument directly, instead of passing an unevaluated expression. However, given the con... |

120 |
A multithreaded massively parallel architecture
- unknown authors
- 1992
(Show Context)
Citation Context ...hout pause, interruption, or execution of instructions from other threads. Threads of this form are required to implement a language on parallel multithreaded hardware (e.g., Monsoon [30, 29], and *T =-=[28, 3]-=-). They also yield efficient implementations on conventional architectures when combined with a suitable abstract machine such as TAM [13]. In a later chapter, we formalize this notion of a thread and... |

101 | Projections for strictness analysis
- Wadler, Hughes
- 1987
(Show Context)
Citation Context ...t iteration can be speeded up. A good example is the frontiers representation [11]. Finally, we note that strictness analysis has been extended to analyze higher-order functions [10], data structures =-=[43, 44], pol-=-ymorphic functions [1, 20, 40, 6]. 1.3.2 Dependence Analysis In this section, we give a brief overview of the Dependence Analysis approach as presented in [35]. The algorithm produces "suspendabl... |

96 | M-Structures: Ex- tending a parallel, non-strict functional language with state
- Barth, Nikhil, et al.
- 1991
(Show Context)
Citation Context ...Compilation Our thesis is targeted toward producing a partitioning algorithm for use in a compiler for the Id language. Id [27] is a functional language extended with I-structures [5] and Mstructures =-=[8]-=-. Like any other modern functional language, Id has the standard features including higher order functions, algebraic data types, pattern matching and a HindleyMilner based type inference algorithm. I... |

93 |
The revised report on the algorithmic language Scheme
- Rees, Clinger
- 1986
(Show Context)
Citation Context ...b cannot be defined until the tuple a is defined -- leading to a deadlock. A similar reasoning shows that example 1.2 also produces a deadlock under strict evaluation. In strict languages like Scheme =-=[32], the letr-=-ec is not used to define such "circular" dependencies, but used to define recursive functions . Now consider a non-strict evaluation of the examples. In example 1.1 the tuple a is returned w... |

80 |
The theory and practice of transforming call-by-need into call-byvalue
- Mycroft
- 1980
(Show Context)
Citation Context ...f of n arguments is strict in its i th argument if f(x 1 ; : : : ; x i\Gamma1 ; ?; x i+1 ; : : : ; x n ) = ? for all values of x 1 ; : : : ; x i\Gamma1 and x i+1 ; : : : ; x n . As Mycroft points out =-=[26]-=-, we can safely evaluate an argument to a function f which is strict in that argument. If f terminates, the argument would have been evaluated, as the argument is needed to produce a value for the res... |

77 |
Functional Programming: Application and Implementation
- Henderson
- 1980
(Show Context)
Citation Context ...s an additional flexibility to the programmer: the ability to create and manipulate infinite data structures. A well known example in literature is the sieve of Eratosthenes for finding prime numbers =-=[15]-=-. The program works by defining an infinite list of integers, and using this list to select out the primes. Even though the list is infinite, lazy evaluation scheme actually builds the list long enoug... |

73 | Multithreading: A revisionist view of dataflow architectures
- Papadopoulos, Traub
- 1991
(Show Context)
Citation Context ... instructions without pause, interruption, or execution of instructions from other threads. Threads of this form are required to implement a language on parallel multithreaded hardware (e.g., Monsoon =-=[30, 29]-=-, and *T [28, 3]). They also yield efficient implementations on conventional architectures when combined with a suitable abstract machine such as TAM [13]. In a later chapter, we formalize this notion... |

70 |
Strictness Analysis for Higher-Order Functions
- Burn, Hankin, et al.
- 1986
(Show Context)
Citation Context ... strict. As strictness is a undecidable property, the analysis has to make approximations at compile time. Many approaches to strictness analysis have been developed including abstract interpretation =-=[26, 10]-=-, backwards analysis [19], and type inference [25]. A good overview of the field is given in [2]. We give a brief overview of the abstract interpretation approach and point out its ability in dealing ... |

67 |
Backward Analysis of Functional Programs. Departmental Research Report CSC/87/R3
- Hughes
- 1987
(Show Context)
Citation Context ...ndecidable property, the analysis has to make approximations at compile time. Many approaches to strictness analysis have been developed including abstract interpretation [26, 10], backwards analysis =-=[19]-=-, and type inference [25]. A good overview of the field is given in [2]. We give a brief overview of the abstract interpretation approach and point out its ability in dealing with recursive programs. ... |

59 |
Strictness Analysis: A New Perspective Based on Type Inference
- Kuo, Mishra
- 1989
(Show Context)
Citation Context ...analysis has to make approximations at compile time. Many approaches to strictness analysis have been developed including abstract interpretation [26, 10], backwards analysis [19], and type inference =-=[25]-=-. A good overview of the field is given in [2]. We give a brief overview of the abstract interpretation approach and point out its ability in dealing with recursive programs. In this approach, the ide... |

59 | Eicken. Compiler-controlled Multithreading for Lenient Parallel Languages - Schauser, Culler, et al. - 1991 |

56 | Strictness analysis on non-flat domains (by abstract interpretation over finite domains
- Wadler
- 1987
(Show Context)
Citation Context ...t iteration can be speeded up. A good example is the frontiers representation [11]. Finally, we note that strictness analysis has been extended to analyze higher-order functions [10], data structures =-=[43, 44], pol-=-ymorphic functions [1, 20, 40, 6]. 1.3.2 Dependence Analysis In this section, we give a brief overview of the Dependence Analysis approach as presented in [35]. The algorithm produces "suspendabl... |

45 |
Id (version 90.0) Reference Manual
- Nikhil
- 1990
(Show Context)
Citation Context ...am. In the rest of the chapter, we deal with the following issues. First we discuss nonstrictness and the need for a partitioning algorithm. Then, we give a brief overview of a non-strict language Id =-=[27]-=- and its compilation process. We end the chapter by discussing the state of the art algorithms for partitioning (and other related topics). Chapter 2 defines the language framework employed in the the... |

42 | Start the next generation: Integrating global caches and data architecture
- Ang, Arvind, et al.
- 1994
(Show Context)
Citation Context ...hout pause, interruption, or execution of instructions from other threads. Threads of this form are required to implement a language on parallel multithreaded hardware (e.g., Monsoon [30, 29], and *T =-=[28, 3]-=-). They also yield efficient implementations on conventional architectures when combined with a suitable abstract machine such as TAM [13]. In a later chapter, we formalize this notion of a thread and... |

41 |
A Compiler for the MIT Tagged-Token Dataflow Architecture - SM. Thesis
- Traub
- 1986
(Show Context)
Citation Context ...rams represented as dataflow graphs which are described below. Dataflow Graphs: Programs to be partitioned are expressed in a structured dataflow graph, an intermediate form into which Id is compiled =-=[33]-=-. A structured dataflow graph consists of a collection of acyclic graphs describing basic blocks and interfaces. A basic block corresponds to a group of operators with the same control dependence. For... |

36 |
Strictness analysis - a practical approach
- Clack, Peyton-Jones
- 1985
(Show Context)
Citation Context ...l take exponential time. A lot of work has been done in choosing a "good" representation for the function so that fix point iteration can be speeded up. A good example is the frontiers repre=-=sentation [11]-=-. Finally, we note that strictness analysis has been extended to analyze higher-order functions [10], data structures [43, 44], polymorphic functions [1, 20, 40, 6]. 1.3.2 Dependence Analysis In this ... |

36 |
Global Analysis for Partitioning Non-Strict Programs into Sequential Threads
- Traub, Culler, et al.
- 1992
(Show Context)
Citation Context ...can be determined by the two instructions. Informally, the problem is to produces a set of threads given a program in Id. Each thread is a subset of instructions of a procedure body, which satisfies: =-=[37]-=- 1. A compile-time instruction ordering can be determined for the thread which is valid for all contexts in which the procedure is invoked. 2. Once the first instruction in a thread is executed, it is... |

30 |
Monsoon: An explicit token store architecture
- Papadopoulos, Culler
- 1990
(Show Context)
Citation Context ... instructions without pause, interruption, or execution of instructions from other threads. Threads of this form are required to implement a language on parallel multithreaded hardware (e.g., Monsoon =-=[30, 29]-=-, and *T [28, 3]). They also yield efficient implementations on conventional architectures when combined with a suitable abstract machine such as TAM [13]. In a later chapter, we formalize this notion... |

26 |
Strictness analysis and polymorphic invariance
- Abramsky
- 1985
(Show Context)
Citation Context ...unctions performed by each module is given below: (we omit descriptions of translation modules, whose functionality is obvious) 1. Parsing: This is modified version of Berkeley YACC to generate a LALR=-=[1]-=- parser in Id. 2. Desugaring: This is a macro expansion phase in which multi-clause definitions and functions, list and array comprehensions are replaced by simpler AID constructs. 3. Scope Analysis: ... |

26 |
Correct and optimal implementations of recursion in a simple programming language
- Vuillemin
- 1974
(Show Context)
Citation Context ... insure that the delayed expressions are executable. In fact, if there is any evaluation order which will produce an answer from a program, lazy evaluation will also produce an answer to that program =-=[42]-=-. Laziness grants an additional flexibility to the programmer: the ability to create and manipulate infinite data structures. A well known example in literature is the sieve of Eratosthenes for findin... |

21 |
Higher-order strictness analysis in untyped lambda calculus
- Hudak, Young
- 1986
(Show Context)
Citation Context ...ere better partitions can be obtained using demand dependence. In this chapter, we use Paths, as a way of representing dependence information. Paths are very similar to the strictness sets defined in =-=[18]-=-, and different from the Paths in [9], but we continue to use the same terminology. We combine the strong points of both strictness analysis and DD, i.e., ability to handle recursion as well as retain... |

20 |
Implementation of non-strict functional programming languages
- Traub
- 1991
(Show Context)
Citation Context ...ble under strict evaluation. Example 1.1 illustrates non-strictness in data-structures and example 1.2 illustrates non-strictness arising from the conditional statement. These examples are taken from =-=[35]-=-. Example 1.1: fa = mk tuple 2 (2,b); b = select 1 (a) in ag Example 1.2: f(n)=fp = eq? n 0; a = if p then f in 3g else f in dg; b = if p then f in cg else f in 4g; c = a + 2; d = b + 1; e = c * d in ... |

18 |
Path Analysis and Optimization of Non-strict Functional Languages
- Bloss
- 1989
(Show Context)
Citation Context ... proofs given in the thesis make use of an equivalence between the two semantics, we do not attempt a formal proof of this fact. The denotational semantics is based on the standard semantics given in =-=[9]-=-. As functions in our language can have many arguments and return many results, we need a model to capture multiple values. We use D n to denote a domain formed by the n-product D \Theta D \Theta : : ... |

17 | Compilation as partitioning: A new approach to compiling non-strict functional languages - Traub - 1989 |

14 |
Eds. Abstract Interpretation of Declarative Languages
- ABRAMSKY, HANKIN
- 1987
(Show Context)
Citation Context ...time. Many approaches to strictness analysis have been developed including abstract interpretation [26, 10], backwards analysis [19], and type inference [25]. A good overview of the field is given in =-=[2]-=-. We give a brief overview of the abstract interpretation approach and point out its ability in dealing with recursive programs. In this approach, the idea is to execute the programs with partial info... |

14 | Multithread code generation for dataflow architetures from non-strict programs - Traub - 1991 |

12 |
A note on abstract interpretation of polymorphic functions
- Baraki
- 1989
(Show Context)
Citation Context ... good example is the frontiers representation [11]. Finally, we note that strictness analysis has been extended to analyze higher-order functions [10], data structures [43, 44], polymorphic functions =-=[1, 20, 40, 6]. 1.3.2 De-=-pendence Analysis In this section, we give a brief overview of the Dependence Analysis approach as presented in [35]. The algorithm produces "suspendable" threads given a non-strict program ... |

12 |
Compile-time Partitioning of a Non-strict Language into Sequential Threads
- Hoch, Davenport, et al.
- 1993
(Show Context)
Citation Context ...chnique. We call this approach the Dependence Analysis approach. Another less theoretical, more pragmatic approach (called Demand and Dependence (DD) partitioning) started in [21], progressed through =-=[36, 16, 38] and culmi-=-nated in [37]. The approach began as a local approach. That is, the initial algorithms worked as follows: look at "small" regions in programs and see whether they can be sequentialized. This... |

9 |
Abstract interpretation of first-order polymorphic functions
- Hughes
- 1988
(Show Context)
Citation Context ... good example is the frontiers representation [11]. Finally, we note that strictness analysis has been extended to analyze higher-order functions [10], data structures [43, 44], polymorphic functions =-=[1, 20, 40, 6]. 1.3.2 De-=-pendence Analysis In this section, we give a brief overview of the Dependence Analysis approach as presented in [35]. The algorithm produces "suspendable" threads given a non-strict program ... |

8 | Polymorphic strictness analysis using frontiers
- Seward
- 1993
(Show Context)
Citation Context ... good example is the frontiers representation [11]. Finally, we note that strictness analysis has been extended to analyze higher-order functions [10], data structures [43, 44], polymorphic functions =-=[1, 20, 40, 6]. 1.3.2 De-=-pendence Analysis In this section, we give a brief overview of the Dependence Analysis approach as presented in [35]. The algorithm produces "suspendable" threads given a non-strict program ... |

7 |
A parallel intermediate language
- Ariola, Arvind
- 1989
(Show Context)
Citation Context ...Syntax and Semantics In section 1.3.3 we introduced the structured dataflow graph intermediate form into which Id can be compiled. However, we choose to work with another intermediate language (P-TAC =-=[4]-=-) for the following reasons: 1. It is also an intermediate form used in a compiler for Id [46], and techniques for compiling Id to P-TAC are well known. 2. Unlike dataflow graphs, there is a formal op... |

2 |
Term Rewriting Systems. Course Notes, Summer course organized by Corrado Boehm
- Klop
- 1985
(Show Context)
Citation Context ... env 0 [[y]]. This is the way environments are "linked" in a block structured language. 2.3 Operational Semantics The operational semantics of SP-TAC is given in terms of an Abstract Reducti=-=on System [24]-=-, which is a structure hA; \Gamma! R i where A is a set of terms and \Gamma! R is a binary relation on A. The operational semantics is directly distilled from the operational semantics of PTAC given i... |

1 |
The Lambda Calculus: Its Sytax and Semantics
- Barendregt
- 1984
(Show Context)
Citation Context ...inside the then and else blocks of an if statement from getting rewritten. A context C[] is a term with a hole in it, such that, when a suitable term is plugged in the hole, C[] becomes a proper term =-=[7]-=-. We now present the set of rewrite rules, R SP \GammaT AC , for defining the ARS for SP-TAC. In this section n and b n represent a variable and a numeral, respectively. We do not discuss type errors ... |

1 |
Parallel Machines: Parallel Machine Languages
- Ianucci
- 1990
(Show Context)
Citation Context ... program to apply this technique. We call this approach the Dependence Analysis approach. Another less theoretical, more pragmatic approach (called Demand and Dependence (DD) partitioning) started in =-=[21], progress-=-ed through [36, 16, 38] and culminated in [37]. The approach began as a local approach. That is, the initial algorithms worked as follows: look at "small" regions in programs and see whether... |

1 |
Lambda Lifting
- Johnsson
- 1986
(Show Context)
Citation Context ... ; x 2 ; : : : ; x n ) = b i g We make the following assumptions. 1. All primitive operators return a single value as their result. 2. All nested lambda abstractions have been lifted to the top level =-=[23]-=-. 3. All functions (user defined and primitive) are not curried. This ensures that the syntax specifies a first order language. 4. All local and bound variables are ff-renamed so that they are defined... |

1 |
An Id Compiler
- Zhou
- 1992
(Show Context)
Citation Context ...ithm. In this thesis, we concentrate on a first order subset of Id allowing I-structures as the only means of achieving side effects. We now give an overview of an Id compiler being implemented in Id =-=[46]-=- so that the reader can put the partitioning stage of the compiler in this perspective. The compiler reads an Id source file and produces Multi-threaded machine code to run on conventional microproces... |