一句话:提出自底向上精化方法,用局部归纳不变式关联抽象模型与 Rust 实现,并可复用现成验证工具。
精化可将抽象系统模型与可执行程序关联,使模型性质传递到实现,但现有方法或生成低效代码,或对代码与证明结构限制过严。本文提出一种新的自底向上精化方法:用带守卫迁移系统表达抽象模型,并引入局部归纳不变式,将抽象模型局部关联到具体状态;该方式比标准耦合不变式更灵活,支持多种程序结构、数据表示和证明结构。作者将其实现为 Rust 库,利用 Rust 类型系统管理守卫所有权,从而可配合现成 Rust 验证工具使用。案例研究包括 Memcached 的并发实现,表明方法具有实用性。
Refinement relates an abstract system model to a concrete, executable program, such that properties established for the abstract model carry over to the concrete implementation. Refinement has been used successfully in the development of substantial verified systems. Nevertheless, existing refinement techniques have limitations that impede their practical usefulness. Top-down refinement techniques that automatically generate executable code generally produce implementations with sub-optimal performance. Bottom-up refinement allows one to reason about existing, efficient implementations, but imposes strict requirements on the structure of the code, the structure of the refinement proofs, as well as the employed verification logic and tools. In this paper, we present a novel bottom-up refinement methodology that removes these limitations. Our methodology usesthe familiar notion of guarded transition systems to express abstract models, but combines guards with a novel notion of locally inductive invariants to relate the abstract model locally to concrete state. This approach is muchmore flexible than standard coupling invariants; in particular, it supports a wide range of program structures, data representations, and proof structures. We integrate our methodology as a library into Rust, leveraging the Rust type system to reason about ownership of guards. This integration allows oneto use our methodology with an off-the-shelf Rust verification tool. It also facilitates practical applications, as we demonstrate on a number of substantial case studies including a concurrent implementation of Memcached.
@article{paperbot2944,
title = {A Refinement Methodology for Distributed Programs in Rust},
author = {Aurel Bílý and João Pereira and Peter Müller},
journal = {Proceedings of the ACM on Programming Languages},
volume = {9},
number = {OOPSLA2},
year = {2025},
doi = {10.1145/3763119}
}