Builtin types viewed as inductive families
MetadataShow full item record
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.
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_5conference
Programming Languages and Systems
Copyright © The Author(s) 2023. This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the chapter’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
DescriptionThis research was funded by the Engineering and Physical Sciences Research Council (grant number EP/T007265/1).
Items in the St Andrews Research Repository are protected by copyright, with all rights reserved, unless otherwise indicated.