PV-Bench / experiments /t2 /examples /D06 /annotated.c
cielseven's picture
add the experiment harnesses for t1 to t4 and t3-flat
28adce7
Raw History Blame Contribute Delete
393 Bytes
int bounded_power_of_two()
/*@ Require emp
Ensure exists t, 0 < t && t < 10 && __return == (1 << (t + 2)) */
{
return 32;
}
int given_of_marked_call()
/*@ Require emp
Ensure exists u, __return == (1 << u) && u >= 2 */
{
int x = bounded_power_of_two() /*@ where @mark call_x */;
//@ Given t of call_x
//@ x == 1 << (t + 2)
//@ exists u, x == (1 << u) && u >= 2
return x;
}