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 543<br />

correctly with respect to formal requirements. MaC uses two different logics<br />

for specify<strong>in</strong>g monitor<strong>in</strong>g scripts and safety requirements. Ma<strong>in</strong> phases of the<br />

framework are:<br />

(1) system requirements are formalized and a monitor<strong>in</strong>g script is written; the<br />

monitor<strong>in</strong>g script is used to <strong>in</strong>strument the code for establish<strong>in</strong>g a mapp<strong>in</strong>g<br />

from low-level <strong>in</strong>formation to high-level events<br />

(2) at run-time, events generated by the <strong>in</strong>strumented system are checked with<br />

respect to requirements<br />

MaC Architecture The run-time monitor<strong>in</strong>g and check<strong>in</strong>g architecture consists<br />

of three components: the filter, the event recognizer, and the run-time<br />

checker. The filter extracts low-level <strong>in</strong>formation from the system, such as both<br />

value of program variables and time when those variables change their values,<br />

and sends them to the event recognizer. The event recognizer converts received<br />

events <strong>in</strong>to both high-level events and conditions that are sent to the run-time<br />

checker.<br />

Events delivered to the checker have a timestamp which reflects the actual<br />

time of the occurrence of the event. The timestamp enables monitor<strong>in</strong>g of realtime<br />

properties of the system. The run-time checker checks correctness of the<br />

executions accord<strong>in</strong>g to the requirement specification, events provided from the<br />

event recognizer, and past history. The current prototype of the MaC framework<br />

supports <strong>in</strong>strumentation and monitor<strong>in</strong>g of Java bytecode.<br />

Events and Conditions Monitor<strong>in</strong>g scripts def<strong>in</strong>ed by the Primitive Event<br />

Def<strong>in</strong>ition Language (PEDL) are used to specify both the <strong>in</strong>formation that is sent<br />

from the filter to the event recognizer, and how this <strong>in</strong>formation is transformed<br />

<strong>in</strong>to requirement-level events by the event recognizer. In particular, when an<br />

“<strong>in</strong>terest<strong>in</strong>g” event occurs <strong>in</strong> the runn<strong>in</strong>g system, the filter sends a notification<br />

to the event recognizer. Two possible k<strong>in</strong>ds of notification exist: events which<br />

occur <strong>in</strong>stantaneously dur<strong>in</strong>g the system execution, and conditions which are<br />

<strong>in</strong>formation hold<strong>in</strong>g for a duration of time. S<strong>in</strong>ce events are associated with the<br />

time of their occurrence and conditions are associated to their duration, it is<br />

possible to reason about tim<strong>in</strong>g properties of monitored systems.<br />

Sometimes, variables can become undef<strong>in</strong>ed because they are out of scope.<br />

To support reason<strong>in</strong>g even on such variables, a three-valued logic is used for<br />

PEDL: <strong>in</strong> addition to true and false, formulas can be evaluated to undef<strong>in</strong>ed<br />

(thesymbolused<strong>in</strong>suchcaseis⊥).<br />

MaC Logic The logic has two sorts: conditions and events. The syntax of conditions<br />

(C ) and events (E) is as follows, where c is a primitive condition and e<br />

is a primitive event:<br />

C ::= c | def<strong>in</strong>ed(C ) | [E, E) | ¬C | C ∨ C | C ∧ C | C ⇒ C<br />

E ::= e |↑C |↓C | E ∨ E | E ∧ E | E when C

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

Saved successfully!

Ooh no, something went wrong!