You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My proposal: have an Ident type in the Why3 crate with a string and a unique identifier. The Why3 crates generates colision-free names when printing (while trying to use the string when possible), by maintaining the local environment. The Creusot crate needs to be audited to use this new API.
While working on this I found a bug. It was probably to be expected given the current state of things. Now we have a concrete test case:
externcrate creusot_contracts;use creusot_contracts::*;#[open]#[logic]#[ensures(result == (1,2))]pubfnf() -> (Int,Int){let x = 2;({let x = 1; x}, x)}
Translated VC:
goal vc_f'0 : let x = 2 in let x_1 = 1 in [%#sxxx0] (x_1, x_1) = (1, 2)
The VCGen is written in CPS. When it finishes translating the first component {let x = 1; x} of the pair, it calls a continuation to translate the second component x while the x = 1 binding is still in scope.
The add_bounds/pop_bounds calls here are basically just broken:
My proposal: have an
Ident
type in the Why3 crate with a string and a unique identifier. The Why3 crates generates colision-free names when printing (while trying to use the string when possible), by maintaining the local environment. The Creusot crate needs to be audited to use this new API.This is related with #108 .
The text was updated successfully, but these errors were encountered: