Code Monkey home page Code Monkey logo

kani's Introduction

Kani Rust Verifier

The Kani Rust Verifier aims to be a bit-precise model-checker for Rust. Kani ensures that unsafe Rust code is actually safe, and verifies that safe Rust code will not panic at runtime.

Installing Kani

Until an official release is out, you can read documentation on how to check out and build Kani yourself.

What can Kani do?

Our documentation covers:

How does Kani work?

You write a proof harness that looks a lot like a test harness, except that you can check all possible values using kani::any():

use my_crate::{function_under_test, is_valid, meets_specification};

#[kani::proof]
fn check_my_property() {
   let input = kani::any();
   kani::assume(is_valid(input));
   let output = function_under_test(input);
   assert!(meets_specification(input, output));
}

Kani will then prove that all valid inputs will produce acceptable outputs, without panicking or executing undefined behavior. You can learn more about how to use Kani by following the Kani tutorial.

Security

See SECURITY for more information.

Developer guide

See Kani developer documentation.

License

Kani

Kani is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

Rust compiler

Kani contains code from the Rust compiler. The rust compiler is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See the Rust repository for details.

kani's People

Contributors

bors avatar brson avatar alexcrichton avatar centril avatar nikomatsakis avatar guillaumegomez avatar oli-obk avatar manishearth avatar pcwalton avatar ralfjung avatar johntitor avatar bjorn3 avatar graydon avatar nrc avatar dylan-dpc avatar eddyb avatar kennytm avatar steveklabnik avatar estebank avatar petrochenkov avatar topecongiro avatar matthiaskrgr avatar mark-simulacrum avatar catamorphism avatar pnkfelix avatar frewsxcv avatar flip1995 avatar varkor avatar michaelwoerister avatar marijnh avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.