论文标题

反例引导神经合成

CounterExample Guided Neural Synthesis

论文作者

Polgreen, Elizabeth, Abboud, Ralph, Kroening, Daniel

论文摘要

程序合成是从规范中生成程序。正确的合成很困难,并且提供正式保证的方法遭受可伸缩性问题的影响。另一方面,神经网络能够快速从示例中生成程序,但无法确保其输出的程序实际符合逻辑规范。在这项工作中,我们将神经网络与形式上的推理相结合:使用后者将逻辑规范转换为一系列示例,这些示例将神经网络指向正确的解决方案,并确保返回的任何解决方案都可以满足形式规格。我们将技术应用于综合循环不变性,并将性能与使用使用神经网络的SMT和现有技术的现有求解器进行比较。我们的结果表明,基于正式推理的指导大大提高了神经网络的性能,几乎将其可以解决的基准数量增加了一倍。

Program synthesis is the generation of a program from a specification. Correct synthesis is difficult, and methods that provide formal guarantees suffer from scalability issues. On the other hand, neural networks are able to generate programs from examples quickly but are unable to guarantee that the program they output actually meets the logical specification. In this work we combine neural networks with formal reasoning: using the latter to convert a logical specification into a sequence of examples that guides the neural network towards a correct solution, and to guarantee that any solution returned satisfies the formal specification. We apply our technique to synthesising loop invariants and compare the performance to existing solvers that use SMT and existing techniques that use neural networks. Our results show that the formal reasoning based guidance improves the performance of the neural network substantially, nearly doubling the number of benchmarks it can solve.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源