[论文解读] Synthesis from Assume-Guarantee Contracts using Skolemized Proofs of Realizability
本文提出了一种新颖的、无需模板的程序合成方法,通过线性实数上的k-归纳可实现性证明,从假设-保证契约中进行合成。通过从SMT求解器支持的可实现性证明中提取Skolem函数,该方法自动生成正确性保证的C实现代码,在多种基于Lustre的基准测试中仅需极少的人工编写代码即表现出色。
The realizability problem in requirements engineering is to determine the existence of an implementation that meets the given formal requirements. A step forward after realizability is proven, is to construct such an implementation automatically, and thus solve the problem of program synthesis. In this paper, we propose a novel approach to pro- gram synthesis guided by k-inductive proofs of realizability of assume- guarantee contracts constructed from safety properties. The proof of re- alizability is performed over a set of forall-exists formulas, and synthesis is per- formed by extracting Skolem functions witnessing the existential quan- tification. These Skolem functions can then be combined into an imple- mentation. Our approach is implemented in the JSyn tool which con- structs Skolem functions from a contract written in a variant of the Lus- tre programming language and then compiles the Skolem functions into a C language implementation. For a variety of benchmark models that already contained hand-written implementations, we are able to identify the usability and effectiveness of the synthesized counterparts, assuming a component-based verification framework.
研究动机与目标
- 解决在有限域或模板受限规范之外的复杂、无限状态安全性质的自动化合成空白。
- 实现从假设-保证契约中完全自动化的正确实现代码合成,无需用户引导的细化或模板枚举。
- 开发一种从量化公式中提取功能性Skolem实例的方法,从而可直接编译为高效的C代码。
- 评估合成实现作为组件化验证框架中占位符的可行性与效率。
- 在现有可实现性检查基础上增加后处理步骤,将存在量词的实例转换为可执行的Skolem函数。
提出的方法
- 该方法使用对∀∃-公式的k-归纳推理,证明线性实数(LRA)中假设-保证契约的可实现性。
- 利用JKind模型检查器进行可实现性检查,并与AE-VAL求解器集成,以实现存在量词的Skolem化。
- 采用自定义的后量化消除算法,提取细粒度的Skolem函数而非关系,确保生成功能性C代码。
- 通过自定义代码生成器将Skolem函数编译为C实现,保持构造正确性。
- 该方法支持无限状态系统,避免模板约束或迭代细化,从而具备更广泛的应用潜力。
- 该框架在JSyn工具链中实现,可处理用类似Lustre的语言编写的契约,并输出C代码。
实验结果
研究问题
- RQ1k-归纳可实现性证明能否有效引导在无限状态领域中生成正确性保证的实现?
- RQ2是否可能从SMT求解器支持的可实现性证明中提取可执行的Skolem函数,而无需依赖模板枚举?
- RQ3在性能和正确性方面,合成代码与手写实现相比效果如何?
- RQ4该方法能否在无需用户引导细化的情况下扩展到非平凡的真实契约?
- RQ5证明长度(k=0, k=1)对合成代码的复杂性和效率有何影响?
主要发现
- JSyn工具成功从一系列非平凡的假设-保证契约中合成出C实现代码,这些契约以类似Lustre的语言表达。
- 合成的实现被发现功能正确,且在性能上具有竞争力,其代码大小和执行时间在基准模型中远低于手写实现。
- 该方法在无需模板约束或用户引导细化的情况下实现合成,展示了高度的自动化与通用性。
- 在所有评估基准中,k=0和k=1的可实现性证明已足够支持合成,表明收敛效率高。
- 使用Skolem函数而非关系,使得代码可直接编译为高效、可执行的C代码。
- 该方法在合成速度上优于用户引导的技术,且在契约规格定义后无需任何人工干预。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。