mirror of
https://github.com/kmc7468/cs220.git
synced 2026-11-04 00:00:33 +09:00
Strengthen the post-condition
This commit is contained in:
1 parent
85fd0b333b
commit
3a463b55b1
1 file changed
+1
-1
@@ -15,7 +15,7 @@ module BinarySearch
|
|||||||
requires { forall i1 i2 : int. 0 <= i1 < i2 < length a -> a[i1] <= a[i2] }
|
requires { forall i1 i2 : int. 0 <= i1 < i2 < length a -> a[i1] <= a[i2] }
|
||||||
ensures { 0 <= result <= length a }
|
ensures { 0 <= result <= length a }
|
||||||
ensures { forall i: int. 0 <= i < result -> a[i] < v }
|
ensures { forall i: int. 0 <= i < result -> a[i] < v }
|
||||||
ensures { result < length a -> a[result] >= v }
|
ensures { forall i: int. result <= i < length a -> v <= a[i] }
|
||||||
=
|
=
|
||||||
(* IMPORTANT: DON'T MODIFY THE ABOVE LINES *)
|
(* IMPORTANT: DON'T MODIFY THE ABOVE LINES *)
|
||||||
0 (* TODO *)
|
0 (* TODO *)
|
||||||
|
|||||||
Reference in new issue
Block a user