1 results
6 - A simple type-theoretic language: Mini-TT
-
- By Thierry Coquand, Chalmers University of Technology and Göteborg University, Yoshiki Kinoshita, National Institute of Advanced Industrial Science and Technology (AIST), Japan, Bengt Nordström, Chalmers University of Technology and Göteborg University, Makoto Takeyama, National Institute of Advanced Industrial Science and Technology (AIST), Japan
- Edited by Yves Bertot, Gérard Huet, Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt, Jean-Jacques Lévy, Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt, Gordon Plotkin, University of Edinburgh
-
- Book:
- From Semantics to Computer Science
- Published online:
- 06 August 2010
- Print publication:
- 24 September 2009, pp 139-164
-
- Chapter
- Export citation
-
Summary
Abstract
This paper presents a formal description of a small functional language with dependent types. The language contains data types, mutual recursive/inductive definitions and a universe of small types. The syntax, semantics and type system is specified in such a way that the implementation of a parser, interpreter and type checker is straight-forward. The main difficulty is to design the conversion algorithm in such a way that it works for open expressions. The paper ends with a complete implementation in Haskell (around 400 lines of code).
Introduction
We are going to describe a small language with dependent types, its syntax, operational semantics and type system. This is in the spirit of the paper “A simple applicative language: Mini-ML” by Clément, Despeyroux, and Kahn, where they explain a small functional language. From them we have borrowed the idea of using patterns instead of variables in abstractions and let-bindings. It gives an elegant way to express mutually recursive definitions. We also share with them the view that a programming language should not only be formally specified, but it should also be possible to reason about the correctness of its implementation. There should be a small step from the formal operational semantics to an interpreter and also between the specification of the type system to a type checker.