27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Definition 2: For a set of MSCs M, the domain theory<br />

D i for each co mponent i is defined as: ,<br />

then the pair is in the domain theory D i .<br />

From Definition 2, (" send signal (mine detected)",<br />

"stop") from Figure 3 is in the domain theory. This is used<br />

in [7] to define a method to quantify the states.<br />

In [6], several variables are defined to differentiate the<br />

states of a component. However, it leads to having different<br />

behaviors when producing various behavior models for a<br />

single component. Choosing between these models is hard<br />

as they cannot be compared. In [13], it is proposed to use the<br />

invariant properties of the system to find a unique way of<br />

calculating the state values as described below:<br />

Definition 3: In the finite state machine shown with<br />

tuple Σ , for the final state the<br />

state value is calculated as: , and for<br />

0 < k < f the state value is defined as follows:<br />

i) , if there exist<br />

some j and l such that j is the maximum index that<br />

.<br />

ii) if case i) does n ot hold<br />

but , for some k < .<br />

iii) , if none of the above cases hold.<br />

<br />

The value of is related to message that comes after.<br />

For case i), the semantic cause is .<br />

For case ii), is the only semantic cause. Finally,<br />

there is not any semantic cause for case iii). The Order of<br />

messages is used to achieve state values.<br />

The state v alues that are f ound using Definition 3 are<br />

effective for analyzing the system behaviors. After<br />

constructing the FSMs from various scenarios or a sin gle<br />

scenario, to clearly analyze the system behavior, the FSMs<br />

for each co mponent are blended. Therefore, the concept of<br />

identical states is defined as:<br />

<br />

Definition 4: For each component i, two states and<br />

<br />

form the MSCs m and n (m can be eq ual to n ) are<br />

identical states if any of following holds:<br />

i) j = k for .<br />

ii) .<br />

Following the example in Figure 3, the FSMs are<br />

blended in Figure 4 where states are as signed with<br />

appropriate state values. Initial and final state values are 1.<br />

The presence of identical states in the behavior models<br />

may result in emergent behavior since the component may<br />

be confused when the next message is received. Therefore,<br />

dealing with these issues is an i mportant challenge in<br />

analyzing the behavior models. Once the identical states are<br />

found, the finite state machines are merged by merging the<br />

found identical states. In Figure 3, emergent behavior occurs<br />

for component client control as a result of identical states<br />

and <br />

<br />

in MSC m1 when the content of "send<br />

signal" messages are not considered. These identical states<br />

are then merged as shown in Figure 5.<br />

f0<br />

Send signal<br />

f1<br />

motors move forward<br />

Stop motors<br />

f2<br />

f3<br />

Rotate<br />

Figure 5. Merging identical states of FSMs for client control of<br />

MSC m1<br />

IV.<br />

Stop<br />

DETECTING EMERGENT BEHAVIOR<br />

The method proposed in [13] merges all the identical<br />

states without considering whether they may produce<br />

emergent behaviors or not. This is an important issue since<br />

merging the identical states that do not produce emergent<br />

behaviors results in overgeneralization in th e behavior<br />

models. Furthermore, merging all th e identical states takes<br />

too much unnecessary time and resources.<br />

In the FSMs of MSC m1 (Figure 3), identical states<br />

leading to e mergent behavior are shown. These states are<br />

identified and merged in Figures 4 and 5 , respectively. In<br />

Figure 6, another example is considered where the FSM for<br />

MSC m2 (presented in Figure 2) is given. Then, states<br />

values are found and the identical states are identified to be<br />

, and . However, these states do n ot lead to<br />

emergent behaviors as the component never gets confused in<br />

performing the messages. Hence, merging is not necessary.<br />

ff<br />

ff<br />

Send signal(less than 10 km)<br />

V(s m1 1)<br />

motors move forward<br />

V(s m1 2)<br />

Rotate<br />

1<br />

S m2 Send signal (battry has power)<br />

0<br />

S m2 motors move forward<br />

1<br />

S m2 2<br />

Rotate<br />

S m2 3<br />

Send signal(no obstacle detected)<br />

1<br />

Send signal(obstacle detected)<br />

Send signal(mine detected)<br />

V(s m1 1)<br />

stop motors<br />

V(s m1 2)<br />

Stop<br />

1<br />

S m2 Send signal (no mine detected)<br />

Rotate<br />

7 S m2 6 S m2 5<br />

motors move forward<br />

S m2 4<br />

motors move forward<br />

V(s m1 1)<br />

stop motors<br />

V(s m1 2)<br />

Stop<br />

1<br />

S m2 8<br />

Rotate<br />

S m2 f<br />

Figure 4. Blending FSMs for client control of MSC m1<br />

Figure 6. FSM for component client control of MSC m2<br />

72

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!