## Programming Language Semantics in Foundational Type Theory (1996)

### Cached

### Download Links

- [www.cs.cmu.edu]
- [www.cs.cmu.edu]
- [www-2.cs.cmu.edu]
- [www.cs.cmu.edu]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proc. the IFIP TC2/WG2.2,2.3 International Conference on Programming Concepts and Methods (PROCOMET’98 |

Citations: | 5 - 1 self |

### BibTeX

@INPROCEEDINGS{Crary96programminglanguage,

author = {K. Crary},

title = {Programming Language Semantics in Foundational Type Theory},

booktitle = {In Proc. the IFIP TC2/WG2.2,2.3 International Conference on Programming Concepts and Methods (PROCOMET’98},

year = {1996},

pages = {107--125},

publisher = {Chapman}

}

### Years of Citing Articles

### OpenURL

### Abstract

There are compelling benefits to using foundational type theory as a framework for programming language semantics. I give a semantics of an expressive programming calculus in the foundational type theory of Nuprl. Previous typetheoretic semantics have used less expressive type theories, or have sacrificed important programming constructs such as recursion and modules. The primary mechanisms of this semantics are partial types, for typing recursion, set types, for encoding power and singleton kinds, which are used for subtyping and module programming, and very dependent function types, for encoding signatures. Keywords Semantics, program verification, type theory, functional programming 1 INTRODUCTION Type theory has become a popular framework for formal reasoning in computer science and has formed the basis for a number of automated deduction systems, including Automath, Nuprl, HOL and Coq, among others. In addition to formalizing mathematics, these systems are widely used for the a...

### Citations

1308 | Monads for functional programming - Wadler - 1995 |

605 |
The Definition of Standard ML (Revised
- Milner, Tofte, et al.
- 1997
(Show Context)
Citation Context ...n of Idealized Algol, and Harper and Mitchell did the same for a simplified fragment of Standard ML. Recently, Harper and Stone (1998) have given such an interpretation of full Standard ML (Revised) (=-=Milner et al., 1997-=-). However, in each of these cases, the type theories used were not sufficiently rich to form a foundation for mathematical reasoning; for example, they were unable to express equality or induction pr... |

500 | T.: Introduction to HOL: A Theorem Proving Environment for Higher Order Logic: Cambridge - Melham - 1993 |

471 |
The calculus of constructions
- Coquand, Huet
- 1988
(Show Context)
Citation Context ...rovides such impredicative features and is quite similar to Nuprl; I have not used that framework in this paper out of desire to use a simpler and more standard theory. The Calculus of Constructions (=-=Coquand and Huet, 1988-=-) also supplies impredicative features and could likely also support the semantics in this paper. 6 CONCLUSION Aside from its advantages for formal program reasoning, embedding programming languages i... |

441 |
The formulae-as-types notion of construction
- Howard
- 1980
(Show Context)
Citation Context ... of the programming features of type theory. It is primarily those programming features that I will use in the embedding. The logic of types is obtained through the propositions-as-types isomorphism (=-=Howard, 1980-=-), but this will not be critical to our purposes. Detailed discussions of type theory, including the logic of types, appear in Martin-Lof (1982) and Constable (1991), and Nuprl specifically is discuss... |

352 | Proofs and Types - Girard, Lafont, et al. - 1989 |

285 |
Interpre'tation fonctionelle et e'limination des coupures duns l'arithme'tique d'ordre supe'rieure
- Girard
- 1972
(Show Context)
Citation Context ...mes knowledge of several well-known programming constructs. The syntax rules ofsK appear in Figure 1. The overall structure of the calculus is similar to the higher-order polymorphic lambda calculus (=-=Girard, 1972-=-) augmented with records at the term and type constructor level (and their corresponding types and kinds), and a fixpoint operator at the term level. In addition to the kind Type , the kind level also... |

267 | A type-theoretic approach to higher-order modules with sharing - Harper, Lillibridge - 1994 |

264 | Constructive mathematics and computer programming - Martin-Löf - 1979 |

228 | Une extension de l’interprétation de Gödel à l’analyse et son application: l’élimination des coupures dans l’analyse et la théorie des types - Girard - 1971 |

227 | TIL: A TypeDirected Optimizing Compiler for ML - Tarditi, Morrisett, et al. - 1996 |

170 | Unboxed objects and polymorphic typing - Leroy - 1992 |

160 | The essence of Algol - Reynolds - 1981 |

156 | An intuitionistic theory of types: Predicative part - Martin-Löf - 1975 |

151 | and team. Implementing Mathematics with the Nuprl Proof Development System - Constable - 1986 |

129 | Toward a mathematical semantics for computer languages - Scott, Strachey - 1971 |

102 | On the type structure of Standard ML - Harper, Mitchell - 1993 |

102 | Compiling With Types - Morrisett - 1995 |

89 | A type-theoretic interpretation of Standard ML
- Harper, Stone
- 1998
(Show Context)
Citation Context ... are equal as members of kind . The typing judgement \Delta; \Gamma `K e : c indicates that (in kind context \Delta and type context \Gamma) the term e has type c. Finally, the valuability judgement (=-=Harper and Stone, 1998-=-) \Delta; \Gamma `K e # c indicates that the term e has type c and evaluates without computational effects (in this setting this means just that it terminates). ThesK calculus used in the KML compiler... |

68 | Explicit polymorphism and CPS conversion - Harper, Lillibridge - 1993 |

65 | Recursive Definition in Type Theory - Mendler - 1987 |

55 | de Bruijn. A survey of the project AUTOMATH - G - 1980 |

37 | An interpretation of Standard ML in type theory - Harper, Stone - 1997 |

34 | Relational interpretations of recursive types in an operational setting - Birkedal, Harper - 1999 |

34 |
Partial objects in constructive type theory
- Constable, Smith
- 1987
(Show Context)
Citation Context ... type. It is clear, then, that fix cannot be used to define new members of the basic types. How then can recursive functions be typed? The solution is to add a new type constructor for partial types (=-=Constable and Smith, 1987-=-; Smith, 1989; Crary, 1998c). For any type T , the partial type T is a supertype of T that contains all the elements of T and also all divergent terms. (A total type is one that contains only converge... |

32 |
A non-type-theoretic definition of Martin-Lof's types
- Allen
- 1987
(Show Context)
Citation Context ... framework other than type theory. Martin-Lof type theory is closely tied to a structured operational semantics and has denotational models in many frameworks including partial equivalence relations (=-=Allen, 1987; Harper, -=-1992), set theory (Howe, 1996) and domain theory (Rezus, 1985; Palmgren and Stoltenberg-Hansen, 1989). Thus, foundational type theory may be used as a "semantic intermediate language." The p... |

29 | Formal objects in type theory using very dependent types
- Hickey
- 1996
(Show Context)
Citation Context .... So we want a type of functions whose return type can depend not only upon their arguments but upon their own return values! The type I will use for this embedding is a very dependent function type (=-=Hickey, 1996-=-). This type is a generalization of the dependent function type (itself a generalization of the ordinary function type) and like it, the very dependent function type's members are just lambda abstract... |

29 | Semantic foundations for embedding HOL in Nuprl
- Howe
- 1996
(Show Context)
Citation Context ...n-Lof type theory is closely tied to a structured operational semantics and has denotational models in many frameworks including partial equivalence relations (Allen, 1987; Harper, 1992), set theory (=-=Howe, 1996) and doma-=-in theory (Rezus, 1985; Palmgren and Stoltenberg-Hansen, 1989). Thus, foundational type theory may be used as a "semantic intermediate language." The paper is organized as follows: Section 2... |

22 | Type Theoretic Methodology for Practical Programming Languages
- Crary
- 1998
(Show Context)
Citation Context ...ctions for future work. Finally, Section 6 contains brief concluding remarks. Due to space limitations, many technical details have been omitted; these may be found in the companion technical report (=-=Crary, 1998-=-b). 2 THEsK PROGRAMMING CALCULUS As a case study to illustrate my technique, I use a predicative variant of K , the high-level typed intermediate language in the KML compiler (Crary, 1998c). In this s... |

20 | Computational foundations of basic recursive function theory - Constable, Smith - 1993 |

19 | Partial objects in Type Theory - Smith - 1988 |

17 | Phase distinctions in type theory - Cardelli - 1988 |

14 | Types in logic, mathematics and programming - Constable - 1998 |

14 | The computational behaviour of Girard’s paradox - Howe |

13 |
Constructive mathematics as a programming logic i: some principles of theory
- Constable
- 1985
(Show Context)
Citation Context ...r kind P i () contains only subtypes ofsand the singleton kind S i () contains only types that are equal tos; other types must be left out. The mechanism for achieving this exclusion is the set type (=-=Constable, 1985-=-). If S is a type and P [\Delta] is a predicate over S, then the set type fz : S j P [z]g contains all elements z of S such that P [z] is true. With this type, we can embed the power and singleton kin... |

13 | Foundations for the Implementation of Higher-Order Subtyping
- Crary
- 1997
(Show Context)
Citation Context ...a supertype of T that contains all the elements of T and also all divergent terms. (A total type is one that contains only convergent terms.) The induction principles on T (Smith, 1989; Constable and =-=Crary, 1997-=-) are different than those on T , so we can safely type fix with the rule: H `se 2 T ! T H `sT admissible H `sfix (e) 2 T (8) We use partial types to interpret the possibly non-terminating computation... |

11 | M.B.Reinhold: 'Type' is not a type - Meyer - 1986 |

10 | Computational complexity and induction for partial computable functions in type theory
- Constable, Crary
- 1998
(Show Context)
Citation Context ...ial type T is a supertype of T that contains all the elements of T and also all divergent terms. (A total type is one that contains only convergent terms.) The induction principles on T (Smith, 1989; =-=Constable and Crary, 1997-=-) are different than those on T , so we can safely type fix with the rule: H `se 2 T ! T H `sT admissible H `sfix (e) 2 T (8) We use partial types to interpret the possibly non-terminating computation... |

9 | Coquand and Gérard Huet. The Calculus of Constructions - Thierry - 1988 |

7 | Constructing type systems over an operational semantics
- Harper
- 1992
(Show Context)
Citation Context ...her than type theory. Martin-Lof type theory is closely tied to a structured operational semantics and has denotational models in many frameworks including partial equivalence relations (Allen, 1987; =-=Harper, 1992), set the-=-ory (Howe, 1996) and domain theory (Rezus, 1985; Palmgren and Stoltenberg-Hansen, 1989). Thus, foundational type theory may be used as a "semantic intermediate language." The paper is organi... |

6 | Admissibility of Fixpoint Induction over Partial Types
- Crary
- 1998
(Show Context)
Citation Context ...ctions for future work. Finally, Section 6 contains brief concluding remarks. Due to space limitations, many technical details have been omitted; these may be found in the companion technical report (=-=Crary, 1998-=-b). 2 THEsK PROGRAMMING CALCULUS As a case study to illustrate my technique, I use a predicative variant of K , the high-level typed intermediate language in the KML compiler (Crary, 1998c). In this s... |

4 | Coquand. An analysis of Girard’s paradox - Thierry - 1986 |

3 | Type theory as a foundation for computer science - Constable - 1991 |

3 |
Semantics of constructive type theory
- Rezus
- 1985
(Show Context)
Citation Context ...ed to a structured operational semantics and has denotational models in many frameworks including partial equivalence relations (Allen, 1987; Harper, 1992), set theory (Howe, 1996) and domain theory (=-=Rezus, 1985; Palmgren-=- and Stoltenberg-Hansen, 1989). Thus, foundational type theory may be used as a "semantic intermediate language." The paper is organized as follows: Section 2 presents the paper's object lan... |

3 | The Objective Caml System, Release 1.00. Institut National de Recherche en Informatique et Automatique (INRIA - Leroy - 1996 |

2 | Formal reasoning about communications systems I - Kreitz - 1997 |

1 |
Higher-order modules and the References 19 phase distinction
- Harper, Mitchell, et al.
- 1990
(Show Context)
Citation Context ...tside the scope of this paper (see Crary (1998c)). Corollary 3 (Type Preservation) If `K e :sand [[e]] 7! t then t 2 [[ ]]. Another consequence of the soundness theorem is that the phase distinction (=-=Harper et al., 1990-=-) is respected insK : all type expressions converge and therefore types may be computed in a compile-time phase. This is expressed by Corollary 4: Corollary 4 (Phase Distinction) If `K c :sthen there ... |

1 |
Domain interpretations of intuitionistic type theory
- Palmgren, Stoltenberg-Hansen
- 1989
(Show Context)
Citation Context ...tured operational semantics and has denotational models in many frameworks including partial equivalence relations (Allen, 1987; Harper, 1992), set theory (Howe, 1996) and domain theory (Rezus, 1985; =-=Palmgren and Stoltenberg-Hansen, 1989). Thus, f-=-oundational type theory may be used as a "semantic intermediate language." The paper is organized as follows: Section 2 presents the paper's object language,sK . This object language is a sm... |

1 | 3] Lars Birkedal and Robert Harper. Relational interpretations of recursive types in an operational setting - INRIA-Rocquencourt, Lyon - 1996 |

1 | 46] Erik Palmgren and Viggo Stoltenberg-Hansen. Domain interpretations of intuitionistic type theory - Information, Computation - 1993 |