Esempio n. 1
0
def test_gap_io7(t_pre: Place, value: bool, t_post: Place = Result()) -> bool:
    Terminates(value)
    TerminationMeasure(2)
    return IOExists2(
        Place,
        Place)(lambda t1, t2:
               (no_op_io(t_pre, t1) and Implies(not value, gap_io(t1, t2)) and
                no_op_io(t1, t2) and no_op_io(t2, t_post)))
Esempio n. 2
0
def test_gap_io9(t_pre: Place, t_post: Place = Result()) -> bool:
    Terminates(True)
    TerminationMeasure(2)
    return IOExists3(Place, Place, bool)(
        lambda t1, t2, value: (
            random_bool_io(t_pre, value, t1) and
            #:: ExpectedOutput(termination_check.failed:gap.enabled)
            Implies(value, gap_io(t1, t2)) and no_op_io(t1, t2) and no_op_io(
                t2, t_post)))
Esempio n. 3
0
def test_gap_io6(t_pre: Place, value: bool, t_post: Place = Result()) -> bool:
    Terminates(value)
    TerminationMeasure(2)
    return gap_io(t_pre, t_post) if not value else no_op_io(t_pre, t_post)
Esempio n. 4
0
def test_gap_io5(t_pre: Place, value: bool, t_post: Place = Result()) -> bool:
    Terminates(value)
    TerminationMeasure(2)
    #:: ExpectedOutput(termination_check.failed:gap.enabled)
    return gap_io(t_pre, t_post) if value else no_op_io(t_pre, t_post)
Esempio n. 5
0
def test_gap_io4(t_pre: Place, value: bool, t_post: Place = Result()) -> bool:
    Terminates(value)
    TerminationMeasure(2)
    return (Implies(not value, gap_io(t_pre, t_post))
            and no_op_io(t_pre, t_post))
Esempio n. 6
0
def test_gap_io2(t_pre: Place, t_post: Place = Result()) -> bool:
    Terminates(True)
    TerminationMeasure(2)
    #:: ExpectedOutput(termination_check.failed:gap.enabled)
    return gap_io(t_pre, t_post)
Esempio n. 7
0
def test_gap_io1(t_pre: Place, t_post: Place = Result()) -> bool:
    TerminationMeasure(2)
    return gap_io(t_pre, t_post)
Esempio n. 8
0
def resource_io(t_pre: Place, file_name: str,
                t_post: Place = Result()) -> bool:
    return IOExists5(
        Place, Place, Place, Place, File)(lambda t2, t3, t4, t5, fp: (open_io(
            t_pre, file_name, fp, t2) and gap_io(t2, t3) and write_io(
                t3, fp, t4) and gap_io(t4, t5) and close_io(t5, fp, t_post)))