C-rusted: The Advantages of Rust, in C, without the Disadvantages
Roberto Bagnara, Abramo Bagnara, Federico Serafini

TL;DR
C-rusted introduces a method to annotate C programs with ownership, resource, and type information, enabling static analysis to prevent many errors while maintaining compatibility with standard C toolchains.
Contribution
It presents a novel annotation system for C that enhances static analysis capabilities without requiring changes to existing compilation tools.
Findings
Annotations enable static detection of resource and type errors.
Annotated code can be verified for correctness using existing C compilers.
The approach reduces runtime errors and security vulnerabilities.
Abstract
C-rusted is an innovative technology whereby C programs can be (partly) annotated so as to express: ownership, exclusivity and shareability of language, system and user-defined resources; dynamic properties of objects and the way they evolve during program execution; nominal typing and subtyping. The (partially) annotated C programs can be translated with unmodified versions of any compilation toolchain capable of processing ISO C code. The annotated C program parts can be validated by static analysis: if the static analyzer flags no error, then the annotations are provably coherent among themselves and with respect to annotated C code, in which case said annotated parts are provably exempt from a large class of logic, security, and run-time errors.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSecurity and Verification in Computing · Software Reliability and Analysis Research · Logic, programming, and type systems
