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
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
2.2. CCS, FORMALLY 33<br />
• If B is empty, then it is only willing to accept one datum as input along a<br />
channel called ‘in’. The received datum is stored for further output.<br />
• If B is full, then it is only willing to output the successor of the value it stores,<br />
<strong>and</strong> empties itself in doing so.<br />
This behaviour of B can be modelled in value passing CCS thus:<br />
B(x)<br />
B def<br />
= in(x).B(x)<br />
def<br />
= out(x + 1).B .<br />
Note that the input prefix ‘in’ now carries a parameter that is a variable—in this<br />
case x—whose scope is the process that is prefixed by the input action—in this<br />
example, B(x). The intuitive idea is that process B is willing to accept a nonnegative<br />
integer n as input, bind the received value to x <strong>and</strong> thereafter behave like<br />
B(n)—that is, like a full one-place buffer storing the value n. The behaviour of<br />
the process B(n) is then described by the second equation above, where the scope<br />
of the formal parameter x is the whole right-h<strong>and</strong> side of the equation. Note that<br />
output prefixes, like ‘out(x+1)’ above, may carry expressions—the idea being that<br />
the value being output is the one that results from the evaluation of the expression.<br />
The general SOS rule for input prefixing now becomes<br />
a(x).P a(n)<br />
→ P [n/x]<br />
n ≥ 0<br />
where we write P [n/x] for the expression that results by replacing each fr<strong>ee</strong> occurrence<br />
of the variable x in P with n. The general SOS rule for output prefixing<br />
is instead the one below.<br />
ā(e).P ā(n)<br />
→ P<br />
n is the result of evaluating e<br />
In value passing CCS, as we have already s<strong>ee</strong>n in our definition of the one place<br />
buffer B, process names may be parameterized by value variables. The general<br />
form that these parameterized constants may take is A(x1, . . . , xn), where A is a<br />
process name, n ≥ 0 <strong>and</strong> x1, . . . , xn are distinct value variables. The operational<br />
semantics for these constants is given by the following rule.<br />
P [v1/x1, . . . , vn/xn] α → P ′<br />
A(e1, . . . , en) α → P ′<br />
A(x1, . . . , xn) def<br />
= P <strong>and</strong> each ei has value vi