Intensional Datatype Refinement

Eddie Jones, Steven Ramsay
8/4/2020
cs.PL

Official code: plrg-bristol/intensional-datatys (5 stars, Haskell, BSD-3-Clause, last commit 2020-08-05).

Abstract

The pattern-match safety problem is to verify that a given functional program will never crash due to non-exhaustive patterns in its function definitions. We present a refinement type system that can be used to solve this problem.

Show full abstract

The system extends ML-style type systems with algebraic datatypes by a limited form of structural subtyping and environment-level intersection. We describe a fully automatic, sound and complete type inference procedure for this system which, under reasonable assumptions, is worst-case linear-time in the program size. Compositionality is essential to obtaining this complexity guarantee. A prototype implementation for Haskell is able to analyse a selection of packages from the Hackage database in a few hundred milliseconds.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause

A pattern-matching safety analysis for Haskell, based on a type system for intensional datatype refinements and implemented as a GHC Core plugin.

51HaskellJul 24, 20206 years agoBSD-3-Clause

Similar Papers

Cite this paper

@article{jones2020intensional,
  title  = {Intensional Datatype Refinement},
  author = {Eddie Jones and Steven Ramsay},
  year   = {2020},
  eprint = {2008.01452},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2008.01452}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2008.01452.svg)](https://codeofpaper.com/paper/2008.01452)

Discussion