Zero-Cost Coercions for Program and Proof Reuse

02/02/2018
by   Larry Diehl, et al.
0

We introduce the notion of identity coercions between non-indexed and indexed variants of inductive datatypes, such as lists and vectors. An identity coercion translates one type to another such that the coercion function definitionally reduces to the identity function. This allows us to reuse vector programs to derive list programs (and vice versa), without any runtime cost. This also allows us to reuse vector proofs to derive list proofs (and vice versa), without the cost of equational reasoning proof obligations. Our work is formalized in Cedille, a dependently typed programming language based on a type-annotated Curry-style type the- ory with implicit (or, erased) products (or, dependent functions), and relies crucially on erasure to introduce definitional equalities between underlying untyped terms.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/21/2018

Generic Zero-Cost Reuse for Dependent Types

Dependently typed languages are well known for having a problem with cod...
research
11/17/2020

Learning functional programs with function invention and reuse

Inductive programming (IP) is a field whose main goal is synthesising pr...
research
03/30/2022

A meta-probabilistic-programming language for bisimulation of probabilistic and non-well-founded type systems

We introduce a formal meta-language for probabilistic programming, capab...
research
02/13/2020

Learning to Represent Programs with Property Signatures

We introduce the notion of property signatures, a representation for pro...
research
10/06/2021

Empowering Citizens by a Blockchain-Based Robinson List

A Robinson list protects phone subscribers against commercial spam calls...
research
03/19/2019

Elaborating Inductive Datatypes and Course-of-Values Pattern Matching to Cedille

In CDLE, a pure Curry-style type theory, it is possible to generically d...
research
05/23/2022

Groundhog: Efficient Request Isolation in FaaS

Security is a core responsibility for Function-as-a-Service (FaaS) provi...

Please sign up or login with your details

Forgot password? Click here to reset