C to Checked C by 3C
arxiv.org
arxiv.org
Checked C is essentially a gradually typed spatially safe C—checked pointers are backwards-binary compatible with legacy pointers, and the language allows them to be added piecemeal, rather than necessarily all at once, so that safety retrofitting can be incremental.
This paper presents a semi-automated process for porting a legacy C program to Checked C. The process centers on 3C, a static analysis-based annotation tool. 3C employs two novel static analysis algorithms—typ3c and boun3c—to annotate legacy pointers as checked pointers, and to infer array bounds annotations for pointers that need them...
Experiments on 11 programs totaling 319KLoC show 3C to be effective at inferring checked pointer types, and experience with previously and newly ported code finds 3C works well when combined with human-driven refactoring...."
PDF: https://arxiv.org/ftp/arxiv/papers/2203/2203.13445.pdf
Checked C Project:
https://www.microsoft.com/en-us/research/project/checked-c/
https://github.com/microsoft/checkedc
"Checked C: Making C Safe by Extension":
https://www.microsoft.com/en-us/research/uploads/prod/2018/0...