Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4 Model checking/OBDDs Design by contract

Similar presentations


Presentation on theme: "Lecture 4 Model checking/OBDDs Design by contract"— Presentation transcript:

1 Lecture 4 Model checking/OBDDs Design by contract
OCL: Object constraint language for pre and post conditions, invariants etc. Testing multi-threaded programs Testing state machines and statecharts

2 Chapter 19: State machines and statecharts
Widely used: graphical user interfaces, networking protocols. Important role in object-oriented design: some objects contain own state machine or state chart. Also useful for multi-object coordination (traversal state).

3 State machine or statechart
Two purposes model describes a portion of the system implementation framework provides skeleton for implementation

4 State machines May grow large and cumbersome
Therefore, David Harel invented statecharts

5 Statecharts State actions Example on entry on exit
do (called activity) Example on entry: notify repair center on exit: log repair do: flash service light

6 Statecharts Conditional state transitions
Nested states: very useful. Allow to treat individual state as a state machine. Allow for clear boundaries between parts of the graph

7 Concise artifacts: a comparison
State machine: Statechart sometimes exponentially smaller Decision tree: BDD (binary decision diag.) sometimes exponentially smaller

8 Start (H) Ready Warmup Quality_ Check Copying Alternate_Start Backup_
ok Is_warm Quality_ Check stop start on Copying Alternate_Start Backup_ Check_ Quality Backup_ Warmup Is_warm fault Error Low_resolution

9 When and how to build models
If a subsystem has a behavior that could be described with a state model but does not have one, create it. Helps with fault finding.


Download ppt "Lecture 4 Model checking/OBDDs Design by contract"

Similar presentations


Ads by Google