Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics with spacings around colon (:).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 8 Feb 2023 11:00:24 +0000 (12:00 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 8 Feb 2023 13:33:26 +0000 (14:33 +0100)
examples/cpp/synchro-mutex/s4u-mc-synchro-mutex.tesh
examples/sthread/pthread-mc-mutex-simpledeadlock.tesh
src/kernel/actor/SynchroObserver.cpp
src/mc/transition/TransitionSynchro.cpp

index 2469cc3..2db23f3 100644 (file)
@@ -5,219 +5,219 @@ p This file tests the dependencies between MUTEX transitions
 $ ${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"
 > [App    ] Configuration change: Set 'actors' to '1'
 > [Checker] Start a DFS exploration. Reduction is: dpor.
-> [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner:1) (stack depth: 1, state: 1, 0 interleaves)
-> [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner:1) (stack depth: 2, state: 2, 0 interleaves)
-> [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner:-1) (stack depth: 3, state: 3, 0 interleaves)
-> [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (stack depth: 4, state: 4, 0 interleaves)
-> [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner:2) (stack depth: 5, state: 5, 0 interleaves)
-> [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner:-1) (stack depth: 6, state: 6, 0 interleaves)
+> [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (stack depth: 1, state: 1, 0 interleaves)
+> [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner: 1) (stack depth: 2, state: 2, 0 interleaves)
+> [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 3, state: 3, 0 interleaves)
+> [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 4, state: 4, 0 interleaves)
+> [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 5, state: 5, 0 interleaves)
+> [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 6, 0 interleaves)
 > [Checker] Execution came to an end at 1;1;1;2;2;2;0 (state: 7, depth: 7)
 > [Checker] Backtracking from 1;1;1;2;2;2;0
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:-1) (state=3)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=4)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:1) (state=2)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=4)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=2)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:1) (state=1)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=4)
-> [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (stack depth: 1, state: 1, 0 interleaves)
-> [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (stack depth: 2, state: 8, 0 interleaves)
-> [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner:2) (stack depth: 3, state: 9, 0 interleaves)
-> [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner:1) (stack depth: 4, state: 10, 0 interleaves)
-> [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner:1) (stack depth: 5, state: 11, 0 interleaves)
-> [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner:-1) (stack depth: 6, state: 12, 0 interleaves)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=1)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
+> [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 1, state: 1, 0 interleaves)
+> [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 2, state: 8, 0 interleaves)
+> [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 3, state: 9, 0 interleaves)
+> [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: 1) (stack depth: 4, state: 10, 0 interleaves)
+> [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner: 1) (stack depth: 5, state: 11, 0 interleaves)
+> [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 12, 0 interleaves)
 > [Checker] Execution came to an end at 2;1;2;2;1;1;0 (state: 13, depth: 7)
 > [Checker] Backtracking from 2;1;2;2;1;1;0
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:1) (state=10)
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:1) (state=11)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=10)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=11)
 > [Checker] Backtracking from 2;1;2;2
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=8)
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:2) (state=9)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=8)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=9)
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=1)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=8)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=1)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=8)
 > [Checker] DFS exploration ended. 13 unique states visited; 3 backtracks (18 transition replays, 3 states visited overall)
 
 $ ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.thres:verbose --log=root.fmt="[Checker]%e%m%n" -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:2 --log=s4u_test.thres:critical --log=root.fmt="[App%e%e%e%e]%e%m%n"
 > [App    ] Configuration change: Set 'actors' to '2'
 > [Checker] Start a DFS exploration. Reduction is: dpor.
-> [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner:1) (stack depth: 1, state: 1, 0 interleaves)
-> [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner:1) (stack depth: 2, state: 2, 0 interleaves)
-> [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner:-1) (stack depth: 3, state: 3, 0 interleaves)
-> [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (stack depth: 4, state: 4, 0 interleaves)
-> [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner:2) (stack depth: 5, state: 5, 0 interleaves)
-> [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner:-1) (stack depth: 6, state: 6, 0 interleaves)
-> [Checker] Execute 3: MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (stack depth: 7, state: 7, 0 interleaves)
-> [Checker] Execute 3: MUTEX_WAIT(mutex: 1, owner:3) (stack depth: 8, state: 8, 0 interleaves)
-> [Checker] Execute 3: MUTEX_UNLOCK(mutex: 1, owner:-1) (stack depth: 9, state: 9, 0 interleaves)
-> [Checker] Execute 4: MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (stack depth: 10, state: 10, 0 interleaves)
-> [Checker] Execute 4: MUTEX_WAIT(mutex: 1, owner:4) (stack depth: 11, state: 11, 0 interleaves)
-> [Checker] Execute 4: MUTEX_UNLOCK(mutex: 1, owner:-1) (stack depth: 12, state: 12, 0 interleaves)
+> [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (stack depth: 1, state: 1, 0 interleaves)
+> [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner: 1) (stack depth: 2, state: 2, 0 interleaves)
+> [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 3, state: 3, 0 interleaves)
+> [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 4, state: 4, 0 interleaves)
+> [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 5, state: 5, 0 interleaves)
+> [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 6, 0 interleaves)
+> [Checker] Execute 3: MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (stack depth: 7, state: 7, 0 interleaves)
+> [Checker] Execute 3: MUTEX_WAIT(mutex: 1, owner: 3) (stack depth: 8, state: 8, 0 interleaves)
+> [Checker] Execute 3: MUTEX_UNLOCK(mutex: 1, owner: -1) (stack depth: 9, state: 9, 0 interleaves)
+> [Checker] Execute 4: MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (stack depth: 10, state: 10, 0 interleaves)
+> [Checker] Execute 4: MUTEX_WAIT(mutex: 1, owner: 4) (stack depth: 11, state: 11, 0 interleaves)
+> [Checker] Execute 4: MUTEX_UNLOCK(mutex: 1, owner: -1) (stack depth: 12, state: 12, 0 interleaves)
 > [Checker] Execution came to an end at 1;1;1;2;2;2;3;3;3;4;4;4;0 (state: 13, depth: 13)
 > [Checker] Backtracking from 1;1;1;2;2;2;3;3;3;4;4;4;0
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 1, owner:-1) (state=9)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=10)
+> [Checker]   MUTEX_UNLOCK(mutex: 1, owner: -1) (state=9)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=10)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 1, owner:3) (state=8)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=10)
+> [Checker]   MUTEX_WAIT(mutex: 1, owner: 3) (state=8)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=10)
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=7)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=10)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=7)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=10)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:-1) (state=6)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=7)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=6)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=7)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:2) (state=5)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=7)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=5)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=7)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=4)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=7)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=7)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:-1) (state=3)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=7)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=7)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:1) (state=2)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=7)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=2)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=7)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:1) (state=1)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=7)
-> [Checker] Execute 4: MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (stack depth: 7, state: 7, 0 interleaves)
-> [Checker] Execute 3: MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (stack depth: 8, state: 14, 0 interleaves)
-> [Checker] Execute 4: MUTEX_WAIT(mutex: 1, owner:4) (stack depth: 9, state: 15, 0 interleaves)
-> [Checker] Execute 4: MUTEX_UNLOCK(mutex: 1, owner:3) (stack depth: 10, state: 16, 0 interleaves)
-> [Checker] Execute 3: MUTEX_WAIT(mutex: 1, owner:3) (stack depth: 11, state: 17, 0 interleaves)
-> [Checker] Execute 3: MUTEX_UNLOCK(mutex: 1, owner:-1) (stack depth: 12, state: 18, 0 interleaves)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=1)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=7)
+> [Checker] Execute 4: MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (stack depth: 7, state: 7, 0 interleaves)
+> [Checker] Execute 3: MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (stack depth: 8, state: 14, 0 interleaves)
+> [Checker] Execute 4: MUTEX_WAIT(mutex: 1, owner: 4) (stack depth: 9, state: 15, 0 interleaves)
+> [Checker] Execute 4: MUTEX_UNLOCK(mutex: 1, owner: 3) (stack depth: 10, state: 16, 0 interleaves)
+> [Checker] Execute 3: MUTEX_WAIT(mutex: 1, owner: 3) (stack depth: 11, state: 17, 0 interleaves)
+> [Checker] Execute 3: MUTEX_UNLOCK(mutex: 1, owner: -1) (stack depth: 12, state: 18, 0 interleaves)
 > [Checker] Execution came to an end at 1;1;1;2;2;2;4;3;4;4;3;3;0 (state: 19, depth: 13)
 > [Checker] Backtracking from 1;1;1;2;2;2;4;3;4;4;3;3;0
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 1, owner:3) (state=16)
-> [Checker]   MUTEX_WAIT(mutex: 1, owner:3) (state=17)
+> [Checker]   MUTEX_UNLOCK(mutex: 1, owner: 3) (state=16)
+> [Checker]   MUTEX_WAIT(mutex: 1, owner: 3) (state=17)
 > [Checker] Backtracking from 1;1;1;2;2;2;4;3;4;4
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=14)
-> [Checker]   MUTEX_WAIT(mutex: 1, owner:4) (state=15)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=14)
+> [Checker]   MUTEX_WAIT(mutex: 1, owner: 4) (state=15)
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=7)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=14)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=7)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=14)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:-1) (state=6)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=7)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=6)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=7)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:2) (state=5)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=7)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=5)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=7)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=4)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=7)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=7)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:-1) (state=3)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=7)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=7)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:1) (state=2)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=7)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=2)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=7)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:1) (state=1)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=7)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=1)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=7)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:-1) (state=3)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=4)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:1) (state=2)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=4)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=2)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:1) (state=1)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=4)
-> [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (stack depth: 1, state: 1, 0 interleaves)
-> [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (stack depth: 2, state: 20, 0 interleaves)
-> [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner:2) (stack depth: 3, state: 21, 0 interleaves)
-> [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner:1) (stack depth: 4, state: 22, 0 interleaves)
-> [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner:1) (stack depth: 5, state: 23, 0 interleaves)
-> [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner:-1) (stack depth: 6, state: 24, 0 interleaves)
-> [Checker] Execute 3: MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (stack depth: 7, state: 25, 0 interleaves)
-> [Checker] Execute 3: MUTEX_WAIT(mutex: 1, owner:3) (stack depth: 8, state: 26, 0 interleaves)
-> [Checker] Execute 3: MUTEX_UNLOCK(mutex: 1, owner:-1) (stack depth: 9, state: 27, 0 interleaves)
-> [Checker] Execute 4: MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (stack depth: 10, state: 28, 0 interleaves)
-> [Checker] Execute 4: MUTEX_WAIT(mutex: 1, owner:4) (stack depth: 11, state: 29, 0 interleaves)
-> [Checker] Execute 4: MUTEX_UNLOCK(mutex: 1, owner:-1) (stack depth: 12, state: 30, 0 interleaves)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=1)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
+> [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 1, state: 1, 0 interleaves)
+> [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 2, state: 20, 0 interleaves)
+> [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 3, state: 21, 0 interleaves)
+> [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: 1) (stack depth: 4, state: 22, 0 interleaves)
+> [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner: 1) (stack depth: 5, state: 23, 0 interleaves)
+> [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 24, 0 interleaves)
+> [Checker] Execute 3: MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (stack depth: 7, state: 25, 0 interleaves)
+> [Checker] Execute 3: MUTEX_WAIT(mutex: 1, owner: 3) (stack depth: 8, state: 26, 0 interleaves)
+> [Checker] Execute 3: MUTEX_UNLOCK(mutex: 1, owner: -1) (stack depth: 9, state: 27, 0 interleaves)
+> [Checker] Execute 4: MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (stack depth: 10, state: 28, 0 interleaves)
+> [Checker] Execute 4: MUTEX_WAIT(mutex: 1, owner: 4) (stack depth: 11, state: 29, 0 interleaves)
+> [Checker] Execute 4: MUTEX_UNLOCK(mutex: 1, owner: -1) (stack depth: 12, state: 30, 0 interleaves)
 > [Checker] Execution came to an end at 2;1;2;2;1;1;3;3;3;4;4;4;0 (state: 31, depth: 13)
 > [Checker] Backtracking from 2;1;2;2;1;1;3;3;3;4;4;4;0
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 1, owner:-1) (state=27)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=28)
+> [Checker]   MUTEX_UNLOCK(mutex: 1, owner: -1) (state=27)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=28)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 1, owner:3) (state=26)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=28)
+> [Checker]   MUTEX_WAIT(mutex: 1, owner: 3) (state=26)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=28)
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=25)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=28)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=25)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=28)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:-1) (state=24)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=25)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=24)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=25)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:1) (state=23)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=25)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=23)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=25)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:1) (state=22)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=25)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=22)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=25)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:2) (state=21)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=25)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=21)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=25)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=20)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=25)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=20)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=25)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=1)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:3) (state=25)
-> [Checker] Execute 4: MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (stack depth: 7, state: 25, 0 interleaves)
-> [Checker] Execute 3: MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (stack depth: 8, state: 32, 0 interleaves)
-> [Checker] Execute 4: MUTEX_WAIT(mutex: 1, owner:4) (stack depth: 9, state: 33, 0 interleaves)
-> [Checker] Execute 4: MUTEX_UNLOCK(mutex: 1, owner:3) (stack depth: 10, state: 34, 0 interleaves)
-> [Checker] Execute 3: MUTEX_WAIT(mutex: 1, owner:3) (stack depth: 11, state: 35, 0 interleaves)
-> [Checker] Execute 3: MUTEX_UNLOCK(mutex: 1, owner:-1) (stack depth: 12, state: 36, 0 interleaves)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=1)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 3) (state=25)
+> [Checker] Execute 4: MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (stack depth: 7, state: 25, 0 interleaves)
+> [Checker] Execute 3: MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (stack depth: 8, state: 32, 0 interleaves)
+> [Checker] Execute 4: MUTEX_WAIT(mutex: 1, owner: 4) (stack depth: 9, state: 33, 0 interleaves)
+> [Checker] Execute 4: MUTEX_UNLOCK(mutex: 1, owner: 3) (stack depth: 10, state: 34, 0 interleaves)
+> [Checker] Execute 3: MUTEX_WAIT(mutex: 1, owner: 3) (stack depth: 11, state: 35, 0 interleaves)
+> [Checker] Execute 3: MUTEX_UNLOCK(mutex: 1, owner: -1) (stack depth: 12, state: 36, 0 interleaves)
 > [Checker] Execution came to an end at 2;1;2;2;1;1;4;3;4;4;3;3;0 (state: 37, depth: 13)
 > [Checker] Backtracking from 2;1;2;2;1;1;4;3;4;4;3;3;0
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 1, owner:3) (state=34)
-> [Checker]   MUTEX_WAIT(mutex: 1, owner:3) (state=35)
+> [Checker]   MUTEX_UNLOCK(mutex: 1, owner: 3) (state=34)
+> [Checker]   MUTEX_WAIT(mutex: 1, owner: 3) (state=35)
 > [Checker] Backtracking from 2;1;2;2;1;1;4;3;4;4
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=32)
-> [Checker]   MUTEX_WAIT(mutex: 1, owner:4) (state=33)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=32)
+> [Checker]   MUTEX_WAIT(mutex: 1, owner: 4) (state=33)
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=25)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=32)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=25)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=32)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:-1) (state=24)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=25)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=24)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=25)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:1) (state=23)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=25)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=23)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=25)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:1) (state=22)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=25)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=22)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=25)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:2) (state=21)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=25)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=21)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=25)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=20)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=25)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=20)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=25)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=1)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner:4) (state=25)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=1)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 1, owner: 4) (state=25)
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner:1) (state=22)
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:1) (state=23)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=22)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=23)
 > [Checker] Backtracking from 2;1;2;2
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=20)
-> [Checker]   MUTEX_WAIT(mutex: 0, owner:2) (state=21)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=20)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=21)
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=1)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner:2) (state=20)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=1)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=20)
 > [Checker] DFS exploration ended. 37 unique states visited; 7 backtracks (76 transition replays, 33 states visited overall)
 
 $ ${bindir:=.}/../../../bin/simgrid-mc -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:3 --log=s4u_test.thres:critical
