Re: When do statemachine changes become effective



Re: When do statemachine changes become effective

From: Kinika Tasie-Amadi ^lt;kinika@yahoo.com>
Date: Mon 11 Jul 2005 - 23:23:04 BST
Message-ID: <20050711222305.73549.qmail@web32213.mail.mud.yahoo.com>
Section 2.12.5.4 of the UML standard (page 2-169 in
UML 1.5) is concerned with the differences between UML
state machines and classical Harel statecharts. One of
the differences is "Actions on transitions [in UML
state machines] are executed in their given order".


--- Les Munday <baldrick@ureach.com> wrote:

> 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
> language.
> > 
> > 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
> are 
> > 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
> changes 
> > caused by the actions become effective in the next
> step only.
> Harel's 
> > 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
> both 
> > 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
> transition 
> > 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.
> 
> Les.
> 
> ________________________________________________
> Get your own "800" number
> Voicemail, fax, email, and a lot more
> http://www.ureach.com/reg/tag
> 
> 
> 
> To remove yourself from this list please mail
> puml-list-request@cs.york.ac.uk
> with a message containing the word "unsubscribe".
> 
> 



		
___________________________________________________________ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
Received on Mon Jul 11 23:23:38 2005