arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2503.21691cs.PL
收藏

地方能力图:Rust所有权和借贷保证的通用模型

Place Capability Graphs: A General-Purpose Model of Rust's Ownership and Borrowing Guarantees

University of British Columbia(不列颠哥伦比亚大学);ETH Zurich(苏黎世联邦理工学院);New York University(纽约大学)

Zachary Grannan, Aurea Bílá, Jonáš Fiala, Jasper Geer, Markus de Medeiros, Peter Müller, Alexander J. Summers

AI总结:

本文提出了一种名为地方能力图的模型,用于Rust所有权和借贷保证的验证和程序分析工具,支持超过97%的Rust函数。

摘要:

Rust新颖的类型系统因其提供的丰富的保证而成为验证和程序分析工具的有吸引力的目标,这些保证用于控制别名和可变性。然而,完全理解、提取和利用这些保证是微妙且具有挑战性的:现有的Rust类型检查模型要么支持一个较小的理想化语言,与现实世界的Rust代码脱节,要么在精确建模Rust借贷、复合类型存储它们、函数签名和循环方面存在严重限制。在本文中,我们提出了一个名为地方能力图的Rust类型检查的新模型,该模型克服了这些限制,并且可以直接从Rust编译器自身的程序表示和分析中计算出来。我们展示了我们的模型支持最流行的公共库中超过97%的Rust函数,并通过开发有前途的新原型版本的现有Flowistry和Prusti工具,证明了其作为通用验证和程序分析工具基础的适用性。

英文摘要:

Rust's novel type system has proved an attractive target for verification and program analysis tools, due to the rich guarantees it provides for controlling aliasing and mutability. However, fully understanding, extracting and exploiting these guarantees is subtle and challenging: existing models for Rust's type checking either support a smaller idealised language disconnected from real-world Rust code, or come with severe limitations in terms of precise modelling of Rust borrows, composite types storing them, function signatures and loops. In this paper, we present a novel model of Rust's type-checking called Place Capability Graphs, which lifts these limitations, and which can be directly calculated from the Rust compiler's own programmatic representations and analyses. We demonstrate that our model supports over 97% of Rust functions in the most popular public crates, and show its suitability as a general-purpose basis for verification and program analysis tools by developing promising new prototype versions of the existing Flowistry and Prusti tools.

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

↑