libhoare
libhoare copied to clipboard
Design by contract style assertions for Rust
When I try to build my project with libhoare I'll get many compilation errors. I added the dependency to my Cargo.toml like this: `[dependencies.hoare] git = "https://github.com/nick29581/libhoare.git"` As a result...
This crate is awesome by it's idea/implemetation. Why isn't it developed anymore?
I used these a few times out of laziness, should use the attr's span, just requires threading it through a few function calls and the ReturnFolder struct.
http://docs.adacore.com/spark2014-docs/html/ug/spark_2014.html#subprogram-contracts
Would be good to print values of all variables in the predicate which implement `Show`. Maybe also narrowing down which clause of the predicate failed (assuming it is a bunch...
Just like assertions. Not sure what the syntax should look like.
Example (from Reddit user thiez): ``` #[postcond = "self.x=\old(self.x)+1"] fn inc(&mut self) { self.x += 1; } ``` The `/old` function in this example allows us to speak about the...