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 472 (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 time-consuming, and is likely to exceed the production of today’s programmers. New techniques are required to solve this so-called 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.
Self-applicable 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 self-applicable, 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 self-applicable, 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, non-local static side-effects under dynamic control, and a restricted use of pointers. We define a Core C language, derive a two-level Core C language with explicit binding times, and formulate well-annotatedness conditions. Function specialization and code generation is described in terms of the two-level Core C language. An implementation of the C partial evaluator has been made. Some experimental results are given. 1
On Jones-optimal 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 \Jones-optimality". We argue that the 1993 de nition of Jones-optimality is in principle impossible to ful l for strongly typed languages due to necessary encodings on the inputs and outputs of a well-typed self-interpreter. We propose a technical correction of the de nition which allows Jones-optimality to remain a meaningful concept for typed languages. We extend recent work by Hughes and by Taha and Makholm on the long-unsolved problem of Jones-optimal specialization for strongly typed languages. The methods of Taha and Makholm are enhanced to allow \almost optimal " results when a self-interpreter 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 su-cient for Jones-optimal 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 Jones-optimal specialization for strongly typed languages.
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 15 (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. E-mail: 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. E-mail: 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 self-applicable partial evaluator for a substantial subset of the C programming language. The possibility of self-application enables generation of stand-alone 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 ...
A Hybrid Approach to Online and Offline Partial Evaluation
- Higher-Order 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 state-of-the-art offline PE, for a statically typed call-by-value functional language. ..."
Abstract
-
Cited by 14 (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 state-of-the-art offline PE, for a statically typed call-by-value functional language.
Higher-order Binding-time Analysis
- In ACM Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'93
, 1993
"... The partial evaluation process requires a binding-time analysis. Binding-time 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 binding-time analysis. Binding-time 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 first-order 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 higher-order languages. This paper develops such a generalisation: a projection-based abstract interpretation suitable for higher-order binding-time analysis. Launchbury [Lau91b] has shown that binding-time analysis and strictness analysis are equivalent problems at first order, and for projection-based 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 evaluation-order independent view of binding-time analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of "control-ba ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluation-order independent view of binding-time analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of "control-based binding-time 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 R-tree. 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 Binding-Time Analysis
- Journal of Lisp and Symbolic Computation
, 1994
"... First-order projection-based binding-time analysis has proven genuinely useful in partial evaluation [Lau91a, Lau91c]. There have been three notable generalisations of projection-based 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
First-order projection-based binding-time analysis has proven genuinely useful in partial evaluation [Lau91a, Lau91c]. There have been three notable generalisations of projection-based 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 projection-based, 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 binding-time analysis is essential for good partial evaluation, and we do not address...

