def test4(a: List[int], b: List[int]) -> None: Requires(Acc(list_pred(a))) Requires(Acc(list_pred(b))) for i in a: Invariant(Acc(list_pred(b))) for j in b: pass
def test_terminate_promise_4(a: List[int], b: List[int]) -> None: Requires(MustTerminate(2)) Requires(Acc(list_pred(a))) Requires(Acc(list_pred(b))) for i in a: Invariant(MustTerminate(len(a) - len(Previous(i)))) Invariant(Acc(list_pred(b))) #:: ExpectedOutput(leak_check.failed:loop_context.has_unsatisfied_obligations) for j in b: pass
def test3() -> None: a = [1, 2, 3] b = [1, 2, 3] for i in a: Invariant(Acc(list_pred(b))) for j in b: pass
def test2() -> None: a = [1, 2, 3] for i in a: pass Assert(Acc(list_pred(a)))
def test1(a: List[int]) -> None: Requires(Acc(list_pred(a))) Ensures(Acc(list_pred(a))) for i in a: pass
def test_terminate_promise_1(a: List[int]) -> None: Requires(MustTerminate(2)) Requires(Acc(list_pred(a))) #:: ExpectedOutput(leak_check.failed:loop_context.has_unsatisfied_obligations) for i in a: pass
def test_measures_4(a: List[int]) -> None: Requires(Acc(list_pred(a))) Requires(len(a) > 1) for i in a: #:: ExpectedOutput(invariant.not.preserved:obligation_measure.non_positive) Invariant(MustTerminate(len(a) - len(Previous(i)) - 1))
def test_measures_3(a: List[int]) -> None: Requires(Acc(list_pred(a))) for i in a: Invariant(MustTerminate(len(a) - len(Previous(i))))
def test_measures_1(a: List[int]) -> None: Requires(Acc(list_pred(a))) for i in a: #:: ExpectedOutput(invariant.not.established:obligation_measure.non_positive) Invariant(MustTerminate(-1))
def test_exhale_1(a: List[int]) -> None: Requires(Acc(list_pred(a))) for i in a: Invariant(MustTerminate(len(a) - len(Previous(i)))) Invariant(MustTerminate(1 + len(a) - len(Previous(i))))
def test_generation_1(a: List[int]) -> None: Requires(Acc(list_pred(a))) for i in a: Invariant(MustTerminate(len(a) - len(Previous(i)))) non_terminating()