Results 1  10
of
81
A Syntactic Approach to Type Soundness
 Information and Computation
, 1992
"... We present a new approach to proving type soundness for Hindley/Milnerstyle polymorphic type systems. The keys to our approach are (1) an adaptation of subject reduction theorems from combinatory logic to programming languages, and (2) the use of rewriting techniques for the specification of the la ..."
Abstract

Cited by 538 (21 self)
 Add to MetaCart
We present a new approach to proving type soundness for Hindley/Milnerstyle polymorphic type systems. The keys to our approach are (1) an adaptation of subject reduction theorems from combinatory logic to programming languages, and (2) the use of rewriting techniques for the specification of the language semantics. The approach easily extends from polymorphic functional languages to imperative languages that provide references, exceptions, continuations, and similar features. We illustrate the technique with a type soundness theorem for the core of Standard ML, which includes the first type soundness proof for polymorphic exceptions and continuations. 1 Type Soundness Static type systems for programming languages attempt to prevent the occurrence of type errors during execution. A definition of type error depends on a specific language and type system, but always includes the use of a function on arguments for which it is not defined, and the attempted application of a nonfunction. ...
The Revised Report on the Syntactic Theories of Sequential Control and State
 Theoretical Computer Science
, 1992
"... The syntactic theories of control and state are conservative extensions of the v calculus for equational reasoning about imperative programming facilities in higherorder languages. Unlike the simple v calculus, the extended theories are mixtures of equivalence relations and compatible congruen ..."
Abstract

Cited by 255 (36 self)
 Add to MetaCart
The syntactic theories of control and state are conservative extensions of the v calculus for equational reasoning about imperative programming facilities in higherorder languages. Unlike the simple v calculus, the extended theories are mixtures of equivalence relations and compatible congruence relations on the term language, which significantly complicates the reasoning process. In this paper we develop fully compatible equational theories of the same imperative higherorder programming languages. The new theories subsume the original calculi of control and state and satisfy the usual ChurchRosser and Standardization Theorems. With the new calculi, equational reasoning about imperative programs becomes as simple as reasoning about functional programs. 1 The syntactic theories of control and state Most calculusbased programming languages provide imperative programming facilities such as assignment statements, exceptions, and continuations. Typical examples are ML [16], Schem...
A FormulaeasTypes Notion of Control
 In Conference Record of the Seventeenth Annual ACM Symposium on Principles of Programming Languages
, 1990
"... The programming language Scheme contains the control construct call/cc that allows access to the current continuation (the current control context). This, in effect, provides Scheme with firstclass labels and jumps. We show that the wellknown formulaeastypes correspondence, which relates a constr ..."
Abstract

Cited by 234 (0 self)
 Add to MetaCart
The programming language Scheme contains the control construct call/cc that allows access to the current continuation (the current control context). This, in effect, provides Scheme with firstclass labels and jumps. We show that the wellknown formulaeastypes correspondence, which relates a constructive proof of a formula ff to a program of type ff, can be extended to a typed Idealized Scheme. What is surprising about this correspondence is that it relates classical proofs to typed programs. The existence of computationally interesting "classical programs"  programs of type ff, where ff holds classically, but not constructively  is illustrated by the definition of conjunctive, disjunctive, and existential types using standard classical definitions. We also prove that all evaluations of typed terms in Idealized Scheme are finite.
Reasoning about Programs in ContinuationPassing Style
 Lisp and Symbolic Computation
"... Plotkin's v calculus for callbyvalue programs is weaker than the fij calculus for the same programs in continuationpassing style (CPS). To identify the callby value axioms that correspond to fij on CPS terms, we define a new CPS transformation and an inverse mapping, both of which are interes ..."
Abstract

Cited by 161 (13 self)
 Add to MetaCart
Plotkin's v calculus for callbyvalue programs is weaker than the fij calculus for the same programs in continuationpassing style (CPS). To identify the callby value axioms that correspond to fij on CPS terms, we define a new CPS transformation and an inverse mapping, both of which are interesting in their own right. Using the new CPS transformation, we determine the precise language of CPS terms closed under fijtransformations, as well as the callbyvalue axioms that correspond to the socalled administrative fijreductions on CPS terms. Using the inverse mapping, we map the remaining fi and j equalities on CPS terms to axioms on callbyvalue terms. On the pure (constant free) set ofterms, the resulting set of axioms is equivalent to Moggi's computational calculus. If the callbyvalue language includes the control operators abort and callwithcurrentcontinuation, the axioms are equivalent to an extension of Felleisen et al.'s vCcalculus and to the equational subtheory of Talcott's logic IOCC. Contents 1 Compiling with and without Continuations 4 2 : Calculi and Semantics 7 3 The Origins and Practice of CPS 10 3.1 The Original Encoding : : : : : : : : : : : : : : : : : : : : : 10 3.2 The Universe of CPS Terms : : : : : : : : : : : : : : : : : : 11 4 A Compacting CPS Transformation 13
On the Expressive Power of Programming Languages
 Science of Computer Programming
, 1990
"... The literature on programming languages contains an abundance of informal claims on the relative expressive power of programming languages, but there is no framework for formalizing such statements nor for deriving interesting consequences. As a first step in this direction, we develop a formal noti ..."
Abstract

Cited by 131 (4 self)
 Add to MetaCart
The literature on programming languages contains an abundance of informal claims on the relative expressive power of programming languages, but there is no framework for formalizing such statements nor for deriving interesting consequences. As a first step in this direction, we develop a formal notion of expressiveness and investigate its properties. To validate the theory, we analyze some widely held beliefs about the expressive power of several extensions of functional languages. Based on these results, we believe that our system correctly captures many of the informal ideas on expressiveness, and that it constitutes a foundation for further research in this direction. 1 Comparing Programming Languages The literature on programming languages contains an abundance of informal claims on the expressive power of programming languages. Arguments in these contexts typically assert the expressibility or nonexpressibility of programming constructs relative to a language. Unfortunately, pro...
Typing FirstClass Continuations in ML
, 1992
"... An extension of ML with continuation primitives similar to those found in Scheme is considered. A number of alternative type systems are discussed, and several programming examples are given. A continuationbased operational semantics is defined for a small, purely functional, language, and the soun ..."
Abstract

Cited by 93 (14 self)
 Add to MetaCart
