Creusot 帮助你证明 Rust 代码的正确性。
Creusot helps you prove your Rust code is correct

原始链接: https://github.com/creusot-rs/creusot/tree/master

Creusot 是一款专为 Rust 设计的演绎验证工具,旨在通过消除恐慌(panics)、溢出和断言失败来确保代码安全。除基础安全性外,用户还可以添加标注以执行形式化功能验证。 该工具通过将 Rust 代码转换为 Why3 平台的中间语言 Coma 来发挥作用,使用户能够利用 Why3 强大的验证能力。Creusot 效能的一个突出案例是 *CreuSAT*,这是一个用 Rust 编写并经过完全验证的 SAT 求解器。 若要开始使用,用户需要一个兼容的 Rust 工具链(通过 `rustup` 安装)以及 OCaml 包管理器(`opam`)。安装过程包括克隆 Creusot 仓库,并按照官方指南中的设置说明进行操作。如需进一步帮助,可通过讨论论坛和 Zulip 聊天室获取社区支持。学术用户请引用该项目的 ICFEM '22 出版物,有意贡献的开发者可查阅 `CONTRIBUTING.md` 文档。仓库的测试套件中提供了大量已验证代码的示例。

Hacker News | 最新 | 往期 | 评论 | 提问 | 展示 | 招聘 | 提交 | 登录 Creusot 帮助您证明 Rust 代码的正确性 (github.com/creusot-rs) 14 分,由 fanf2 发布于 49 分钟前 | 隐藏 | 往期 | 收藏 | 讨论 | 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Creusot is a deductive verifier for Rust code. It verifies your code is safe from panics, overflows, and assertion failures. By adding annotations you can take it further and verify your code does the correct thing.

Creusot works by translating Rust code to Coma, an intermediate verification language of the Why3 Platform. Users can then leverage the full power of Why3 to (semi)-automatically discharge the verification conditions!

See ARCHITECTURE.md for technical details.

If you need help using Creusot or would like to discuss, you can post on the discussions forum or join our Zulip chat!

If you would like to cite Creusot in academic contexts, we encourage you to use our ICFEM'22 publication.

To get an idea of what verifying a program with Creusot looks like, we encourage you to take a look at some of our test suite:

More examples are found in examples and tests/should_succeed.

Projects built with Creusot

  • CreuSAT is a verified SAT solver written in Rust and verified with Creusot. It really pushes the tool to its limits and gives an idea of what 'use in anger' looks like.
  • Another big project is in the works :)
  1. Install rustup, to get the suitable Rust toolchain
  2. Get opam, the package manager for OCaml
  3. Clone the creusot repository, then move into the creusot directory.
    git clone https://github.com/creusot-rs/creusot
    cd creusot
  4. Install Creusot:
  5. Check that the installation succeeded:

See the Creusot guide: Installation for more details.

  1. Enter the cloned Creusot git repository used previously to install Creusot
  2. Update Creusot's sources:
  3. Update opam's package listing:
  4. Reinstall Creusot:

See CONTRIBUTING.md for information on the developer workflow for hacking on the Creusot codebase.

联系我们 contact @ memedata.com