diff --git a/Bench/123-get_odd_collatz.py b/Bench/123-get_odd_collatz.py index 2e8b554..4ff7280 100644 --- a/Bench/123-get_odd_collatz.py +++ b/Bench/123-get_odd_collatz.py @@ -78,6 +78,7 @@ def get__odd__collatz__unsorted(n : int) -> List[int]: Ensures(Forall(int, lambda d_2_i_: not (((1) <= (d_2_i_)) and ((d_2_i_) < (len(Result())))) or (((Result())[d_2_i_]) == (next__odd__collatz((Result())[(d_2_i_) - (1)]))))) # post-conditions-end + # impl-start odd__collatz = list([int(0)] * 0) # type : List[int] d_3_cur_ = int(0) # type : int d_3_cur_ = n @@ -109,6 +110,8 @@ def get__odd__collatz__unsorted(n : int) -> List[int]: (not (((1) <= (d_5_i_)) and ((d_5_i_) < (len(odd__collatz)))) or (((odd__collatz)[d_5_i_]) == (next__odd__collatz((odd__collatz)[(d_5_i_) - (1)]))), [[next__odd__collatz((odd__collatz)[(d_5_i_) - (1)])]]))) # assert-end return odd__collatz + # impl-end + def get__odd__collatz(n : int) -> List[int]: diff --git a/Bench/126-is_sorted.py b/Bench/126-is_sorted.py index 638acaa..7e86178 100644 --- a/Bench/126-is_sorted.py +++ b/Bench/126-is_sorted.py @@ -15,6 +15,7 @@ def is__sorted(a : List[int]) -> bool: and (Forall(int, lambda d_2_i_: not (((0) <= (d_2_i_)) and ((d_2_i_) < (len(a)))) or ((count_set(a, (a)[d_2_i_], 0)) <= (2)))))) # post-conditions-end + # impl-start f = False # type : bool if (len(a)) == (0): f = True @@ -66,6 +67,7 @@ def is__sorted(a : List[int]) -> bool: d_4_i_ = (d_4_i_) + (1) f = d_7_has__no__more__that__2_ return f + # impl-end @Pure def count_set(a : List[int], x : int, i : int) -> int: @@ -73,6 +75,8 @@ def count_set(a : List[int], x : int, i : int) -> int: Requires(Acc(list_pred(a), 1/2)) Requires(((0) <= (i)) and ((i) <= (len(a)))) # pre-conditions-end + # post-conditions-start + # post-conditions-end # impl-start if (i) == 0: