## A Syntactic Approach to Type Soundness (1992)

### Cached

### Download Links

- [www.cs.princeton.edu]
- [www.cs.rice.edu]
- [www.cs.rice.edu]
- DBLP

### Other Repositories/Bibliography

Venue: | Information and Computation |

Citations: | 539 - 21 self |

### BibTeX

@ARTICLE{Wright92asyntactic,

author = {Andrew K. Wright and Matthias Felleisen},

title = {A Syntactic Approach to Type Soundness},

journal = {Information and Computation},

year = {1992},

volume = {115},

pages = {38--94}

}

### Years of Citing Articles

### OpenURL

### Abstract

We present a new approach to proving type soundness for Hindley/Milner-style 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 non-function. ...

### Citations

1562 | The Definition of Standard ML
- Miller, Tofte, et al.
- 1990
(Show Context)
Citation Context ...of V �� for any type �� . Significant effort has been invested in proving type soundness for Hindley/Milner-style type systems, and their practical realization in the programming language Stan=-=dard ML [22, 23]-=-. Soundness proofs exist for the functional fragment [20, 36], for extensions including references [6, 17, 35, 37], and for a monomorphic language including first-class continuations [8]. However, the... |

1286 | A structural approach to operational semantics
- Plotkin
- 1981
(Show Context)
Citation Context ...r the reader to their paper [8: page 169]. 2.2 Proofs based on Structural Operational Semantics Tofte [36, 37]: Tofte reformulated Milner's functional language with a structural operational semantics =-=[27]-=-. The semantics is specified as a deductive proof system; a conclusion E ` e ) v of a deduction states that expression e evaluates to v in value environment E. A value environment is a finite map from... |

1115 |
The Lambda Calculus: Its Syntax and Semantics
- Barendregt
- 1981
(Show Context)
Citation Context ...and let-expressions binding their variables. The let-expression binds x in e 2 but not e 1 , i.e., let bindings are not recursive. The fixedpoint combinator Y provides recursion. Following Barendregt =-=[2]-=-, we adopt the convention that bound variables are always distinct from free variables in distinct expressions, and we identify expressions that differ only by a consistent renaming of the bound varia... |

936 | A theory of type polymorphism in progra.mming
- Milner
- 1978
(Show Context)
Citation Context ...design a sound type system for an explicitly typed monomorphic language, the formulation of a sound type system for a language based on Hindley/Milnerstyle polymorphism and type inference is delicate =-=[6, 8, 15, 17, 20, 37]-=-. Although the treatment of purely functional languages is relatively well understood in this framework, the incorporation of imperative features such as references and exceptions requires extreme car... |

292 |
Abstract types have existential types
- Mitchell, Plotkin
- 1985
(Show Context)
Citation Context ...lled the predicate. Subject reduction states that reduction of the subject of a deduction preserves the predicate. Subject reduction holds for terms in CL and the -calculus [33]. Mitchell and Plotkin =-=[25]-=- present a type preservation theorem, i.e., subject reduction, for a variant of the second order polymorphic -calculus. This language has explicitly typed declarations; the proof of type preservation ... |

257 | The revised report on the syntactic theories of sequential control and state. Theoretical Computer Science 103
- Felleisen, Hieb
- 1992
(Show Context)
Citation Context ...ndley/Milner-style polymorphic type systems. Our approach is based on subject reduction, a classical result from combinatory logic [4], and on rewriting as a means to specifying operational semantics =-=[11, 12, 13, 14]-=-. To demonstrate the approach, we develop a proof of soundness for the core 1 of Standard ML, which extends a functional polymorphic language with references and exceptions. We also show soundness for... |

233 |
Principal type schemes for functional programs
- Damas, Milner
- 1982
(Show Context)
Citation Context ...then j= E [[e]]; : �� . Weak soundness is a consequence of the fact that wrong does not possess any type. Theorem (Weak Soundness) If . e : �� then E [[e]]; 6= wrong. Syntactic Type Soundness =-=5 Damas [5, 6]-=-: Damas extended Milner's results to a language with reference cells and destructive assignment. The proof technique is derived from Milner's technique; however, the proof is significantly more compli... |

210 |
Data types as lattices
- SCOTT
- 1976
(Show Context)
Citation Context ...orem for a functional language like the above based on a denotational semantics for the language of untyped expressions. The semantic domain is the solution of the following reflexive domain equation =-=[32]-=-: V = B 0 \Phi : : : \Phi B n \Phi F \Phi W F = V ! V B 0 ; : : : ; B n are basic domains (with bottom), such as integers and booleans; F is the function domain; W is a domain consisting of the single... |

