Results 1 - 10
of
24
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 call-tracking. 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 200 (22 self)
- Add to MetaCart
Notions of program dependency arise in many settings: security, partial evaluation, program slicing, and call-tracking. 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, binding-time analysis, slicing, and call-tracking 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.
Closed Types for a Safe Imperative MetaML
, 2001
"... This paper addresses the issue of safely combining computational eects and multi-stage programming. We propose a type system, which exploits a notion of closed type, to check statically that an imperative multi-stage program does not cause run-time errors. Our approach is demonstrated formally for a ..."
Abstract
-
Cited by 28 (11 self)
- Add to MetaCart
This paper addresses the issue of safely combining computational eects and multi-stage programming. We propose a type system, which exploits a notion of closed type, to check statically that an imperative multi-stage program does not cause run-time errors. Our approach is demonstrated formally for a core language called MiniML ref . This core language safely combines multi-stage constructs and ML-style references, and is a conservative extension of MiniML ref , a simple imperative subset of SML. In previous work, we introduced a closed type constructor , which was enough to ensure the safe execution of dynamically generated code in the pure fragment of MiniML ref .
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 25 (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.
Closed Types as a Simple Approach to Safe Imperative Multi-Stage Programming
, 2000
"... Safely adding computational eects to a multi-stage language has been an open problem. In previous work, a closed type constructor was used to provide a safe mechanism for executing dynamically generated code. This paper proposes a general notion of closed type as a simple approach to safely intro ..."
Abstract
-
Cited by 24 (14 self)
- Add to MetaCart
Safely adding computational eects to a multi-stage language has been an open problem. In previous work, a closed type constructor was used to provide a safe mechanism for executing dynamically generated code. This paper proposes a general notion of closed type as a simple approach to safely introducing computational eects into multistage languages. We demonstrate this approach formally in a core language called Mini-ML BN ref . This core language combines safely multi-stage constructs and ML-style references. In addition to incorporating state, Mini-ML BN ref also embodies a number of technical improvements over previously proposed core languages for multi-stage programming.
Partial Evaluation for Higher-Order Languages with State
, 1996
"... We have designed and implemented an offline partial evaluator for a higher-order language with first-class references. Its distinguishing feature over other partial evaluators is its ability to perform assignments to local and global references at specialization time for a higher-order language. The ..."
Abstract
-
Cited by 23 (7 self)
- Add to MetaCart
We have designed and implemented an offline partial evaluator for a higher-order language with first-class references. Its distinguishing feature over other partial evaluators is its ability to perform assignments to local and global references at specialization time for a higher-order language. The partial evaluator consists of a region-based monovariant binding-time analysis and a specializer in essentially continuation-passing store-passing style, thus generalizing type-based binding-time analysis and continuation-based partial evaluation. The partial evaluator yields good results for realistic problems such as object-oriented programming, unification, and specializer generation. Keywords: higher-order programming, program transformation, partial evaluation, state Categories: D.1.1 Applicative (Functional) Programming, D.1.2 Automatic Programming, D.3.1 Formal Definitions and Theory, Semantics, D.3.2 Language Classifications, Applicative languages, D.3.4 Processors, I.2.2 Automatic...
A Monadic Multi-stage Metalanguage
, 2003
"... We describe a metalanguage MMML, which makes explicit the order of evaluation (in the spirit of monadic metalanguages) and the staging of computations (as in languages for multi-level binding-time analysis). The main contribution of the paper is an operational semantics which is sufficiently detaile ..."
Abstract
-
Cited by 12 (7 self)
- Add to MetaCart
We describe a metalanguage MMML, which makes explicit the order of evaluation (in the spirit of monadic metalanguages) and the staging of computations (as in languages for multi-level binding-time analysis). The main contribution of the paper is an operational semantics which is sufficiently detailed for analyzing subtle aspects of multi-stage programming, but also intuitive enough to serve as a reference semantics. For instance, the separation of computational types from code types, makes clear the distinction between a computation for generating code and the generated code, and provides a basis for multi-lingual extensions, where a variety of programming languages (aka monads) coexist. The operational semantics consists of two parts: local (semantics preserving) simplification rules, and computation steps executed in a deterministic order (because they may have side-effects). We focus on the computational aspects, thus we adopt a simple type system, that can detect usual type errors, but not the unresolved link errors. Because of its explicit annotations, MMML is suitable as an intermediate language.
Mechanically Verifying the Correctness of an Offline Partial Evaluator
, 1995
"... We show that using deductive systems to specify an offline partial evaluator allows its correctness to be mechanically verified. For a -mix-style partial evaluator, we specify binding-time constraints using a natural-deduction logic, and the associated program specializer using natural (aka "deducti ..."
Abstract
-
Cited by 12 (3 self)
- Add to MetaCart
We show that using deductive systems to specify an offline partial evaluator allows its correctness to be mechanically verified. For a -mix-style partial evaluator, we specify binding-time constraints using a natural-deduction logic, and the associated program specializer using natural (aka "deductive") semantics. These deductive systems can be directly encoded in the Elf programming language --- a logic programming language based on the LF logical framework. The specifications are then executable as logic programs. This provides a prototype implementation of the partial evaluator. Moreover, since deductive system proofs are accessible as objects in Elf, many aspects of the partial evaluation correctness proofs (e.g., the correctness of binding-time analysis) can be coded in Elf and mechanically verified. This work illustrates the utility of declarative programming and of using deductive systems for defining program specialization systems: by exploiting the logical character of definit...
A self-applicable 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 fixed-point 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 11 (3 self)
- Add to MetaCart
This paper (essentially [12, Chapter 8]) describes partial evaluation for the lambda calculus, augmented with an explicit fixed-point 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 higher-order facilities. The requirements on binding-time analysis are formulated via a type system and an ecient binding-time analysis via constraint solving is outlined. The partial evaluator is proven correct.
Correctness of a Region-Based Binding-Time Analysis
- Carnegie Mellon University, Elsevier Science BV
, 1997
"... A binding-time analysis is the first pass of an offline partial evaluator. It determines which parts of a program may be executed at specialization time. Region-based binding-time analysis applies to higher-order programming languages with firstclass references. The consideration of effects in the d ..."
Abstract
-
Cited by 6 (5 self)
- Add to MetaCart
A binding-time analysis is the first pass of an offline partial evaluator. It determines which parts of a program may be executed at specialization time. Region-based binding-time analysis applies to higher-order 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 region-based binding-time analysis and prove its correctness with respect to a continuation-style semantics for an annotated call-by-value lambda calculus with ML-style references. We provide a relative correctness proof that relies on the correctness of region inference and on the correctness of a binding-time analysis for an applied lambda calculus. The main tool in the proof is a translation from terms with explicit region annotations to an extended continuation-passing store-passing style. The analysis is monovariant/monomorphic, however, ess...
Reflections on Reflections
, 1997
"... In the functional programming literature, compiling is often expressed as a translation between source and target program calculi. In recent work, Sabry and Wadler proposed the notion of a reflection as a basis for relating the source and target calculi. A reflection elegantly describes the situati ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
In the functional programming literature, compiling is often expressed as a translation between source and target program calculi. In recent work, Sabry and Wadler proposed the notion of a reflection as a basis for relating the source and target calculi. A reflection elegantly describes the situation where there is a kernel of the source language that is isomorphic to the target language. However, we believe that the reflection criteria is so strong that it often excludes the usual situation in compiling where one is compiling from a higher-level to a lower-level language. We give a detailed analysis of several translations commonly used in compiling that fail to be reflections. We conclude that, in addition to the notion of reflection, there are several relations weaker a reflection that are useful for characterizing translations. We show that several familiar translations (that are not naturally reflections) form what we call a reduction correspondence. We introduce the more genera...

