arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.05331cs.PLcs.CRcs.SE
收藏

C-rusted:在C语言中兼具Rust的优势且无其弊端

C-rusted: The Advantages of Rust, in C, without the Disadvantages

Roberto Bagnara, Abramo Bagnara, Federico Serafini

AI总结:

本研究提出C-rusted技术,通过对C程序部分注解表达资源属性等信息,兼容标准C编译工具链,经静态验证无错的注解代码可避免大量逻辑、安全及运行时错误,兼具Rust优势且无其弊端。

摘要:

C-rusted是一项创新技术,可对C程序进行(部分)注解,以此表达:语言、系统及用户定义资源的所有权、排他性与可共享性;对象的动态属性及其在程序执行过程中的演化方式;标称类型与子类型。经(部分)注解的C程序可通过任何能处理ISO C代码的未修改版本编译工具链进行翻译。已注解的C程序部分可通过静态分析验证:若静态分析器未标记错误,则可证明注解之间、注解与被注解C代码之间均一致,在此情况下,上述已注解部分可证明不会出现一大类逻辑、安全及运行时错误。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