RE: SCXML: Fundamental questions

Hello Jim,

Thank you very much for a quick and detailed response.

We have an experimental implementation of SCXML based on these assumptions so this is good news. :)

All the best,
Andrew

From: Barnett, James [mailto:James.Barnett@aspect.com]
Sent: Friday, April 11, 2008 4:24 PM
To: Andrew Emmons; www-voice@w3.org
Subject: RE: SCXML: Fundamental questions

Andrew,
 Your statements are all correct.  For simple (= flat) state machines of the kind you would see in an automata theory class, things can be stated very straightforwardly: "at any point, a state machine is in one and only one state, which is called the 'active' state.  When an event occurs, the state machine may take a transition, instantaneously leaving its current active state and entering another. "  Things are more complicated in SCXML due to nested and parallel states, but the same basic idea applies: at any point an SCXML state machine is either a) in a single _atomic_ (innermost) state, and the other active states are the ancestors of the atomic state, or b) in multiple atomic states, in which case the atomic states are descendents of a single parallel element, and the other active states are the ancestors of those atomic states.

- Jim


________________________________
From: www-voice-request@w3.org [mailto:www-voice-request@w3.org] On Behalf Of Andrew Emmons
Sent: Friday, April 11, 2008 3:50 PM
To: www-voice@w3.org
Subject: SCXML: Fundamental questions


Hello,



Quickoffice has been looking at using SCXML in combination with our SVG implementation.



We have a few quick questions about the very basics of state machines. We were trying to find a clear definition in the spec about what an "active" state is. Or what it means to "activate" a state. Or "being in" a state. This might be an oversight of the spec, or might be something so fundamentally obvious that it was not deemed necessary to specifically describe it, in which case we apologize for the questions.



Consider the following state machine excerpt (transitions omitted):



<scxml>

  <state id="s">

    <state id="s0"/>

    <state id="s1"/>

  </state>

  <state id="t">

    <state id="t0"/>

    <state id="t1"/>

  </state>

</scxml>



Are those statements correct :



- "being in s" means that s is active

- "entering s" means that s becomes active

- generally speaking, if a state machine "is in" a state, it means that state is active (and vice-versa)

- when a substate is active, all its ancestor states are necessarily also active

- thus, if the state machine "is in" s0, it is also necessarily "in" s

- a transition from s0 to t0 necessarily exits s0 and s (they both become inactive) and enters t and t0 (which both become active)



A straightforward answer to those questions will go a long way towards helping us to implement some aspects of the SCXML spec and towards designing proper state machines using SCXML.



Thanks in advance,
Andrew

Andrew Emmons
Architect and Manager, SVG Technologies
Co-Chair, W3C SVG Working Group
Quickoffice, BitFlash Division
Web: www.bitflash.com<http://www.bitflash.com/>,
www.quickoffice.com<http://www.quickoffice.com>

Received on Saturday, 12 April 2008 19:11:27 UTC