Results 1  10
of
12
Program Analysis and Specialization for the C Programming Language
, 1994
"... Software engineers are faced with a dilemma. They want to write general and wellstructured programs that are flexible and easy to maintain. On the other hand, generality has a price: efficiency. A specialized program solving a particular problem is often significantly faster than a general program. ..."
Abstract

Cited by 526 (0 self)
 Add to MetaCart
Software engineers are faced with a dilemma. They want to write general and wellstructured programs that are flexible and easy to maintain. On the other hand, generality has a price: efficiency. A specialized program solving a particular problem is often significantly faster than a general program. However, the development of specialized software is timeconsuming, and is likely to exceed the production of today’s programmers. New techniques are required to solve this socalled software crisis. Partial evaluation is a program specialization technique that reconciles the benefits of generality with efficiency. This thesis presents an automatic partial evaluator for the Ansi C programming language. The content of this thesis is analysis and transformation of C programs. We develop several analyses that support the transformation of a program into its generating extension. A generating extension is a program that produces specialized programs when executed on parts of the input. The thesis contains the following main results.
Selfapplicable C program specialization
 Yale University
, 1992
"... A partial evaluator is an automatic program transformation tool. Given as input a general program and part of its input, it can produce a specialized version. If the partial evaluator is selfapplicable, program generators can be made. The goal is efficiency: the specialized program often runs an or ..."
Abstract

Cited by 28 (1 self)
 Add to MetaCart
A partial evaluator is an automatic program transformation tool. Given as input a general program and part of its input, it can produce a specialized version. If the partial evaluator is selfapplicable, program generators can be made. The goal is efficiency: the specialized program often runs an order of magnitude faster than the general one. We consider partial evaluation of the pragmatic oriented imperative C programming language. New problems studied includes partially static data structures, nonlocal static sideeffects under dynamic control, and a restricted use of pointers. We define a Core C language, derive a twolevel Core C language with explicit binding times, and formulate wellannotatedness conditions. Function specialization and code generation is described in terms of the twolevel Core C language. An implementation of the C partial evaluator has been made. Some experimental results are given. 1
On Jonesoptimal specialization for strongly typed languages
 Semantics, Applications, and Implementation of Program Generation, LNCS 1924
, 2000
"... Abstract. The phrase \optimal program specialization " was de ned by Jones et al. in 1993 to capture the idea of a specializer being strong enough to remove entire layers of interpretation. As it has become clear that it does not imply \optimality " in the everyday meaning of the word, we ..."
Abstract

Cited by 19 (2 self)
 Add to MetaCart
Abstract. The phrase \optimal program specialization " was de ned by Jones et al. in 1993 to capture the idea of a specializer being strong enough to remove entire layers of interpretation. As it has become clear that it does not imply \optimality " in the everyday meaning of the word, we propose to rename the concept \Jonesoptimality". We argue that the 1993 de nition of Jonesoptimality is in principle impossible to ful l for strongly typed languages due to necessary encodings on the inputs and outputs of a welltyped selfinterpreter. We propose a technical correction of the de nition which allows Jonesoptimality to remain a meaningful concept for typed languages. We extend recent work by Hughes and by Taha and Makholm on the longunsolved problem of Jonesoptimal specialization for strongly typed languages. The methods of Taha and Makholm are enhanced to allow \almost optimal " results when a selfinterpreter is specialized to a typeincorrect program; how to do this has been an open problem since 1987. Neither Hughes ' nor Taha{Makholm's methods are by themselves sucient for Jonesoptimal specialization when the language contains primitive operations that produce or consume complex data types. A simple postprocess is proposed to solve the problem. An implementation of the proposed techniques has been produced and used for the rst successful practical experiments with truly Jonesoptimal specialization for strongly typed languages.
A Hybrid Approach to Online and Offline Partial Evaluation
 HigherOrder and Symbolic Computation
, 2002
"... This article presents a hybrid method of partial evaluation (PE), which is exactly as precise as naive online PE and nearly as efficient as stateoftheart offline PE, for a statically typed callbyvalue functional language. ..."
Abstract

Cited by 16 (0 self)
 Add to MetaCart
This article presents a hybrid method of partial evaluation (PE), which is exactly as precise as naive online PE and nearly as efficient as stateoftheart offline PE, for a statically typed callbyvalue functional language.
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...
Partial Evaluation of C and Automatic Compiler Generation (Extended Abstract)
 Compiler Construction. 4th International Conference. (Paderborn, Germany). Lecture Notes in Computer Science
