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
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
7.3. TESTING MUTUAL EXCLUSION 171<br />
Definition 7.3 [Tests] A test is a finite, rooted LTS T over the set of actions Act ∪<br />
{bad}, where bad is a distinguished channel name not occurring in Act. We use<br />
root(T ) to denote the start state of the LTS T . <br />
As above, the idea is that a test acts as a monitor that ‘observes’ the behaviour of<br />
a process <strong>and</strong> reports any occurrence of an undesirable situation by performing a<br />
bad-labelled transition.<br />
In the remainder of this section, tests will often be concisely described using<br />
the regular fragment of Milner’s CCS—that is the fragment of CCS given by the<br />
following grammar :<br />
T ::= 0 | α.T | T + T | X ,<br />
where α can be any action in Act as well as the distinguished action bad, <strong>and</strong> X<br />
is a constant drawn from a given, finite set of process names. The right-h<strong>and</strong> side<br />
of the defining equations for a constant can only be a term generated by the above<br />
grammar. For example, the process MutexTest we specified above is a regular CCS<br />
process, but the term<br />
X def<br />
= a.(b.0 | X)<br />
is not.<br />
We now proc<strong>ee</strong>d to describe formally how tests can be used to check whether<br />
a process satisfies a formula expressed in HML with recursion.<br />
Definition 7.4 [Testing properties] Let F be a formula in HML with recursion,<br />
<strong>and</strong> let T be a test.<br />
• For every state s of an LTS, we say that s passes the test T iff<br />
(s | root(T )) \ L bad<br />
.<br />
(Recall that L st<strong>and</strong>s for the collection of observable actions in CCS except<br />
for the action bad.) Otherwise we say that s fails the test T .<br />
• We say that the test T tests for the formula F (<strong>and</strong> that F is testable) iff for<br />
every LTS T <strong>and</strong> every state s of T ,<br />
s |= F iff s passes the test T .<br />
• A collection of formulae in HML with recursion is testable iff each of the<br />
formulae in it is.