# Practical refinement-type checking

@inproceedings{Davies2005PracticalRC, title={Practical refinement-type checking}, author={Rowan Davies and F. Pfenning}, year={2005} }

Software development is a complex and error prone task. Programming languages with strong static type systems assist programmers by capturing and checking the fundamental structure of programs in a very intuitive way. Given this success, it is natural to ask: can we capture and check more of the structure of programs?
In this dissertation I describe an approach called refinement-type checking that allows many common program properties to be captured and checked. This approach builds on the… Expand

#### Figures and Topics from this paper

#### 56 Citations

A unified system of type refinements

- Computer Science
- 2007

This work presents a system of type refinements that unifies and extends past work on datasort and index refinements, and provides unified mechanisms of definite types, such as intersections, and indefinite types,such as unions. Expand

Sums of uncertainty: refinements go gradual

- Computer Science
- POPL 2017
- 2016

This work develops a type system of gradual sums that combines refinement with imprecision, and develops a bidirectional version of the type system, which rules out excessive imprecison, and gives a type-directed translation to a target language with explicit casts. Expand

Nested refinements: a logic for duck typing

- Computer Science
- POPL '12
- 2012

A core calculus is presented that merges SMT-based logical implication and syntactic subtyping to automatically typecheck sophisticated dynamic language programs and can precisely reason about the interaction of higher-order functions, polymorphism, and dictionaries. Expand

Thesis Proposal: Unifying Principles of Type Refinements

- 2020

Traditional static type systems in the Hindley-Milner style are a useful means of guaranteeing type safety, in the form of type preservation and progress theorems, and of broadly specifying… Expand

When Is a Type Refinement an Inductive Type?

- Computer Science
- FoSSaCS
- 2011

This paper shows how to generically derive inductive characterisations of refinements of inductive types, and argues that these characterisations can alleviate some of the difficulties associated with ad hoc refinements. Expand

Type Refinements for Compiler Correctness

- 2013

Type refinements, introduced by Freeman and Pfenning and explored by Davies and Dunfield, unify the ontological and epistemic views of typing. Types tell us what programming language constructs… Expand

Type Refinements in an Open World (Extended Abstract)

- Computer Science
- 2015

The problem of exception tracking is examined, a perennially problematic typing concept for programming languages, from the point of view of refinements in an open world, integrating behavioral typing with theorem proving even in anopen world. Expand

Refinement types for logical frameworks

- Computer Science
- 2010

It is proposed that adding refinement types to LF is both useful and practical and found that refinement types and LF are a match made in heaven: refinements enable many rich new modes of expression, and the simplicity of LF ensures that they come at a modest cost. Expand

Facilitating program verification with dependent types

- Computer Science
- First International Conference onSoftware Engineering and Formal Methods, 2003.Proceedings.
- 2003

It is shown that the use of restricted form of dependent types can enable us to capture many more program invariants such as memory safety while retaining practical type-checking. Expand

Refining Inductive Types

- Computer Science
- Log. Methods Comput. Sci.
- 2012

This paper shows how to generically derive inductive characterizations of refinements of inductive types, and argues that these characterizations can alleviate some of the difficulties associated with ad hoc refinements. Expand

#### References

SHOWING 1-10 OF 102 REFERENCES

Refinement types for ML

- Computer Science
- PLDI '91
- 1991

A type system called refinement types is described, which is an example of a new way to make this tradeoff, as well as a potentially useful system in itself. Expand

An effective theory of type refinements

- Computer Science
- ICFP '03
- 2003

This work develops an explicit two level system that allows programmers to reason about the behavior of effectful programs and proves that refinements give rise to an optimization principle for programs. Expand

Dependent types in practical programming

- Computer Science
- POPL '99
- 1999

We present an approach to enriching the type system of ML with a restricted form of dependent types, where type index objects are drawn from a constraint domain C, leading to the DML(C) language… Expand

A Type System Equivalent to a Model Checker

- Computer Science
- ESOP
- 2005

Light is shed on the relationship between the two approaches, a type system that is equivalent to a model checker for verifying temporal safety properties of imperative programs is presented, and synergistic program analyses involving interplay between them are motivated. Expand

Soft typing

- Computer Science
- PLDI '91
- 1991

A generalization of static and dynamic typing---called soft typing---that combines the best features of both approaches is presented, and an extension of the ML type system supporting union types and recursive types that assigns types to a wider class of programs than ML is developed. Expand

Combining Two Forms of Type Refinements

- Computer Science
- 2002

A small functional language and type system that elegantly combines datasort refinements (commonly called refinement types) and dependent index refinements, so that one can specify invariants using whatever refinement is most suitable. Expand

Intersection types and computational effects

- Computer Science
- ICFP '00
- 2000

A solution similar to the value restriction for polymorphism adopted in the revised definition of Standard ML is proposed, which is not tied to let-expressions and requires an additional weakening of the usual subtyping rules. Expand

A Theory of Type Polymorphism in Programming

- Computer Science
- J. Comput. Syst. Sci.
- 1978

This work presents a formal type discipline for polymorphic procedures in the context of a simple programming language, and a compile time type-checking algorithm w which enforces the discipline. Expand

Annotated Type Systems for Program Analysis

- Mathematics
- 1995

In this Ph.D. thesis, we study four program analyses. Three of them are specified by annotated type systems and the last one by abstract interpretation. We present a combined strictness and totality… Expand

A type-theoretic interpretation of standard ML

- Computer Science
- Proof, Language, and Interaction
- 2000

Robin Milner's work on ML culminated in his ambitious proposal for Standard ML that sought to extend ML to a full-scale programming language supporting functional and imperative programming and an expressive module system and provided a precise de nition of the static and dynamic semantics in a uniform relational framework. Expand