Linear Constraints

03/10/2021
by   Jean-Philippe Bernardy, et al.
0

A linear argument must be consumed exactly once in the body of its function. A linear type system can verify the correct usage of resources such as file handles and manually managed memory. But this verification requires bureaucracy. This paper presents linear constraints, a front-end feature for linear typing that decreases the bureaucracy of working with linear types. Linear constraints are implicit linear arguments that are to be filled in automatically by the compiler. Linear constraints are presented as a qualified type system, together with an inference algorithm which extends OutsideIn, GHC's existing constraint solver algorithm. Soundness of linear constraints is ensured by the fact that they desugar into Linear Haskell.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/20/2022

Constraint-based type inference for FreezeML

FreezeML is a new approach to first-class polymorphic type inference tha...
research
08/08/2023

Some Options for Instantiation of Bipolar Argument Graphs with Deductive Arguments

Argument graphs provide an abstract representation of an argumentative s...
research
07/08/2016

Solving finite-domain linear constraints in presence of the alldifferent

In this paper, we investigate the possibility of improvement of the wide...
research
05/26/2019

An Unconditionally Stable First-Order Constraint Solver for Multibody Systems

This article describes an absolutely stable, first-order constraint solv...
research
11/01/2019

A Modular Inference of Linear Types for Multiplicity-Annotated Arrows

Bernardy et al. [2018] proposed a linear type system λ^q_→ as a core typ...
research
11/01/2019

Modular Inference of Linear Types for Multiplicity-Annotated Arrows

Bernardy et al. [2018] proposed a linear type system λ^q_→ as a core typ...
research
05/05/2020

A Linear Algebra Approach to Linear Metatheory

Linear typed λ-calculi are more delicate than their simply typed sibling...

Please sign up or login with your details

Forgot password? Click here to reset