Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move DPOR and sleep set algorithm from backtrack to run procedure
[simgrid.git] / examples / cpp / synchro-mutex / s4u-mc-synchro-mutex.tesh
1 #!/usr/bin/env tesh
2
3 p This file tests the dependencies between MUTEX transitions
4
5 $ ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.thres:verbose --log=root.fmt="[Checker]%e%m%n" -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:1 --log=s4u_test.thres:critical --log=root.fmt="[App%e%e%e%e]%e%m%n"
6 > [App    ] Configuration change: Set 'actors' to '1'
7 > [Checker] Start a DFS exploration. Reduction is: dpor.
8 > [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (stack depth: 1, state: 1, 0 interleaves)
9 > [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner: 1) (stack depth: 2, state: 2, 0 interleaves)
10 > [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 3, state: 3, 0 interleaves)
11 > [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 4, state: 4, 0 interleaves)
12 > [Checker] INDEPENDENT Transitions:
13 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
14 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
15 > [Checker] INDEPENDENT Transitions:
16 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=2)
17 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
18 > [Checker] Dependent Transitions:
19 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=1)
20 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
21 > [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 5, state: 5, 0 interleaves)
22 > [Checker] Dependent Transitions:
23 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
24 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=5)
25 > [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 6, 0 interleaves)
26 > [Checker] Dependent Transitions:
27 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
28 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=6)
29 > [Checker] Execution came to an end at 1;1;1;2;2;2;0 (state: 7, depth: 7)
30 > [Checker] Backtracking from 1;1;1;2;2;2;0
31 > [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (stack depth: 3, state: 3, 0 interleaves)
32 > [Checker] INDEPENDENT Transitions:
33 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=2)
34 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=3)
35 > [Checker] Dependent Transitions:
36 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=1)
37 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=3)
38 > [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: 2) (stack depth: 4, state: 8, 0 interleaves)
39 > [Checker] INDEPENDENT Transitions:
40 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=3)
41 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 2) (state=8)
42 > [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 5, state: 9, 0 interleaves)
43 > [Checker] Dependent Transitions:
44 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 2) (state=8)
45 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=9)
46 > [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 10, 0 interleaves)
47 > [Checker] Dependent Transitions:
48 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 2) (state=8)
49 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=10)
50 > [Checker] Execution came to an end at 1;1;2;1;2;2;0 (state: 11, depth: 7)
51 > [Checker] Backtracking from 1;1;2;1;2;2;0
52 > [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 1, state: 1, 0 interleaves)
53 > [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 2, state: 12, 0 interleaves)
54 > [Checker] Dependent Transitions:
55 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=1)
56 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=12)
57 > [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 3, state: 13, 0 interleaves)
58 > [Checker] INDEPENDENT Transitions:
59 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=12)
60 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=13)
61 > [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: 1) (stack depth: 4, state: 14, 0 interleaves)
62 > [Checker] INDEPENDENT Transitions:
63 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=12)
64 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=14)
65 > [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner: 1) (stack depth: 5, state: 15, 0 interleaves)
66 > [Checker] Dependent Transitions:
67 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=14)
68 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=15)
69 > [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 16, 0 interleaves)
70 > [Checker] Dependent Transitions:
71 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=14)
72 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=16)
73 > [Checker] Execution came to an end at 2;1;2;2;1;1;0 (state: 17, depth: 7)
74 > [Checker] Backtracking from 2;1;2;2;1;1;0
75 > [Checker] DFS exploration ended. 17 unique states visited; 3 backtracks (21 transition replays, 2 states visited overall)
76
77 $ ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:2 --log=s4u_test.thres:critical
78 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/sleep-set' to 'true'
79 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'actors' to '2'
80 > [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor.
81 > [0.000000] [mc_dfs/INFO] DFS exploration ended. 128 unique states visited; 26 backtracks (296 transition replays, 143 states visited overall)
82
83 $ ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true -- ${bindir:=.}/s4u-synchro-mutex  --cfg=actors:3 --log=s4u_test.thres:critical
84 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/sleep-set' to 'true'
85 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'actors' to '3'
86 > [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor.
87 > [0.000000] [mc_dfs/INFO] DFS exploration ended. 4645 unique states visited; 1082 backtracks (18004 transition replays, 12278 states visited overall)