Results 1  10
of
21
Static and Dynamic Semantics Processing
 Proceedings of the Eighteenth Annual ACM Symposium on Principles of Programming Languages
, 1991
"... This paper presents a step forward in the use of partial evaluation for interpreting and compiling programs, as well as for automatically generating a compiler from denotational definitions of programming languages. We determine the static and dynamic semantics of a programming language, reduce the ..."
Abstract

Cited by 48 (25 self)
 Add to MetaCart
This paper presents a step forward in the use of partial evaluation for interpreting and compiling programs, as well as for automatically generating a compiler from denotational definitions of programming languages. We determine the static and dynamic semantics of a programming language, reduce the expressions representing the static semantics, and generate object code by instantiating the expressions representing the dynamic semantics. By processing the static semantics of the language, programs get compiled. By processing the static semantics of the partial evaluator, compilers are generated. The correctness of a compiler is guaranteed by the correctness of both the executable specification and our partial evaluator. The results reported in this paper improve on previous work in the domain of compiler generation [16, 30], and solves several open problems in the domain of partial evaluation [15]. In essence: ffl Our compilation goes beyond a mere syntaxtosemantics mapping since the ...
MetaProgramming in Logic Programming
 Handbook of Logic in Artificial Intelligence and Logic Programming
, 1994
"... data types are facilitated in Godel by its type and module systems. Thus, in order to describe the metaprogramming facilities of Godel, a brief account of these systems is given. Each constant, function, predicate, and proposition in a Godel program must be specified by a language declaration. The ..."
Abstract

Cited by 46 (3 self)
 Add to MetaCart
data types are facilitated in Godel by its type and module systems. Thus, in order to describe the metaprogramming facilities of Godel, a brief account of these systems is given. Each constant, function, predicate, and proposition in a Godel program must be specified by a language declaration. The type of a variable is not declared but inferred from its context within a particular program statement. To illustrate the type system, we give the language declarations that would be required for the program in Figure 1. BASE Name. CONSTANT Tom, Jerry : Name. PREDICATE Chase : Name * Name; Cat, Mouse : Name. Note that the declaration beginning BASE indicates that Name is a base type. In the statement Chase(x,y) ! Cat(x) & Mouse(y). the variables x and y are inferred to be of type Name. Polymorphic types can also be defined in Godel. They are constructed from the base types, type variables called parameters, and type constructors. Each constructor has an arity 1 attached to it. As an...
Partial evaluation of Standard ML
, 1993
"... This thesis describes offline partial evaluation of the core of Standard ML, a large typed functional language. Unlike previous partial evaluators for larger languages (like for instance Similix for a subset of Scheme or CMix for a subset of C) we have chosen not do to the partial evaluation direct ..."
Abstract

Cited by 44 (0 self)
 Add to MetaCart
