| Guy Steele. Rabbit: A compiler for Scheme. Technical Report MIT/AI-TR-474, Massachusetts Institute of Technology, 1978. |
....produced by a fix expression can be block allocated and wired directly together. This leaves the fix bound variables unassigned for the duration, thus simplifying optimizations such as inlining and loop recognition. fix is identical to the labels operator handled by Steele s Rabbit compiler [9] and the Y operator of Kranz s Orbit compiler [4, 3] and Rozas Liar compiler [7, 8] The output expression includes calls to void, a primitive that evaluates to some unspecified value. It may be defined as follows. define void (lambda ( if #f #f) We do not use a special undefined ....
....Yet virtually nothing has been written explaining how to cope with the reality of arbitrary letrec expressions, e.g. by transforming them into one of these ideal forms. Moreover, nothing has been written describing e#cient strategies for detecting violations of the letrec restriction. Steele [9] developed strategies for generating good code for mutually recursive procedures bound by a labels form that is essentially our fix construct. Because labels forms are present in the input language handled by his compiler, he does not describe the translation of general letrec expressions into ....
Steele Jr., G. L. Rabbit: a compiler for Scheme. MIT AI Memo 474, Massachusetts Institute of Technology, Cambridge, Mass., May 1978.
.... Collecting Interpreter (II) 136 Chapter 1 Background and Motivation The continuation passing style (CPS) transformation is ubiquitous in the area of programming language semantics: ffl it defines the intermediate representation of many compilers and program analysis tools [3, 15, 39, 55, 56, 58, 82, 92, 97]; ffl it is essential in the construction of many denotational models of programming languages [99, 101] ffl it permits a simulation of call by value semantics using call by name semantics [77] ffl it converts heap allocation into stack allocation [5, 37] ffl it embeds classical logic into ....
....marked ( is significant as it corresponds to the source reduction. Following Plotkin s terminology [75] we call this reduction proper , and all other reductions administrative. The remainder of this chapter addresses various algorithms for the elimination of administrative redexes. Steele [97] based his compiler for Scheme on the CPS transformation. In order to minimize the size of intermediate programs, Steele improved the original CPS transformation to recognize various special cases. Although Steele s CPS transform generates terms without administrative redexes, his algorithm is ....
[Article contains additional citation context not shown here]
Steele, G. L. Rabbit: A Compiler for Scheme. MIT AI Memo 474, Massachusetts Institute of Technology (1978).
....paper. 1.1. Intermediate languages for compiling CPS or languages with properties similar to CPS (such as A normal forms [25] or monadic normal forms [39] we refer to these as CPS based languages) are often used as intermediate languages when compiling and partial evaluating functional languages [1, 21, 38, 40, 43, 50, 60, 66]. These applications take advantage of the fact that, in CPS, all intermediate values are named and that contexts are represented explicitly. For example, intermediate value naming is used to aid register allocation in compiling (roughly, each name corresponds to a register) and to prevent ....
....O C : K = O : y:y C hCi K) Figure 8. Optimizing CPS translation for the Domain free cube (excerpts) Most practical applications of CPS (such as compiling and partial evaluation) use an optimizing version of a particular CPS translation that produces terms with fewer administrative redexes [18, 26, 52, 58, 66]. In this section, we present an optimizing version of the translation in Figure 7 that yields terms in administrative normal form (i.e. the terms contain no administrative redexes) We need to consider the CPS translation of objects only, since continuations are introduced only in this ....
G. Steele Jr. Rabbit: A compiler for Scheme. Technical Report AI-TR-474, Articial Intelligence Laboratory, Massachusetts Institute of Technology, Cambridge, Massachusetts, May 1978.
....supports multiple closure representations but it is restricted in that all representations share the same interface. There are many studies of closure conversion which focus on the data structures used for variable lookup and the tradeo#s between sharing and time to lookup the value of a variable [17, 25, 4, 23]. Our framework abstracts out data structure representation issues. Jagannathan and Wright discuss flow directed inlining in an untyped system [13] Their paper examines heuristics for selecting application sites for inlining. They do not discuss inlining open terms. Plevyak and Chien have ....
Guy Steele. Rabbit: A compiler for Scheme. Technical Report MIT/AI-TR-474, Massachusetts Institute of Technology, 1978.
....list based implementations enable elegant translations of function calls and conditionals, as shown in Section 6.1 and allow an elegant optimization for accessing global variables, as shown in Section 6.8. 5. 2 Top level environment Steele and Sussman discuss in The Art of the Interpreter [17] top level bindings versus referential transparency and come to the conclusion that free variables should be bound dynamically in the top level environment to allow incremental program development. However, for a small system like LispMe, another approach which was partly inspired by the Hugs ....
....to allow mutually recursive de nitions. 5.4 Discussion By requiring all used names to be de ned earlier, LispMe encourages a bottom up style of programming, where standard Scheme additionally o ers the top down approach by allowing unbound identi ers resolved at runtime. Steele and Sussman s [17] motivation was to allow independent de nition, replacement and debugging of parts of a (presumably) large program. All e ects of rede nitions of top level names can be achieved by assignment using set 10 , so the only thing missing in LispMe is the possibility to write de nitions using ....
G. L. Steele Jr. and G. J. Sussman. The art of the interpreter or, the modularity complex (parts zero, one, and two). AI Memo 453, Articial Intelligence Laboratory, Massachusetts Institute of Technology, Cambridge, Massachusetts, May 1978.
....of domains. We commonly refer to Haskell as a lazy language, but technically it is really non strict because it contains constructs that make small changes to standard lazy evaluation. These features make Haskell both more ecient and harder to understand. In this paper we present a meta circular[25,1,14,4] interpreter (of Haskell, written in Haskell) which provides a uni ed model of these constructs and their interactions with Haskell s other features. Our interpreter is a compositional monadic interpreter written in the style of Liang, Hudak, and Jones [16] 1 The work described here was ....
Steele Jr., G. L. and G. J. Sussman, The art of the interpreter or, the modularity complex (parts zero, one, and two), AI Memo 453, Massachusetts Institute of Technology, Articial Intelligence Laboratory (1978).
....analysis. 1 Permanent Address: Department of Computer Science, Rice University, Houston, TX 77251 1892. 1 Data Flow Analysis of Programs in CPS Many compilers for higher order applicative languages (Scheme, ML, Common Lisp) map source programs to programs in continuation passing style (CPS) [1, 11, 12, 17]. Compiler writers believe that the intermediate representation based on CPS eases the production of code and facilitates optimizations. Numerous people also argue that the CPS transformation increases the precision of the data flow analysis that is necessary for advanced optimizations [2, 3, 5, ....
Steele, G. L. Rabbit: A Compiler for Scheme. MIT AI Memo 474, Massachusetts Institute of Technology (1978). 13
....to each procedure call. Therefore, compilers for languages with this combination of features usually include special purpose analysis to determine when a function s activation record will not survive the activation of the function, and use stack allocation when this is the case [KKR 86, BGS82, Ste78] Methods to do this are ad hoc, cheap, and usually e#ective. In the Rabbit compiler [Ste78] the results of evaluating lambda (functionproducing) expressions are traced to determine their use. Uses are divided into three categories: function as data, in which the value produced by the lambda ....
....usually include special purpose analysis to determine when a function s activation record will not survive the activation of the function, and use stack allocation when this is the case [KKR 86, BGS82, Ste78] Methods to do this are ad hoc, cheap, and usually e#ective. In the Rabbit compiler [Ste78] the results of evaluating lambda (functionproducing) expressions are traced to determine their use. Uses are divided into three categories: function as data, in which the value produced by the lambda expression is assigned to a variable with a non function (not applied to arguments) use; ....
Guy L. Steele Jr. RABBIT: A compiler for SCHEME. Technical report, Massachusetts Institute of Technology, May 1978.
....these. If a language supports exception handling, then caller saves allows a simpler, more e#cient processing of exceptions. In general, use of caller saves makes it possible to examine an activation record without referring to other activation records. Steele and Sussman discuss this [Ste77a, SS76] 2. Storing registers into contiguous storage can be much faster than storing them into cells scattered in memory. Often there are special machine instructions to do this. 3. Hennessy and Chow found that their register allocator was not as effective with a caller saves convention [CH84] Their ....
Guy Lewis Steele Jr. and Gerald Jay Sussman. LAMBDA: The ultimate imperative. AI Memo 353, Massachusetts Institute of Technology, 1976.
....it may be customized. Because different applications will exercise different operations in different ways, systems which permit customization of these operations on a per application basis offer the promise of greater flexibility and programmability. First class procedures[1, 21] and continuations[13, 28] are two abstractions we have found to be extremely useful in implementing a variety of environment and control operations. Languages such as Scheme[10] or ML[25] have demonstrated that these abstractions are effective building blocks for expressing a number of interesting data, program and ....
Guy Steele Jr. Rabbit: A Compiler for Scheme. Master's thesis, Massachusetts Institute of Technology, 1978.
....GOTO statements (as well as the payoff from considering all the perverse possibilities in languages that do have them) is minimal. The preceding remarks concerning the hegemony of CFGs are only true in the procedural language community. The Lisp Scheme community uses ASTs in their compilers [Ste78] [Kra88] For the most part, however, code optimization to them means applying closure analysis techniques to reduce a program to a procedural form, at which point their compilers generate code. They do not discuss how to perform traditional optimizations using ASTs. Thus, their point of arrival ....
Guy L. Steele. RABBIT: A Compiler for Scheme. Technical Report, Massachusetts Institute of Technology, May 1978.
.... for = 3 3 Symmetric or asymmetric continuation passing style In gure 3, we give a translation for the sequential subset of C using the continuation passing style or CPS for short; such a style is often used for denotational semantics ( 2] and for program transformations in compilers ([25], 1] In our notation, a translation consists of a set of translation rules having the following pattern: Term] exp. The left hand side of the rule is a term of C in brackets and the right hand side is an expression in = Such a rule should be read as the text of the translation of Term ....
Guy Lewis Steele, Jr. Rabbit: a compiler for scheme. MIT AI Memo 474, Massachusetts Institute of Technology, Cambridge, Mass., May 1978. 16
.... di erent data types have di erent representations on standard architectures, it is natural to generate one piece of code for f that manipulates values of uniform size (typically pointers) This approach, known as boxing, has been used for many years in compilers for LISP [Gre77, BGS82] and Scheme [Ste78]. Since it is non trivial to determine which values will be used in polymorphic contexts, the URA implies the stringent requirements that (1) all values be must boxed and (2) data representations are determined by type constructor and not just by type. For instance, lists of integers and lists of ....
G. Steele. Rabbit: A compiler for Scheme. Technical Report MIT/AI-TR-474, Massachusetts Institute of Technology, 1978.
....DISCOVERIES OF CONTINUATIONS 6 235 Van Wijngaarden s goal was to formulate a preprocessor that would translate Algol 60 into a more restricted sublanguage. The final stage of the preprocessing was (what we would now call) a transformation of proper procedures into continuation passing style (CPS) [41], with an attendant elimination of labels and goto statements. An earlier stage of the preprocessing replaced function procedures by proper procedures. As van Wijngaarden described the transformation: Provide each procedure declaration with an extra formal parameter specified label and ....
Steele Jr., Guy Lewis and Sussman, Gerald Jay. LAMBDA: The Ultimate Imperative. AI Memo 353, Massachusetts Institute of Technology (March 10, 1976).
....x is bound to v. ae 1 [ae 2 ] denotes functional composition of environments ae 1 and ae 2 . We define EnvDomain( ae) to be the set of variables in ae that are not unbound. ae denotes lexical environments, and ae denotes public environments. The semantics is given in continuation passing style [14, 22], and models evaluation in terms of two environments. The first maps bound variables, and the second maps public variables. 5 Records and Modules 5.1 Records As a first example, consider the definition of a simple record structure. Rascal does not provide a primitive record constructor, but ....
Guy L. Steele. Rabbit: A Compiler for Scheme. Master 's thesis, Massachusetts Institute of Technology, 1978.
.... Collecting Interpreter (II) 1 Chapter 1 Background and Motivation The continuation passing style (CPS) transformation is ubiquitous in the area of programming language semantics: ffl it defines the intermediate representation of many compilers and program analysis tools [3, 15, 39, 55, 56, 58, 82, 92, 97]; ffl it is essential in the construction of many denotational models of programming languages [99, 101] ffl it permits a simulation of call by value semantics using call by name semantics [77] ffl it converts heap allocation into stack allocation [5, 37] ffl it embeds classical logic into ....
....marked ( is significant as it corresponds to the source reduction. Following Plotkin s terminology [75] we call this reduction proper , and all other reductions administrative. The remainder of this chapter addresses various algorithms for the elimination of administrative redexes. Steele [97] based his compiler for Scheme on the CPS transformation. In order to minimize the size of intermediate programs, Steele improved the original CPS transformation to recognize various special cases. Although Steele s CPS transform generates terms without administrative redexes, his algorithm is ....
[Article contains additional citation context not shown here]
Steele, G. L. Rabbit: A Compiler for Scheme. MIT AI Memo 474, Massachusetts Institute of Technology (1978).
....copy propagation, and inlining of those continuations and procedures that have single unique invocation points. No static analysis is performed, except a simple per module reference count analysis. We refer the reader to the literature for further details concerning the practical issues involved [3, 19,22,27, 28]. 6 Tailcalls in C Implementations of high level languages must often deal with tailcalls. A tailcall is a function call that occurs as the last action (the tail ) in a function body. An implementation is properly tail recursive if tailcalls do not cause net growth in stack usage. In effect, ....
....the label, receives as the return value the next label to call, and loops ad infinitum. While this preserves tail recursion, parameter passing cannot be done in a natural way. Instead, global variables are used to communicate arguments from caller to callee. This technique has been used many times [24, 27, 28]. To eliminate the high overhead for parameter passing and control flow in the previous scheme, some compilers collect all code into a single C function [13] This allows parameters to be located in local C function variables, perhaps even registers, and known control transfers become simple ....
Guy L. Steele Jr. Rabbit: a compiler for Scheme (a study in compiler optimization). MIT AI Memo 474, Massachusetts Institute of Technology, May 1978. Master's Thesis.
.... t e j let v = t in e j let v = o in e j switch t (c : e) e def Prog Gamma (v p = p (v ; v fc ; v sc ) e) programs Figure 3: Definition of RML s internal CPS representation ffl Other compilers have demonstrated the usefulness of CPS in the context of (semi )functional languages [20, 12, 11, 3, 2]. 4.2 The CPS representation for RML The CPS representation of RML programs is a straight forward encoding of the terms occurring in the RML specification; it is defined in Figure 3. A few comments on terminology and notation: trivial expressions are those expressions that denote values rather ....
....statically allocated C data structures. The only technical problems are how to represent labels, and how to implement tailcalls. Because of tail recursiveness, the C stack cannot be used for calls or parameter passing. A standard solution is to represent each label as a parameterless function [20, 21]. A function must end by returning the address of the next function to call. On top of this sits a dispatch loop that calls a function pointer, gets back a new pointer, and then loops to call the new function, ad infinitum. Parameters and results are passed in global variables and or a simulated ....
Guy L. Steele Jr. Rabbit: a Compiler for Scheme (A Study in Compiler Optimization). MIT AI Memo 474, Massachusetts Institute of Technology, 1978.
....abstraction was adopted by Goldberg and Kay as the central programming metaphor for Smalltalk 72 [GK76] In the functional programming community, it was known early on that lexically scoped higher order programming with state can model essential aspects of objectoriented programming. Steele [Ste76] shows that Scheme can implement procedural data structures that are accessed by late binding. Object oriented extensions to Lisp such as Flavors [Moo86] and CLOS [Ste90] show that practical and extremely powerful object systems can be constructed as syntactic extensions of Lisp. The ....
Guy Steele. Lambda: The ultimate declarative. A.I. Memo No. 379, Massachusetts Institute of Technology, Cambridge, MA, November 1976.
No context found.
Guy Steele. Rabbit: A compiler for Scheme. Technical Report MIT/AI-TR-474, Massachusetts Institute of Technology, 1978.
No context found.
Guy Lewis Steele Jr. and Gerald Jay Sussman. The art of the interpreter, or the modularity complex (parts zero, one, and two). MIT AI Memo 453, Massachusetts Institute of Technology, Cambridge, Mass., May 1978. 15 16
No context found.
Guy L. Steele. Rabbit: A compiler for Scheme. Technical Report 474, Massachusetts Institute of Technology, Cambridge, MA, May 1978. (p 100)
No context found.
Guy Lewis Steele Jr. and Gerald Jay Sussman. The art of the interpreter, or the modularity complex (parts zero, one, and two). MIT AI Memo 453, Massachusetts Institute of Technology, Cambridge, Mass., May 1978. 15 16
No context found.
G.L. Steele Jr. RABBIT: A Compiler for SCHEME. Technical Report, Massachusetts Institute of Technology, 1978.
No context found.
Steele, G. L. Rabbit: A compiler for Scheme. MIT AI Memo 474, Massachusetts Institute of Technology, 1978.
First 50 documents
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC