Cargando…

Concise Read-Only Specifications for Better Synthesis of Programs with Pointers

In program synthesis there is a well-known trade-off between concise and strong specifications: if a specification is too verbose, it might be harder to write than the program; if it is too weak, the synthesised program might not match the user’s intent. In this work we explore the use of annotation...

Descripción completa

Detalles Bibliográficos
Autores principales: Costea, Andreea, Zhu, Amy, Polikarpova, Nadia, Sergey, Ilya
Formato: Online Artículo Texto
Lenguaje:English
Publicado: 2020
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7702248/
http://dx.doi.org/10.1007/978-3-030-44914-8_6
_version_ 1783616576091586560
author Costea, Andreea
Zhu, Amy
Polikarpova, Nadia
Sergey, Ilya
author_facet Costea, Andreea
Zhu, Amy
Polikarpova, Nadia
Sergey, Ilya
author_sort Costea, Andreea
collection PubMed
description In program synthesis there is a well-known trade-off between concise and strong specifications: if a specification is too verbose, it might be harder to write than the program; if it is too weak, the synthesised program might not match the user’s intent. In this work we explore the use of annotations for restricting memory access permissions in program synthesis, and show that they can make specifications much stronger while remaining surprisingly concise. Specifically, we enhance Synthetic Separation Logic (SSL), a framework for synthesis of heap-manipulating programs, with the logical mechanism of read-only borrows. We observe that this minimalistic and conservative SSL extension benefits the synthesis in several ways, making it more (a) expressive (stronger correctness guarantees are achieved with a modest annotation overhead), (b) effective (it produces more concise and easier-to-read programs), (c) efficient (faster synthesis), and (d) robust (synthesis efficiency is less affected by the choice of the search heuristic). We explain the intuition and provide formal treatment for read-only borrows. We substantiate the claims (a)–(d) by describing our quantitative evaluation of the borrowing-aware synthesis implementation on a series of standard benchmark specifications for various heap-manipulating programs.
format Online
Article
Text
id pubmed-7702248
institution National Center for Biotechnology Information
language English
publishDate 2020
record_format MEDLINE/PubMed
spelling pubmed-77022482020-12-01 Concise Read-Only Specifications for Better Synthesis of Programs with Pointers Costea, Andreea Zhu, Amy Polikarpova, Nadia Sergey, Ilya Programming Languages and Systems Article In program synthesis there is a well-known trade-off between concise and strong specifications: if a specification is too verbose, it might be harder to write than the program; if it is too weak, the synthesised program might not match the user’s intent. In this work we explore the use of annotations for restricting memory access permissions in program synthesis, and show that they can make specifications much stronger while remaining surprisingly concise. Specifically, we enhance Synthetic Separation Logic (SSL), a framework for synthesis of heap-manipulating programs, with the logical mechanism of read-only borrows. We observe that this minimalistic and conservative SSL extension benefits the synthesis in several ways, making it more (a) expressive (stronger correctness guarantees are achieved with a modest annotation overhead), (b) effective (it produces more concise and easier-to-read programs), (c) efficient (faster synthesis), and (d) robust (synthesis efficiency is less affected by the choice of the search heuristic). We explain the intuition and provide formal treatment for read-only borrows. We substantiate the claims (a)–(d) by describing our quantitative evaluation of the borrowing-aware synthesis implementation on a series of standard benchmark specifications for various heap-manipulating programs. 2020-04-18 /pmc/articles/PMC7702248/ http://dx.doi.org/10.1007/978-3-030-44914-8_6 Text en © The Author(s) 2020 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
Costea, Andreea
Zhu, Amy
Polikarpova, Nadia
Sergey, Ilya
Concise Read-Only Specifications for Better Synthesis of Programs with Pointers
title Concise Read-Only Specifications for Better Synthesis of Programs with Pointers
title_full Concise Read-Only Specifications for Better Synthesis of Programs with Pointers
title_fullStr Concise Read-Only Specifications for Better Synthesis of Programs with Pointers
title_full_unstemmed Concise Read-Only Specifications for Better Synthesis of Programs with Pointers
title_short Concise Read-Only Specifications for Better Synthesis of Programs with Pointers
title_sort concise read-only specifications for better synthesis of programs with pointers
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7702248/
http://dx.doi.org/10.1007/978-3-030-44914-8_6
work_keys_str_mv AT costeaandreea concisereadonlyspecificationsforbettersynthesisofprogramswithpointers
AT zhuamy concisereadonlyspecificationsforbettersynthesisofprogramswithpointers
AT polikarpovanadia concisereadonlyspecificationsforbettersynthesisofprogramswithpointers
AT sergeyilya concisereadonlyspecificationsforbettersynthesisofprogramswithpointers