Results 1 - 10
of
14
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.
Tutorial Notes on Partial Evaluation
- Proceedings of the Twentieth Annual ACM Symposium on Principles of Programming Languages
, 1993
"... The last years have witnessed a flurry of new results in the area of partial evaluation. These tutorial notes survey the field and present a critical assessment of the state of the art. 1 Introduction Partial evaluation is a source-to-source program transformation technique for specializing program ..."
Abstract
-
Cited by 230 (60 self)
- Add to MetaCart
The last years have witnessed a flurry of new results in the area of partial evaluation. These tutorial notes survey the field and present a critical assessment of the state of the art. 1 Introduction Partial evaluation is a source-to-source program transformation technique for specializing programs with respect to parts of their input. In essence, partial evaluation removes layers of interpretation. In the most general sense, an interpreter can be defined as a program whose control flow is determined by its input data. As Abelson points out, [43, Foreword], even programs that are not themselves interpreters have important interpreter-like pieces. These pieces contain both compile-time and run-time constructs. Partial evaluation identifies and eliminates the compile-time constructs. 1.1 A complete example We consider a function producing formatted text. Such functions exist in most programming languages (e.g., format in Lisp and printf in C). Figure 1 displays a formatting functio...
DyC: An Expressive Annotation-Directed Dynamic Compiler for C
"... We present the design of DyC, a dynamic-compilation system for C based on run-time specialization. Directed by a few declarative user annotations that specify the variables and code on which dynamic compilation should take place, a binding-time analysis computes the set of run-time constants at each ..."
Abstract
-
Cited by 88 (4 self)
- Add to MetaCart
We present the design of DyC, a dynamic-compilation system for C based on run-time specialization. Directed by a few declarative user annotations that specify the variables and code on which dynamic compilation should take place, a binding-time analysis computes the set of run-time constants at each program point in the annotated procedure's control-flow graph; the analysis supports program-point-specific polyvariant division and specialization. The results of the analysis guide the construction of a run-time specializer for each dynamically compiled region; the specializer supports various caching strategies for managing dynamically generated code and mixes of speculative and demand-driven specialization of dynamic branch successors. Most of the key cost/benefit trade-offs in the binding-time analysis and the run-time specializer are open to user control through declarative policy annotations. DyC has
Partial evaluation of numerical programs in Fortran
- ACM SIGPLAN WORKSHOP ON PARTIAL EVALUATION AND SEMANTICS-BASED PROGRAM MANIPULATION (ORLANDO, FLORIDA)
, 1994
"... We investigate the application of partial evaluation to numerically oriented computation in scientific and engineering applications. We present our results using the Fast Fourier Transformation, the N-body attraction problem, and the cubic splines interpolation as examples. All programs are written ..."
Abstract
-
Cited by 31 (1 self)
- Add to MetaCart
We investigate the application of partial evaluation to numerically oriented computation in scientific and engineering applications. We present our results using the Fast Fourier Transformation, the N-body attraction problem, and the cubic splines interpolation as examples. All programs are written in Fortran 77, specialized using our Fortran partial evaluator, and compiled into executable machine code using a commercial Fortran compiler. The results demonstrate that existing partial evaluation technology is strong enough to improve the efficiency of a large class of numerical programs. However, using partial evaluation as a development tool in the ‘real world’ still remains a challenging problem.
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
C Program Specialization
, 1992
"... Automatic program specialization has numerous application areas ranging from specialization of scientific computation to automatic compiler generation. During the last decade, several automatic partial evaluators have been developed and demonstrated their usefulness. However, none of these have both ..."
Abstract
-
Cited by 18 (5 self)
- Add to MetaCart
Automatic program specialization has numerous application areas ranging from specialization of scientific computation to automatic compiler generation. During the last decade, several automatic partial evaluators have been developed and demonstrated their usefulness. However, none of these have both been for a typed imperative language and self-applicable. The main content of this thesis is the development of an automatic self-applicable program specializer for a substantial subset of the C programming language. The use of an imperative language introduce many problems not present in partial evaluation of functional languages. New problems addressed and solved in this thesis includes handling of static side-effects under dynamic control, treatment of the imperative data structures arrays and structures, partially static data structures and specialization time splitting of these, and representation of values and programs for efficient self-application. In the thesis we recall the founda...
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 ...
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 14 (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 off-line approach and uses a binding-time analysis prior to the specialization phase. The source language includes multi-dimensional arrays, procedures and functions, as well as global storage. The system is presented and experimental results are given. 1
Partial-Evaluation Techniques for Concurrent Programs
- In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM-97
, 1997
"... This paper presents an application of partial evaluation (program specialization) techniques to concurrent programs. The language chosen for this investigation is a very simple CSP-like language. A standard binding-time analysis for imperative languages is extended in order to deal with the basic ..."
Abstract
-
Cited by 11 (0 self)
- Add to MetaCart
This paper presents an application of partial evaluation (program specialization) techniques to concurrent programs. The language chosen for this investigation is a very simple CSP-like language. A standard binding-time analysis for imperative languages is extended in order to deal with the basic concurrent constructs (synchronous communication and nondeterministic choice). Based on the binding-time annotations, a specialization transformation is defined and proved correct. In order to maintain a simple and clear presentation, the specialization algorithm addresses only the data transfer component of the communication; partial evaluation, the way it is defined here, always generates residual synchronizations. However, a simple approximate analysis for detecting and removing redundant synchronizations from the residual program (i.e. synchronizations whose removal does not increase the nondeterminism of a program) can be performed. The paper also addresses pragmatic concerns such as im...
Partial Evaluation of Call-by-value lambda-calculus with Side-effects
- ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM '97
"... We present a framework of an online partial evaluator for a callby -value -calculus with destructive updates of data structures. It properly and correctly specializes expressions that contain sideeffects, while preserving pointer equality, which is an important property for programs using updates. O ..."
Abstract
-
Cited by 5 (5 self)
- Add to MetaCart
We present a framework of an online partial evaluator for a callby -value -calculus with destructive updates of data structures. It properly and correctly specializes expressions that contain sideeffects, while preserving pointer equality, which is an important property for programs using updates. Our partial evaluator uses a side-effect analysis to extract immutable data structures and then performs an online specialization using preactions. Once mutable and immutable data structures are separated, partial evaluation is done in sucha way that accessesto immutable ones are performed at specialization time, while accessesto mutable ones are residualized. For the correct residualization of side-effecting operations, preactions are used to solve various issues, including code elimination, code duplication, and execution order preservation. The preaction mechanism also enablesus to reduceexpressionsthat were residualized when the conventional let-expression approach of Similix was used. Th...

