-
Open ClockSync1 and MC_ClockSync1.
-
Notice how the variables
time
,hc
, andadj
are declared. -
Check the type annotations that start with
@type
. -
Check the test in MC_ClockSync1.
-
Run:
$ apalache check --init=Test1_Init \ --next=Test1_Next --inv=Test1_Inv --length=1 MC_ClockSync1.tla
-
The tool reports no error.
-
Open ClockSync2 and MC_ClockSync2.
-
Check constants
t_min
andt_max
. -
Notice that variables
msgs
andstate
are added. -
Check the test in MC_ClockSync2.
-
Run:
$ apalache check --init=Test2_Init \ --next=Test2_Next --inv=Test2_Inv --length=1 MC_ClockSync2.tla
-
The tool reports no error.
-
Open ClockSync3 and MC_ClockSync3.
-
Notice that variable
rcvd
is added. -
Check the test in MC_ClockSync3.
-
Run:
$ apalache check --init=Test3_Init \ --next=Test3_Next --inv=Test3_Inv --length=1 MC_ClockSync3.tla
-
The tool reports no error.
-
Open ClockSync4 and MC_ClockSync4.
-
Notice that variable
diff
is added. -
Check the test in MC_ClockSync4.
-
Run:
$ apalache check --init=Test4_Init \ --next=Test4_Next --inv=Test4_Inv --length=1 MC_ClockSync4.tla
-
The tool reports no error.
-
Check the invariant
SkewInv
in ClockSync4. -
Run:
$ apalache check --inv=SkewInv MC_ClockSync4.tla
-
The tool reports an error. Open
counterexample1.tla
.
-
Open ClockSync5 and MC_ClockSync5.
-
Notice the changes in
AdjustClock
. -
Run:
$ apalache check --inv=SkewInv MC_ClockSync5.tla
-
The tool reports no error.
-
Open ClockSync6 and MC_ClockSync6.
-
Notice that we made
Proc
a constant. -
Check the operator
DiffSum
and how it is used. -
Run:
$ apalache check --inv=SkewInv MC_ClockSync6.tla
-
Open MC_ClockSync6p.
-
Check the operator
ConstInit
. -
Check how we have changed the bound in
SkewInv
. -
Run:
$ apalache check --cinit=ConstInit --inv=SkewInv MC_ClockSync6p.tla
-
The tool reports no error.