Datasets:
File size: 630 Bytes
c62beea | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | use vstd::prelude::*;
fn main() {}
verus!{
fn f1_contains_z(text: &[u8]) -> (result: bool)
{
let mut index = 0;
while index < text.len()
{
if text[index] == 90 || text[index] == 122 {
return true;
}
index += 1;
}
false
}
spec fn step1(__hp0: Seq<u8>, outp: bool) -> bool {
(outp == (exists|i: int| 0 <= i < __hp0.len() && (__hp0[i] == 90 || __hp0[i] == 122)))
}
fn chain_driver(text: &[u8]) -> (r_final: bool)
ensures
step1(text@, r_final),
{
let x1 = f1_contains_z(text);
proof {
assert(step1(text@, x1));
}
x1
}
} // verus!
|