A Syntactic Approach to Type Soundness
@article{Wright1994ASA, title={A Syntactic Approach to Type Soundness}, author={Andrew K. Wright and Matthias Felleisen}, journal={Inf. Comput.}, year={1994}, volume={115}, pages={38-94} }
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…
1,253 Citations
Simple imperative polymorphism
- EconomicsLISP Symb. Comput.
- 1995
A study of a number of ML programs shows that the inability to type all Hindley-Milner typable expressions seldom impacts realistic programs, so with a module system that separates specifications from implementations, imperative features can be freely used to implement polymorphic specifications.
Quantified types in an imperative language
- Computer ScienceTOPL
- 2006
A formal abstract machine and type-safety proof that capture the essence of type variables at the C level is developed that avoids a subtle unsoundness issue resulting from the address-of operator.
Proof of Imperative Programs in Type Theory
- Computer ScienceTYPES
- 1998
A functional translation of imperative programs, based on a combination of the type and effect discipline and monads, in the context of Type Theory is presented, which includes functional constructions in a straight-forward way.
A Type System for a Lambda Calculus with Assignments
- Computer ScienceTACS
- 1994
A Hindley/Milner-style polymorphic type system for λvar, an extension of the call-by-name λ-calculus with mutable variables and assignments, which proves the soundness of the type system with respect toλvar's untyped reduction semantics so that any well-typed program will evaluate to an answer, provided the evaluation terminates.
Proving Type Soundness of a Simply Typed ML-Like Language with References
- Computer Science
This paper formalizes in the Coq proof assistant an MLlike language with imperative features, a monomorphic type system, a reduction semantics, and the type soundness that is an extension of Mini-ML.
Liberal Typing for Functional Logic Programs
- Computer ScienceAPLAS
- 2010
A new notion of well-typed program is proposed that adds support for type-indexed functions, existential types, opaque higher-order patterns and generic functions--as shown by an extensive collection of examples that illustrate the possibilities of this proposal.
Types in Compilation
- Computer ScienceLecture Notes in Computer Science
- 2001
A translation from a language with singleton kinds to one without is presented, and it is proved to be sound and complete, and this translation is useful for type-preserving compilers generating typed target languages.
A Rewriting Logic Approach to Defining Type Systems
- Computer Science
- 2008
This work presents an extension of the syntactic approach to proving type system soundness presented by Wright and Felleisen [1994] that works in the above described semantics-based domain.
The Essence of Lightweight Family Polymorphism
- Computer ScienceJ. Object Technol.
- 2008
This paper gives a formal translation from .FJ into a variant of Featherweight GJ with a little extension of F-bounded polymorphism, to achieve a clear correspondence between the two languages without losing type safety.
Proving ML Type Soundness Within Coq
- Computer ScienceTPHOLs
- 2000
This work verifies within the Coq proof assistant that ML typing is sound with respect to the dynamic semantics and proves mechanically its equivalence with the initial type system provided by Damas and Milner.
References
SHOWING 1-10 OF 41 REFERENCES
Typing first-class continuations in ML
- Computer SciencePOPL '91
- 1991
The soundness of the Damas–Milner polymorphic type assignment system with respect to this semantics is proved, and the full Damas-Milner type system is shown to be unsound in the presence of first-class continuations.
Polymorphic type inference and assignment
- Computer SciencePOPL '91
- 1991
The type system given here leads to a better integration of imperative programming style with the purely applicative kernel of ML, and generic functions that allocate mutable data can safely be given fully polymorphic types.
Type assignment in programming languages
- Computer Science
- 1984
A family of polymorphic type disciplines for programming languages similar to the type discipline of ML, the metalanguage of the LCF system, which are based on the use of type inference systems to define the notion of well typed expressions and programs and on theUse of type assignment algorithms to compute the type or types that can be inferred for those same expressions or programs.
Abstract types have existential types
- Computer SciencePOPL
- 1985
This work uses a second-order typed lambda calculus SOL to show how data algebras may be given types, passed as parameters, and returned as results of function calls.
Abstract types have existential type
- Computer ScienceTOPL
- 1988
This work uses a second-order typed lambda calculus SOL to show how data algebras may be given types, passed as parameters, and returned as results of function calls.
On the Relation between Direct and Continuation Semantics
- Computer ScienceICALP
- 1974
This work gives two theorems which specify the relationship between the direct and the continuation semantic functions for a purely applicative language and shows that direct semantics are included in continuation semantics.
The essence of ML
- Computer SciencePOPL '88
- 1988
It is proved that the important programming features of ML cannot be added to any impredicative language, such as the Girard-Reynolds calculus, without implicitly assuming a type of all types.