l2 - CS 290C: Formal Models for Web Software Lecture 2:...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 290C: Formal Models for Web Software Lecture 2: Modeling States with Statecharts Instructor: Tevfik Bultan
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Statecharts A visual formalism for specifying hierarchical state machines “A Visual Formalism for Complex Systems,” David Harel, Science of Computer Programming, 1987 Especially useful for modeling reactive systems systems which continuously react to internal or external events without terminating State machines in UML are based on Statecharts Statecharts is a formal language, it has formal semantics
Background image of page 2
Statecharts Statecharts characteristics: Hierarchical grouping of states superstates are formed by grouping other states Superstates can be formed using AND composition or OR composition When the system is in an AND-state it is in all of its substates When the system is in an OR-state it is in only one of its substates If a state has no substates it is an atomic state Synchronization and communication between different parts of the system is achieved using events
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Statecharts A B C D A basic state machine Initial ( default ) state is A If event x occurs while in state A, the next state will be B If event y occurs while in state A, the next state will be C x y t Given the event sequence: y , x, t Behavior of the state machine is: A C D The x event is ignored since it does not enable any transition when the system is in state C Note that we are interested in the behavior of the machine — the paths it takes (including the states it visits. This is different then using the state machines as language recognizers (as in automata theory or compilers) y t
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/27/2011 for the course CMPSC 290h taught by Professor Chong during the Fall '09 term at UCSB.

Page1 / 13

l2 - CS 290C: Formal Models for Web Software Lecture 2:...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online