Results 1  10
of
45
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 ..."
Abstract

Cited by 275 (29 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...
Typedirected partial evaluation
 Proceedings of the TwentyThird Annual ACM Symposium on Principles of Programming Languages
, 1996
"... Abstract. Typedirected partial evaluation stems from the residualization of arbitrary static values in dynamic contexts, given their type. Its algorithm coincides with the one for coercing asubtype value into a supertype value, which itself coincides with the one of normalization in thecalculus. T ..."
Abstract

Cited by 217 (38 self)
 Add to MetaCart
(Show Context)
Abstract. Typedirected partial evaluation stems from the residualization of arbitrary static values in dynamic contexts, given their type. Its algorithm coincides with the one for coercing asubtype value into a supertype value, which itself coincides with the one of normalization in thecalculus. Typedirected partial evaluation is thus used to specialize compiled, closed programs, given their type. Since Similix, letinsertion is a cornerstone of partial evaluators for callbyvalue procedural programs with computational e ects. It prevents the duplication of residual computations, and more generally maintains the order of dynamic side e ects in residual programs. This article describes the extension of typedirected partial evaluation to insert residual let expressions. This extension requires the userto annotate arrowtypes with e ect information. It is achieved by delimiting and abstracting control, comparably to continuationbased specialization in direct style. It enables typedirected partial evaluation of e ectful programs (e.g.,ade nitional lambdainterpreter for an imperative language) that are in direct style. The residual programs are in Anormal form. 1
A Modal Analysis of Staged Computation
 JOURNAL OF THE ACM
, 1996
"... We show that a type system based on the intuitionistic modal logic S4 provides an expressive framework for specifying and analyzing computation stages in the context of functional languages. Our main technical result is a conservative embedding of Nielson & Nielson's twolevel functional la ..."
Abstract

Cited by 204 (22 self)
 Add to MetaCart
We show that a type system based on the intuitionistic modal logic S4 provides an expressive framework for specifying and analyzing computation stages in the context of functional languages. Our main technical result is a conservative embedding of Nielson & Nielson's twolevel functional language in our language MiniML, which in
A temporallogic approach to bindingtime analysis
 In Proceedings, 11 th Annual IEEE Symposium on Logic in Computer Science
, 1996
"... is permitted for educational or research use on condition that this copyright notice is included in any copy. See back inner page for a list of recent publications in the BRICS Report Series. Copies may be obtained by contacting: BRICS ..."
Abstract

Cited by 86 (5 self)
 Add to MetaCart
(Show Context)
is permitted for educational or research use on condition that this copyright notice is included in any copy. See back inner page for a list of recent publications in the BRICS Report Series. Copies may be obtained by contacting: BRICS
Practical RefinementType Checking
, 1997
"... Refinement types allow many more properties of programs to be expressed and statically checked than conventional type systems. We present a practical algorithm for refinementtype checking in a calculus enriched with refinementtype annotations. We prove that our basic algorithm is sound and comple ..."
Abstract

Cited by 37 (1 self)
 Add to MetaCart
Refinement types allow many more properties of programs to be expressed and statically checked than conventional type systems. We present a practical algorithm for refinementtype checking in a calculus enriched with refinementtype annotations. We prove that our basic algorithm is sound and complete, and show that every term which has a refinement type can be annotated as required by our algorithm. Our positive experience with an implementation of an extension of this algorithm to the full core language of Standard ML demonstrates that refinement types can be a practical program development tool in a realistic programming language. The required refinement type definitions and annotations are not much of a burden and serve as formal, machinechecked explanations of code invariants which otherwise would remain implicit. 1 Introduction The advantages of staticallytyped programming languages are well known, and have been described many times (e.g. see [Car97]). However, conventional ty...
The essence of etaexpansion in partial evaluation
 LISP AND SYMBOLIC COMPUTATION
, 1995
"... Selective etaexpansion is a powerful "bindingtime improvement", i.e., a sourceprogram modification that makes a partial evaluator yield better results. But like most bindingtime improvements, the exact problem it solves and the reason why have not been formalized and are only understoo ..."
Abstract

Cited by 34 (11 self)
 Add to MetaCart
Selective etaexpansion is a powerful "bindingtime improvement", i.e., a sourceprogram modification that makes a partial evaluator yield better results. But like most bindingtime improvements, the exact problem it solves and the reason why have not been formalized and are only understood by few. In this paper, we describe the problem and the effect of etaredexes in terms of monovariant bindingtime propagation: etaredexes preserve the static data ow of a source program by interfacing static higherorder values in dynamic contexts and dynamic higherorder values in static contexts. They contribute to two distinct bindingtime improvements. We present two extensions of Gomard's monovariant bindingtime analysis for the purecalculus. Our extensions annotate and etaexpandterms. The rst one etaexpands static higherorder values in dynamic contexts. The second also etaexpands dynamic higherorder values in static contexts. As a significant application, we show that our first bindingtime analysis suffices to reformulate the traditional formulation of a CPS transformation into a modern onepass CPS transformer. This bindingtime improvement is known, but it is still left unexplained in contemporary literature, e.g., about "cpsbased" partial evaluation. We also outline the counterpart of etaexpansion for partially static data structures.
A Provably Correct Compiler Generator
, 1992
"... We have designed, implemented, and proved the correctness of a compiler generator that accepts action semantic descriptions of imperative programming languages. The generated compilers emit absolute code for an abstract RISC machine language that currently is assembled into code for the SPARC and th ..."
Abstract

Cited by 28 (3 self)
 Add to MetaCart
We have designed, implemented, and proved the correctness of a compiler generator that accepts action semantic descriptions of imperative programming languages. The generated compilers emit absolute code for an abstract RISC machine language that currently is assembled into code for the SPARC and the HP Precision Architecture. Our machine language needs no runtime typechecking and is thus more realistic than those considered in previous compiler proofs. We use solely algebraic specifications; proofs are given in the initial model. 1 Introduction The previous approaches to proving correctness of compilers for nontrivial languages all use target code with runtime typechecking. The following semantic rule is typical for these target languages: (FIRST : C; hv 1 ; v 2 i : S) ! (C; v 1 : S) The rule describes the semantics of an instruction that extracts the first component of the topelement of the stack, provided that the topelement is a pair. If not, then it is implicit that the...
Syntactic Accidents in Program Analysis: On the Impact of the CPS Transformation
 Journal of Functional Programming
, 2000
"... Our results formalize and confirm a folklore theorem about traditional bindingtime analysis, namely that CPS has a positive effect on binding times. What may be more surprising is that the benefit does not arise from a standard refinement of program analysis, as, for instance, duplicating continuati ..."
Abstract

Cited by 27 (9 self)
 Add to MetaCart
Our results formalize and confirm a folklore theorem about traditional bindingtime analysis, namely that CPS has a positive effect on binding times. What may be more surprising is that the benefit does not arise from a standard refinement of program analysis, as, for instance, duplicating continuations.
The Occurrence of Continuation Parameters in CPS Terms
, 1995
"... We prove an occurrence property about formal parameters of continuations in ContinuationPassing Style (CPS) terms that have been automatically produced by CPS transformation of pure, callbyvalue terms. Essentially, parameters of continuations obey a stacklike discipline. This property was intro ..."
Abstract

Cited by 25 (18 self)
 Add to MetaCart
(Show Context)
We prove an occurrence property about formal parameters of continuations in ContinuationPassing Style (CPS) terms that have been automatically produced by CPS transformation of pure, callbyvalue terms. Essentially, parameters of continuations obey a stacklike discipline. This property was introduced, but not formally proven, in an earlier work on the DirectStyle transformation (the inverse of the CPS transformation). The proof has been implemented in Elf, a constraint logic programming language based on the logical framework LF. In fact, it was the implementation that inspired the proof. Thus this note also presents a case study of machineassisted proof discovery. All the programs are available in ( ftp.daimi.aau.dk:pub/danvy/Programs/danvypfenningElf93.tar.gz ftp.cs.cmu.edu:user/fp/papers/cpsocc95.tar.gz Most of the research reported here was carried out while the first author visited Carnegie Mellon University in the Spring of 1993. Current address: Olivier Danvy, Ny Munkeg...