Re: Non-determinism in Statecharts



Date view Thread view Subject view Author view Attachment view

From: Kinika Tasie-Amadi (kinika@yahoo.com)
Date: Sun 19 Sep 2004 - 01:25:36 BST


 --- Andreia Melo <andreia@det.ua.pt> wrote: 
> Dear all,
> 
> Is it possible to specify non-determinism in
> Statecharts?

yes it is, if non-determinism is with respect to the
sequence of actions that a transition performs in
response to a particular event from a particular
state.

> If yes, how?
> 

according to the UML standard, if more than one of the
guards of transitions from a choice vertex evaluates
to true, an *arbitrary* one is selected. so, for
example, let a transition triggered by input x target
a choice vertex, where one transition from that choice
vertex perform action y, and another transition from
that choice vertex perform action z. if both
transitions from the choice vertex have a guard that
is set to 'true', then the response to input x is
either action y or action z, where the choice is
resolved non-deterministically.

it is also the case that if a transition causes entry
into a *concurrent* state, and two (or more) regions
in that concurrent state have entry actions, then the
order of the performance of those entry actions is
non-deterministic. for example, assume that a
transition enters concurrent state S, parent of states
(and regions) A and X. further, let the entry actions
of A be a followed by b (denoted this as a -> b), and
let the entry actions of X be x followed by y followed
by z (denote this as x -> y -> z). then,
non-deterministically, the actual sequence of actions
performed due to the transition will be a -> x -> b ->
y -> z OR x -> a -> y -> z -> b OR one of eight other
permutations.

sincerely
Kinika


> Thank you in advance,
> Andreia
> 
>
--------------------------------------------------------------
> Engª Andreia Barbosa de Melo
> Dep. Electrónica e Telecomunicações
> Universidade de Aveiro - Portugal
> Gab. 306, ext telef. 23029
> email: andreia@det.ua.pt
> homepage: http://www.ieeta.pt/~andreia
> 
>  


	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun!  http://uk.messenger.yahoo.com

Date view Thread view Subject view Author view Attachment view