Results 1  10
of
21
Implementing Multistage Languages Using ASTs, Gensym, and Reflection
 In Krzysztof Czarnecki, Frank Pfenning, and Yannis Smaragdakis, editors, Generative Programming and Component Engineering (GPCE), Lecture Notes in Computer Science
, 2003
"... The paper addresses theoretical and practical aspects of implementing multistage languages using abstract syntax trees (ASTs), gensym, and reflection. We present an operational account of the correctness of this approach, and report on our experience with a bytecode compiler called MetaOCaml th ..."
Abstract

Cited by 46 (10 self)
 Add to MetaCart
The paper addresses theoretical and practical aspects of implementing multistage languages using abstract syntax trees (ASTs), gensym, and reflection. We present an operational account of the correctness of this approach, and report on our experience with a bytecode compiler called MetaOCaml that is based on this strategy. Current performance measurements reveal interesting characteristics of the underlying OCaml compiler, and illustrate why this strategy can be particularly useful for implementing domainspecific languages in a typed, functional setting.
Normalization by evaluation for MartinLöf type theory with one universe
 IN 23RD CONFERENCE ON THE MATHEMATICAL FOUNDATIONS OF PROGRAMMING SEMANTICS, MFPS XXIII, ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE
, 2007
"... ..."
From ReductionBased to ReductionFree Normalization
, 2004
"... We present a systematic construction of a reductionfree normalization function. Starting from ..."
Abstract

Cited by 21 (8 self)
 Add to MetaCart
We present a systematic construction of a reductionfree normalization function. Starting from
Memoization in typedirected partial evaluation
 PROCEEDINGS OF THE 2002 ACM SIGPLAN/SIGSOFT CONFERENCE ON GENERATIVE PROGRAMMING AND COMPONENT ENGINEERING, NUMBER 2487 IN LECTURE NOTES IN COMPUTER SCIENCE
, 2002
"... We use a code generator—typedirected partial evaluation— to verify conversions between isomorphic types, or more precisely to verify that a composite function is the identity function at some complicated type. A typed functional language such as ML provides a natural support to express the function ..."
Abstract

Cited by 14 (6 self)
 Add to MetaCart
We use a code generator—typedirected partial evaluation— to verify conversions between isomorphic types, or more precisely to verify that a composite function is the identity function at some complicated type. A typed functional language such as ML provides a natural support to express the functions and typedirected partial evaluation provides a convenient setting to obtain the normal form of their composition. However, offtheshelf typedirected partial evaluation turns out to yield gigantic normal forms. We identify that this gigantism is due to redundancies, and that these redundancies originate in the handling of sums, which uses delimited continuations. We successfully eliminate these redundancies by extending typedirected partial evaluation with memoization capabilities. The result only works for pure functional programs, but it provides an unexpected use of code generation and it yields ordersofmagnitude improvements both in time and in space for type isomorphisms.
Term rewriting for normalization by evaluation
 19–42, International Workshop on Implicit Computational Complexity (ICC’99
"... We extend normalization by evaluation ( rst presented in [5]) from the pure typedcalculus to general higher type term rewriting systems. We distinguish between computational rules and proper rewrite rules, and de ne a domain theoretic model intended to explain why normalization by evaluation for th ..."
Abstract

Cited by 12 (3 self)
 Add to MetaCart
We extend normalization by evaluation ( rst presented in [5]) from the pure typedcalculus to general higher type term rewriting systems. We distinguish between computational rules and proper rewrite rules, and de ne a domain theoretic model intended to explain why normalization by evaluation for the former is much more e cient. Normalization by evaluation is proved to be correct w.r.t. this model. 1
The Second Futamura Projection for TypeDirected Partial Evaluation
 HIGHERORDER AND SYMBOLIC COMPUTATION
, 1999
"... A generating extension of a program specializes it with respect to some specified part of the input. A generating extension of a program can be formed trivially by applying a partial evaluator to the program; the second Futamura projection describes the automatic generation of nontrivial genera ..."
Abstract

Cited by 9 (2 self)
 Add to MetaCart
A generating extension of a program specializes it with respect to some specified part of the input. A generating extension of a program can be formed trivially by applying a partial evaluator to the program; the second Futamura projection describes the automatic generation of nontrivial generating extensions by applying a partial evaluator to itself with respect to the programs. We derive
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 8 (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 Denotational Account of Untyped Normalization by Evaluation
, 2003
"... We show that the standard normalizationbyevaluation construction for the simplytyped ### calculus has a natural counterpart for the untyped ## calculus, with the central typeindexed logical relation replaced by a "recursively defined" invariant relation, in the style of Pitts. In fact, the ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
We show that the standard normalizationbyevaluation construction for the simplytyped ### calculus has a natural counterpart for the untyped ## calculus, with the central typeindexed logical relation replaced by a "recursively defined" invariant relation, in the style of Pitts. In fact, the construction can be seen as generalizing a computationaladequacy argument for an untyped, callbyname language to normalization instead of evaluation. In the
Staged Notational Definitions
 GENERATIVE PROGRAMMING AND COMPONENT ENGINEERING (GPCE), LECTURE NOTES IN COMPUTER SCIENCE
, 2003
"... Recent work proposed defining typesafe macros via interpretation into a multistage language. The utility of this approach was illustrated with a language called MacroML, in which all type checking is carried out before macro expansion. Building on this work, the goal of this paper is to develo ..."
Abstract

Cited by 7 (3 self)
 Add to MetaCart
Recent work proposed defining typesafe macros via interpretation into a multistage language. The utility of this approach was illustrated with a language called MacroML, in which all type checking is carried out before macro expansion. Building on this work, the goal of this paper is to develop a macro language that makes it easy for programmers to reason about terms locally. We show that defining the semantics of macros in this manner helps in developing and verifying not only type systems for macro languages but also equational reasoning principles. Because the MacroML calculus is sensetive to renaming of (what appear locally to be) bound variables, we present a calculus of staged notational definitions (SND) that eliminates the renaming problem but retains MacroML's phase distinction. Additionally, SND incorporates the generality of Griffin's account of notational definitions. We exhibit a formal equational theory for SND and prove its soundness.
Logical Relations for Callbyvalue Delimited Continuations
 In Trends in Functional Programming
, 2007
"... Abstract: Logical relations, defined inductively on the structure of types, provide a powerful tool to characterize higherorder functions. They often enable us to prove correctness of a program transformer written with higherorder functions concisely. This paper demonstrates that the technique of ..."
Abstract

Cited by 3 (3 self)
 Add to MetaCart
Abstract: Logical relations, defined inductively on the structure of types, provide a powerful tool to characterize higherorder functions. They often enable us to prove correctness of a program transformer written with higherorder functions concisely. This paper demonstrates that the technique of logical relations can be used to characterize callbyvalue functions as well as delimited continuations. Based on the traditional logical relations for callbyname functions, logical relations for callbyvalue functions are first defined, whose CPS variant is used to prove the correctness of an offline specializer for the callbyvalue λcalculus. They are then modified to cope with delimited continuations and are used to establish the correctness of an offline specializer for the callbyvalue λcalculus with delimited continuation constructs, shift and reset. This is the first correctness proof for such a specializer. Along the development, correctness of the continuationbased and shift/resetbased letinsertion and Anormalization is established.