Illegal configuration with history in pseudocode

Hi there,

I do have a problem with the following scxml document putting my interpreter in an illegal configuration:

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

	<state id="a">
		<transition target="h" />
	</state>

	<state id="b" initial="b1">
		<history id="h">
			<transition target="b1.2"/>
		</history>

		<state id="b1" initial="b1.1">
			<state id="b1.1"/>
			<state id="b1.2">
				<transition event="t2" target="b1.3"/>
			</state>
			<state id="b1.3">
				<transition event="t3" target="a"/>
			</state>
		</state>
	</state>
</scxml>

The problem is with entering state "h" from "a" for the first time. With regard to "procedure enterStates(enabledTransitions)", this means that tstates
contains only "h" with "a" as the source state and "root" as their ancestor. The procedure "addStatesToEnter(s,statesToEnter,statesForDefaultEntry)" will recognize s as being a history state and call itself with "b1.2", adding "b1.2" into "statesToEnter".

When returning into the enterStates procedure again, only tStates will be iterated to get the set of proper ancestors to enter as well, but tStates still only contains "h", not "b1.2", meaning "b" will be entered as a proper ancestor of "h" but "b1" will not as "b1.2" is only contained in statesToEnter, not in tStates and thus, its proper ancestors are never added into statesToEnter resulting in a configuration of {"b", "b1.2"}.

What did I miss here? What part of the pseudo-code is supposed to add "b1" into statesToEnter with the document above? As having b1.2 and not b1 in the configuration is supposed to be illegal.

Best regards
Stefan

Received on Friday, 8 February 2013 18:28:50 UTC