Liquid Type Inference Under the Hood

Reiser, Micha (2017) Liquid Type Inference Under the Hood. Masters thesis, HSR Hochschule für Technik Rapperswil.

[thumbnail of refinement-types-final.pdf]
refinement-types-final.pdf - Supplemental Material

Download (270kB) | Preview


Dependent types can be used to prove more fine-granular invariants of programs. However, dependent types come at the cost of requiring to be manually annotated. Since dependent types are awkward to write, it is desired to have automatically inferred dependent types. The liquid type inference algorithm explained in this paper is capable of inferring dependent types that only use conjunctions over a given set of qualifiers. The constraint-based inference algorithm uses Hindley-Milner to infer the ML-types and check if the program is well-typed in the sense of the underlying type system. This guarantee reduces dependent types inference to inferring the unknown refinement predicates. The algorithm consists of three steps: Firstly, create templates for the unknown refinement predicates. Secondly, generate constraints over these templates setting them into a relation. Finally, find the least fixpoint solution for the unknown refinement predicates that satisfies all the constraints. The program is well-typed if the least fixpoint solution can be found. This paper further shows why path sensitivity is an important property of liquid type inference and how it is realized.

Item Type: Thesis (Masters)
Subjects: Topics > Software > Performance
Area of Application > Development Tools
Technologies > Programming Languages
Metatags > IFS (Institute for Software)
Divisions: Master of Science in Engineering (MRU Software and Systems)
Depositing User: Christian Spielmann
Thesis advisor
Mehta, Farhad D.
Date Deposited: 05 Apr 2017 12:00
Last Modified: 02 Nov 2017 08:59

Actions (login required)

View Item
View Item