mirror of
https://github.com/kmc7468/cs220.git
synced 2025-12-12 21:08:45 +00:00
Strengthen the post-condition
This commit is contained in:
@@ -15,7 +15,7 @@ module BinarySearch
|
||||
requires { forall i1 i2 : int. 0 <= i1 < i2 < length a -> a[i1] <= a[i2] }
|
||||
ensures { 0 <= result <= length a }
|
||||
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 *)
|
||||
0 (* TODO *)
|
||||
|
||||
Reference in New Issue
Block a user