index 8070caa..72324f2 100644 (file)
@@ -18,14 +18,14 @@ $ ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/setenv:LD_PRELOAD=${libdir
 > [0.000000] [ker_engine/INFO] 3 actors are still running, waiting for something.
 > [0.000000] [ker_engine/INFO] Legend of the following listing: "Actor <pid> (<name>@<host>): <status>"
 > [0.000000] [ker_engine/INFO] Actor 1 (main thread@Lilibeth) simcall ActorJoin(pid:2)
-> [0.000000] [ker_engine/INFO] Actor 2 (0:1@Lilibeth) simcall MUTEX_WAIT(mutex_id: 1owner:3)
-> [0.000000] [ker_engine/INFO] Actor 3 (0:2@Lilibeth) simcall MUTEX_WAIT(mutex_id: 0owner:2)
+> [0.000000] [ker_engine/INFO] Actor 2 (0:1@Lilibeth) simcall MUTEX_WAIT(mutex_id:owner:3)
+> [0.000000] [ker_engine/INFO] Actor 3 (0:2@Lilibeth) simcall MUTEX_WAIT(mutex_id:owner:2)
 > [0.000000] [mc_global/INFO] Counter-example execution trace:
-> [0.000000] [mc_global/INFO]   2: MUTEX_ASYNC_LOCK(mutex: 0, owner:2)
-> [0.000000] [mc_global/INFO]   2: MUTEX_WAIT(mutex: 0, owner:2)
-> [0.000000] [mc_global/INFO]   3: MUTEX_ASYNC_LOCK(mutex: 1, owner:3)
-> [0.000000] [mc_global/INFO]   2: MUTEX_ASYNC_LOCK(mutex: 1, owner:3)
-> [0.000000] [mc_global/INFO]   3: MUTEX_WAIT(mutex: 1, owner:3)
-> [0.000000] [mc_global/INFO]   3: MUTEX_ASYNC_LOCK(mutex: 0, owner:2)
+> [0.000000] [mc_global/INFO]   2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2)
+> [0.000000] [mc_global/INFO]   2: MUTEX_WAIT(mutex: 0, owner: 2)
+> [0.000000] [mc_global/INFO]   3: MUTEX_ASYNC_LOCK(mutex: 1, owner: 3)
+> [0.000000] [mc_global/INFO]   2: MUTEX_ASYNC_LOCK(mutex: 1, owner: 3)
+> [0.000000] [mc_global/INFO]   3: MUTEX_WAIT(mutex: 1, owner: 3)
+> [0.000000] [mc_global/INFO]   3: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2)
 > [0.000000] [mc_Session/INFO] You can debug the problem (and see the whole details) by rerunning out of simgrid-mc with --cfg=model-check/replay:'2;2;3;2;3;3'
 > [0.000000] [mc_dfs/INFO] DFS exploration ended. 19 unique states visited; 2 backtracks (22 transition replays, 2 states visited overall)
