RefinedC: Automating the foundational verification of C code with refined ownership types

Sammler MJ, Lepigre R, Krebbers R, Memarian K, Dreyer D, Garg D. 2021. RefinedC: Automating the foundational verification of C code with refined ownership types. Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation. PLDI: Conference on Programming Language Design and Implementation, 158–174.

Download (ext.)

Conference Paper | Published | English

Scopus indexed
Author
Sammler, Michael JoachimISTA; Lepigre, Rodolphe; Krebbers, Robbert; Memarian, Kayvan; Dreyer, Derek; Garg, Deepak
Abstract
Given the central role that C continues to play in systems software, and the difficulty of writing safe and correct C code, it remains a grand challenge to develop effective formal methods for verifying C programs. In this paper, we propose a new approach to this problem: a type system we call RefinedC, which combines ownership types (for modular reasoning about shared state and concurrency) with refinement types (for encoding precise invariants on C data types and Hoare-style specifications for C functions). RefinedC is both automated (requiring minimal user intervention) and foundational (producing a proof of program correctness in Coq), while at the same time handling a range of low-level programming idioms such as pointer arithmetic. In particular, following the approach of RustBelt, the soundness of the RefinedC type system is justified semantically by interpretation into the Coq-based Iris framework for higher-order concurrent separation logic. However, the typing rules of RefinedC are also designed to be encodable in a new “separation logic programming” language we call Lithium. By restricting to a carefully chosen (yet expressive) fragment of separation logic, Lithium supports predictable, automatic, goal-directed proof search without backtracking. We demonstrate the effectiveness of RefinedC on a range of representative examples of C code.
Publishing Year
Date Published
2021-06-18
Proceedings Title
Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation
Publisher
Association for Computing Machinery
Page
158-174
Conference
PLDI: Conference on Programming Language Design and Implementation
Conference Location
virtual
Conference Date
2021-06-20 – 2021-06-25
IST-REx-ID

Cite this

Sammler MJ, Lepigre R, Krebbers R, Memarian K, Dreyer D, Garg D. RefinedC: Automating the foundational verification of C code with refined ownership types. In: Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation. Association for Computing Machinery; 2021:158-174. doi:10.1145/3453483.3454036
Sammler, M. J., Lepigre, R., Krebbers, R., Memarian, K., Dreyer, D., & Garg, D. (2021). RefinedC: Automating the foundational verification of C code with refined ownership types. In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation (pp. 158–174). virtual: Association for Computing Machinery. https://doi.org/10.1145/3453483.3454036
Sammler, Michael Joachim, Rodolphe Lepigre, Robbert Krebbers, Kayvan Memarian, Derek Dreyer, and Deepak Garg. “RefinedC: Automating the Foundational Verification of C Code with Refined Ownership Types.” In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation, 158–74. Association for Computing Machinery, 2021. https://doi.org/10.1145/3453483.3454036.
M. J. Sammler, R. Lepigre, R. Krebbers, K. Memarian, D. Dreyer, and D. Garg, “RefinedC: Automating the foundational verification of C code with refined ownership types,” in Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation, virtual, 2021, pp. 158–174.
Sammler MJ, Lepigre R, Krebbers R, Memarian K, Dreyer D, Garg D. 2021. RefinedC: Automating the foundational verification of C code with refined ownership types. Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation. PLDI: Conference on Programming Language Design and Implementation, 158–174.
Sammler, Michael Joachim, et al. “RefinedC: Automating the Foundational Verification of C Code with Refined Ownership Types.” Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation, Association for Computing Machinery, 2021, pp. 158–74, doi:10.1145/3453483.3454036.
All files available under the following license(s):
Copyright Statement:
This Item is protected by copyright and/or related rights. [...]

Link(s) to Main File(s)
Access Level
OA Open Access

Export

Marked Publications

Open Data ISTA Research Explorer

Search this title in

Google Scholar