{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

CS 290C: Formal Models for Web Software Lecture 2: Modeling States with Statecharts Instructor: Tevfik Bultan

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

View Full Document
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
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

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

View Full Document
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
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online