An extension of ML with continuation primitives similar to those found in Scheme is considered. A number of alternative type systems are discussed, and several programming examples are given. A continuationbased operational semantics is defined for a small, purely functional, language, and the soundness of the DamasMilner polymorphic type assignment system with respect to this semantics is proved. The full DamasMilner type system is shown to be unsound in the presence of firstclass continuations. Restrictions on polymorphism similar to those introduced in connection with reference types are shown to suffice for soundness. 1 Introduction Firstclass continuations are a simple and natural way to provide access to the flow of evaluation in functional languages. The ability to seize the "current continuation" (control state of the evaluator) provides a simple and natural basis for defining numerous higherlevel constructs such as coroutines [22], exceptions [41], and logic variables [...
Representing control: a study of the CPS transformation
, 1992
"... This paper investigates the transformation of v terms into continuationpassing style (CPS). We show that by appropriate jexpansion of Fischer and Plotkin's twopass equational specification of the CPS transform, we can obtain a static and contextfree separation of the result terms into "esse ..."
Abstract

Cited by 81 (7 self)
 Add to MetaCart
This paper investigates the transformation of v terms into continuationpassing style (CPS). We show that by appropriate jexpansion of Fischer and Plotkin's twopass equational specification of the CPS transform, we can obtain a static and contextfree separation of the result terms into "essential" and "administrative" constructs. Interpreting the former as syntax builders and the latter as directly executable code, we obtain a simple and efficient onepass transformation algorithm, easily extended to conditional expressions, recursive definitions, and similar constructs. This new transformation algorithm leads to a simpler proof of Plotkin's simulation and indifference results. Further we show how CPSbased control operators similar to but more general than Scheme's call/cc can be naturally accommodated by the new transformation algorithm. To demonstrate the expressive power of these operators, we use them to present an equivalent but even more concise formulation of t...
A CurryHoward foundation for functional computation with control
 In Proceedings of ACM SIGPLANSIGACT Symposium on Principle of Programming Languages
, 1997
"... We introduce the type theory ¯ v , a callbyvalue variant of Parigot's ¯calculus, as a CurryHoward representation theory of classical propositional proofs. The associated rewrite system is ChurchRosser and strongly normalizing, and definitional equality of the type theory is consistent, compatib ..."
Abstract

Cited by 76 (3 self)
 Add to MetaCart
We introduce the type theory ¯ v , a callbyvalue variant of Parigot's ¯calculus, as a CurryHoward representation theory of classical propositional proofs. The associated rewrite system is ChurchRosser and strongly normalizing, and definitional equality of the type theory is consistent, compatible with cut, congruent and decidable. The attendant callbyvalue programming language ¯pcf v is obtained from ¯ v by augmenting it by basic arithmetic, conditionals and fixpoints. We study the behavioural properties of ¯pcf v and show that, though simple, it is a very general language for functional computation with control: it can express all the main control constructs such as exceptions and firstclass continuations. Prooftheoretically the dual ¯ v constructs of naming and ¯abstraction witness the introduction and elimination rules of absurdity respectively. Computationally they give succinct expression to a kind of generic (forward) "jump" operator, which may be regarded as a unif...
A Polymorphic Record Calculus and Its Compilation
 ACM Transactions on Programming Languages and Systems
, 1995
"... this article appeared in Proceedings of ACM Symposium on Principles of Programming Languages, 1992, under the title \A compilation method for MLstyle polymorphic record calculi." This work was partly supported by the Japanese Ministry of Education under scienti c research grant no. 06680319. Author ..."
Abstract

Cited by 72 (8 self)
 Add to MetaCart
this article appeared in Proceedings of ACM Symposium on Principles of Programming Languages, 1992, under the title \A compilation method for MLstyle polymorphic record calculi." This work was partly supported by the Japanese Ministry of Education under scienti c research grant no. 06680319. Author's address: Research Institute for Mathematical Sciences, Kyoto University, Sakyoku, Kyoto 60601, JAPAN; email: ohori@kurims.kyotou.ac.jp Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of ACM. To copy otherwise, or to republish, requires a fee and/or speci c permission. c 1999 ACM 01640925/99/01000111 $00.75
The mystery of the tower revealed: A nonreflective description of the reflective tower
 Lisp and Symbolic Computation
, 1988
"... In an important series of papers [8, 9], Brian Smith has discussed the nature of programs that know about their text and the context in which they are executed. He called this kind of knowledge reflection. Smith proposed a programming language, called 3LISP, which embodied such selfknowledge in th ..."
Abstract

Cited by 71 (7 self)
 Add to MetaCart
In an important series of papers [8, 9], Brian Smith has discussed the nature of programs that know about their text and the context in which they are executed. He called this kind of knowledge reflection. Smith proposed a programming language, called 3LISP, which embodied such selfknowledge in the domain of metacircular interpreters. Every 3LISP program is interpreted by a metacircular interpreter, also written in 3LISP. This gives rise to a picture of an infinite tower of metacircular interpreters, each being interpreted by the one above it. Such a metaphor poses a serious challenge for conventional modes of understanding of programming languages. In our earlier work on reflection [4], we showed how a useful species of reflection could be modeled without the use of towers. In this paper, we give a semantic account of the reflective tower. This account is selfcontained in the sense that it does not employ reflection to explain reflection. 1. Modeling reflection Reflective programming languages were introduced in [8, 9] to study programs that need knowledge of their own behavior. In artificial intelligence, this kind of knowledge is needed, for example, in programs that must explain their behavior to