, 1992
"... ) Lars Ole Andersen DIKU, Department of University of Copenhagen, Universitetsparken 1, DK 2100 Copenhagen Ø, Denmark. Email: lars@diku.dk Abstract. A partial evaluator is a program transformator which as input take a program and parts of its input, and as output produce a specialized residual pro ..."
Abstract

Cited by 15 (2 self)
 Add to MetaCart
) Lars Ole Andersen DIKU, Department of University of Copenhagen, Universitetsparken 1, DK 2100 Copenhagen Ø, Denmark. Email: lars@diku.dk Abstract. A partial evaluator is a program transformator which as input take a program and parts of its input, and as output produce a specialized residual program. When applied to the rest of the input data, the residual program yields same result as the orignal program. The aim is efficiency: the residual program often runs an order of magnitude faster. We have developed a selfapplicable partial evaluator for a substantial subset of the C programming language. The possibility of selfapplication enables generation of standalone compilers from executable specifications, for example interpreters. 1 Introduction During the last decade partial evaluation has proven its usefulness in numerous areas ranging from specialization of scientific computation [3], to specialization of general scanners [9], to automatic compiler generation [4,5]. The aim ...
Higherorder Bindingtime Analysis
 In ACM Symposium on Partial Evaluation and SemanticsBased Program Manipulation (PEPM'93
, 1993
"... The partial evaluation process requires a bindingtime analysis. Bindingtime analysis seeks to determine which parts of a program's result is determined when some part of the input is known. Domain projections provide a very general way to encode a description of which parts of a data structure are ..."
Abstract

Cited by 13 (2 self)
 Add to MetaCart
The partial evaluation process requires a bindingtime analysis. Bindingtime analysis seeks to determine which parts of a program's result is determined when some part of the input is known. Domain projections provide a very general way to encode a description of which parts of a data structure are static (known), and which are dynamic (not static). For firstorder functional languages Launchbury [Lau91a] has developed an abstract interpretation technique for bindingtime analysis in which the basic abstract value is a projection. Unfortunately this technique does not generalise easily to higherorder languages. This paper develops such a generalisation: a projectionbased abstract interpretation suitable for higherorder bindingtime analysis. Launchbury [Lau91b] has shown that bindingtime analysis and strictness analysis are equivalent problems at first order, and for projectionbased analyses have exactly the same safety condition. We argue that the same is true at higher order, ...
A Computational Formalization for Partial Evaluation (Extended Version)
, 1996
"... We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluationorder independent view of bindingtime analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of "controlba ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluationorder independent view of bindingtime analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of "controlbased bindingtime improvements" for let expressions. Specifically,
Applying Partial Evaluation to VLSI Design Rule Checking
, 1995
"... This report describes the design and implementation of a complete VLSI design rule checking program. We use formal techniques to develop a methodology for performing design rule checking, and implement this methodology in the Scheme programming language. We specify the requirements for a simplified ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
This report describes the design and implementation of a complete VLSI design rule checking program. We use formal techniques to develop a methodology for performing design rule checking, and implement this methodology in the Scheme programming language. We specify the requirements for a simplified VLSI design database and implement it, making use of the Hilbert Rtree. We describe the implementationof an efficient algorithm for the decompositionof rectilinear polygons into collections of rectangles. We apply partial evaluation techniques to our final design rule checking program in order to determine the effect this has on our program's structure and performance. Finally, we describe the implementation of a graphical user interface for the checker and summarise our experiences and insights gained during the course of this project. Acknowledgement I would like to thank my supervisor, Dr. Andrew Butterfield, for his suggestions and support during this project. I would also like to th...
PERs from Projections for BindingTime Analysis
 Journal of Lisp and Symbolic Computation
, 1994
"... Firstorder projectionbased bindingtime analysis has proven genuinely useful in partial evaluation [Lau91a, Lau91c]. There have been three notable generalisations of projectionbased analysis to higher order. The first lacked a formal basis [Mog89]; the second used structures strictly more general ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Firstorder projectionbased bindingtime analysis has proven genuinely useful in partial evaluation [Lau91a, Lau91c]. There have been three notable generalisations of projectionbased analysis to higher order. The first lacked a formal basis [Mog89]; the second used structures strictly more general that projections, namely partial equivalence relations (PERs) [HS91]; the third involved a complex construction that gave rise to impractically large abstract domains [Dav93]. This paper presents a technique free of these shortcomings: it is simple, entirely projectionbased, satisfies a formal correctness condition, and gives rise to reasonably small abstract domains. Though the technique is cast in terms of projections, there is also an interpretation in terms of PERs. The principal limitation of the technique is the restriction to monomorphic typing. 1 Introduction and Background We take as given that bindingtime analysis is essential for good partial evaluation, and we do not address...