RefinedRust: A Type System for High-Assurance Verification of Rust Programs

Author:

Gäher Lennard1ORCID,Sammler Michael1ORCID,Jung Ralf2ORCID,Krebbers Robbert3ORCID,Dreyer Derek1ORCID

Affiliation:

1. MPI-SWS, Saarland Informatics Campus, Germany

2. ETH Zurich, Zürich, Switzerland

3. Radboud University Nijmegen, Nijmegen, Netherlands

Abstract

Rust is a modern systems programming language whose ownership-based type system statically guarantees memory safety, making it particularly well-suited to the domain of safety-critical systems. In recent years, a wellspring of automated deductive verification tools have emerged for establishing functional correctness of Rust code. However, none of the previous tools produce foundational proofs (machine-checkable in a general-purpose proof assistant), and all of them are restricted to the safe fragment of Rust. This is a problem because the vast majority of Rust programs make use of unsafe code at critical points, such as in the implementation of widely-used APIs. We propose RefinedRust, a refinement type system—proven sound in the Coq proof assistant—with the goal of establishing foundational semi-automated functional correctness verification of both safe and unsafe Rust code. We have developed a prototype verification tool implementing RefinedRust. Our tool translates Rust code (with user annotations) into a model of Rust embedded in Coq, and then checks its adherence to the RefinedRust type system using separation logic automation in Coq. All proofs generated by RefinedRust are checked by the Coq proof assistant, so the automation and type system do not have to be trusted. We evaluate the effectiveness of RefinedRust by verifying a variant of Rust’s Vec implementation that involves intricate reasoning about unsafe pointer-manipulating code.

Funder

European Research Council

Publisher

Association for Computing Machinery (ACM)

Reference55 articles.

1. Andrew W. Appel. 2014. Program Logics for Certified Compilers. https://www.cambridge.org/de/academic/subjects/computer-science/programming-languages-and-applied-logic/program-logics-certified-compilers

2. Matt Asay. 2020. Why AWS loves Rust, and how we’d like to help. https://aws.amazon.com/de/blogs/opensource/why-aws-loves-rust-and-how-wed-like-to-help/ Last accessed 07 October 2021

3. Vytautas Astrauskas, Peter Müller, Federico Poli, and Alexander J. Summers. 2019. Leveraging Rust types for modular specification and verification. Proc. ACM Program. Lang., 3, OOPSLA (2019), 147:1–147:30. https://doi.org/10.1145/3360573 10.1145/3360573

4. The Rustonomicon authors. 2023. The nullable pointer optimization. https://doc.rust-lang.org/nomicon/ffi.html#the-nullable-pointer-optimization Last accessed 16 Nov 2023

5. The Rustonomicon authors. 2023. Vector implementation. https://doc.rust-lang.org/nomicon/vec/vec-final.html Last accessed 16 Nov 2023

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3