Generic Zero-Cost Reuse for Dependent Types
Cedille code accompanying the paper draft (available on arXiv) authored by Larry Diehl, Denis Firsov, and Aaron Stump.
This is the generic version of our previous manual reuse work, where identity functions are defined via definitional equality, rather than propositional equality.
We describe the directories containing our code below. As in the paper, program reuse corresponds to non-dependent function type reuse, proof reuse corresponds to dependent function type reuse, and data reuse corresponds to fixpoint type reuse.
Evaluating This Work
The Cedille type checker, needed to evaluate this work, is available here.
The artifact branch has a document that explains how to work with Cedille for the purpose of evaluating this work. The master branch is only ahead of the artifact branch in minor ways, so the document should apply to the master branch as well.
The artifact branch includes a pre-released version of Cedille, if you don't want to separately git clone and install it, but I suggest installing the now open source Cedille instead (following these installation instructions).
Alternatively, if you don't want to manually install anything, there is a Virtual Box image of the artifact branch that you can get from here, by clicking the "Source Materials" tab on the bottom and downloading the zip file.
This directory includes our primary contributions, the generic zero-cost reuse combinators for the following types:
- Functions (forgetful
- Functions (enriching
- Fixpoints (forgetful
- Fixpoints (enriching
The auxiliary combinators also appear here.
This directory includes reuse examples via our combinators:
- Program Reuse of append and Proof Reuse of associativity
- Data Reuse of vectors and lists
- Data Reuse of unchecked/raw and checked/typed STLC terms
- Program Reuse of STLC step function (enriching
- Program Reuse of STLC substitution function (enriching
This directory includes the algebraic list and vector datatypes, and their schemes, defined using generic Mendler-style fixpoints:
- Lists Scheme (
- Lists (
- Vectors Scheme (
- Vectors (
- Raw Terms Scheme (
- Raw Terms (
- Typed Terms Scheme (
- Typed Terms (
This directory imports the generic datatype development (via efficient Mendler-style fixpoints) by Firsov et al.:
It also includes the generic derivation of induction (
as well as other technical devices.