Builtin types viewed as inductive families
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, 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.
Citation
Allais , G 2023 , Builtin types viewed as inductive families . in T Wies (ed.) , Programming Languages and Systems : 32nd European Symposium on Programming, ESOP 2023, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2023, Paris, France, April 22–27, 2023, Proceedings . Lecture Notes in Computer Science , vol. 13990 , Springer , pp. 113–139 , 32nd European Symposium on Programming, ESOP 2023 , Paris , France , 22/04/23 . https://doi.org/10.48550/arXiv.2301.02194 , https://doi.org/10.1007/978-3-031-30044-8_5 conference
Publication
Programming Languages and Systems
ISSN
0302-9743Type
Conference item
Description
This research was funded by the Engineering and Physical Sciences Research Council (grant number EP/T007265/1).Collections
Items in the St Andrews Research Repository are protected by copyright, with all rights reserved, unless otherwise indicated.