Towards a practical high-assurance systems programming language
Authors
School of Computer Science and Engineering
UNSW,
Sydney 2052, Australia
Abstract
Writing correct and performant low-level systems code is a notoriously demanding job, even for experienced developers. To make the matter worse, formally reasoning about their correctness properties introduces yet another level of complexity to the task. It requires considerable expertise in both systems programming and formal verification. The development can be extremely costly due to the sheer complexity of the systems and the nuances in them, if not assisted with appropriate tools that provide abstraction and automation.
Cogent is designed to alleviate the burden on developers when writing and verifying systems code. It is a high-level functional language with a certifying compiler, which automatically proves the correctness of the compiled code and also provides a purely functional abstraction of the low-level program to the developer. Equational reasoning techniques can then be used to prove functional correctness properties of the program on top of this abstract semantics, which is notably less laborious than directly verifying the C code.
To make Cogent a more approachable and effective tool for developing real-world systems, we further strengthen the framework by extending the core language and its ecosystem. Specifically, we enrich the language to allow users to control the memory representation of algebraic data types, while retaining the automatic proof with a data layout refinement calculus. We repurpose existing tools in a novel way and develop an intuitive foreign function interface, which provides users a seamless experience when using Cogent in conjunction with native C. We augment the Cogent ecosystem with a property-based testing framework, which helps developers better understand the impact formal verification has on their programs and enables a progressive approach to producing high-assurance systems. Finally we explore refinement type systems, which we plan to incorporate into Cogent for more expressiveness and better integration of systems programmers with the verification process.
BibTeX Entry
@phdthesis{Chen:phd, address = {Sydney, Australia}, author = {Zilin Chen}, doi = {https://doi.org/10.26190/unsworks/24733}, month = mar, paperurl = {https://trustworthy.systems/publications/papers/Chen%3Aphd.pdf}, school = {UNSW}, title = {Towards A Practical High-Assurance Systems Programming Language}, url = {http://hdl.handle.net/1959.4/101026}, year = {2023} }