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.

Since most of the existing approaches merge all of the<br />

identical states, they result in overgeneralized FSMs. In [7],<br />

some criteria are propos ed to identify identical states that<br />

have emergent behavior. This definition is as follows:<br />

Definition 5: The component i in MSC m has emergent<br />

behavior in state , if there exists MSC n (m and n can be<br />

equal) and a state <br />

, such that and are identical<br />

states and one of the following holds:<br />

i) = where l is a c omponent<br />

and represents message with content c sent<br />

from i to l.<br />

ii) = where lis a co mponent<br />

and represents a message with content c<br />

received by i from l. Component l sends a message<br />

with content c to component i such that i<br />

does not receive this message before event of<br />

in MSC m and by removing this event, still<br />

component l can send .<br />

<br />

iii) State is the final state of MSC n and <br />

is a send message for component i.<br />

iv) Case ii) h olds except th at by removing event of<br />

in MSC m, component l cannot send <br />

anymore. Then, there exist events e and w for l<br />

such that the event of is syntactical cause for<br />

<br />

. Then, states and are identical<br />

and emergent behavior occurs for l.<br />

Only the identical states that result in emergent<br />

behaviors based on Definition 5 s hould be merged and<br />

unnecessary merging for the other states should be avoided.<br />

Behavior Model algorithm (Figure 7), is prop osed to<br />

synthesize behavior models while preventing emergent<br />

behaviors due to overgeneralization.<br />

Algorithm: Behavior Model<br />

Input: Set of message sequence charts (M)<br />

Output: State machines for each component<br />

1. For each component i:<br />

2. Make domain theory D i based on Definition 2.<br />

3. Make state machines and assign state values based on Definition 3.<br />

4. Find identical states based on Definition 4.<br />

5. For each set of identical states:<br />

a. If they lead to emergent behavior based on Definition 5:<br />

Merge the states to one single state.<br />

b. Otherwise, no merging is needed.<br />

Figure 7. Synthesis of emergent behavior preventing<br />

overgeneralization<br />

To show the effectiveness of Definition 5 and the<br />

proposed algorithm, the case study is considered. MSC m1<br />

has emergent behavior since case i) of Definition 5 holds for<br />

it. For th e FSMs of client control in MSC m2 (shown in<br />

Figure 6) the proposed algorithm is applied and the identical<br />

states are f ound to be , and . However, these<br />

states do not lead to e mergent behavior since they do not<br />

hold any of four cases in Definition 5. The reason is that in<br />

cases ii) and i v) of Definition 5, the event that comes after<br />

the identical states should be a receive message while in this<br />

example, the event is a send message. In cases i) and iii) ,<br />

although the event that comes after identical states is<br />

sending message which matches the example, one of the<br />

identical states should be th e final state i n the machine or<br />

the next event should be different for the identical states in<br />

order to produce emergent behavior. Since none of these is<br />

valid for the example, the identical states of MSC m2 do not<br />

lead to emergent behavior and merging them is unnecessary.<br />

V. CONCLUSIONS AND FUTURE WORK<br />

It has been reported that detecting unwanted behavior<br />

during the design phase is 20 times cheaper th an finding<br />

them during the deployment phase [11]. This paper provides<br />

a systematic approach to anal yze system requirements for<br />

defects, while saving on overhead by replacing ad-hoc<br />

methodologies with automated ones. A new algorithm is<br />

developed for behavior model synthesis and emergent<br />

behavior detection while preventing overgeneralization. The<br />

proposed algorithm improves the existing ad-hoc methods<br />

[7, 13]. The future work is implementing the proposed<br />

algorithm as a syntax checker to provide an automated tool<br />

to check and correct the system designs. Moreover this work<br />

can be u tilized as part o f a comprehensive framework to<br />

analyze system requirements and design.<br />

REFERENCES<br />

[1] M. Moshirpour, "Model-Based Detection of Emergent Behavior In<br />

Distributed and Multi-Agent <strong>Systems</strong> from Component Level<br />

Perspective," in Dept. of Electrical and Computer Engineering.<br />

Master of Science Thesis. University of Calgary, 2011.<br />

[2] "ITU: Message Sequence Charts. Recommendation, International<br />

Telecommunication Union," 1992.<br />

[3] "Recommendation Z.120: Message Sequence Chart," Geneva, 1996.<br />

[4] D. Harel and H. K ugler, "Synthesizing state-based object systems<br />

from lsc specifications," IJFCS, 2002.<br />

[5] I. Kruger, R. G rosu, P. Scholz, and M. Broy, "From mscs to<br />

statecharts," in Franz j. rammig (ed.): Distributed and parallel<br />

embedded systems: Kluwer Academic Publis, 1999.<br />

[6] J. Whittle and J. Schumann, "Generating statecharts designs from<br />

scenarios," in ICSE Limerick, Ireland, 2000.<br />

[7] A. Mousavi, "Inference of Emergent Behaviours of Scenario-Based<br />

Specifications," in Dept. of Electrical and Computer Engineering.,<br />

PhD Thesis: University of Calgary, 2009.<br />

[8] J. Grabowski, "Test Generation and Test Case Specification with<br />

Message Sequence Charts," in <strong>Institute</strong> for Informatics and Applied<br />

Mathematics: Universitat Bern, 1994.<br />

[9] H. Muccini, "Detecting implied scenarios analyzing nonlocal<br />

branching choices," in FASE 2003 Warsaw, Poland.<br />

[10] S. Uchitel, J. Kramer, and J. Magee, "Negative scenarios for implied<br />

scenario elicitation," in FSE 2002.<br />

[11] R.F. Goldsmith, Discovering Real Business Requirements for<br />

Software Project Success. Norwood MA: Artech House, Inc., 2004.<br />

[12] K. Koskimies, T. Mannisto, T. Systa, and J. Tuonmi, "Automated<br />

support for modeling oo software," IEEE Software, pp. 15(1):87–94,<br />

1998.<br />

[13] M. Moshirpour, A. Mousavi, and B.H. Far, "Detecting Emergent<br />

Behavior in D istributed <strong>Systems</strong> Using Scenario-Based<br />

Specifications," in Proc. of <strong>SEKE</strong>, 2010, pp. 349-354.<br />

73

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

Saved successfully!

Ooh no, something went wrong!