Applied Type System: Extended Abstract

The framework Pure Type System (PTS) offers a simple and general approach to designing and formalizing type systems. However, in the presence of dependent types, there often exist certain acute problems that make it difficult for PTS to directly accommodate many common realistic programming features such as general recursion, recursive types, effects (e.g., exceptions, references, input/output), etc. In this paper, Applied Type System (ATS) is presented as a framework for designing and formalizing type systems in support of practical programming with advanced types (including dependent types). In particular, it is demonstrated that ATS can readily accommodate a paradigm referred to as programming with theorem-proving (PwTP) in which programs and proofs are constructed in a syntactically intertwined manner, yielding a practical approach to internalizing constraint-solving needed during type-checking. The key salient feature of ATS lies in a complete separation between statics, where types are formed and reasoned about, and dynamics, where programs are constructed and evaluated. With this separation, it is no longer possible for a program to occur in a type as is otherwise allowed in PTS. The paper contains not only a formal development of ATS but also some examples taken from ATS, a programming language with a type system rooted in ATS, in support of using ATS as a framework to form type systems for practical programming.

[1]  Thierry Coquand,et al.  The Calculus of Constructions , 1988, Inf. Comput..

[2]  S. Hayashi,et al.  PX, a computational logic , 1988 .

[3]  Scott A. Smolka,et al.  Tools and Algorithms for the Construction and Analysis of Systems , 2013, Lecture Notes in Computer Science.

[4]  Amy P. Felty,et al.  The Coq proof assistant user's guide : version 5.6 , 1990 .

[5]  Carolyn L. Talcott,et al.  A Variable Typed Logic of Effects , 1995, Inf. Comput..

[6]  Chiyan Chen,et al.  Combining programming with theorem proving , 2005, ICFP '05.

[7]  Peter Beike,et al.  The Definition Of Standard Ml Revised , 2016 .

[8]  W. Miller Faking It , 2003 .

[9]  Mark P. Jones Qualified Types: Theory and Practice , 1994 .

[10]  Robert L. Constable,et al.  Partial Objects In Constructive Type Theory , 1987, Logic in Computer Science.

[11]  Gang Chen,et al.  Guarded recursive datatype constructors , 2003, POPL '03.

[12]  Peter Claussen Theories of programming languages , 2000, SOEN.

[13]  Hongwei Xi,et al.  ATS/LF: A type system for construct- ing proofs as total functional programs , 2008 .

[14]  Jean-Yves Girard,et al.  The System F of Variable Types, Fifteen Years Later , 1986, Theor. Comput. Sci..

[15]  Diomidis Spinellis,et al.  Faking It , 2011, IEEE Software.

[16]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

[17]  N. P. Mendler,et al.  Recursive Types and Type Constraints in Second-Order Lambda Calculus , 1987, LICS.

[18]  Hongwei Xi,et al.  Dependent ML An approach to practical programming with dependent types , 2007, Journal of Functional Programming.

[19]  Frank Pfenning,et al.  Dependent types in practical programming , 1999, POPL '99.

[20]  Rance Cleaveland,et al.  Implementing mathematics with the Nuprl proof development system , 1986 .

[21]  Tim Sheard,et al.  WHAT IS A PROOF , 2005 .

[22]  Chiyan Chen,et al.  Implementing Cut Elimination: A Case Study of Simulating Dependent Types in Haskell , 2004, PADL.

[23]  Hongwei Xi,et al.  Applied Type System: Extended Abstract , 2003, TYPES.

[24]  C. A. R. HOARE,et al.  An axiomatic basis for computer programming , 1969, CACM.

[25]  Richard Statman,et al.  Lambda Calculus with Types , 2013, Perspectives in logic.