14.08.2013 Views

Reactive Systems: Modelling, Specification and Verification - Cs.ioc.ee

Reactive Systems: Modelling, Specification and Verification - Cs.ioc.ee

Reactive Systems: Modelling, Specification and Verification - Cs.ioc.ee

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.

CHAPTER 6. HML WITH RECURSION 117<br />

expressed by the conjunct [a] i 〈a〉tt because a is the only action in our<br />

example labelled transition system).<br />

On the other h<strong>and</strong>, the process q has the option of terminating at any time by performing<br />

the a-labelled transition leading to process r, or equivalently it is possible<br />

from q to satisfy [a]ff. Let us call this property Pos([a]ff). We can express it in<br />

an extension of HML as the following infinite disjunction:<br />

Pos([a]ff) = [a]ff ∨ 〈a〉[a]ff ∨ 〈a〉〈a〉[a]ff ∨ · · · = <br />

〈a〉 i [a]ff ,<br />

where 〈a〉 i st<strong>and</strong>s for a sequence of modal operators 〈a〉 of length i. This formula<br />

can be read as follows:<br />

In order for a process to have the possibility of refusing an a-action at<br />

some point, this action should either be refused now (as expressed by<br />

the disjunct [a]ff), or, for some positive integer i, it should be possible<br />

to reach a state in which an a can be refused by performing a sequence<br />

of i actions (as expressed by the disjunct 〈a〉 i [a]ff because a is the<br />

only action in our example labelled transition system).<br />

Even if it is theoretically possible to extend HML with infinite conjunctions <strong>and</strong><br />

disjunctions, infinite formulae are not particularly easy to h<strong>and</strong>le (for instance they<br />

are infinitely long, <strong>and</strong> we would have a hard time using them as inputs for an<br />

algorithm). What do we do instead? The answer is in fact both simple <strong>and</strong> natural<br />

for a computer scientist; let us introduce recursion into our logic. Assuming for the<br />

moment that a is the only action, we can then express Inv(〈a〉tt) by means of the<br />

following recursive equation:<br />

i≥0<br />

X ≡ 〈a〉tt ∧ [a]X , (6.1)<br />

where we write F ≡ G if <strong>and</strong> only if the formulae F <strong>and</strong> G are satisfied by exactly<br />

the same processes—i.e., if [F ] = [G]. The above recursive equation captures the<br />

intuition that a process that can invariantly perform an a-labelled transition—that<br />

is, one that can perform an a-labelled transition in all of its reachable states—can<br />

certainly perform one now, <strong>and</strong>, moreover, each state that it reaches via one such<br />

transition can invariantly perform an a-labelled transition. This looks deceptively<br />

easy <strong>and</strong> natural. However, the mere fact of writing down an equation like (6.1)<br />

does not mean that this equation makes sense! Ind<strong>ee</strong>d, equations may be s<strong>ee</strong>n as

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

Saved successfully!

Ooh no, something went wrong!