diff --git a/doc/fsm/cmd.txt b/doc/fsm/cmd.txt index 877e4a2374ed37189d6d6b457e58f271a148fb16..feb1168f6680e852fc98de63628173d8d1e94122 100644 --- a/doc/fsm/cmd.txt +++ b/doc/fsm/cmd.txt @@ -8,6 +8,8 @@ dot -Tpng agentBeginning.gv -o agentBeginning.png dot -Tpng offerer.gv -o offerer.png +dot -Tpng receiver.gv -o receiver.png + dot -Tpng uncommited.gv -o uncommited.png dot -Tpng committed.gv -o committed.png diff --git a/doc/fsm/offerer.png b/doc/fsm/offerer.png index a20d0b7a352951102fd38e9bd13df2d448bd0465..efb2a80783e68a0a9ee919213d012a10c8da3bfd 100644 Binary files a/doc/fsm/offerer.png and b/doc/fsm/offerer.png differ diff --git a/doc/fsm/supervisor.png b/doc/fsm/supervisor.png index b29be54624b3e359bd1fdbb3f741178b454aa81a..c56e48fdfcebc36dd2d32311338c429d618778da 100644 Binary files a/doc/fsm/supervisor.png and b/doc/fsm/supervisor.png differ diff --git a/doc/fsm/supervisor_mgm2.gv b/doc/fsm/supervisor_mgm2.gv index 8651448cfe8c693d77bb8e79cab8f2e6fd174db8..543f739784d3464afeb75fbfb0ee7f17b4f503a3 100644 --- a/doc/fsm/supervisor_mgm2.gv +++ b/doc/fsm/supervisor_mgm2.gv @@ -10,7 +10,7 @@ digraph finite_state_machine { start -> WaitingForAgentValues [label = " broadcast(agents) ! Trigger "]; - start -> start [label = " agent : KickStartMe => + WaitingForAgentValues -> WaitingForAgentValues [label = " agent : KickStartMe => agent ! ContinueAlgo "]; @@ -20,9 +20,12 @@ digraph finite_state_machine { WaitingForAgentValues -> DecidingToContinueOrStop [label = " sender : InformValue(val) && (#currentContext == #agents - 1) => currentContext.put(sender, val) - stopOrContinue = shouldAlgoKeepOn() - broadcast(agents) ! WhatToDo(stopOrContinue) - self ! WhatToDo(stopOrContinue) + self.shouldAlgoKeepOn() match { + case true => broadcast ! ContinueAlgo + self ! ContinueAlgo + case false => broadcast ! StopAlgo + self ! StopAlgo + } "]; WaitingForAgentValues -> WaitingForAgentValues [label = " agent : Trigger => @@ -30,7 +33,7 @@ digraph finite_state_machine { "]; DecidingToContinueOrStop -> WaitingForAgentValues [label = " self ! ContinueAlgo => - currentContext = ∅ + currentContext.reset(); unstashall "];