Liquid types
Authors:
Open Access
- 30 May 2008
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 43 (6) , 159-169
Abstract
We present Logically Qualified Data Types , abbreviated to Liquid Types , a system that combines Hindley-Milner type inference with Predicate Abstraction to automatically infer dependent types precise enough to prove a variety of safety properties. Liquid types allow programmers to reap many of the benefits of dependent types, namely static verification of critical properties and the elimination of expensive run-time checks, without the heavy price of manual annotation. We have implemented liquid type inference in DSOLVE, which takes as input an OCAML program and a set of logical qualifiers and infers dependent types for the expressions in the OCAML program. To demonstrate the utility of our approach, we describe experiments using DSOLVE to statically verify the safety of array accesses on a set of OCAML benchmarks that were previously annotated with dependent types as part of the DML project. We show that when used in conjunction with a fixed set of array bounds checking qualifiers, DSOLVE reduces the amount of manual annotation required for proving safety from 31% of program text to under 1%.Keywords
This publication has 20 references indexed in Scilit:
- Dynamic Typing with Dependent Types2006
- Inference of User-Defined Type Qualifiers and Qualifier Rules2006
- Efficient Verification of Sequential and Concurrent C ProgramsFormal Methods in System Design, 2004
- Abstractions from proofs2004
- Predicate abstraction for software verification2002
- The S LAM project2002
- Cayenne—a language with dependent types1998
- Refinement types for ML1991
- Constructive mathematics and computer programmingPhilosophical Transactions of the Royal Society of London. Series A, Mathematical and Physical Sciences, 1984
- Principal type-schemes for functional programs1982