Intensional Datatype Refinement

08/04/2020
by   Eddie Jones, et al.
0

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. 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/28/2023

Answer Refinement Modification: Refinement Type System for Algebraic Effects and Handlers

Algebraic effects and handlers are a mechanism to structure programs wit...
research
11/10/2020

Data Flow Refinement Type Inference

Refinement types enable lightweight verification of functional programs....
research
04/01/2020

FreezeML: Complete and Easy Type Inference for First-Class Polymorphism

ML is remarkable in providing statically typed polymorphism without the ...
research
04/26/2022

Structural Rules and Algebraic Properties of Intersection Types

In this paper we define several notions of term expansion, used to defin...
research
02/18/2020

ConSORT: Context- and Flow-Sensitive Ownership Refinement Types for Imperative Programs

We present ConSORT, a type system for safety verification in the presenc...
research
08/01/2019

Refinement Kinds: Type-safe Programming with Practical Type-level Computation (Extended Version)

This work introduces the novel concept of kind refinement, which we deve...
research
09/26/2022

Focusing on Liquid Refinement Typing

We present a foundation systematizing, in a way that works for any evalu...

Please sign up or login with your details

Forgot password? Click here to reset