Seamless, Correct, and Generic Programming over Serialised Data
Abstract
In typed functional languages, one can typically only manipulate data in a type-safe manner if it first has been deserialised into an in-memory tree represented as a graph of nodes-as-structs and subterms-as-pointers. We demonstrate how we can use QTT as implemented in \idris{} to define a small universe of serialised datatypes, and provide generic programs allowing users to process values stored contiguously in buffers. Our approach allows implementors to prove the full functional correctness by construction of the IO functions processing the data stored in the buffer.
- Publication:
-
arXiv e-prints
- Pub Date:
- October 2023
- DOI:
- 10.48550/arXiv.2310.13441
- arXiv:
- arXiv:2310.13441
- Bibcode:
- 2023arXiv231013441A
- Keywords:
-
- Computer Science - Programming Languages;
- D.2.4;
- E.1;
- F.3.1
- E-Print:
- As submitted to JFP