Re: When do statemachine changes become effective

Re: When do statemachine changes become effective

From: Les Munday ^lt;>
Date: Thu 12 May 2005 - 17:48:56 BST
Message-Id: <>
I have been using statecharts prior to UML and even before I'd
heard of Harel and i-Logix. My understanding is that all actions
on a transition, or actions upon entry to a state (depending on
whether using Mealy or Moore) are executed in parallel and it
cannot be determined which finishes first.
> Yet, somehow I think that a property as fundamental as the
question when 
> changes become effective should be part of the core semantics
of UML 
> statemachines. It should not be left open to the action
> Let me refine my examples a bit:
>       evt/x=y         y=x
>     -----------> O ---------->
> I have split the compound action expression into two simple
ones and put 
> them on transition segments joined by a junction point. And,
to put in 
> yet another example, here's a situation where the transitions
> supposed to fire in the same step (being in concurrent regions
of a 
> composite state):
>       evt/x=y
>     ----------->
> - - - - - - - - -
>       evt/y=x
>     ----------->
> In both cases, for a classical Harel statechart, the variables
would be 
> swapped when the transition(s) is/are executed, because any
> caused by the actions become effective in the next step only.
> old publications are very clear about this.
> What's the situation for a UML statemachine, I wonder? As
mentioned in 
> the original post, my intuition says that for the first case
> variables assume the former value of y. For the second case,
I'd say the 
> result is undefined, since you can't really foretell which
> fires first.

Exactly! In the second example it cannot be determined which
completes first, so when it comes to actual implementation it
should not matter in which sequence you code the actions.

I believe that some languages (Ada for example) will actually
allow you to express such a situation and only when the code is
compiled will the order be determined.


Get your own "800" number
Voicemail, fax, email, and a lot more
Received on Thu May 12 17:49:04 2005