Mixed Linear and Non-linear Recursive Types

06/22/2019
by   Bert Lindenhovius, et al.
0

We describe a type system with mixed linear and non-linear recursive types called LNL-FPC (the linear/non-linear fixpoint calculus). The type system supports linear typing which enhances the safety properties of programs, but also supports non-linear typing as well which makes the type system more convenient for programming. Just like in FPC, we show that LNL-FPC supports type-level recursion which in turn induces term-level recursion. We also provide sound and computationally adequate categorical models for LNL-FPC which describe the categorical structure of the substructural operations of Intuitionistic Linear Logic at all non-linear types, including the recursive ones. In order to do so, we describe a new technique for solving recursive domain equations within the category CPO by constructing the solutions over pre-embeddings. The type system also enjoys implicit weakening and contraction rules which we are able to model by identifying the canonical comonoid structure of all non-linear types. We also show that the requirements of our abstract model are reasonable by constructing a large class of concrete models that have found applications not only in classical functional programming, but also in emerging programming paradigms that incorporate linear types, such as quantum programming and circuit description programming languages.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/22/2019

LNL-FPC: The Linear/Non-linear Fixpoint Calculus

We describe a type system with mixed linear and non-linear recursive typ...
research
09/06/2021

Quantum CPOs

We introduce the monoidal closed category qCPO of quantum cpos, whose ob...
research
05/11/2020

Computational Adequacy for Substructural Lambda Calculi

Substructural type systems, such as affine (and linear) type systems, ar...
research
10/26/2017

Linear Haskell: practical linearity in a higher-order polymorphic language

Linear type systems have a long and storied history, but not a clear pat...
research
10/03/2017

DimReader: Using auto-differentiation to explain non-linear projections

Non-linear dimensionality reduction (NDR) methods such as LLE and t-SNE ...
research
10/21/2020

On the Semantic Expressiveness of Recursive Types

Recursive types extend the simply-typed lambda calculus (STLC) with the ...
research
10/29/2018

To Memory Safety through Proofs

We present a type system capable of guaranteeing the memory safety of pr...

Please sign up or login with your details

Forgot password? Click here to reset