Refinement types for ML

  title={Refinement types for ML},
  author={Timothy S. Freeman and Frank Pfenning},
  booktitle={PLDI '91},
Abstract : Programming computers is a notoriously error-prone process. It is the job of the programming language designer to make this process more reliable. One approach to this is to impose some sort of typing discipline on the programs. In doing this, the programming language designer is immediately faced with a tradeoff: if the type system is too simple, it cannot accurately express important properties of the program; if it is too expressive, then mechanically checking or inferring the… 

Figures from this paper

Practical Refinement-Type Checking : Thesis Summary

The practicality of the approach is demonstrated by showing that it can be used to design a refinement-type checker for a widely-used language with a strong type system: Standard ML, and a new variant of intersection types that achieve soundness in the presence of call-by-value effects by incorporating a value restriction.

Dependent types in practical programming

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

Leveraging Program Analysis for Type Inference

This thesis focuses on Liquid types, an advanced family of algorithms that combine classical typing disciplines and known static analyses to prove various safety properties of functional programs, and uses abstract interpretation to constructively design type inference algorithms.

Refinement type inference via abstract interpretation

The problem of refinement type inference can be reduced to that of computing invar iants of simple, first-order imperative programs without rec u sive datatypes and shows that any of the variety of abstract interpretation techniques developed f or imperative programs, such as polyhedra, counterexample guided pr edicate abstraction and refinement, can beirectly applied to verify behavioral properties of modern software in a fully automatic manner.

15-851 Project Report: Refinement Type Inference using Abstract Interpretation

Two refinement type inference algorithms based on abstract interpretation are described, one without intersection types and one with principal intersection types, and experimental comparisons of these two algorithms are discussed.

Types and programming languages

This text provides a comprehensive introduction both to type systems in computer science and to the basic theory of programming languages, with a variety of approaches to modeling the features of object-oriented languages.

The Design and Implementation of Typed Scheme: From Scripts to Programs

It is shown how the Typed Scheme type system, in conjunction with simple recursive types, is able to encode refinements of existing datatypes, thus expressing both proposed variations of refinement types.

Structural refinement types

This article builds on the algebraic subtyping approach and extends it with typing rules which combine properties of nominal and structural type systems in a novel way, and the resulting type system is very expressive and allows to specify and infer non-trivial properties of programs.

Thesis Proposal: Practical Reenement-type Checking

This work intends to design an extension of Standard ML which is suitable for reenement-type checking, extend a real compiler with an eecient reenements-type checker, and demonstrate that this allows many common program invariants to be captured in a practical way.

Polymorphic algebraic data type reconstruction

This work presents a rule-based constraint rewriting algorithm that reconstructs both type declarations and type definitions, allowing the programmer to effectively program type-less in a strictly typed language.



A Theory of Type Polymorphism in Programming

  • R. Milner
  • Computer Science
    J. Comput. Syst. Sci.
  • 1978

Typeful Programming

  • L. Cardelli
  • Computer Science
    Formal Description of Programming Concepts
  • 1989
It is shown how typeful programming is best supported by sophisticated type systems, and how these systems can help in clarifying programming issues and in adding power and regularity to languages.

On understanding types, data abstraction, and polymorphism

A λ-calculus-based model for type systems that allows us to explore the interaction among the concepts of type, data abstraction, and polymorphism in a simple setting, unencumbered by complexities of production programming languages is developed.

Programming with intersection types, union types, and polymorphism

This report summarizes a preliminary investigation of the expressiveness of a programming language combining intersection types, union types, and polymorphism.

Type Inference with Subtypes

Polymorphic Subtype Inference: Closing the Theory-Practice Gap

Following the framework described above, a transformation is described, based on the lazy instance definition, that eliminates certain redundancies from typings that leads to a coercion set of size at most one.

Basic Polymorphic Typechecking

Preliminary Investigation of a Calculus with Intersection and Union Types

This report summarizes the results of a preliminary investigation of a simple typed-calculus with intersection and union types and gives a semantics in the form of rules for equality between typed terms and exhibits a PER model validating these rules.

Polymorphic type inference and assignment

The type system given here leads to a better integration of imperative programming style with the purely applicative kernel of ML, and generic functions that allocate mutable data can safely be given fully polymorphic types.

Preliminary design of the programming language Forsythe

This paper develops a program for computing reachability in a finite directed graph, and defines a procedure reachable that, given a node x and a graph g, will compute the set of nodes that can be reached from x.