Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getExitSet() returns an incorrect result in certain configurations #193

Open
ryanhol-amazon-com opened this issue Mar 12, 2020 · 0 comments · May be fixed by #194
Open

getExitSet() returns an incorrect result in certain configurations #193

ryanhol-amazon-com opened this issue Mar 12, 2020 · 0 comments · May be fixed by #194

Comments

@ryanhol-amazon-com
Copy link

getExitSet() can return an incorrect result in certain configurations, leading to the unexpected exit of states unrelated to the active transition.

Given the following state chart definition...

<scxml>
  <parallel id="Main">
    <state id="Parent">
      <state id="Child">
        <state id="Action1">
          <transition target="Action2" event="Go"/>
        </state>

        <state id="Action2"/>
      </state>
    </state>

    <state id="Sibling1"/>
    <state id="Sibling2"/>
    <state id="Sibling3"/>
    <state id="Sibling4"/>
    <!-- Any number of siblings... -->
  </parallel>
</scxml>

...when taking a transition from Action1 to Action2, the expected
exit set is [Action1]. However, getExitSet() returns an exit set that
includes Action1 in addition to all Sibling* states (i.e.
[Action1, Sibling1, Sibling2, ...]).

The issue here is that getExitSet() depends on finding a sibling of the
least-common-compound-ancestor (LCCA) in order to determine the bounds
of the exit set. In this case -- transitioning from Action1 to
Action2 -- the LCCA is 'Child'. However, 'Child' has no siblings. When the LCCA has no siblings, getExitSet() takes the action of including all
subsequent states (in document order) in the exit set.

ryanhol-amazon-com added a commit to ryanhol-amazon-com/uscxml that referenced this issue Mar 12, 2020
Fixed an issue that caused getExitSet() to return an incorrect result in
certain configurations, leading to the unexpected exit of states unrelated to
the active transition.

fixes tklab-tud#193
@ryanhol-amazon-com ryanhol-amazon-com linked a pull request Mar 12, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant