基于代码契约的资源契约研究
On Verifying Resource Contracts using Code Contracts
摘要:
在本文中,我们提出了一种方法来检查使用现成的静态分析器的资源消耗合同。我们提出了一组注释,以支持资源使用规范,特别是,动态内存消耗约束。由于动态内存可以由内存管理器回收,因此该资源的消耗不是单调的。规约语言可以以模块化方式表达存储器消耗和生存期属性。我们通过扩展代码契约的规约语言开发了一个概念验证的实现。为了验证这些注释的正确性,我们依赖于代码契约静态验证器和指向分析。我们还简要讨论了我们的方法来处理非线性表达式的可能扩展。
英文摘要:
In this paper we present an approach to check resource consumption contracts using an off-the-shelf static analyzer. We propose a set of annotations to support resource usage specifications, in particular, dynamic memory consumption constraints. Since dynamic memory may be recycled by a memory manager, the consumption of this resource is not monotone. The specification language can express both memory consumption and lifetime properties in a modular fashion. We develop a proof-of-concept implementation by extending Code Contracts' specification language. To verify the correctness of these annotations we rely on the Code Contracts static verifier and a points-to analysis. We also briefly discuss possible extensions of our approach to deal with non-linear expressions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。