RE: Reentering child of parallel state leaves all childs?

Stefan,
I'm glad that isn't a bug, though I'm not completely confident in enterStates and addStatesToEnter.  I still want to look at them more closely.


-          Jim

From: Stefan Radomski [mailto:radomski@tk.informatik.tu-darmstadt.de]
Sent: Sunday, February 10, 2013 11:15 AM
To: Jim Barnett
Cc: www-voice@w3.org (www-voice@w3.org)
Subject: Re: Reentering child of parallel state leaves all childs?

Thank you, my findLCCA was not filtering for compound states - it's working now.
  Stefan

On Feb 9, 2013, at 11:15 PM, Jim Barnett <Jim.Barnett@genesyslab.com<mailto:Jim.Barnett@genesyslab.com>> wrote:


The LCCA of a is actually the <scxml> node.  A transition from a to a Is supposed to take you out of b and p, and then cause re-entry.  Any transition that exits a direct child of the <parallel> node causes the <parallel> node to be exited (and hence all its active descendants as well.)

There may be a bug in addStatesToEnter.  If you look in enterStates, when it adds the ancestors of the target state, it checks to see if any of them is a parallel state and adds its other default siblings if they aren't already on the list to be entered.  addStatesToEnter doesn't do this check.  I'll have to look at this more closely.

= Jim

From: Stefan Radomski [mailto:radomski@tk.informatik.tu-darmstadt.de<http://tk.informatik.tu-darmstadt.de>]
Sent: Saturday, February 09, 2013 4:46 PM
To: www-voice@w3.org<mailto:www-voice@w3.org> (www-voice@w3.org<mailto:www-voice@w3.org>)
Subject: Reentering child of parallel state leaves all childs?

Hi, it's me again.

I am currently trying to get Jacob's test-cases to run and ran into something peculiar with the following SCXML document:

<scxml
xmlns="http://www.w3.org/2005/07/scxml"
version="1.0"
profile="ecmascript">

<parallel id="p">
<state id="a">
    <transition target="a" event="t"/>
</state>
<state id="b"/>
</parallel>

</scxml>

Its initial stable configuration is {p, a, b}. When event "t" arrives, we are entering exitStates with the transition "a -> a" enabled. Considering the pseudocode in the draft, we will determine the LCCA of {a, a}, which is "p" and subsequently add all of its descendants, which are part of the configuration to statesToExit, which includes "b". Thus exiting "b", even when we are immediately reentering "a" - is this desired?

Worse still, if I read the pseudo-code correctly, we will only reenter "a", not "b" in enterStates, leaving the interpreter in an invalid configuration. What did I miss here?

Regards
Stefan

Received on Sunday, 10 February 2013 20:23:43 UTC