arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1812.03318cs.SE
收藏

Timsort C在Isabelle/HOL中的实现

A Verified Timsort C Implementation in Isabelle/HOL

Yu Zhang, Yongwang Zhao, David Sanan

摘要:

传统算法在现代软件中有着广泛的应用,对其进行形式化验证具有重要的意义。Timsort是一种复杂的混合稳定排序算法,它是由归并排序和插入排序发展而来的。虽然OpenJDK中的Timsort实现已经得到了形式化验证,但是在C程序设计语言中仍然没有一个标准的、经过形式化验证的Timsort实现。本文研究了Isabelle/HOL环境下Timsort的实现及其形式化验证。然后,我们手动生成一个C实现的Timsort从验证过的规范。由于RISML的C类具体语法,代码生成非常简单。C实现也通过一组随机测试用例进行了测试。

英文摘要:

Formal verification of traditional algorithms are of great significance due to their wide application in state-of-the-art software. Timsort is a complicated and hybrid stable sorting algorithm, derived from merge sort and insertion sort. Although Timsort implementation in OpenJDK has been formally verified, there is still not a standard and formally verified Timsort implementation in C programming language. This paper studies Timsort implementation and its formal verification using a generic imperative language - Simpl in Isabelle/HOL. Then, we manually generate an C implementation of Timsort from the verified Simpl specification. Due to the C-like concrete syntax of Simpl, the code generation is straightforward. The C implementation has also been tested by a set of random test cases.

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

↑