Cargando…
Resourceful Program Synthesis from Graded Linear Types
Linear types provide a way to constrain programs by specifying that some values must be used exactly once. Recent work on graded modal types augments and refines this notion, enabling fine-grained, quantitative specification of data use in programs. The information provided by graded modal types app...
Autores principales: | , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
2020
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7880237/ http://dx.doi.org/10.1007/978-3-030-68446-4_8 |
_version_ | 1783650668742967296 |
---|---|
author | Hughes, Jack Orchard, Dominic |
author_facet | Hughes, Jack Orchard, Dominic |
author_sort | Hughes, Jack |
collection | PubMed |
description | Linear types provide a way to constrain programs by specifying that some values must be used exactly once. Recent work on graded modal types augments and refines this notion, enabling fine-grained, quantitative specification of data use in programs. The information provided by graded modal types appears to be useful for type-directed program synthesis, where these additional constraints can be used to prune the search space of candidate programs. We explore one of the major implementation challenges of a synthesis algorithm in this setting: how does the synthesis algorithm efficiently ensure that resource constraints are satisfied throughout program generation? We provide two solutions to this resource management problem, adapting Hodas and Miller’s input-output model of linear context management to a graded modal linear type theory. We evaluate the performance of both approaches via their implementation as a program synthesis tool for the programming language Granule, which provides linear and graded modal typing. |
format | Online Article Text |
id | pubmed-7880237 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2020 |
record_format | MEDLINE/PubMed |
spelling | pubmed-78802372021-02-16 Resourceful Program Synthesis from Graded Linear Types Hughes, Jack Orchard, Dominic Logic-Based Program Synthesis and Transformation Article Linear types provide a way to constrain programs by specifying that some values must be used exactly once. Recent work on graded modal types augments and refines this notion, enabling fine-grained, quantitative specification of data use in programs. The information provided by graded modal types appears to be useful for type-directed program synthesis, where these additional constraints can be used to prune the search space of candidate programs. We explore one of the major implementation challenges of a synthesis algorithm in this setting: how does the synthesis algorithm efficiently ensure that resource constraints are satisfied throughout program generation? We provide two solutions to this resource management problem, adapting Hodas and Miller’s input-output model of linear context management to a graded modal linear type theory. We evaluate the performance of both approaches via their implementation as a program synthesis tool for the programming language Granule, which provides linear and graded modal typing. 2020-12-29 /pmc/articles/PMC7880237/ http://dx.doi.org/10.1007/978-3-030-68446-4_8 Text en © The Author(s) 2021 Open Access 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. |
spellingShingle | Article Hughes, Jack Orchard, Dominic Resourceful Program Synthesis from Graded Linear Types |
title | Resourceful Program Synthesis from Graded Linear Types |
title_full | Resourceful Program Synthesis from Graded Linear Types |
title_fullStr | Resourceful Program Synthesis from Graded Linear Types |
title_full_unstemmed | Resourceful Program Synthesis from Graded Linear Types |
title_short | Resourceful Program Synthesis from Graded Linear Types |
title_sort | resourceful program synthesis from graded linear types |
topic | Article |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7880237/ http://dx.doi.org/10.1007/978-3-030-68446-4_8 |
work_keys_str_mv | AT hughesjack resourcefulprogramsynthesisfromgradedlineartypes AT orcharddominic resourcefulprogramsynthesisfromgradedlineartypes |