186 | The call-by-need lambda calculus
- Ariola, Felleisen
- 1997
(Show Context)
Citation Context ...e first subsection deals with Reference ML, an extension of Functional ML with references. It uses our previous work on a calculus of state,sv -S [12, 14], and in particular its cell-oriented variant =-=[3]-=-. The second subsection addresses Exception ML, an extension of Functional ML with exceptions. It uses a modified version of our control calculus,sv -C [13, 14], especially its fragment with prompts [... |

171 |
Call-by-name, call-by-value, and the lambda calculus
- Plotkin
- 1975
(Show Context)
Citation Context ...ell-typed answers. Programming language calculi, like the -calculus, are the natural choice to specify the semantics of a language such that each intermediate step of evaluation is a program. Plotkin =-=[26]-=- shows how the semantics of a prototypical functional language relates to the -calculus. The -calculi extensions for state [12, 14] extend this strategy to languages with references and similar constr... |

170 | Introduction to Combinators and -Calculus - Hindley, Seldin - 1986 |

150 | The type and effect discipline
- Talpin, Jouvelot
- 1994
(Show Context)
Citation Context ...-style type systems, and their practical realization in the programming language Standard ML [22, 23]. Soundness proofs exist for the functional fragment [20, 36], for extensions including references =-=[6, 17, 35, 37]-=-, and for a monomorphic language including first-class continuations [8]. However, there are several drawbacks to the existing proofs. Proofs of type soundness are sensitive to the precise formulation... |

148 | The theory and practice of first-class prompts - Felleisen - 1988 |

142 | The principal type-scheme of an object in combinatory logic - Hindley - 1969 |

126 |
An ideal model for recursive polymorphic types
- MacQueen, Plotkin, et al.
- 1986
(Show Context)
Citation Context ...amma! V, a finite map from variables to denotational values. To establish soundness, Milner introduced a semantic relation j=. This relation identifies each type �� with an ideal V �� of the d=-=omain V [18]-=-. An ideal is simply a subset of the domain that is closed under certain operations (subset and least upper bounds of finite consistent subsets); each of the basic domains forms an ideal. A denotation... |

125 | Higher–Order Concurrency
- Reppy
- 1992
(Show Context)
Citation Context ...ce, and type inference for records are a strong focus of recent research efforts to explain object-oriented languages, as many popular objectoriented languages have unsound static type systems. Reppy =-=[29]-=- has successfully addressed concurrency with our technique; it should also be possible to treat nondeterminism and distributed computing. We have used our technique to prove an alternative type system... |

116 |
A syntactic theory of sequential control
- Felleisen, Friedman, et al.
- 1987
(Show Context)
Citation Context ...ndley/Milner-style polymorphic type systems. Our approach is based on subject reduction, a classical result from combinatory logic [4], and on rewriting as a means to specifying operational semantics =-=[11, 12, 13, 14]-=-. To demonstrate the approach, we develop a proof of soundness for the core 1 of Standard ML, which extends a functional polymorphic language with references and exceptions. We also show soundness for... |

110 | Type inference for polymorphic references - Tofte - 1990 |

94 |
Type Assignment in Programming Languages
- Damas
- 1984
(Show Context)
Citation Context ...design a sound type system for an explicitly typed monomorphic language, the formulation of a sound type system for a language based on Hindley/Milnerstyle polymorphism and type inference is delicate =-=[6, 8, 15, 17, 20, 37]-=-. Although the treatment of purely functional languages is relatively well understood in this framework, the incorporation of imperative features such as references and exceptions requires extreme car... |

93 | Operational Semantics and Polymorphic Type Inference
- Tofte
- 1988
(Show Context)
Citation Context ...d in proving type soundness for Hindley/Milner-style type systems, and their practical realization in the programming language Standard ML [22, 23]. Soundness proofs exist for the functional fragment =-=[20, 36]-=-, for extensions including references [6, 17, 35, 37], and for a monomorphic language including first-class continuations [8]. However, there are several drawbacks to the existing proofs. Proofs of ty... |

90 |
Revised report on the algorithmic language scheme
- Rees, Clinger
- 1986
(Show Context)
Citation Context ...ess proof to include polymorphism. Duba, Harper, and MacQueen [8]: Duba et al. present several languages extending a monomorphic functional core with first-class continuations in the spirit of Scheme =-=[28]-=-. They describe several approaches to proving type soundness for the languages. One is with 2 This is an over-simplification; the reader interested in the precise definition is referred to Damas's the... |

85 |
Dynamic typing in a statically-typed language
- Abadi, Cardelli, et al.
- 1991
(Show Context)
Citation Context ...xity of the semantic relation complicates the proof; indeed, Tofte found a mistake in Damas's proof, although the theorem is not thought to be false [37: page 2]. Abadi, Cardelli, Pierce, and Plotkin =-=[1]-=-: Abadi et al. demonstrate type soundness for a functional language with a dynamic type and related operations. Their proof with respect to a denotational semantics is similar to Milner's proof, altho... |

83 |
Control operators, the SECD machine and the -calculus
- Felleisen, Friedman
- 1986
(Show Context)
Citation Context ...ndley/Milner-style polymorphic type systems. Our approach is based on subject reduction, a classical result from combinatory logic [4], and on rewriting as a means to specifying operational semantics =-=[11, 12, 13, 14]-=-. To demonstrate the approach, we develop a proof of soundness for the core 1 of Standard ML, which extends a functional polymorphic language with references and exceptions. We also show soundness for... |

77 | Co-induction in relational semantics - Milner, Tofte - 1991 |

71 |
The essence of ML
- Mitchell, Harper
- 1988
(Show Context)
Citation Context ...ndard ML with first-class continuations. In principle, our approach is uniformly applicable to any language; 1 Mitchell and Harper refer to the functional polymorphic sublanguage as the essence of ML =-=[24]-=-. However, the difficulties of typing references and exceptions [6, 17, 35, 37] and the fact that they cannot be expressed by facilities of the functional core [10] indicate that they are equally impo... |

49 | Polymorphic type inference and assignment
- Leroy, Weis
- 1991
(Show Context)
Citation Context ...design a sound type system for an explicitly typed monomorphic language, the formulation of a sound type system for a language based on Hindley/Milnerstyle polymorphism and type inference is delicate =-=[6, 8, 15, 17, 20, 37]-=-. Although the treatment of purely functional languages is relatively well understood in this framework, the incorporation of imperative features such as references and exceptions requires extreme car... |

46 |
On the relation between direct and continuation semantics
- Reynolds
- 1974
(Show Context)
Citation Context ... of values in the store, it can no longer be defined by induction on types; its existence must be established by a category theoretical argument that generalizes the technique of inclusive predicates =-=[31]-=-. The complexity of the semantic relation complicates the proof; indeed, Tofte found a mistake in Damas's proof, although the theorem is not thought to be false [37: page 2]. Abadi, Cardelli, Pierce, ... |

38 |
A syntactic theory of sequential state
- Felleisen, Friedman
- 1989
(Show Context)
Citation Context |

30 |
Definitional interpreters for higher order programming languages
- Reynolds
- 1972
(Show Context)
Citation Context ...semantics for a monomorphic language with continuations. The proof is an adaptation of Tofte's technique; however, the semantics is significantly restructured, as the technique of defunctionalization =-=[30]-=- is used to represent the flow of control explicitly. The semantics has two judgment forms. The first kind of conclusion, E; K ` e ) v, indicates that expression e evaluates to answer v in environment... |

26 | A.Demers: Data types are values - Donahue - 1985 |

26 | Programming, transforming, and proving with function abstractions and memories
- Mason, Talcott
- 1989
(Show Context)
Citation Context ...elleisen [3], which was derived from Felleisen and Hieb's work [14]. A similar definition of evaluation for dealing with state using rewriting techniques also appears in the work of Mason and Talcott =-=[19]-=-. Syntactic Type Soundness 22 By the variable conventions, x is not free in v in the ref reduction; the domains of ` 1 and ` 2 are disjoint in ae merge ; and the free variables of R are disjoint from ... |

26 | Typing references by effect inference
- Wright
- 1992
(Show Context)
Citation Context ...ae merge , and ae lift reductions coalesce into one program reduction, but the structure of the proof is essentially the same. Our work on an alternative type system for references uses this approach =-=[38]-=-. We chose to use calculi in this paper as the resulting proofs are more regular in structure. In specifying the semantics of references as a calculus, we use an additional expression form, the ae-exp... |

13 |
Typing First-Class Continuations in
- Duba, Harper, et al.
- 1993
(Show Context)
Citation Context |

9 |
On the expressive power of programming languages. Science of Computer Programming
- Felleisen
- 2001
(Show Context)
Citation Context ...ic sublanguage as the essence of ML [24]. However, the difficulties of typing references and exceptions [6, 17, 35, 37] and the fact that they cannot be expressed by facilities of the functional core =-=[10]-=- indicate that they are equally important. Syntactic Type Soundness 3 in practice, the resulting proofs are lengthy but simple, requiring only ordinary inductive techniques. In the next section, we de... |

4 |
A sequent calculus for type assignment
- Seldin
- 1977
(Show Context)
Citation Context ...ject, and the type �� is called the predicate. Subject reduction states that reduction of the subject of a deduction preserves the predicate. Subject reduction holds for terms in CL and the -calcu=-=lus [33]-=-. Mitchell and Plotkin [25] present a type preservation theorem, i.e., subject reduction, for a variant of the second order polymorphic -calculus. This language has explicitly typed declarations; the ... |

3 |
ML of New Jersey release notes (version 0.75
- Standard
- 1991
(Show Context)
Citation Context ...we present an extension to Functional ML providing first-class continuations. The typing of our extension is similar to that described by Duba et al. [8], and implemented in Standard ML of New Jersey =-=[34]-=-. It is a simple matter to merge this extension with Core ML. Control ML extends Functional ML's syntax with two new constructs: e ::= v j e 1 e 2 j let x be e 1 in e 2 j abort e (Expressions) v ::= c... |