Flow-sensitive type systems offer an elegant way to ensure memory-safety in programming languages. Unfortunately, their adoption in new or existing languages is often hindered by a painful effort to implement or integrate them into compilers. This paper presents early results in our effort to alleviate this task. We introduce Fuel, a type capability-based library that can be plugged onto a compiler toolchain to check for memory-safety properties. Fuel builds upon well-established ideas in the domain of capability-based system, and adds a mechanism leveraging dynamic checks to recover capabilities where static reasoning is either too difficult or impossible. This approach allows the analysis to potentially cover situations where a typical type system might not be expressive enough to statically reason about memory safety.
翻译:流动敏感型系统为确保程序化语言的记忆安全提供了一种优雅的方法,但不幸的是,以新的或现有语言采用这些系统往往受到痛苦努力的阻碍,难以落实这些系统或将其纳入汇编者之中。本文件介绍了我们努力减轻这项任务的早期成果。我们引入了燃料,这是一个基于能力型图书馆,可将其插入一个汇编工具链,以检查记忆安全特性。燃料基于能力型系统领域的既定想法,并增加了一种机制,在静态推理过于困难或不可能的情况下,利用动态检查来恢复能力。这种方法使得分析有可能涵盖典型类型系统可能无法表达到足以固定地解释记忆安全性的情况。