C*: Unifying Programming and Verification in C

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Cao, Yiyuan, Zhuang, Jiayi, Chen, Houjin, Fan, Jinkai, Xu, Wenbo, Wang, Zhiyi, Wang, Di, Cao, Qinxiang, Xiong, Yingfei, Zhao, Haiyan, Hu, Zhenjiang
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866908298987438080
author Cao, Yiyuan
Zhuang, Jiayi
Chen, Houjin
Fan, Jinkai
Xu, Wenbo
Wang, Zhiyi
Wang, Di
Cao, Qinxiang
Xiong, Yingfei
Zhao, Haiyan
Hu, Zhenjiang
author_facet Cao, Yiyuan
Zhuang, Jiayi
Chen, Houjin
Fan, Jinkai
Xu, Wenbo
Wang, Zhiyi
Wang, Di
Cao, Qinxiang
Xiong, Yingfei
Zhao, Haiyan
Hu, Zhenjiang
contents Ensuring the correct functionality of systems software, given its safety-critical and low-level nature, is a primary focus in formal verification research and applications. Despite advances in verification tooling, conventional programmers are rarely involved in the verification of their own code, resulting in higher development and maintenance costs for verified software. A key barrier to programmer participation in verification practices is the disconnect of environments and paradigms between programming and verification practices, which limits accessibility and real-time verification. We introduce C*, a proof-integrated language design for C programming. C* extends C with verification capabilities, powered by a symbolic execution engine and an LCF-style proof kernel. It enables real-time verification by allowing programmers to embed proof-code blocks alongside implementation code, facilitating interactive updates to the current proof state. Its expressive and extensible proof support allows users to build reusable libraries of logical definitions, theorems, and programmable proof automation. Crucially, C* unifies implementation and proof code development by using C as the common language. We implemented a prototype of C* and evaluated it on a representative benchmark of small C programs and a challenging real-world case study: the attach function of pKVM's buddy allocator. Our results demonstrate that C* supports the verification of a broad subset of C programming idioms and effectively handles complex reasoning tasks in real-world scenarios.
format Preprint
id arxiv_https___arxiv_org_abs_2504_02246
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle C*: Unifying Programming and Verification in C
Cao, Yiyuan
Zhuang, Jiayi
Chen, Houjin
Fan, Jinkai
Xu, Wenbo
Wang, Zhiyi
Wang, Di
Cao, Qinxiang
Xiong, Yingfei
Zhao, Haiyan
Hu, Zhenjiang
Programming Languages
Software Engineering
Ensuring the correct functionality of systems software, given its safety-critical and low-level nature, is a primary focus in formal verification research and applications. Despite advances in verification tooling, conventional programmers are rarely involved in the verification of their own code, resulting in higher development and maintenance costs for verified software. A key barrier to programmer participation in verification practices is the disconnect of environments and paradigms between programming and verification practices, which limits accessibility and real-time verification. We introduce C*, a proof-integrated language design for C programming. C* extends C with verification capabilities, powered by a symbolic execution engine and an LCF-style proof kernel. It enables real-time verification by allowing programmers to embed proof-code blocks alongside implementation code, facilitating interactive updates to the current proof state. Its expressive and extensible proof support allows users to build reusable libraries of logical definitions, theorems, and programmable proof automation. Crucially, C* unifies implementation and proof code development by using C as the common language. We implemented a prototype of C* and evaluated it on a representative benchmark of small C programs and a challenging real-world case study: the attach function of pKVM's buddy allocator. Our results demonstrate that C* supports the verification of a broad subset of C programming idioms and effectively handles complex reasoning tasks in real-world scenarios.
title C*: Unifying Programming and Verification in C
topic Programming Languages
Software Engineering
url https://arxiv.org/abs/2504.02246