Re: [Boost-bugs] [Boost C++ Libraries] #2907: Events no longer reach orthogonal inner state after leaving that state and then returning to it

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2907: Events no longer reach orthogonal inner state after leaving that state and then returning to it
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-04-07 18:19:12


#2907: Events no longer reach orthogonal inner state after leaving that state and
then returning to it
---------------------------------------------------------------------------+
  Reporter: George van Venrooij <george.van.venrooij_at_[hidden]> | Owner: andreas_huber69
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: statechart
   Version: Boost 1.37.0 | Severity: Problem
Resolution: invalid | Keywords: event fowarding orthogonal inner state
---------------------------------------------------------------------------+

Comment(by andreas_huber69):

> If there are '''multiple''' orthogonal states specifying reactions for
 the '''same''' event, then ''only one'' of those reactions is triggered.
 That's at least how it reads to me.

 Correct.

> I also deduced that ''at least one'' of those reactions will be
 triggered, [...]

 Correct.

> [...] but this does not seem to be the case. Am I correct in this
 conclusion?

 Incorrect, in your testcase, as a result of step 6 parent_state::react is
 called. This is due to the fact that state_2A is the first innermost state
 that is selected during reaction search. state_2A does not have a reaction
 for the event, so its outer state (parent_state) is automatically checked
 for a suitable reaction. parent_state::react simply discards the event, so
 reaction search is considered successful. If parent_state::react returned
 forward_event() (or didn't exist) then reaction search would continue with
 the last remaining innermost state (state_1A).

> Your explanation of the behavior in steps 4-6 is that the event
 processing mechanism selects one inner orthogonal state (seemingly at
 random) and if that one does not specify a reaction to the current event,
 then no other inner orthogonal states are checked and the event is checked
 against the next outer state.
>
> Is this correct?

 Not quite: The other innermost states are checked ''if and only if'' all
 the direct and indirect outer states of the selected innermost state are
 "unable" to react to the event. That is, they all either do not have a
 reaction for the current event or the reactions all return
 forward_event().

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2907#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC