作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2026, Vol. 52 ›› Issue (2): 24-45. doi: 10.19678/j.issn.1000-3428.0069799

• 前沿观点与综述 • 上一篇    

操作系统形式规约与验证综述

王梓1, 王洪强2, 杨晓艺2, 兰雨晴1,2   

  1. 1. 北京航空航天大学网络空间安全学院, 北京 100191;
    2. 北京航空航天大学软件学院, 北京 100191
  • 收稿日期:2024-04-28 修回日期:2024-07-03 发布日期:2024-11-22
  • 作者简介:王梓(CCF学生会员),男,博士研究生,主研方向为操作系统形式化验证、系统安全;王洪强,博士研究生;杨晓艺(通信作者),博士、博士后,E-mail:xyyang001@buaa.edu.cn;兰雨晴,教授、博士。

Review of Formal Specification and Verification for Operating Systems

WANG Zi1, WANG Hongqiang2, YANG Xiaoyi2, LAN Yuqing1,2   

  1. 1. School of Cyber Science and Technology, Beihang Univeristy, Beijing 100191, China;
    2. School of Software, Beihang Univeristy, Beijing 100191, China
  • Received:2024-04-28 Revised:2024-07-03 Published:2024-11-22

摘要: 操作系统(OS)作为信息时代关键基础设施,广泛应用于军事、工业、医疗等核心领域。其可靠性与安全性直接决定关键领域运行稳定,漏洞易致系统崩溃、数据泄露等严重后果,因此构建系统化安全保障体系具有重要理论与工程价值。以"形式规约-形式验证-工程落地"为框架,梳理近十年该领域研究成果,剖析技术路径与实践应用。在形式规约层面,明确基于迁移系统等数学结构描述系统功能的模型规约与基于线性时序逻辑(LTL)定义安全、活性需求的性质规约的差异,从功能正确性和安全属性两个方面进行阐述,其中,功能正确性涵盖任务管理调度、内存分配回收、异常中断处理、任务间通信与文件系统读写一致性,安全属性聚焦访问控制的BLP模型与BIBA模型、分离内核多域隔离、信息流无干扰与无泄漏理论。在形式验证层面,阐述依托霍尔逻辑验证程序一致性的推理证明、基于LTL与计算树逻辑(CTL)验证时序属性的模型检测、属性验证标准化流程3类核心方法,并以首个通过机器证明实现功能正确与信息流无干扰的seL4微内核为案例,揭示理论到工程的转化路径。在工程应用上,总结汽车领域控制器局域网(CAN)总线通信验证、智能手机Android系统组件间通信鲁棒性检测的成果。本文的系统性梳理旨在为相关领域的研究奠定基础,为大语言模型提供数据集支持,并为最终的技术工程落地提供参考。

关键词: 操作系统, 形式化方法, 形式规约, 形式验证, 系统安全

Abstract: Operating Systems (OSs), which form a critical infrastructure in the information age, are widely used in core fields such as medical care, industries, and the military. Their reliability and security directly determine the operational stability of these key fields, while vulnerabilities can lead to serious consequences, including system crashes and data leakage. Hence, the construction of a systematic security assurance system would be of great theoretical and engineering value. This paper systematically reviews the research achievements in this field over the past decade based on the framework of ″formal specification—formal verification—engineering implementation″ and analyzes technical paths and practical applications. With regard to formal specification level, it clarifies the differences between model specifications that describe system functions based on mathematical structures, such as transition systems, and property specifications that define safety and liveness requirements based on Linear Temporal Logic (LTL). This analysis focuses on two key aspects: functional correctness and security attributes. Functional correctness covers task management scheduling, memory allocation and recycling, exception interrupt handling, inter-task communication, and file system read—write consistency, while security attributes focus on the BLP and BIBA models for access control, multidomain isolation in separation kernels, and noninterference and nonleakage theories of information flow. For formal verification, three core methods are considered: deductive proof, which verifies program consistency by relying on Hoare's logic; model checking, which verifies temporal properties based on LTL and Computation Tree Logic (CTL); and standardized process of property verification. Taking the seL4 microkernel, which is the first to achieve functional correctness and information flow non-interference through machine proof, as a case study, this discussion reveals the transformation from theory to engineering. With regard to engineering applications, the achievements in Controller Area Network (CAN) bus communication verification within the automotive field and robustness detection of intercomponent communication in the Android system of smartphones are summarized. This systematic review aims to establish a foundation for future research in related fields, provide dataset support for large language models, and provide a reference for the engineering implementation of these technologies.

Key words: Operating System (OS), formal method, formal specification, formal verification, system security

中图分类号: