Download Model Testing – Combining Model Checking and Coverage Testing

Transcript
Coverage-Driven Model Checking
- 18 -
Fig. 4. Traffic light system specification as an ESG
A supposedly faulty MSyst for the traffic light system is given in Fig. 5 in the form of a
FSM. The states of MSyst represent the colors of the traffic light system. The transitions represent the color changes of the traffic light system. The fault in MSyst is obvious: The state where
the traffic light changes to “red/yellow” is missing. Such a fault is useful to demonstrate how
the approach localizes the injected fault.
Fig. 5. A faulty MSyst as a FSM
Fig. 6 transfers the FSM in Fig. 5 into a Kripke structure. The Kripke structure conserves
the three states red, green and yellow of MSyst as normal states SNS, but rename them as s1, s2
and s3. Additionally three transition states (s4, s5, s6) are generated for each transition in MSyst.
The atomic propositions generated from the events specified in MSpec are assigned to normal
and transition states, expressing either being enabled or executed at that state. For example,
considering the state transition (red, yellow) in Fig. 5, the event yellow must be enabled at
state s1 of the Kripke structure corresponding to the state red in MSyst; thus s1 is labeled with
the atomic proposition yellowen. The additional transition state s4 represents the point of time
where the event yellow is executed; thus it is labeled with the atomic proposition yellowex.
Fig. 6. Kripke structure for MSyst of Fig. 5