Results 1  10
of
11
MetaML and MultiStage Programming with Explicit Annotations
 Theoretical Computer Science
, 1999
"... . We introduce MetaML, a practicallymotivated, staticallytyped multistage programming language. MetaML is a "real" language. We have built an implementation and used it to solve multistage problems. MetaML allows the programmer to construct, combine, and execute code fragments in a typesafe ..."
Abstract

Cited by 239 (30 self)
 Add to MetaCart
. We introduce MetaML, a practicallymotivated, staticallytyped multistage programming language. MetaML is a "real" language. We have built an implementation and used it to solve multistage problems. MetaML allows the programmer to construct, combine, and execute code fragments in a typesafe manner. Code fragments can contain free variables, but they obey the staticscoping principle. MetaML performs typechecking for all stages once and for all before the execution of the first stage. Certain anomalies with our first MetaML implementation led us to formalize an illustrative subset of the MetaML implementation. We present both a bigstep semantics and type system for this subset, and prove the type system's soundness with respect to a bigstep semantics. From a software engineering point of view, this means that generators written in the MetaML subset never generate unsafe programs. A type system and semantics for full MetaML is still ongoing work. We argue that multi...
A Core Calculus of Dependency
 IN PROC. 26TH ACM SYMP. ON PRINCIPLES OF PROGRAMMING LANGUAGES (POPL
, 1999
"... Notions of program dependency arise in many settings: security, partial evaluation, program slicing, and calltracking. We argue that there is a central notion of dependency common to these settings that can be captured within a single calculus, the Dependency Core Calculus (DCC), a small extension ..."
Abstract

Cited by 228 (25 self)
 Add to MetaCart
Notions of program dependency arise in many settings: security, partial evaluation, program slicing, and calltracking. We argue that there is a central notion of dependency common to these settings that can be captured within a single calculus, the Dependency Core Calculus (DCC), a small extension of Moggi's computational lambda calculus. To establish this thesis, we translate typed calculi for secure information flow, bindingtime analysis, slicing, and calltracking into DCC. The translations help clarify aspects of the source calculi. We also define a semantic model for DCC and use it to give simple proofs of noninterference results for each case.
Macros as multistage computations: Typesafe, generative, binding macros in MacroML
 in MacroML. In the International Conference on Functional Programming (ICFP ’01
, 2001
"... ..."
MultiStage Programming: Axiomatization and Type Safety (Extended Abstract)
 In 25th International Colloquium on Automata, Languages, and Programming
, 1998
"... Multistaged programming provides a new paradigm for constructing efficient solutions to complex problems. Techniques such as program generation, multilevel partial evaluation, and runtime code generation respond to the need for general purpose solutions which do not pay runtime interpretive over ..."
Abstract

Cited by 34 (15 self)
 Add to MetaCart
Multistaged programming provides a new paradigm for constructing efficient solutions to complex problems. Techniques such as program generation, multilevel partial evaluation, and runtime code generation respond to the need for general purpose solutions which do not pay runtime interpretive overheads. This paper provides a foundation for the formal analysis of one such system. We introduce a multistage language and present its axiomatic, reduction, and natural semantics. Our axiomatic semantics is an extension of the callbyvalue calculus with staging constructs. We demonstrate the soundness of the axiomatic semantics with respect to the natural semantics. We show that stagedlanguages can "go Wrong" in new ways, and devise a type system that screens out such programs. Finally, we present a proof of the soundness of this type system with respect to the reduction semantics, and show how to extend this result to the natural semantics. 1 Introduction Recently, there has been signi...
An Idealized MetaML: Simpler, and More Expressive
, 1999
"... MetaML is a multistage functional programming language featuring three constructs that can be viewed as staticallytyped refinements of the backquote, comma, and eval of Scheme. Thus it provides special support for writing code generators and serves as a semantically sound basis for systems involv ..."
Abstract

Cited by 32 (13 self)
 Add to MetaCart
MetaML is a multistage functional programming language featuring three constructs that can be viewed as staticallytyped refinements of the backquote, comma, and eval of Scheme. Thus it provides special support for writing code generators and serves as a semantically sound basis for systems involving multiple interdependent computational stages. In previous work, we reported on an implementation of MetaML, and on a smallstep semantics and typesystem for MetaML. In this paper, we present An Idealized MetaML (AIM) that is the result of our study of a categorical model for MetaML. An important outstanding problem is finding a type system that provides the user with a means for manipulating both open and closed code. This problem has eluded efforts by us and other researchers for over three years. AIM solves the issue by providing two type constructors, one classifies closed code and the other open code, and describing how they interact.
Logical Modalities and MultiStage Programming
, 1999
"... . Multistage programming is a method for improving the performance of programs through the introduction of controlled program specialization. This paper makes a case for multistage programming with open code and closed values. We argue that a simple language exploiting interactions between two log ..."
Abstract

Cited by 22 (13 self)
 Add to MetaCart
. Multistage programming is a method for improving the performance of programs through the introduction of controlled program specialization. This paper makes a case for multistage programming with open code and closed values. We argue that a simple language exploiting interactions between two logical modalities is well suited for multistage programming, and report the results from our study of categorical models for multistage languages. Keywords: Multistage programming, categorical models, semantics, type systems (multilevel typed calculi) , combination of logics (modal and temporal). 1 Introduction Multistage programming is a method for improving the performance of programs through the introduction of controlled program specialization [15, 13]. MetaML was the first language designed specifically to support this method. It provides a type constructor for "code" and staging annotations for building, combining, and executing code, thus allowing the programmer to have finer cont...
Functor Categories and TwoLevel Languages
 In Foundations of Software Science and Computation Structures (FoSSaCS
, 1998
"... We propose a denotational semantics for the twolevel language of [GJ91, Gom92], and prove its correctness w.r.t. a standard denotational semantics. Other researchers (see [Gom91, GJ91, Gom92, JGS93, HM94]) have claimed correctness for lambdamix (or extensions of it) based on denotational models, b ..."
Abstract

Cited by 15 (4 self)
 Add to MetaCart
We propose a denotational semantics for the twolevel language of [GJ91, Gom92], and prove its correctness w.r.t. a standard denotational semantics. Other researchers (see [Gom91, GJ91, Gom92, JGS93, HM94]) have claimed correctness for lambdamix (or extensions of it) based on denotational models, but the proofs of such claims rely on imprecise definitions and are basically awed. At a technical level there are two important differences between our model and more naive models in Cpo: the domain for interpreting dynamic expressions is more abstract (we interpret code as terms modulo conversion), the semantics of newname is handled differently (we exploit functor categories). The key idea is to interpret a twolevel language in a suitable functor category Cpo D op rather than Cpo. The semantics of newname follows the ideas pioneered by Oles and Reynolds for modeling the stack discipline of Algollike languages. Indeed, we can think of the objects of D (i.e. the natural numbers) as ...
Sound Specialization in the Presence of Computational Effects
 In Theoretical Aspects of Computer Software
, 1997
"... Moggi's computational lambda calculus c is a wellestablished model of computation. We define a twolevel version c of the computational lambda calculus and demonstrate that it is an inevitable description for sound specialization. We implement the calculus in terms of a standard twolevel lambda c ..."
Abstract

Cited by 14 (5 self)
 Add to MetaCart
Moggi's computational lambda calculus c is a wellestablished model of computation. We define a twolevel version c of the computational lambda calculus and demonstrate that it is an inevitable description for sound specialization. We implement the calculus in terms of a standard twolevel lambda calculus via a continuationpassing style transformation. This transformation is sound and complete with respect to c ; it forms a reflection in the twolevel lambda calculus of c . As a practical ramification of this work we show that several published specialization algorithms are unsound and develop a sound specializer similar to continuationbased specializers. Keywords: lambda calculus, partial evaluation, functional programming, continuations. 1 Introduction What is a correct partial evaluator for the lambda calculus? Most of the work addressing this question has focused on the relationship between the bindingtime analysis and the specializer [20, 21, 23,30,32,38] using a variety of ...
A selfapplicable partial evaluator for the lambda calculus
 International Conference on Computer Languages
, 1990
"... This paper (essentially [12, Chapter 8]) describes partial evaluation for the lambda calculus, augmented with an explicit fixedpoint operator. The techniques used here diverge from those used in [12, Chapters 4, 5] and [11] in that they are not based on specialization of named program points. The a ..."
Abstract

Cited by 12 (3 self)
 Add to MetaCart
This paper (essentially [12, Chapter 8]) describes partial evaluation for the lambda calculus, augmented with an explicit fixedpoint operator. The techniques used here diverge from those used in [12, Chapters 4, 5] and [11] in that they are not based on specialization of named program points. The algorithm essentially leaves some operators (applications, lambdas, etc.) untouched and reduces others as standard evaluation would do it. This simple scheme is able to handle programs that rely heavily on higherorder facilities. The requirements on bindingtime analysis are formulated via a type system and an ecient bindingtime analysis via constraint solving is outlined. The partial evaluator is proven correct.
A Categorical Analysis of MultiLevel Languages (Extended Abstract)
, 1999
"... We propose categorical models for fl, 2 , MetaML, and AIM. First, we focus on the underlying logical modalities and the interactions between them, then we investigate the interactions between logical modalities and computational monads. We give two examples of categorical model: one simpler but with ..."
Abstract

Cited by 10 (7 self)
 Add to MetaCart
We propose categorical models for fl, 2 , MetaML, and AIM. First, we focus on the underlying logical modalities and the interactions between them, then we investigate the interactions between logical modalities and computational monads. We give two examples of categorical model: one simpler but with some limitations, the other more complex but able to model all features of AIM.