07.01.2013 Views

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

Lecture Notes in Computer Science 3472

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

18 Run-Time Verification 547<br />

In the case of the railway gate example, the correspond<strong>in</strong>g MEDL script conta<strong>in</strong>s<br />

the formula:<br />

↑ is open<strong>in</strong>g ⇒ [clos<strong>in</strong>g, ↓ is flash<strong>in</strong>g).<br />

If we consider the trace open, off, flash<strong>in</strong>g, clos<strong>in</strong>g, closed, open<strong>in</strong>g, open,<br />

off, the run-time checker will observe the follow<strong>in</strong>g states:<br />

• s0: ¬is open<strong>in</strong>g, ¬is flash<strong>in</strong>g<br />

• s1: ¬is open<strong>in</strong>g, is flash<strong>in</strong>g<br />

• s2: ¬is open<strong>in</strong>g, is flash<strong>in</strong>g, clos<strong>in</strong>g<br />

• s3: is open<strong>in</strong>g, is flash<strong>in</strong>g<br />

• s4: ¬is open<strong>in</strong>g, is flash<strong>in</strong>g<br />

• s5: ¬is open<strong>in</strong>g, ¬is flash<strong>in</strong>g<br />

State s0 is def<strong>in</strong>ed by the pair of events open and off; thens1 is obta<strong>in</strong>ed<br />

from s0 when event flash<strong>in</strong>g takes place. Further states are obta<strong>in</strong>ed by consider<strong>in</strong>g<br />

rema<strong>in</strong><strong>in</strong>g events. For this trace, the formula ↑ is open<strong>in</strong>g ⇒ [clos<strong>in</strong>g, ↓<br />

is flash<strong>in</strong>g) is true on all states. The value of this formula is computed for each<br />

state us<strong>in</strong>g Table 18.1 and 18.5.3:<br />

• s0: true because ¬is open<strong>in</strong>g<br />

• s1: true because ¬is open<strong>in</strong>g<br />

• s2: true because ¬is open<strong>in</strong>g<br />

• s3: true because <strong>in</strong> s2 the event clos<strong>in</strong>g has been triggered and s<strong>in</strong>ce it,<br />

is flash<strong>in</strong>g was hold<strong>in</strong>g<br />

• s4: true because ¬is open<strong>in</strong>g<br />

• s5: true because ¬is open<strong>in</strong>g<br />

Note that it is necessary to store all traces to evaluate MaC formulas.<br />

Exercise 18.4 (Algorithm Application). Consider the trace open, off, flash<strong>in</strong>g,<br />

clos<strong>in</strong>g, closed, off, open<strong>in</strong>g, open, derive <strong>in</strong>formation sent to the run-time<br />

checker, and evaluate the formula ↑ is open<strong>in</strong>g ⇒ [clos<strong>in</strong>g, ↓ is flash<strong>in</strong>g) for<br />

each state (the formula does not hold <strong>in</strong> all states) us<strong>in</strong>g Table 18.1 and 18.5.3.<br />

Last Work on MaC MaC can detect violation of properties, but cannot provide<br />

any feedback to the runn<strong>in</strong>g system. To overcome this limit, the MaC system<br />

has been extended with a feedback capability. The result<strong>in</strong>g system is called<br />

MaCS (Monitor<strong>in</strong>g and Check<strong>in</strong>g with Steer<strong>in</strong>g) [KLS + 02]. The feedback component<br />

uses the <strong>in</strong>formation collected dur<strong>in</strong>g monitor<strong>in</strong>g and check<strong>in</strong>g to steer<br />

the application back to a safe state after an error occurs.<br />

Computational issues of monitor<strong>in</strong>g by MaC have been <strong>in</strong>vestigated by Kim<br />

et al [KKL + 02]. Moreover, Sammapun et al. [SSD + 03] have def<strong>in</strong>ed a formal<br />

model of Java MaC safety properties <strong>in</strong> terms of an operational semantics for<br />

Middleweight, which is a considerable subset of the Java language.

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

Saved successfully!

Ooh no, something went wrong!