index e22d6cc..efe5bff 100644 (file)
@@ -30,8 +30,8 @@ void MutexObserver::serialize(std::stringstream& stream) const
 }
 std::string MutexObserver::to_string() const
 {
-  return std::string(mc::Transition::to_c_str(type_)) + "(mutex_id: " + std::to_string(get_mutex()->get_id()) +
-         "owner:" + std::to_string(get_mutex()->get_owner()->get_pid()) + ")";
+  return std::string(mc::Transition::to_c_str(type_)) + "(mutex_id:" + std::to_string(get_mutex()->get_id()) +
+         " owner:" + std::to_string(get_mutex()->get_owner()->get_pid()) + ")";
 }
 
 bool MutexObserver::is_enabled()
@@ -52,7 +52,7 @@ void SemaphoreObserver::serialize(std::stringstream& stream) const
 }
 std::string SemaphoreObserver::to_string() const
 {
-  return std::string(mc::Transition::to_c_str(type_)) + "(sem_id: " + std::to_string(get_sem()->get_id()) + ")";
+  return std::string(mc::Transition::to_c_str(type_)) + "(sem_id:" + std::to_string(get_sem()->get_id()) + ")";
 }
 
 SemaphoreAcquisitionObserver::SemaphoreAcquisitionObserver(ActorImpl* actor, mc::Transition::Type type,
@@ -71,7 +71,7 @@ void SemaphoreAcquisitionObserver::serialize(std::stringstream& stream) const
 std::string SemaphoreAcquisitionObserver::to_string() const
 {
   return std::string(mc::Transition::to_c_str(type_)) +
-         "(sem_id: " + std::to_string(acquisition_->semaphore_->get_id()) + ' ' +
+         "(sem_id:" + std::to_string(acquisition_->semaphore_->get_id()) + ' ' +
          (acquisition_->granted_ ? "granted)" : "not granted)");
 }
 
@@ -94,7 +94,7 @@ void BarrierObserver::serialize(std::stringstream& stream) const
 std::string BarrierObserver::to_string() const
 {
   return std::string(mc::Transition::to_c_str(type_)) +
-         "(barrier_id: " + std::to_string(barrier_ != nullptr ? barrier_->get_id() : acquisition_->barrier_->get_id()) +
+         "(barrier_id:" + std::to_string(barrier_ != nullptr ? barrier_->get_id() : acquisition_->barrier_->get_id()) +
          ")";
 }
 bool BarrierObserver::is_enabled()
index e918e7a..a93e27b 100644 (file)
@@ -49,7 +49,7 @@ bool BarrierTransition::depends(const Transition* o) const
 
 std::string MutexTransition::to_string(bool verbose) const
 {
-  return xbt::string_printf("%s(mutex: %" PRIxPTR ", owner:%ld)", Transition::to_c_str(type_), mutex_, owner_);
+  return xbt::string_printf("%s(mutex: %" PRIxPTR ", owner: %ld)", Transition::to_c_str(type_), mutex_, owner_);
 }
 
 MutexTransition::MutexTransition(aid_t issuer, int times_considered, Type type, std::stringstream& stream)