Every program should always be accompanied by a specification that describes important aspects of the code's behavior, but writing good specifications is often harder that writing the code itself. This paper addresses the problem of synthesizing specifications automatically. Our method takes as input (i) a set of function definitions, and (ii) a domain-specific language L in which the extracted properties are to be expressed. It outputs a set of properties--expressed in L--that describe the behavior of functions. Each of the produced property is a best L-property for signature: there is no other L-property for signature that is strictly more precise. Furthermore, the set is exhaustive: no more L-properties can be added to it to make the conjunction more precise. We implemented our method in a tool, spyro. When given the reference implementation for a variety of SyGuS and Synquid synthesis benchmarks, spyro often synthesized properties that that matched the original specification provided in the synthesis benchmark.
翻译:每个程序应始终配有描述代码行为重要方面的规格,但写好规格往往比写代码本身要难。本文件处理的是自动合成规格的问题。 我们的方法以输入(一) 一套功能定义和(二) 特定域语言L 表示所提取的属性。 它产生一套用L- 表示的描述函数行为特征的属性。 每个生成的属性都是最佳的L- 财产供签字使用: 没有其他的L- 财产供签字使用: 没有其他的L- 财产供严格精确的签字使用。 此外, 这套是详尽无遗的: 没有更多的L- 财产可以添加到它中来更精确的连接。 我们在一个工具, 间谍 中应用了我们的方法。 当给各种 SyGuS 和 Synquid 合成基准提供参考时, 间谍ro 经常合成符合合成基准中原始规格的属性。