11.10.2013 Views

Slides Part 2 (OOA, pages 1-128, pdf, 4 slides per page)

Slides Part 2 (OOA, pages 1-128, pdf, 4 slides per page)

Slides Part 2 (OOA, pages 1-128, pdf, 4 slides per page)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LIFE-CYCLE EXPRESSIONS<br />

The Life-Cycle model<br />

Expressions over the alphabet: 〈system o<strong>per</strong>ation〉, #〈output event〉<br />

113<br />

Each system o<strong>per</strong>ation and each expression of the form #〈output event〉 is a<br />

life-cycle expression.<br />

If x and y are life-cycle expressions then so are<br />

x;y x is followed by y<br />

x | y either x or y<br />

x∗ x is executed 0 or more times<br />

x + x is executed at least once<br />

[x] x is optional<br />

x || y x and y are executed concurrently<br />

O<strong>per</strong>ator precedences: [], ∗ , + , ;, |, ||<br />

115<br />

PURPOSE<br />

➠ describe the overall behavior of the whole system or describe the life-cycle<br />

of important objects<br />

➠ restrict the order in which the system o<strong>per</strong>ations may be invoked<br />

➠ Notation:<br />

• Fusion: life-cycle expressions<br />

• UML: state machine diagrams<br />

Definitions: name = life-cycle expression<br />

name can then be used in other life-cycle expressions (but recursion is not<br />

allowed!)<br />

114<br />

Rule:<br />

All system o<strong>per</strong>ations and all output events must occur in the life-cycle model!<br />

116

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

Saved successfully!

Ooh no, something went wrong!