arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.03712cs.LOcs.SC
收藏

无排序种类的饱和排序

Saturating Sorting without Sorts

Pamina Georgiou, Márton Hajdu, Laura Kovács

AI总结:

该研究提出一种基于饱和一阶定理证明的框架,通过抽象种类参数、形式化排列性质与组合式归纳自动化,实现递归排序函数式程序的正确性验证,并在归并、快速排序上验证了适用性。

摘要:

我们提出了一种一阶定理证明框架,用于验证采用递归数据结构实现排序算法的函数式程序的正确性。我们在多类一阶逻辑中形式化递归程序的语义,并将有序性/排列性质整合到我们的一阶形式化体系中。我们的列表形式化并不聚焦于对特定一阶理论(如整数算术)的元素列表进行排序,而是依赖一个对(算术)理论及具体种类进行抽象的种类参数。我们在一阶逻辑中形式化了列表的排列性质,从而能够纯通过基于超位置的一阶推理自动证明此类算法的验证条件。在此过程中,我们调整了近期在饱和过程中实现归纳自动化的相关研究成果。我们倡导一种组合式方法,用于自动化验证参数化列表结构上实现并保持排序与排列性质的函数式程序所需的归纳证明。我们的工作通过两种方式将基于饱和的一阶定理证明转化为自动化验证引擎:(i)通过手动证明拆分引导自动化归纳推理;(ii)在饱和过程中完全自动化归纳推理。我们在包括Mergesort(归并排序)和Quicksort(快速排序)在内的递归排序算法上展示了该框架的适用性。

英文摘要:

We present a first-order theorem proving framework for establishing the correctness of functional programs implementing sorting algorithms with recursive data structures. We formalize the semantics of recursive programs in many-sorted first-order logic and integrate sortedness/permutation properties within our first-order formalization. Rather than focusing on sorting lists of elements of specific first-order theories, such as integer arithmetic, our list formalization relies on a sort parameter abstracting (arithmetic) theories and hence concrete sorts. We formalize the permutation property of lists in first-order logic so that we automatically prove verification conditions of such algorithms purely by superpositon-based first-order reasoning. Doing so, we adjust recent efforts for automating inducion in saturation. We advocate a compositional approach for automating proofs by induction required to verify functional programs implementing and preserving sorting and permutation properties over parameterized list structures. Our work turns saturation-based first-order theorem proving into an automated verification engine by (i) guiding automated inductive reasoning with manual proof splits and (ii) fully automating inductive reasoning in saturation. We showcase the applicability of our framework over recursive sorting algorithms, including Mergesort and Quicksort.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