| 注册
首页|期刊导航|计算机技术与发展|基于Frama-C的快速排序算法的形式化验证

基于Frama-C的快速排序算法的形式化验证

牟欣雨 王旭 江建国

计算机技术与发展2026,Vol.36Issue(9):24-30,7.
✕
计算机技术与发展2026,Vol.36Issue(9):24-30,7.DOI:10.20165/j.cnki.ISSN1673-629X.2026.0081

基于Frama-C的快速排序算法的形式化验证

Formal Verification of Quicksort Algorithm Based on Frama-C

牟欣雨 1王旭 1江建国1

作者信息

  • 1. 辽宁师范大学 数学学院,辽宁 大连 116029
  • 折叠

摘要

Abstract

As a classic divide-and-conquer sorting algorithm,Quicksort is widely used in fundamental software domains such as operating systems,databases,and embedded systems.While C.A.R.Hoare provided a proof of correctness for the algorithm itself upon its intro-duction,systematic verification of its concrete implementations—particularly in C—remains underexplored.The C language implementa-tion of the Quicksort algorithm involves recursion,pointer manipulation,and intricate partitioning logic,making it susceptible to functional errors(such as non-strictly ordered output or missing elements)and security vulnerabilities(such as out-of-bounds array access or non-terminating recursion).To address these issues,we employ the Frama-C platform and its WP plugin to conduct formal verification of a C implementation of Quicksort.By crafting precise ACSL specifications that define functional contracts and loop invariants,and by lever-aging automated theorem provers such as Alt-Ergo,Z3,and CVC4,we verify the correctness of the code.Experimental results confirm that Frama-C is capable of verifying both functional correctness and termination of the Quicksort C program,thereby providing strong as-surance for the reliable deployment of Quicksort in safety-critical systems.

关键词

程序验证/快速排序/定理证明器/Hoare逻辑/Frama-C

Key words

program verification/Quicksort/theorem prover/Hoare logic/Frama-C

分类

信息技术与安全科学

引用本文复制引用

牟欣雨,王旭,江建国..基于Frama-C的快速排序算法的形式化验证[J].计算机技术与发展,2026,36(9):24-30,7.

计算机技术与发展

1673-629X

访问量0
|
下载量0
段落导航相关论文