归纳堆谓词的归纳综合——扩展版
Inductive Synthesis of Inductive Heap Predicates -- Extended Version
AI总结:
本文提出仅用正例的 ILP 谓词学习算法,从具体内存图自动综合兼具形状与数据性质的递归 SL 谓词,并支持验证与构造即正确代码综合。
摘要:
我们提出一种利用归纳逻辑程序设计(ILP)技术,从具体数据结构实例中自动综合分离逻辑(SL)中递归谓词的方法。使这种综合有效所面临的主要挑战是:(1)使其在没有负例的情况下工作,而负例是 ILP 所必需的,但对于基于堆的结构却难以以自动化方式构造;(2)不仅能够概括堆的形状(例如它是一个链表),还能概括其所存储数据的性质(例如它是一个有序链表)。我们通过一种新的谓词学习算法应对这些挑战。本工作的关键贡献是:(a)给出了仅使用正例的、基于 ILP 的学习形式化;以及(b)一种基于仅正例学习、从具体内存图综合具有丰富性质的 SL 谓词的算法。我们表明,本框架能够高效且正确地为现有最先进工具无法处理的结构综合 SL 谓词,包括那些具有非平凡载荷约束的结构(例如二叉搜索树)和嵌套递归结构(例如 n 叉树)。我们还通过一个内存图生成器扩展了本方法的可用性,该生成器可从程序产生正堆例。最后,我们展示了本方法如何促进演绎验证以及构造即正确代码的综合。
英文摘要:
We present an approach to automatically synthesise recursive predicates in Separation Logic (SL) from concrete data structure instances using Inductive Logic Programming (ILP) techniques. The main challenges to make such synthesis effective are (1) making it work without negative examples that are required in ILP but are difficult to construct for heap-based structures in an automated fashion, and (2) to be capable of summarising not just the shape of a heap (e.g., it is a linked list), but also the properties of the data it stores (e.g., it is a sorted linked list). We tackle these challenges with a new predicate learning algorithm. The key contributions of our work are (a) the formulation of ILP-based learning only using positive examples and (b) an algorithm that synthesises property-rich SL predicates from concrete memory graphs based on the positive-only learning. We show that our framework can efficiently and correctly synthesise SL predicates for structures that were beyond the reach of the state-of-the-art tools, including those featuring non-trivial payload constraints (e.g., binary search trees) and nested recursion (e.g., n-ary trees). We further extend the usability of our approach by a memory graph generator that produces positive heap examples from programs. Finally, we show how our approach facilitates deductive verification and synthesis of correct-by-construction code.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。