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

Oxide:锈的本质

Oxide: The Essence of Rust

Aaron Weiss, Olek Gierczak, Daniel Patterson, Amal Ahmed

摘要:

Rust声称通过弥合低级系统编程和高级应用程序编程之间的差距来推进工业编程。这使程序员能够构建更可靠和更有效的软件的论点的核心是借用检查器-一种旨在平衡类型系统表达性和可用性的所有权的新颖方法。然而,到目前为止,还没有一个核心类型系统能够捕捉到Rust的所有权和借用的概念,因此也没有研究Rust的基础。在这项工作中,我们开始通过开发Rust的借用检查器的类型系统帐户来捕获这种所有权模型的本质。我们介绍Oxide,一种接近源代码级Rust的形式化程序设计语言(但具有完全注释的类型)。这种演示需要一个新的生命周期的近似出处的引用,我们的类型系统是能够自动计算这个信息,通过子结构类型判断。我们使用progress和preservation为借用检查提供了类型安全的第一个语法证明。Oxide是一个更简单的借用检查公式-包括最近的功能,如非词汇生命周期-我们希望研究人员能够将其用作Rust工作的基础。

英文摘要:

Rust claims to advance industrial programming by bridging the gap between low-level systems programming and high-level application programming. At the heart of the argument that this enables programmers to build more reliable and efficient software is the borrow checker - a novel approach to ownership that aims to balance type system expressivity with usability. And yet, to date there is no core type system that captures Rust's notion of ownership and borrowing, and hence no foundation for research on Rust to build upon. In this work, we set out to capture the essence of this model of ownership by developing a type systems account of Rust's borrow checker. We present Oxide, a formalized programming language close to source-level Rust (but with fully-annotated types). This presentation takes a new view of lifetimes as an approximation of the provenances of references, and our type system is able to automatically compute this information through a substructural typing judgment. We provide the first syntactic proof of type safety for borrow checking using progress and preservation. Oxide is a simpler formulation of borrow checking - including recent features such as non-lexical lifetimes - that we hope researchers will be able to use as the basis for work on Rust.

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

↑