Escolar Documentos
Profissional Documentos
Cultura Documentos
for
Software Engineering
Inaction: STOP
Action-prefix: (a -> B)
one
EX = one
two
Actions always in
lowercase; processes
start with uppercase
Local process
definitions
range D=1..2
range B=0..1
BUFFER = (in[b:B][d:D] -> FULL[b][d]),
FULL[b:B][d:D] = (out[b][d] -> BUFFER).
const N=3
range D=1..N
range B=0..1
BUFFER = (in[b:B][d:D] -> FULL[b][d]),
FULL[b:B][d:D] = (out[b][d] -> BUFFER).
||MEDIUM = (BUFFER(2)||BUFFER(2)).
P = (a[i:0..3] ->
(when (i==0) b -> STOP
|when (i!=0) c -> P)).
get
BUFFER2 = (get ->
0 1
put->BUFFER2).
put
in
||SYSTEM = ( BUFFER1
||BUFFER2). 0,1 1,1
out
get
get
put
put
Parallel composition of processes in
with disjoint actions produces the
product transition system of the 0,0 1,0
CONTROL = (c->t->CONTROL). 0 1
tea
T||U = (STxSU,LTLU,->,(t,u))
The state space STxSU of T||U is usually restricted to (s 1,s2) that can
be reached from (t,u) via transitions in ->, i.e. the reachable state
space.
ALTMACH =
||ALTMACH =(CONTROL||MACHINE).
{pay,c,t,coffee,tea}
However,
Because(CONTROL2||MACHINE) has athe
CONTROL2MACHINE={c) transition
action tsystem
of
identical is that
MACHINE to not constrained in (CONTROL2||MACHINE).
of (CONTROL||MACHINE). Why?
{a, b}.acquire
||RESOURCE_SHARE =
0 1
(USERS||{a,b}::RESOURCE).
{a,b}::RESOURCE {a, b}.release
a.acquire
b.release
a.release
CLIENT = (call->wait->continue->CLIENT).
SERVER = (request->service->reply->SERVER).
||CLIENT_SERVER = (CLIENT || SERVER)
/{call/request,reply/wait}.
call service reply
CLIENT_SERVER
0 1 2 3
continue
USER = (acquire->use->release->USER)\{use}. or
USER = (acquire->use->release->USER@{acquire,release).
acquire tau
USER
0 1 2
release
AB = (a->b->AB). S1
BA = (b->a->BA). 0
AorB = ({a,b}->AorB).
tau b tau
||S1 = (AorB||AB||BA). S2
||T = (AorB||AB)\{a}. 0 1 2 3
||S2 = (T||BA). a a
// when visitor v[i] has queued get counter number; when less
// than MAX admit visitor and inc counter, else let him wait.
WAIT[i:V] = (get[n:R] -> (when (n<MAX) v[i].enter -> inc -> ENTER
|when (n==MAX) v[i].wait -> WAIT[i])).
range R=0..MAX
COUNTER = COUNTER[0],
COUNTER[n:R] = (get[n] -> COUNTER[n]
|when (n>0) decr -> COUNTER[n-1]
|when (n<MAX) inc -> COUNTER[n+1]
).
enter
||CORRECT = (OPENMUSEUM
||{{east,west}.v[i:V]}::TEST).
||MUSEUM2 = ( east:GATE2
|| west:GATE2
|| {east,west}::COUNTER
|| {east,west}::LOCK).
Analysing...
Depth 28 -- States: 4564 Transitions: 15864 Memory used: 2683K
No deadlocks/errors
Analysed in: 70ms