- From: chris nuernberger <cnuernber@gmail.com>
- Date: Fri, 8 Mar 2013 09:32:58 -0700
- To: Jim Barnett <Jim.Barnett@genesyslab.com>
- Cc: David Junger <tffy@free.fr>, "www-voice@w3.org" <www-voice@w3.org>
- Message-ID: <CAG=GWvfmeqYLH+=Sfj7vpB9SMW43X4MZNXqeKyNvDrpk6=TDLQ@mail.gmail.com>
Furthermore you could have conditions in the datamodel which have changed thus enabling eventless transitions even though to an outside observer you are testing the same eventless transition set over and over again. Chris On Fri, Mar 8, 2013 at 5:57 AM, Jim Barnett <Jim.Barnett@genesyslab.com>wrote: > David,**** > > The intent is that eventless transitions always take priority, so we test > them first each time around the loop. For example, suppose we take a > transition from S1 to S2 on internal event e. The first thing we do in S2 > is test for eventless transitions. Even though there were no eventless > transitions enabled in S1 (if there were, we would have taken them instead > of dequeuing e), there may be new ones enabled once we reach S2. S1’s > onexit handlers, the executable content in the transition, or S2’s onentry > handlers may all have modified the datamodel. (The most obvious use case > would be an onentry handler that counts how often you have entered the > state with eventless transitions providing special behavior based on the > count.) **** > > ** ** > > **- **Jim**** > > ** ** > > *From:* David Junger [mailto:tffy@free.fr] > *Sent:* Friday, March 08, 2013 5:13 AM > *To:* Jim Barnett > *Cc:* www-voice@w3.org > *Subject:* Re: revised mainEventLoop**** > > ** ** > > Le 21 feb 2013 à 16:27, Jim Barnett a écrit :**** > > > > **** > > # Here we handle eventless transitions and transitions**** > > # triggered by internal events until macrostep is complete**** > > while running and not macrostepDone:**** > > enabledTransitions = selectEventlessTransitions()**** > > if enabledTransitions.isEmpty():**** > > if internalQueue.isEmpty():**** > > macrostepDone = true**** > > else:**** > > internalEvent = internalQueue.dequeue()**** > > datamodel["_event"] = internalEvent**** > > enabledTransitions = selectTransitions(internalEvent)* > *** > > if not enabledTransitions.isEmpty():**** > > microstep(enabledTransitions.toList())**** > > ** ** > > If I read it right, it means that eventless transitions are tested every > time we dequeue an internal event. The only reason to do that would be if > you had eventless transitions testing the contents of _event, which would > be kind of hypocritical for "eventless" transitions. If that's not intented > (and the fact that external events don't do that suggests it is not), then > we should test eventless transitions just once, and then ignore those while > consuming internal events.**** > > ** ** > > David**** > -- A foolish consistency is the hobgoblin of little minds - Emerson
Received on Friday, 8 March 2013 16:33:34 UTC