Alerus is a framework for verifying probabilistic Rust programs based on Verus, a verification tool for Rust that supports SMT-based automation and separation-logic-inspired reasoning features and extends Verus with support for probabilistic reasoning while retaining these expressive features.
Abstract
Recent work has developed many techniques for formally verifying probabilistic programs. However, existing verification frameworks for probabilistic programs are restricted to idealized languages designed for verification. As a result, they cannot be used to verify off-the-shelf probabilistic programs written in standard languages. In contrast, for non-probabilistic programs, a number of verification tools now support verifying realistic code written in widely used languages such as Go, C, and Rust. To verify probabilistic programs written in these languages, it would be useful to be able to reuse, as much as possible, the extensive development work that has gone into such tools. This paper presents Alerus, a framework for verifying probabilistic Rust programs. Alerus is based on Verus, a verification tool for Rust that supports SMT-based automation and separation-logic-inspired reasoning features. Alerus extends Verus with support for probabilistic reasoning while retaining these expressive features. To do so, Alerus uses a lightweight encoding of probabilistic error credits, a form of ghost state for randomized reasoning introduced in the Eris program logic. By deriving an appropriate specification using error credits, Alerus supports verifying the correctness of randomized sampling algorithms. We use this technique to verify several sampling routines for discrete distributions, including samplers for the discrete Gaussian distributions, the alias method, and the fast loaded dice roller. We establish the soundness of our error credit extension by adapting VerusBelt, a recently developed logical relations model of Verus that encodes its features in terms of the Iris separation logic. To do so, we replace the use of Iris's standard weakest precondition in this model with Eris's probabilistic weakest precondition instead. The resulting soundness proof is fully mechanized in Rocq.
This paper develops mechanized foundations for writing formal correctness proofs for both HeyVL encodings and PP verification techniques that are grounded in the basics of probability theory and formalizes Markov decision processes (MDPs).
Oliver Bøving, Christoph Matheja· International Conference on...· 0 citations
How to extend RefinedRust with several of the high-level abstractions that Rust provides, including traits, closures, and iterators, and in a manner such that they can be used in conjunction with unsafe code.
Lennard Gäher, Vincent Lafeychine, Sascha Kehrli et al.· Proceedings of the ACM on Pr...· 0 citations
Three applications, leveraging on the mechanisms of Eiffel and design by contract, hold significant promise to address some of the challenges of program testing, software maintenance, and automatic program repair.
Li Huang, Bertrand Meyer, M. Oriol· Communications of the ACM· 0 citations
This work presents a technique for compiling the synchronous fragment of STL (SSTL) into synchronous observers in the dataflow language Lustre, and contributes an interactive visualiser that renders a property's three-valued verdict over an editable trace.
Logan Kenwright, Partha S. Roop, Sobhan Chatterjee et al.· 0 citations
This paper translates Rust code containing RISC-V inline assembly into pure Rust code by emulating each instruction using a machine model extracted from the official RISC-V Sail ISA specification, and demonstrates how each category is handled by the translation.
Charly Castes, Gurvan Debaussart, Thomas Bourgeat· Proceedings of the 14th Work...· 0 citations
SymCert is presented, a framework implemented in Lean for building verified SMT-based analyses of Cedar policies that provide a verified symbolic compiler and authorizer for reducing policies to SMT formulas, a hierarchy enforcer for ensuring well-formedness of counterexamples, and a counterex-ample extractor for provi...
Emina Torlak· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.