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

01/29/2020
by   Andreea Costea, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/31/2019

Towards Neural-Guided Program Synthesis for Linear Temporal Logic Specifications

Synthesizing a program that realizes a logical specification is a classi...
research
07/18/2018

Structuring the Synthesis of Heap-Manipulating Programs - Extended Version

This paper describes a deductive approach to synthesizing imperative pro...
research
04/25/2023

Resource Specifications for Resource-Manipulating Programs

Specifications for modular program verifiers are expressed as constraint...
research
07/30/2022

Fence Synthesis under the C11 Memory Model

The C/C++11 (C11) standard offers a spectrum of ordering guarantees on m...
research
05/25/2021

Comparative Synthesis: Learning Optimal Programs with Indeterminate Objectives

Quantitative program synthesis aims to generate a program that satisfies...
research
02/14/2019

Sip4J: Statically inferring permission-based specifications for sequential Java programs

In mainstream programming languages such as Java, a common way to enable...
research
07/18/2018

Structuring the Synthesis of Heap-Manipulating Programs

This paper describes a deductive approach to synthesizing imperative pro...

Please sign up or login with your details

Forgot password? Click here to reset