Builtin types viewed as inductive families
Allais, Guillaume; Wies, Thomas, ed. (2023) Builtin types viewed as inductive families. In: Programming Languages and Systems. ESOP 2023. Lecture Notes in Computer Science, 13990 . Springer, FRA, pp. 113-139. ISBN 9783031300448 (https://doi.org/10.1007/978-3-031-30044-8_5)
Preview |
Text.
Filename: Allais_LNCS_2023_Builtin_types_viewed_as_inductive.pdf
Final Published Version License: Download (605kB)| Preview |
Abstract
State of the art optimisation passes for dependently typed languages can help erase the redundant information typical of invariant-rich data structures and programs. These automated processes do not dramatically change the structure of the data, even though more efficient representations could be available. Using Quantitative Type Theory as implemented in Idris 2, we demonstrate how to define an invariant-rich, typechecking-time data structure packing an efficient runtime representation together with runtime irrelevant invariants. The compiler can then aggressively erase all such invariants during compilation. Unlike other approaches, the complexity of the resulting representation is entirely predictable, we do not require both representations to have the same structure, and yet we are able to seamlessly program as if we were using the high-level structure.
ORCID iDs
Allais, Guillaume ORCID: https://orcid.org/0000-0002-4091-657X; Wies, Thomas-
-
Item type: Book Section ID code: 86115 Dates: DateEvent17 April 2023PublishedSubjects: Science > Mathematics > Electronic computers. Computer science Department: Faculty of Science > Computer and Information Sciences Depositing user: Pure Administrator Date deposited: 11 Jul 2023 15:03 Last modified: 22 Dec 2024 01:09 URI: https://strathprints.strath.ac.uk/id/eprint/86115