Type inference in applied type system

Chiyan Chen, Hongwei Xi · 2006

Programming is error-prone. Type systems have been demonstrated to be a powerful tool for the construction of reliable programs. Applied Type System ( ATS ) is a recently proposed framework to facilitate the design and formalization of advanced type systems. In ATS , many advanced language features can be naturally expressed and various commonly studied type systems can be readily formalized. In particular, ATS can provide support for dependent types in the presence of realistic language features such as general recursion, effects (references and exceptions), input/output, etc. However, given the expressiveness and complexity of ATS , it is a challenging task to design a practical programming language based on ATS as we need to provide succinct and convenient concrete syntax as well as to support decidable and effective type-checking. In this context, the problem of type inference arises naturally in ATS . This thesis focuses on developing solutions to the problem of type inference in ATS . We study λATS, which is a generic applied type system in ATS , as an internal language, and then develop ATS as an external language for λATS to support practical programming. We present a set of rules for elaborating programs from ATS to λATS, which is often called elaboration. In particular, we identify the difficulties resulting from the need for directly supporting existential types, and then develop novel elaboration techniques to properly address these difficulties. We establish the soundness of the elaboration, that is, a given program in ATS and its elaboration in λATS are guaranteed to have the same dynamic semantics, which constitutes a major technical contribution of this thesis. We expect that this work will not only offer some guidelines for implementing type inference algorithms for type systems based on ATS , but also provide a solid basis for justifying the soundness of such algorithms.

Cited by 2 works.

Authors