This thesis describes offline partial evaluation of the core of Standard ML, a large typed functional language. Unlike previous partial evaluators for larger languages (like for instance Similix for a subset of Scheme or CMix for a subset of C) we have chosen not do to the partial evaluation directly, but to use an untraditional method which we call the cogen approach to transform a program into its generating extension. We show in this thesis that this approach is in many aspects superior to the traditional approach and that it eliminates the need for selfapplying the specializer. We develop a bindingtime analysis based on nonstandard type inference and produce a very efficient implementation of it using constraints. While this has been done before, we have for the first time succeeded in using the typedness of the source language to make the analysis simple and therefore more trustworthy. To our best knowledge this thesis also describes the first successful strategy for partially evaluating complicated patterns with variable bindings. Earlier attempts have either been for a much simpler class of patterns or have stranded on the need/wish for selfapplication of the specializer. Note that partially evaluating complicated patterns is different from partially evaluating programs dealing with complicated patterns; that has been done successfully. A complete system for partial evaluation of Standard ML with parsing, type checking, bindingtime analysis, compiler generation, and pretty printing has been implemented and we report on some experiments with this system. We have not implemented everything described in the thesis, though. Details can be found in Chapter 6. Preface This thesis is submitted in partial fulfillment of the requirements for a Danish Master’s Degree (Candidatus Scientiarum) for both authors. It contains work done from August 1992
Binding Time Analysis: A New PERspective
 In Proceedings of the ACM Symposium on Partial Evaluation and SemanticsBased Program Manipulation (PEPM'91
, 1991
"... Given a description of the parameters in a program that will be known at partial evaluation time, a binding time analysis must determine which parts of the program are dependent solely on these known parts (and therefore also known at partial evaluation time). In this paper a binding time analysis f ..."
Abstract

Cited by 33 (5 self)
 Add to MetaCart
Given a description of the parameters in a program that will be known at partial evaluation time, a binding time analysis must determine which parts of the program are dependent solely on these known parts (and therefore also known at partial evaluation time). In this paper a binding time analysis for the simply typed lambda calculus is presented. The analysis takes the form of an abstract interpretation and uses a novel formalisation of the problem of binding time analysis, based on the use of partial equivalence relations. A simple proof of correctness is achieved by the use of logical relations. 1 Introduction Given a description of the parameters in a program that will be known at partial evaluation time, a binding time analysis must determine which parts of the program are dependent solely on these known parts (and therefore also known at partial evaluation time). A binding time analysis performed prior to the partial evaluation process can have several practical benefits (see [...
The Universal Resolving Algorithm: Inverse Computation in a Functional Language
 in Mathematics of Program Construction. Proceedings
, 2000
"... We present an algorithm for inverse computation in a firstorder functional language based on the notion of a perfect process tree. The Universal Resolving Algorithm (URA) introduced in this paper is sound and complete, and computes each solution, if it exists, in finite time. The algorithm has been ..."
Abstract

Cited by 23 (3 self)
 Add to MetaCart
We present an algorithm for inverse computation in a firstorder functional language based on the notion of a perfect process tree. The Universal Resolving Algorithm (URA) introduced in this paper is sound and complete, and computes each solution, if it exists, in finite time. The algorithm has been implemented for TSG, a typed dialect of SGraph, and shows some remarkable results for the inverse computation of functional programs such as pattern matching and the inverse interpretation of Whileprograms.
Generating a Compiler for a Lazy Language by Partial Evaluation
, 1992
"... Compiler generation is often emphasized as being the most important application of partial evaluation. But most of the larger practical applications have, to the best of our knowledge, been outside this field. Especially, no one has generated compilers for languages other that small languages. This ..."
Abstract

Cited by 20 (2 self)
 Add to MetaCart
Compiler generation is often emphasized as being the most important application of partial evaluation. But most of the larger practical applications have, to the best of our knowledge, been outside this field. Especially, no one has generated compilers for languages other that small languages. This paper describes a large application of partial evaluation where a realistic compiler was generated for a strongly typed lazy functional language. The language, that was called BAWL, was modeled after the language in Bird and Wadler [BW88] and is a combinator language with pattern matching, guarded alternatives, local definitions and list comprehensions. The paper describes the most important techniques used, especially the binding time improvements needed in order to get small and efficient target programs. Finally, the performance of the compiler is compared with two compilers for similar languages: Miranda and LML. Keywords Compiler generation, partial evaluation, binding time improvemen...
Constructor Specialization
 In Schmidt [25
"... In the section on "challenging problems" in the proceedings from the first international workshop on partial evaluation and mixed computation [BEJ88] a question is stated: "Can PE be used to generate new specialized data types, in a way analogous to generating specialized functions". Since then litt ..."
Abstract

Cited by 16 (2 self)
 Add to MetaCart
In the section on "challenging problems" in the proceedings from the first international workshop on partial evaluation and mixed computation [BEJ88] a question is stated: "Can PE be used to generate new specialized data types, in a way analogous to generating specialized functions". Since then little has been done to address this problem. In [Lau89], new types are indeed generated, but they are all simpler versions of the types in the original program. It is, e.g. not possible to have types with more constructors than the types in the original program. I propose to alleviate this by means of constructor specialization. Constructors are specialized with respect to the static parts of their arguments, just like residual functions. I show how this is done and argue that it makes it possible to get good results from partial evaluation in cases where the traditional methods fail to produce satisfactory results. The discussion is centered around a small subset of Standard ML, but the idea a...
Fortran program specialization
 SIGPLAN Notices
, 1994
"... Abstract. We have developed and implemented a partial evaluator for a subset of Fortran 77. A partial evaluator is a tool for program transformation which takes as input a general program and a part of its input, and produces as output a specialized program. The goal is efficiency: a specialized pro ..."
Abstract

Cited by 16 (3 self)
 Add to MetaCart
Abstract. We have developed and implemented a partial evaluator for a subset of Fortran 77. A partial evaluator is a tool for program transformation which takes as input a general program and a part of its input, and produces as output a specialized program. The goal is efficiency: a specialized program often runs an order of magnitude faster than the general program. The partial evaluator is based on the offline approach and uses a bindingtime analysis prior to the specialization phase. The source language includes multidimensional arrays, procedures and functions, as well as global storage. The system is presented and experimental results are given. 1
Principles of Inverse Computation and the Universal Resolving Algorithm
 IN THE ESSENCE OF COMPUTATION: COMPLEXITY, ANALYSIS, TRANSFORMATION
, 2002
"... We survey fundamental concept in inverse programming and present the Universal Resolving Algorithm (URA), an algorithm for inverse computation in a firstorder, functional programming language. We discusst he principles behind the algorithm, including a threestep approach based on the notion of a p ..."
Abstract

Cited by 13 (2 self)
 Add to MetaCart
We survey fundamental concept in inverse programming and present the Universal Resolving Algorithm (URA), an algorithm for inverse computation in a firstorder, functional programming language. We discusst he principles behind the algorithm, including a threestep approach based on the notion of a perfect process tree, and demonstrate our implementation with several examples. We explaint he idea of a semantics modifier for inverse computation which allows us to perform inverse computation in other programming languages via interpreters.
Supercompilation by evaluation
, 2010
"... Supercompilation is a technique due to Turchin [1] which allows for the construction of program optimisers that are both simple and extremely powerful. Supercompilation is capable of achieving transformations such as deforestation [2], function specialisation and constructor specialisation [3]. Insp ..."
Abstract

Cited by 12 (4 self)
 Add to MetaCart
Supercompilation is a technique due to Turchin [1] which allows for the construction of program optimisers that are both simple and extremely powerful. Supercompilation is capable of achieving transformations such as deforestation [2], function specialisation and constructor specialisation [3]. Inspired by Mitchell’s promising results [4], we show how the callbyneed supercompilation algorithm can be recast to be based explicitly on an evaluator, and in the process extend it to deal with recursive let expressions.