We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following example generates invalid coma code:
use creusot_contracts::*; pub enum Q { Zero, Frac1(Int), } use Q::*; impl Invariant for Q { #[predicate] #[open] fn invariant(self) -> bool { true } } impl Q { #[logic] #[ensures(result.invariant())] fn mul(self, y: Q) -> Q { match (self, y) { (Zero, _) => Zero, (_, Zero) => Zero, (Frac1(n), Frac1(m)) => Frac1(n + m), } } }
.coma output (extract). The error is on the line with n + m:
n + m
... goal vc_mul : match (self, y) with | (Q'0.C_Zero, _) -> [%#stest0] invariant'0 (Q'0.C_Zero) | (_, Q'0.C_Zero) -> [%#stest0] invariant'0 (Q'0.C_Zero) | (Q'0.C_Frac1 n, Q'0.C_Frac1 m) -> [%#stest0] invariant'0 (Q'0.C_Frac1 (n + m)) end ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following example generates invalid coma code:
.coma output (extract). The error is on the line with
n + m
:The text was updated successfully, but these errors were encountered: