论文标题
简洁的仅阅读规格,以更好地合成使用指针的程序 - 扩展版本
Concise Read-Only Specifications for Better Synthesis of Programs with Pointers -- Extended Version
论文作者
论文摘要
在计划合成中,简洁和强烈的规格之间存在一个众所周知的权衡:如果规范太冗长,那么编写可能比程序更难。如果太弱,综合程序可能与用户的意图不符。在这项工作中,我们探讨了注释在程序合成中限制内存访问权限的使用,并表明它们可以使规格更强大,同时令人惊讶地简洁。具体而言,我们增强了合成分离逻辑(SSL),这是一个合成堆堆积程序的框架,并具有仅读取借款的逻辑机制。我们观察到,这种极简主义和保守的SSL扩展在几种方面受益于合成,使其更具表现力(通过适度的注释开销来实现更强的正确性保证),(b)有效(b)有效(它产生更简洁,更易于阅读的程序),(c)有效的(c)(c)良好的(d)良好(d)良好的(cysistion)的效率(综合)是构成的(综合)是对构成的效率(综合效率)。我们解释了直觉,并为仅阅读借款提供了正式的处理。我们通过描述我们对各种堆肥程序的一系列标准基准规范的定量评估来证实索赔(a) - (d)。
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.