| 摘要: |
| 基于机器定理证明的形式验证技术不受状态空间限制,是保证软件正确性、避免因潜在软件缺陷带来严重损失的重要方法.文件比较算法(file comparison algorithm)是一类成员众多,应用极为广泛,跨越生物信息学、情报检索、网络安全等多个应用领域的基础算法.在交互式定理证明器Isabelle/HOL中对Miller和Myers在1985年提出的基于行的文件比较算法fcomp做了形式化,改正了算法关于边界变量迭代的一个小错误,证明了改正后算法的可终止性和正确性;对算法时间复杂性做了完全形式化的分析,印证了算法的非形式化分析结论,为今后更多文件比较算法的形式验证提供了可供借鉴的经验. |
| 关键词: 文件比较算法 fcomp 交互式定理证明 Isabelle/HOL |
| DOI:10.13328/j.cnki.jos.005098 |
| 分类号: |
| 基金项目:江苏省自然科学基金(BK20130070) |
|
| Verification of File Comparison Algorithm fcomp in Isabelle/HOL |
|
SONG Li-Hua1, WANG Hai-Tao2, JI Xiao-Jun1, ZHANG Xing-Yuan1
|
|
1.College of Command Information Systems, PLA University of Science and Technology, Nanjing 210007, China;2.Information Management Center, PLA University of Science and Technology, Nanjing 210014, China
|
| Abstract: |
| Being unbound to the state space size, mechanical theorem proving is an important method in ensuring software's correctness and avoiding serious damage from program bugs. File comparison algorithms constitute a large family of algorithms which find wide range of application domains including bio-informatics, information retrieval and network security. This paper presents a work on formalization of fcomp, an efficient line oriented file comparison algorithm suggested by Miller and Myers in 1985, in the interactive theorem prover Isabelle/HOL. A small bug in fcomp's bound variable iteration is identified, and the termination and correctness of the modified algorithm is established. Formal analysis of time complexity is also performed which coincides with the algorithm designers' own results. The presented work lays a valuable foundation for subsequent formal checking of other file comparison algorithms. |
| Key words: file comparison algorithm fcomp interactive theorem proving Isabelle/HOL |