A framework for resource dependent EDSLs in a dependently typed language

de Muijnck-Hughes, Jan and Brady, Edwin and Vanderbauwhede, Wim; Hirschfeld, Robert and Pape, Tobias, eds. (2020) A framework for resource dependent EDSLs in a dependently typed language. In: 34th European Conference on Object-Oriented Programming, ECOOP 2020. Leibniz International Proceedings in Informatics, LIPIcs, 166 . Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing, DEU. ISBN 9783959771542 (https://doi.org/10.4230/LIPIcs.ECOOP.2020.20)

[thumbnail of Muijnck-Hughes-etal-ECOOP2020-A-framework-resource-dependent-EDSLs-dependently-typed-language]
Preview
Text. Filename: Muijnck-Hughes-etal-ECOOP2020-A-framework-resource-dependent-EDSLs-dependently-typed-language.pdf
Final Published Version
License: Creative Commons Attribution 3.0 logo

Download (598kB)| Preview

Abstract

Idris’ Effects library demonstrates how to embed resource dependent algebraic effect handlers into a dependently typed host language, providing run-time and compile-time based reasoning on type-level resources. Building upon this work, Resources is a framework for realising Embedded Domain Specific Languages (EDSLs) with type systems that contain domain specific substructural properties. Differing from Effects, Resources allows a language’s substructural properties to be encoded within type-level resources that are associated with language variables. Such an association allows for multiple effect instances to be reasoned about autonomically and without explicit type-level declaration. Type-level predicates are used as proof that the language’s substructural properties hold. Several exemplar EDSLs are presented that illustrates our framework’s operation and how dependent types provide correctness-by-construction guarantees that substructural properties of written programs hold.

ORCID iDs

de Muijnck-Hughes, Jan ORCID logoORCID: https://orcid.org/0000-0003-2185-8543, Brady, Edwin and Vanderbauwhede, Wim; Hirschfeld, Robert and Pape, Tobias