Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Kha/electrolysis
Simple verification of Rust programs via functional purification in Lean 2(!)
https://github.com/Kha/electrolysis
Last synced: 2 months ago
JSON representation
Simple verification of Rust programs via functional purification in Lean 2(!)
- Host: GitHub
- URL: https://github.com/Kha/electrolysis
- Owner: Kha
- License: other
- Created: 2016-03-15T20:31:53.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-06T09:41:13.000Z (almost 8 years ago)
- Last Synced: 2024-05-22T20:32:01.214Z (8 months ago)
- Language: Lean
- Homepage:
- Size: 2.64 MB
- Stars: 325
- Watchers: 14
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-security - electrolysis - formal verification of Rust programs with the Lean theorem prover (Vulnerability Assessment / Formal Verification)
- awesome-rust-formalized-reasoning - electrolysis - tool for formally verifying Rust programs by transpiling them into the Lean 2 theorem prover. (Projects / Verification)
README
# electrolysis
[![Gitter](https://badges.gitter.im/Kha/electrolysis.svg)](https://gitter.im/Kha/electrolysis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## About
A tool for formally verifying Rust programs by transpiling them into definitions in the [Lean](http://leanprover.github.io/) theorem prover.
* **Masters thesis: Simple Verification of Rust Programs via Functional Purification - [thesis](https://github.com/Kha/masters-thesis/raw/master/main.pdf)|[presentation](http://kha.github.io/electrolysis/presentation.pdf)**
* [Official reference and coverage](http://kha.github.io/electrolysis/)
* [Blog post: A Formal Verification of Rust's Binary Search Implementation](https://kha.github.io/2016/07/22/formally-verifying-rusts-binary-search.html)## Installation
Because electrolysis uses `rustc`'s unstable private API, you need a nightly compiler. Because the API is _highly_ unstable, you need a very specific nightly version, for which you should use [rustup.rs](https://www.rustup.rs/). After installing `rustup`, you can build this project by executing
```
electrolysis$ rustup override add $(cat rust-nightly-version)
electrolysis$ rustup component add rust-src
electrolysis$ cargo run core
```
This will build the project and export all code from the `core` crate necessary for `binary_search` (see also [thys/core/config.toml](thys/core/config.toml)) into [thys/core/generated.lean](thys/core/generated.lean) (this file already exists in case you just want to examine the correctness proof).