W3C home > Mailing lists > Public > www-voice@w3.org > January to March 2013

Bug with deep and shallow history in pseudo-code

From: Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de>
Date: Sat, 9 Feb 2013 18:04:06 +0000
To: "www-voice@w3.org (www-voice@w3.org)" <www-voice@w3.org>
Message-ID: <6A775895400B8040A331C2963964820C19532282@exchange01.tk.informatik.tu-darmstadt.de>
Hi again,

the SCXML document at [1] will put my interpreter in an illegal state configuration. I am sure that there is a more concise example that would accomplish the same, but it is part of Jacob's test framework.

  Enabled transitions: {root -> a}
  Stable initial configuration: {a}

t1 arrives:
  Enabled transitions: {a -> p}
  Stable configuration: {p, b, b1, b1.1, c, c1, c1.1}

t2 arrives:
  Enabled transitions: {b1.1 -> b1.2, c1.1 -> c1.2}
  Stable configuration: {p, b, b1, c, c1, b1.2, c1.2}

t3 arrives:
  Enabled transitions: {b1.2 -> b2, c1.2 -> c2}
  Stable configuration: {p, b, c, b2, b2.1, c2, c2.1}

t4 arrives:
  Enabled transitions: {b2.1 -> b2.2, c2.1 -> c2.2}
  Stable configuration: {p, b, c, b2, c2, b2.2, c2.2}

When t5 arrives, we exit everything and enter "a" again, thus we have to save three histories:
  hp: {b2.2, c2.2}
  hb: {b2.2}
  hc: {c2}
  Stable configuration: {a}

t6 will transition into "p" again and bring the interpreter into an illegal configuration:
  addStatesToEnter will realize that "p" is parallel an attempt to enter all its children
    Entering hp will enter {b2.2, c2.2} as its history
    As "p" is parallel, we will enter "c" as well, as it is compound, we will enter its initial shallow history "hc", adding "c2"
      "c2" is compound and its initial state "c2.1" will be entered.

-> we now have "c2.2" and "c2.1" in the configuration which is illegal.

Who is supposed to prevent "c2" from entering its initial state? We already entered "c2.2" per deep history from "hp" and now the shallow history from "hc" wants to enter "c2" and ultimately its initial state "c2.1" leading to an invalid configuration.

Best regards

[1] https://github.com/jbeard4/scxml-test-framework/blob/master/test/history/history4.scxml
Received on Saturday, 9 February 2013 18:04:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:07:43 UTC