Results 1  10
of
28
MultiStage 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 98 (21 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 objectprograms. 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 ...
Finally Tagless, Partially Evaluated  Tagless Staged Interpreters for Simpler Typed Languages
 UNDER CONSIDERATION FOR PUBLICATION IN J. FUNCTIONAL PROGRAMMING
"... We have built the first family of tagless interpretations for a higherorder typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically typepreserving interpretations include an ..."
Abstract

Cited by 53 (9 self)
 Add to MetaCart
We have built the first family of tagless interpretations for a higherorder typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically typepreserving interpretations include an evaluator, a compiler (or staged evaluator), a partial evaluator, and callbyname and callbyvalue CPS transformers. Our principal technique is to encode de Bruijn or higherorder abstract syntax using combinator functions rather than data constructors. In other words, we represent object terms not in an initial algebra but using the coalgebraic structure of the λcalculus. Our representation also simulates inductive maps from types to types, which are required for typed partial evaluation and CPS transformations. Our encoding of an object term abstracts uniformly over the family of ways to interpret it, yet statically assures that the interpreters never get stuck. This family of interpreters thus demonstrates again that it is useful to abstract over higherkinded types.
Intuitionistic Model Constructions and Normalization Proofs
, 1998
"... We investigate semantical normalization proofs for typed combinatory logic and weak calculus. One builds a model and a function `quote' which inverts the interpretation function. A normalization function is then obtained by composing quote with the interpretation function. Our models are just ..."
Abstract

Cited by 50 (7 self)
 Add to MetaCart
We investigate semantical normalization proofs for typed combinatory logic and weak calculus. One builds a model and a function `quote' which inverts the interpretation function. A normalization function is then obtained by composing quote with the interpretation function. Our models are just like the intended model, except that the function space includes a syntactic component as well as a semantic one. We call this a `glued' model because of its similarity with the glueing construction in category theory. Other basic type constructors are interpreted as in the intended model. In this way we can also treat inductively defined types such as natural numbers and Brouwer ordinals. We also discuss how to formalize terms, and show how one model construction can be used to yield normalization proofs for two different typed calculi  one with explicit and one with implicit substitution. The proofs are formalized using MartinLof's type theory as a meta language and mechanized using the A...
Axiomatizing Reflective Logics and Languages
 Proceedings of Reflection'96
, 1996
"... The very success and breadth of reflective techniques underscores the need for a general theory of reflection. At present what we have is a wideranging variety of reflective systems, each explained in its own idiosyncratic terms. Metalogical foundations can allow us to capture the essential aspects ..."
Abstract

Cited by 36 (20 self)
 Add to MetaCart
The very success and breadth of reflective techniques underscores the need for a general theory of reflection. At present what we have is a wideranging variety of reflective systems, each explained in its own idiosyncratic terms. Metalogical foundations can allow us to capture the essential aspects of reflective systems in a formalismindependent way. This paper proposes metalogical axioms for reflective logics and declarative languages based on the theory of general logics [34]. In this way, several strands of work in reflection, including functional, equational, Horn logic, and rewriting logic reflective languages, as well as a variety of reflective theorem proving systems are placed within a common theoretical framework. General axioms for computational strategies, and for the internalization of those strategies in a reflective logic are also given. 1 Introduction Reflection is a fundamental idea. In logic it has been vigorously pursued by many researchers since the fundamental wor...
Cogen in Six Lines
 Proc. International Conference on Functional Programming
, 1996
"... We have designed and implemented a programgenerator generator (PGG) for an untyped higherorder functional programming language. The program generators perform continuationbased multilevel offline specialization and thus combine the most powerful and general offline partial evaluation techniques. ..."
Abstract

Cited by 31 (11 self)
 Add to MetaCart
We have designed and implemented a programgenerator generator (PGG) for an untyped higherorder functional programming language. The program generators perform continuationbased multilevel offline specialization and thus combine the most powerful and general offline partial evaluation techniques. The correctness of the PGG is ensured by deriving it from a multilevel specializer. Our PGG is extremely simple to implement due to the use of multilevel techniques and higherorder abstract syntax. Keywords: partial evaluation, multilevel computation, continuations. 1 Introduction An attractive feature of partial evaluation is the ability to generate generating extensions. A generating extension for a program p with two inputs inp s and inp d is a program pgen which accepts the static input inp s of p and produces a residual program p s which accepts the dynamic input inp d and produces the same result as JpK inp s inp d , provided both p and p s terminate. JpgenK inp ...
Selfapplicable Partial Evaluation for Pure Lambda Calculus
 Yale University
, 1992
"... Partial evaluation of an applied lambda calculus was done some years ago in the lambdamix project. When moving to pure lambda calculus, some issues need to be considered, most importantly how we represent programs in pure lambda calculus. We start by presenting a compact representation schema for  ..."
Abstract

Cited by 14 (2 self)
 Add to MetaCart
Partial evaluation of an applied lambda calculus was done some years ago in the lambdamix project. When moving to pure lambda calculus, some issues need to be considered, most importantly how we represent programs in pure lambda calculus. We start by presenting a compact representation schema for terms and show how this leads to an exceedingly small and elegant selfinterpreter. Partial evaluation is discussed, and it is shown that partial evaluation in the most general sense is uncomputable. There are several ways of restricting partial evaluation. We choose one of these, which requires explicit binding time information. Binding time annotations are discussed, and the representation schema is extended to include annotations. A partial evaluator is then constructed as an extension of the selfinterpreter, and selfapplication is performed to produce possibly the smallest nontrivial compiler generator in the literature. It is shown that binding time analysis can be done by modifying ...
Compiler Correctness for Parallel Languages
, 1994
"... We present a paradigm for proving the correctness of compilers for languages with parallelism. The source language is given a denotational semantics as a compositional translation to a higherorder process calculus. The target language is also given a denotational semantics as a compositional transl ..."
Abstract

Cited by 11 (2 self)
 Add to MetaCart
We present a paradigm for proving the correctness of compilers for languages with parallelism. The source language is given a denotational semantics as a compositional translation to a higherorder process calculus. The target language is also given a denotational semantics as a compositional translation to the same process calculus. We show the compiler is correct in that it preserves denotation up to bisimulation. The target language is also given an operational semantics, and this operational semantics is shown correct in the sense that it is branchingbisimilar to the denotational semantics of the target language. Together, these results show that for any program, the operational semantics of the target code is branchingbisimilar to the semantics of the source code. 1 Introduction In a series of papers in the early 80's [35, 34, 36, 12] we proposed a paradigm for semanticsbased compiler correctness, and over the last several years we have begun putting this paradigm into practic...
Correctness of a RegionBased BindingTime Analysis
 Carnegie Mellon University, Elsevier Science BV
, 1997
"... A bindingtime analysis is the first pass of an offline partial evaluator. It determines which parts of a program may be executed at specialization time. Regionbased bindingtime analysis applies to higherorder programming languages with firstclass references. The consideration of effects in the d ..."
Abstract

Cited by 6 (5 self)
 Add to MetaCart
(Show Context)
A bindingtime analysis is the first pass of an offline partial evaluator. It determines which parts of a program may be executed at specialization time. Regionbased bindingtime analysis applies to higherorder programming languages with firstclass references. The consideration of effects in the determination of binding time properties makes it possible to have a partial evaluator perform assignments at specialization time. We present such a regionbased bindingtime analysis and prove its correctness with respect to a continuationstyle semantics for an annotated callbyvalue lambda calculus with MLstyle references. We provide a relative correctness proof that relies on the correctness of region inference and on the correctness of a bindingtime analysis for an applied lambda calculus. The main tool in the proof is a translation from terms with explicit region annotations to an extended continuationpassing storepassing style. The analysis is monovariant/monomorphic, however, ess...
Directly reflective metaprogramming
 HigherOrder and Symbolic Computation
, 2010
"... Existing metaprogramming languages operate on encodings of programs as data. This paper presents a new metaprogramming language, based on an untyped lambda calculus, in which structurally reflective programming is supported directly, without any encoding. The language features callbyvalue and ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
(Show Context)
Existing metaprogramming languages operate on encodings of programs as data. This paper presents a new metaprogramming language, based on an untyped lambda calculus, in which structurally reflective programming is supported directly, without any encoding. The language features callbyvalue and callbyname lambda abstractions, as well as novel reflective features enabling the intensional manipulation of arbitrary program terms. The language is scope safe, in the sense that variables can neither be captured nor escape their scopes. The expressiveness of the language is demonstrated by showing how to implement quotation and evaluation operations, as proposed by Wand. The language’s utility for metaprogramming is further demonstrated through additional representative examples. A prototype implementation is described and evaluated.