Results 1 - 10
of
16
Multi-Stage Programming: Its Theory and Applications
, 1999
"... MetaML is a statically typed functional programming language with special support for program generation. In addition to providing the standard features of contemporary programming languages such as Standard ML, MetaML provides three staging annotations. These staging annotations allow the construct ..."
Abstract
-
Cited by 79 (18 self)
- Add to MetaCart
MetaML is a statically typed functional programming language with special support for program generation. In addition to providing the standard features of contemporary programming languages such as Standard ML, MetaML provides three staging annotations. These staging annotations allow the construction, combination, and execution of object-programs. Our thesis is that MetaML's three staging annotations provide a useful, theoretically sound basis for building program generators. This dissertation reports on our study of MetaML's staging constructs, their use, their implementation, and their formal semantics. Our results include an extended example of where MetaML allows us to produce efficient programs, an explanation of why implementing these constructs in traditional ways can be challenging, two formulations of MetaML's semantics, a type system for MetaML, and a proposal for extending ...
A gentle introduction to multi-stage programming
- Domain-specific Program Generation, LNCS
, 2004
"... ..."
From Proof Normalization to Compiler Generation and Type-Directed Change-of-Representation
, 1997
"... The main part of this thesis is a synthesis of considerations from Type Theory, Mathematical Logic/Proof Theory, and (Denotational) Semantics to perform various automatic program transformations ranging from normalization over currying and coercion-insertion to compiler derivation. At the core of o ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
The main part of this thesis is a synthesis of considerations from Type Theory, Mathematical Logic/Proof Theory, and (Denotational) Semantics to perform various automatic program transformations ranging from normalization over currying and coercion-insertion to compiler derivation. At the core of our technique we have what has been described as "An Inverse of the Evaluation Functional for Typed -calculus" [7]. It is essentially type-directed j-expansion followed by fi-reduction on certain terms. Quite independently of [7], j-expansion has been studied for its use in Partial Evaluation, where among other things it has been used to obtain a one-pass CPS-transformer [20]. It is some of the consequences of this coincidence [19] that are described in the following. Our approach will be purely syntactical and it is hoped that it marks a simplification on earlier treatments of the materiel. We have tried presenting the materiel based purely on the standard reduction properties for the simpl...
Generation of LR Parsers by Partial Evaluation
- ACM Transactions on Programming Languages and Systems
, 2000
"... this paper appeared in Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, 1995 under the title "The Essence of LR Parsing." Authors' addresses: Michael Sperber, Wilhelm-Schickard-Institut fur Informatik, Universitat Tubingen, Sand 13, D72076 Tubi ..."
Abstract
-
Cited by 7 (2 self)
- Add to MetaCart
this paper appeared in Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, 1995 under the title "The Essence of LR Parsing." Authors' addresses: Michael Sperber, Wilhelm-Schickard-Institut fur Informatik, Universitat Tubingen, Sand 13, D72076 Tubingen, Germany, sperber@informatik.uni-tuebingen.de.
A Unified Framework for Binding-Time Analysis
- Colloquium on Formal Approaches in Software Engineering (FASE '97), volume 1214 of Lect
, 1997
"... . Binding-time analysis is a crucial part of offline partial evaluation. It is often specified as a non-standard type system. Many typebased binding-time analyses are reminiscent of simple type systems with additional features like recursive types. We make this connection explicit by expressing bind ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
. Binding-time analysis is a crucial part of offline partial evaluation. It is often specified as a non-standard type system. Many typebased binding-time analyses are reminiscent of simple type systems with additional features like recursive types. We make this connection explicit by expressing binding-time analysis with annotated type systems that separate the concerns of type inference from those of binding-time annotation. The separation enables us to explore a design space for bindingtime analysis by varying the underlying type system and the annotation strategy independently. The result is a classification of different monovariant binding-time analyses which allows us to compare their relative power. Due to the systematic approach we uncover some novel analyses. A partial evaluator separates the computation of a source program into two or more stages [7, 20]. Using the (static) input of the first stage it transforms a source program into a specialized residual program. Application...
Optimizing Generic Functions
- MATHEMATICS OF PROGRAM CONSTRUCTION, VOLUME 3125 OF LNCS
, 2004
"... Generic functions are defined by induction on the structural representation of types. As a consequence, by defining just a single generic operation, one acquires this operation over any particular type. An instance on a specific type is generated by interpretation of the type's structure. A dire ..."
Abstract
-
Cited by 7 (0 self)
- Add to MetaCart
Generic functions are defined by induction on the structural representation of types. As a consequence, by defining just a single generic operation, one acquires this operation over any particular type. An instance on a specific type is generated by interpretation of the type's structure. A direct translation leads to extremely ine#cient code that involves many conversions between types and their structural representations. In this
A Transformational Approach to Binary Translation of Delayed Branches
, 1998
"... This paper presents a disciplined method for deriving such case analyses. The method identies problematic cases, shows the translations for the non-problematic cases, and gives con- dence that all cases are considered. The method supports such common architectures as SPARC, MIPS, and PA-RISC, and it ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
This paper presents a disciplined method for deriving such case analyses. The method identies problematic cases, shows the translations for the non-problematic cases, and gives con- dence that all cases are considered. The method supports such common architectures as SPARC, MIPS, and PA-RISC, and it should apply to any tool that analyzes machine instructions. We begin by writing a very simple interpreter for the source machine's code. We then transform the interpreter into an interpreter for a target machine without delayed branches. To maintain the semantics of the program being interpreted, we simultaneously transform the sequence of sourcemachine instructions into a sequence of target-machine instructions. The transformation of the instructions becomes our algorithm for binary translation. We show the translation is correct by reasoning about corresponding states on source and target machines. Categories and Subject Descriptors: D.3.4 [Programming Languag
Pragmatic Aspects of Type-Directed Partial Evaluation
, 1996
"... Type-directed partial evaluation stems from the residualization of static values in dynamic contexts, given their type and the type of their free variables. Its algorithm coincides with the algorithm for coercing a subtype value into a supertype value, which itself coincides with Berger and Schw ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
Type-directed partial evaluation stems from the residualization of static values in dynamic contexts, given their type and the type of their free variables. Its algorithm coincides with the algorithm for coercing a subtype value into a supertype value, which itself coincides with Berger and Schwichtenberg's normalization algorithm for the simply typed -calculus. Type-directed partial evaluation thus can be used to specialize a compiled, closed program, given its type.
CPS Transformation of Flow Information
- Journal of Functional Programming
, 2001
"... We consider the question of how a continuation-passing-style (CPS) transformation changes the ow analysis of a program. We present an algorithm that takes the least solution to the ow constraints of a program and constructs in linear time the least solution to the ow constraints for the CPS-tran ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
We consider the question of how a continuation-passing-style (CPS) transformation changes the ow analysis of a program. We present an algorithm that takes the least solution to the ow constraints of a program and constructs in linear time the least solution to the ow constraints for the CPS-transformed program.
Polymorphic Specialization for ML
- ACM Transactions on Programming Languages and Systems
, 2002
"... We present a novel technique for offine partial evaluation of functional languages with an ML-style typing discipline. Our program specialization method comprises a polymorphic binding-time analysis with polymorphic recursion. Based on the region calculus of Tofte and Talpin, we develop a binding-ti ..."
Abstract
-
Cited by 4 (3 self)
- Add to MetaCart
We present a novel technique for offine partial evaluation of functional languages with an ML-style typing discipline. Our program specialization method comprises a polymorphic binding-time analysis with polymorphic recursion. Based on the region calculus of Tofte and Talpin, we develop a binding-time analysis as a constraint analysis on top of region inference. Our insight is to regard binding times as properties of regions.

