• Nenhum resultado encontrado

Lemmas and Corollaries

No documento Universidade de Brasília (páginas 120-134)

Capítulo 3 Background

H- Calculus for High-Level Synthesis

A.2 Lemmas and Corollaries

Lemma 1(Right Inversion). IfΣI;∆I C,env(Tc, Ts, k, t) ::

ΣO;∆O, c:S then proc

r P

c

∈ CwhereΣ;∆ T

s,Tc k,t P ::

c: [S]+(kTs+t) .

Demonstração. Inversion onprocandcompose

Lemma 2(Left Inversion). IfΣI;∆I, c:S C,env(Tc, Ts, k, t) ::

ΣO;∆O then hproc

ri Pi

xii

i[1,n]∈ CwhereΣi;∆i, c:Si T

s,Tc k,t Pi ::

xi :Si

andQn

i=1Si = [S]+(kTs+t).

Demonstração. Inversions onprocandcompose

Lemma 3(Resource Inversion). IfΣI;∆I C,env(Tc, Ts, k, t) ::

ΣO, r:R;O

then either I. idle(r)∈ C, or

II. proc r

P

x

∈ C

Demonstração. Inversions onproc,idle, andcompose

Lemma 4(Combreduction). If−;∆ Closed{ C }:: (r:R;x:A)with proc

q

Comb(f , d, z←(y1,· · ·, yn)) z

∈ C, for anyq,f,d,y1,· · ·, ynandz,x, then either 1. C−−−−−Closed→ D, for someD, or

2. Cis communicating throughc∈∆orx.

Demonstração. This lemma is proved using a recursive proof that only terminates because theh-calculus does not permit cyclical references.

ΣC;∆∆C C:: (ΣC, r :R;C, x:A) (by inversion on (Closed) and substitution) for someΣC andC

(by inversion onComb)

−;y1:d1T1s(t+d1)1,· · ·, yn:dnTns(t+dn)1 k,ts,c Comb(f , p, z←(y1,· · ·, yn)) ::

z:max(d1,···,dn)pTouts(t+max(d1,···,dn)+p)1

wheres > t+max(d1,· · ·, dn) +pandp >0

i ∈[1, n].yi ∈∆∆C (By (proc))

i ∈[1, n].eitheryi ∈∆oryi∈∆C (By Lemma 2)

We analyse two subcases: If there is ak∈[1, n]such thatyk ∈∆, and if for alli ∈[1, n].yi

C.

Case I(∃k ∈[1, n].yk ∈ ∆). By definition of communication, C is communicating through yk ∈∆so case 2 applies.

Case II(∀i ∈[1, n].yi ∈∆C).

C=C00,h proc

qyi Piy

yii

i[1,n] (by applications of Lemma 1)

whereΣi;∆i s,ck,t Piy::

yi:diTis(t+di)1 for someC00,qyi,Σi andi

(by inversions on (Comb) and (Signal-1)) Piy=Comb(gi, pi, yi ←(w1,· · ·, wm)) orPiy=Sig(di, yiei)

for somem, pi, gi, w1,· · ·, wmandei

We analyse two subcases: If there is ak∈[1, n]such thatPky=Comb(gk, pk, yk ←(w1,· · ·, wm)), and if for alli ∈[1, n].Piy=Sig(di, yiei).

Case II.I(∃k∈[1, n].Pky=Comb(gk, pk, yk ←(w1,· · ·, wm))).

C=C00,proc qk

Comb(gk, pk, yi ←(w1,· · ·, wm)) yk

(by substitution and generalization) for someC00

By applying Lemma 4 recursively we know that eitherC−Closed−−−−→ D, for someD(case 1), orC is communicating throughc∈∆orx(case 2).

Case II.II(∀i∈[1, n].Piy=Sig(di, yiei)).

(by substitution and generalization) C=C000,proc

q

Comb(f , p, z←(y1,· · ·, yn)) z

,h proc

qiy

Sig(di, yiei) yii

i[1,n]

for someC000

C−−−−−Closed→ C000,proc q

Sig(max(d1,· · ·, dn) +p, zf (e1,· · ·, en)) z

(by Comb) Case 1 applies.

Lemma 5(Regreduction). If−;∆ Closed{ C }:: (r:R;x:A)withproc

q

Reg(z←y) z

∈ C, for anyC0,q,y andz,x, then either 1. C−−−−−Closed→ D, for someD, or

2. Cis communicating throughc∈∆orx.

Demonstração.

ΣC;∆∆C C:: (ΣC, r :R;C, x:A) (by inversion on (Closed) and substitution) for someΣC andC

−;y:dTs(t+d)1 k,ts,c Reg(z←y) ::

z:stTs1

(by inversion onReg) wheres > t+d

y∈∆∆C (By (proc))

Eithery∈∆ory∈∆C (By Lemma 2)

Case I(y∈∆). By definition of communication,Cis communicating throughy∈∆so case 2 applies.

Case II(y∈∆C).

C=C00,proc q

Reg(z←y) z

,proc qy

Py

y

(by applications of Lemma 1) for someC00 andqy

(by inversions on (Comb) and (Signal-1)) Py=Comb(g, p, y←(w1,· · ·, wm)) orPy=Sig(d, y←e)

for somem, p, g, w1,· · ·, wmande

Case II.I(Py=Comb(g, p, y←(w1,· · ·, wm))).

C=C00,proc qk

Comb(g, p, y←(w1,· · ·, wm)) yk

(by substitution and generalization) for someC00

By Lemma 4, either C−−−−−Closed→ D, for some D(case 1), orC is communicating through c∈∆ orx (case 2).

Case II.II(Py=Sig(d, y←e)).

(by substitution and generalization) C=C000,proc

q

Reg(z←y) z

,proc qy

Sig(d, y←e) y

,env(c, s, t, k) whereC00=C000,env(c, s, t, k)

(by Reg) C−−−−−Closed→ C00,idle(r),proc

ticksd;clock; a←Sig(0, a0e)← {−;−}; ya y freshaanda0

Case 1 applies.

Lemma 6(Internal resource request). IfΣC;∆∆C C:: (ΣC;∆C, x:A)andCis requesting resourcem∈ΣC thenC−−−−−Closed→ D, for someD.

Demonstração.

ΣC;∆∆C C:: (ΣC;∆C, x:A) (from main assumption) C=C0,proc

p

bm← {Σp;∆p};P d

(from Definition 38) for someC0,b,Σp,p,P andd

C=C00,idle(mBMm] [∆m] [y]) orC=C0,proc m

Mm] [∆m] [y]

y

(by Lemma 3) for someC00,M,Σm,mandy

We proceed analysing both cases:

Case I(C=C00,idle(mBMm] [∆m] [y])).

(from Definition of context) C=E,idle(mBMm] [∆m] [y]),proc

p

bm← {Σp;∆p};P d

(by(inst-1)) C−−−−−Closed→ E,proc

m

Mp

Σm] [∆p

m] [a y]

a

,proc p

P[a

b]

d (fresha)

Case II(C=C0,proc m

Mm] [∆m] [y]

y

).

(from Definition of context) C=E,proc

m

Mm] [∆m] [y]

y

,proc p

bm← {Σp;∆p};P d

(by(ext-2)) C−−−−−Closed→ E,proc

m

M[(Σp×Σm)

Σm] [(∆p×∆m)

m] [a y]

y

,proc p

P[a

b]

d (fresha)

Lemma 7(Internal communication). IfΣC;∆∆C C:: (ΣC, r:R;∆C, x:A)andCis com-municating throughc∈∆C then either

1. C−−−−−Closed→ D, for someD, or

2. Cis communicating throughc∈∆orx.

Demonstração.

ΣC;∆∆C C:: (ΣC, r :R;C, x:A) (from main assumption)

(c:S)∈∆C (generalization)

for someS

C=C0,env(Tc, Ts, k, t) (by Def. of Well-Formed Configuration) for someC0, Ts, Tc, k andt

C0=C00,proc rR

PR

c

(by Lemma 1) whereΣR;∆R T

s,Tc

k,t PR::

c:S for someC00, rR, PR,R andΣR C0=C000,h

proc riL

PiL

xii

i[1,n] (by Lemma 2)

whereΣLi;∆Li, c:Si T

s,Tc

k,t PiL::

xi:Ai and

Yn

i=1

Si=S for anyC000, n, riL, PiL, xi, Ai,ΣLi and∆Li

C0=C,h proc

riL PiL

xii

i[1,n],proc rR

PR

c

(by Def. of Well-Formed Configuration) since∀i ∈[1, n].xi,c

for someC C=C,h

proc riL

PiL

xii

i[1,n],proc rR

PR

c

,env(Tc, Ts, k, t) (by substitution) ΣI;∆I C,env(Tc, Ts, k, t) ::

ΣO;∆O

(by generalization) for someΣI,I,ΣOand∆O

ΣL;∆L, c:S h proc

riL PiL

xi

i

i[1,n],env(Tc, Ts, k, t) (by (proc) and (compose)) ::r1L:RL1,· · ·, rnL:RLn;x1 :A1,· · ·, xn:An

where

n

Y

i=1

ΣLiLand

n

Y

i=1

Li =∆L for someRL1· · ·RLn

ΣR;∆R proc rR

PR

c

,env(Tc, Ts, k, t) ::

rR:RR;c:S

(by (proc) and (compose)) for someRR

ΣI×ΣL×ΣR;∆I×∆L×∆R, c:S (by (proc) and (Compose) C,h

proc riL

PiL

xii

i[1,n],proc rR

PR

c

,env(Tc, Ts, k, t) ::

ΣO, rR:RR, r1L:RL1,· · ·, rnL:RLn;∆O, c:S, x1:A1,· · ·, xn:An

ΣCI×ΣL×ΣR (by Substitution)

ΣCO, rR:RR, r1L:RL1,· · ·, rnL:RLn

C, x:A=∆O, c:S, x1:A1,· · ·, xn:An

∆∆C =

I×∆L×∆R , c:S

Now we analyse each case of c : S covering all possible cases in which C is commu-nicating through c ∈ ∆C. We will, for each case of c :S, use inversion steps to infer the possible values of PR, PiL and more generally C (excluding cases where C is not communicating through c), to prove that, for every case, either C is communicating externally or an operational semantics rule applies.

Case I(S=→− ατS0).

PR=c←putv;PR0 (by inversion ofR)

Yn

i=1

Si =→−

ατS0 (by substitution)

Si =→−

ατSi0 orSi=τSi0 (by definition of Merge (×)) with at least one→−

ατSi0 instance

PiL=vi ←getc;PiL0 orPiL=Pitick (by inversion of (L) and generalization) with at least onevi←getc;PiL0 instance

for anyvi andPiticksuch thatΣLi;∆Li, c:τSi T0

s,Tc

k,t Pitick::

xi :Ai C=E,h

proc riL

vi ←getc;PiL0 xii

iIget,proc rR

c←putv;PR0 c

(by substitution) forE=C,h

proc riL

Pitick xii

iItick,env(Tc, Ts, k, t)

and anyIandIsuch that{Itick, Iget}is a partition of [1,n]

ΣR;∆R0, v :ατ1 T

s,Tc

k,t c←putv;PR0::

c:→− ατSi

(by inversion on (R)) for anyR0

(v:ατ1)∈∆R (by definition of context)

(v:ατ1)∈

I×∆L×∆R

(by Lemma X) (v:ατ1)∈

I×∆L×∆R

, c:S (by definition of Merge (×))

(v:ατ1)∈∆∆C (by substitution)

Either(v:ατ1)∈∆or(v:ατ1)∈∆C (by Lemma 2)

Case I.I((v:ατ1)∈∆).

C=A,proc rR

c←putv;PR0 c

(by generalization) for someA

(v:ατ1)∈∆ (Case I.I)

Cis communicating throughv∈∆ (by definition of communication) Case 2 applies.

Case I.II((v:ατ1)∈∆C).

C=A,proc rsig

Sig(ρ, v←e) v

(by Lemma 1 and inversion on (Signal−2)) for anye, and someAandρ≤0

(by substitution and definition of Well-Formed Configuration) C=E0,h

proc riL

vi ←getc;PiL0 xi

i

iIget,proc rR

c←putv;PR0 c ,proc

rsig

Sig(ρ, v←e) v whereE=E0,proc

rsig

Sig(ρ, v←e) v C−−−−−Closed→ E0,h

proc riL

PiL0[v vi]

xii

iIget,proc rR

PR0

c

(by (1)) ,proc

rsig

Sig(ρ, v←e) v Case 1 applies.

Case II(S=←− ατS0).

PR=v←getc;PR0 (by inversion of (R))

Yn

i=1

Si =←−

ατS0 (by substitution)

Si =→−

ατSi0 orSi=←−

ατSi0orSi =τSi0 (by definition of Merge (×)) with exactly one←−

ατSi0 instance

(by inversion of (L) (L) and generalization) PiL=vi ←getc;PiL0 orPiL=c←putvi;PiL0 orPiL=Pitick

with exactly onec←putvi;PiL0 instance for anyvi andPiticksuch thatΣLi;∆Li, c:τSi T0

s,Tc

k,t Pitick::

xi :Ai C=E,h

proc riL

vi ←getc;PiL0 xi

i

iIget,proc rkL

c←putvk;PkL0 xk

(by substitution) ,proc

rR

v←getc;PR0 c forE=C,h

proc riL

Pitick xii

iItick,env(Tc, Ts, k, t)

for anyk∈[1, n]andIandIsuch that{Itick, Iget,{k}}is a partition of [1,n]

ΣLk;∆Lk0, vk :ατ1, c:←− ατSk T0

s,Tc

k,t c←putvk;PkL0::

xk :Ak

(by inversion on (L)) for anyLk0

(vk :ατ1)∈∆Lk (by definition of context)

(vk :ατ1)∈∆L (becauseQn

i=1Li =∆Land Lemma X) (vk :ατ1)∈

I×∆L×∆R

(by Lemma X) (vk :ατ1)∈

I×∆L×∆R

, c:S (by definition of Merge (×))

(vk :ατ1)∈∆∆C (by substitution)

Either(vk :ατ1)∈∆or(vk :ατ1)∈∆C (by Lemma 2) Case II.I((vk :ατ1)∈∆).

C=A,proc rkL

c←putvk;PL0k xk

(by generalization)

for someA

(vk :ατ1)∈∆ (Case II.I)

Cis communicating throughvk ∈∆ (by definition of communication) Case 2 applies.

Case II.II((vk:ατ1)∈∆C).

C=A,proc rsig

Sig(ρ, vke) vk

(by Lemma 1 and inversion on (Signal−2)) for anyA,eandρsuch thatρ≤0

(by substitution and definition of Well-Formed Configuration) C=E0,h

proc riL

vi ←getc;PiL0 xii

iIget,proc rkL

c←putvk;PkL0 xk ,proc

rR

v←getc;PR0 c

,proc rsig

Sig(ρ, vke) vk whereE=E0,proc

rsig

Sig(ρ, vke) vk C−−−−−Closed→ C∗0,h

proc riL

PiL0[vk vi]

xii

iIget,proc rkL

PkL0

xk

(by (2)) ,proc

rR

PR0[vk v]

c

,proc rsig

Sig(ρ, vke) vk Case 1 applies.

Case III(S=ατS0).

PR=Sig(τ, c←e) (by inversion of (Signal-2))

Yn

i=1

Si =ατS0 (by substitution)

Si =ατSi0 (by definition of Merge (×))

where Yn

i=1

Si0=S0

PiL=Comb(fi, pi, xi ←(yi1,· · ·, yim)), or (by inversion of (Comb), (Reg), (R) and (L))

=Reg(xic), or

=zi ←putc;Pi0L

where there is onek∈[1, m]such thatyik=c for anyfi,pi,m,yij,yi,zi andPi0L

C=E,h proc

riL

Comb(fi, pi, xi ←(yi1,· · ·, yim)) xii

iIcomb (by substitution) ,h

proc riL

Reg(xic) xii

iIreg,h proc

riL

zi←putc;Pi0L xii

iIput

,proc rR

Sig(τ, c←e) c for someE=C,env(Tc, Ts, k, t)

for anyρ,Icomb,IregandIput where{Icomb, Ireg, Iput}is a partition of [1,n]

If Icomb is not empty Lemma 4 is applied and if Ireg is not empty Lemma 5 is applied. In both of these cases, C −−−−−Closed→ D, for some D, and Case 1 applies. The remaining case is the one where bothIcombandIreg are empty andIput= [1, n]:

C=E,h proc

riL

zi ←putc;Pi0L ρi

i[1,n],proc rR

Sig(τ, c←e) c For simplification, we choose to focus on only one specifick∈[1, m]

C=E0,proc rkL

zk ←putc;Pk0L xk

,proc rR

Sig(τ, c←e) c

(by substitution) for someE0

Now we analyse separately the case wherexk =zk and the case wherexk,zk:

Case III.I(xk =zk).

Σk;∆k, c:ατSk T0

s,Ts k,t

xk←putc;Pk0L ::

xk :→− ατAk

(by inversion on (R)) xk:→−

ατAk

∈∆C Sincexk ,x C=E00,h

proc qi

Pi

wii

i[1,l] (by Lemma 2)

wherewi :Ai and Yl

i=1

Bi=→− ατAk

Bi=→−

ατB0i orBi =τB0i (by Definition of merge (×)) for anyB0i

Pi=vi←getxk;Pi0orPi=tickτ;Pi0 (by inversion of (L) and (tick)) for anyvi andPi0

(by substitution and Definition of Configuration) C=A,h

proc qi

vi←getxk;Pi0 wii

iIget

,proc rkL

xk ←putc;Pk0L xk

,proc rR

Sig(τ, c←e) c for someAandIget⊆[1, l]

(by (1)) C−−−−−Closed→ A,h

proc qi

Pi0[c

vi] wii

iIget,proc rkL

Pk0L

xk

,proc rR

Sig(τ, c←e) c Case 1 applies.

Case III.II(xk ,zk).

Σk;∆k, c:ατSk0, zk:←− ατAk T

s,Ts k,t

zk ←putc;Pk0L ::

xk :C

(by inversion on (L)) zk :←−

ατAk

∈∆I zk :←−

ατAk

∈∆∆C (by substitution)

Eitherzk ∈∆orzk ∈∆C (by Lemma X)

If zk ∈∆then Case 2 applies. Now we continue analysing the case where zk ∈ ∆C. In this case, there could be other processes consumingzk with other types. By Definition of merge, for the configuration to be well-typed, the types are either zk :←−

ατA0k orzk :αA0k, and the result of their merge is zk :←−

ατARk. Now we proceed applying Lemma 2 on zk :←−

ατA0k and Lemma 1 onzk :←−

ατARk, leaving us with the configuration:

C=E00,proc q

v←getzk;Q0 zk

,h proc

qi

vi ←getzk;Qi wii

iIget

for anyv,Q0,qi,vi,wi andIget

(by substitution and Definition of Configuration) C=A,proc

q

v←getzk;Q0 zk

,h proc

qi

vi ←getzk;Qi wii

iIget

,proc rkL

zk ←putc;Pk0L xk

,proc rR

Sig(τ, c←e) c for someAandIget⊆[1, l]

C−−−−−Closed→ A,proc q

Q0[c/v]

zk

,h proc

qi Qi[c

vi] wii

iIget (by (2)) ,proc

rkL Pk0L

xk

,proc rR

Sig(τ, c←e) c Case 1 applies.

Case IV(S=→−

c{`:S`}`L).

PR=c.k;PR0 (by inversion of (→−

R)) for anyPR0andkL

Yn

i=1

Si =→−

c{`:S`}`L (by substitution)

Si =→−

c{`:Si`}`LorSi =any other type (by definition of Merge (×)) with at least one→−

c{`:Si`}`Linstance PiL=casecof n

`Pi`L0o

`L orPiL=any other process (by inversion of (→−

L)) with at least onecasecof n

`Pi`L0o

`Linstance for anyPi`L0

C=E,proc rR

c.k;PR0 c

,h proc

riL

casecof n

`Pi`L0o

`L

xii

iI (by substitution) whereE=C,env(Tc, Ts, k, t)andI⊆[1, n]

C−−−−−Closed→ E,proc rR

PR0

c

,h proc

riL PikL0

xii

iI (by (1))

Case 1 applies.

Case V(S =←−

c{`:S`}`L).

PR=casecof n

`P`R0o

`L (by inversion of (←−

R)) for anyP`R0

Yn

i=1

Si =←−

c{`:S`}`L (by substitution)

Si =←−

c{`:Si`}`Lor→−

c{`:Si`}`LorSi =any other type (by definition of Merge (×)) with exactly one←−

c{`:Si`}`Linstance

(by inversion of (←−

L), (→−

L)) PiL=c.korPiL=casecof n

`Pi`L0o

`L orPiL=any other process with exactly onec.kinstance

for anykandPi`L0 C=E,proc

rjL

c.k;PR0j xj

,proc rR

casecofn

`P`R0o

`L

c

(by substitution) ,h

proc riL

casecof n

`Pi`L0o

`L

xii

iI

whereE=C,env(Tc, Ts, k, t),j<Iand{I,{j}} ⊆[1, n]

C−−−−−Closed→ E,proc rjL

PR0j

xj

,proc rR

PkR0

c

,h proc

riL PikL0

xii

iI (by (2)) Case 1 applies.

Case VI(S=S1S2).

PR= (c→(c1, c2)). P1R

P2R

(by inversion of (R)) for anyc1,c2,P1RandP2R

Yn

i=1

Si =S1S2 (by substitution)

Si =Si1Si2 (by definition of Merge (×))

for anySi1 andSi2

PiL= (ci1, ci2)←c;PiL0 (by inversion of (L)) for anyci1,ci2,PiL0

C=E,proc rR

(c→(c1, c2)). P1R

P2R

c

(by substitution) ,h

proc riL

(ci1, ci2)←c;PiL0 xii

i[1,n]

whereE=C,env(Tc, Ts, k, t) C−−−−−Closed→ E,proc

r1R

P1R[a1

c1] [a2 c2]

a1

,proc r2R

P2R

a2

(by (2)) ,h

proc riL

PiL0[a1

ci1] [a2 ci2]

xii

i[1,n]

(freshr1R,r2R,a1 anda2) Case 1 applies.

Case VII(S=τ1Tτ21).

PR=Comb(f , p, c←w1,· · ·, wn), or (by inversion of (Comb), (Reg) and (Signal-1))

=Reg(c←w), or

=Sig(τ1, ce).

wherep >0andmax(delay(w1),· · ·,delay(wn)) +p=τ1 for anyf,n,wi,wande

(It is important to note another possibility istickτ1;aux←Sig(0, aux←e) ;caux but from process equivalence we have that tick τ1;aux ← Sig(0, aux←e) ;caux ≡ Sig(τ1, auxe)so we only consider the latter version)

We analyse each case separately:

Case VII.I(PR=Comb(f , p, c←w1,· · ·, wn)).

C−−−−−Closed→ D, for someD (by Lemma 4)

Case 1 applies.

Case VII.II(PR=Reg(c←w)).

C−−−−−Closed→ D, for someD (by Lemma 5)

Case 1 applies.

Case VII.III(PR=Sig(τ1, ce)).

Yn

i=1

Si =τ1Tτ21 (by substitution)

Si =τ1Tτ21 (by definition of Merge (×)) PiL=Comb(fi, pi, zi←(u1,· · ·, um)) orPiL=Reg(c←u) (by inversion of (Comb) and (Reg))

where there is onej ∈[1, m]such thatyj=c for somem,fi,pi,zi,ui andu.

In the case of Combwe apply Lemma 4 and in the case of Regwe apply Lemma 5. In both cases we get thatC−−−−−Closed→ Dfor someD. Case 1 applies.

Case VIII(S=µz.S).

PR=L:PR0 (by inversion of (µR))

for anyLandPR0 C=E,proc

rR

L:PR0 c

(by substitution) for someE

C−−−−−Closed→ E,proc rR

PR0h

L:PR0. Li

c

(by (Loop)) Case 1 applies.

Case IX(S= 1).

PR=endc (by inversion of (1R))

for anyLandPR0 C=E,proc

rR end

(by substitution)

for someE C−−−−−Closed→ E,idle

rR

(by (1)) Case 1 applies.

Lemma 8. IfΣI;∆I C::

ΣO;∆O

, then either I. C −→ C0, for someC0, or

II. Cis communicating throughc∈∆I, or III. Cis communicating throughc∈∆O, or IV. Cis requesting resource fromr∈ΣI, or

V. Cdoes not haveprocobjects (computation is over).

Demonstração. By induction on the configuration type rules that formC. Case X(One semantic object).

Case X.I(idle).

inst(DEF(P), R)

idle

−;− idle(rBP),env(s, c, k, t) :: (r:R;−) Cdoes not haveprocobjects (computation is over).

Case X.II(proc).

[Σ]+T; [∆]+T s,c k,t P ::

x: [A]+T

inst((Σ;∆;A), R) (T =k×s+t) proc Σ;∆ proc

r P

x

,env(s, c, k, t) :: (r:R;x:A) For every processP, one of the cases apply. For instance:

IfP =xy, thenC −→ C0, for someC0,

ifP =x←gety, thenCis communicating throughc∈∆Oorc∈∆I,

ifP =tickτ, thenC −→ C0, for someC0,

ifP =xr← {Σ;∆}, thenCis requesting resource fromr∈ΣI. Case XI(compose).

ΣI1;∆I1 C1,env(s, c, k, t) ::

ΣO1;∆O1

ΣI2;∆I2 C2,env(s, c, k, t) ::

ΣO2;∆O2

Compose ΣI1×ΣI2;∆I1×∆I2 C1C2,env(s, c, k, t) ::

ΣO1ΣO2;∆O1O2 By induction hypothesis, we have thatIH1andIH2simultaneously:

(IH1) Either

I. C1,env(c, s, k, t)→ C− 0

1,env(c, s, k0, t0), or II. C1is communicating throughc∈∆I1, or III. C1is communicating throughc∈∆O1, or

IV. C1is requesting resource fromr∈ΣI1, or

V. C1does not haveprocobjects (computation is over).

(IH2) Either

I. C2,env(c, s, k, t)→ C− 0

2,env(c, s, k0, t0), or II. C2is communicating throughc∈∆I2, or

III. C2is communicating throughc∈∆O2, or IV. C2is requesting resource fromr∈ΣI2, or

V. C2does not haveprocobjects (computation is over).

We proceed analysing all possible cases provided by (IH1) and(IH2). We start analysing cases of(IH1)for any kind ofC2, using(IH2)only in the last case:

Case XI.I(C1,env(c, s, k, t)→ C− 0

1,env(c, s, k0, t0), for someC0

1).

C1C2→ C− 0

1C2 (by Lemma 7)

Case XI.II(C1is communicating throughc∈∆I1).

C1C2 is communicating throughc∈∆I1×∆I2 (by Lemma 8) Case XI.III(C1 is communicating throughc∈∆O1).

C1C2 is communicating throughc∈∆O1O2 (by Lemma 9) Case XI.IV(C1 is requesting resource fromr∈ΣI1).

C1C2 is requesting resource fromr∈ΣI1×ΣI2 (by Lemma 10) Case XI.V(C1does not haveproc objects). ByIH2:

Case XI.V.I(C2→ C− 0

2, for someC0

2).

C1C2→ C− 1C0

2 (by Lemma 7)

Case XI.V.II(C2 is communicating throughc∈∆I2).

C1C2 is communicating throughc∈∆I1×∆I2 (by Lemma 8) Case XI.V.III(C2 is communicating throughc∈∆O2).

C1C2 is communicating throughc∈∆O1O2 (by Lemma 9) Case XI.V.IV(C2is requesting resource fromr∈ΣI2).

C1C2 is requesting resource fromr∈ΣI1×ΣI2 (by Lemma 10) Case XI.V.V(C2 does not have proc objects (computation is over)).

C1C2does not have proc objects (computation is over) (by Definition 3)

No documento Universidade de Brasília (páginas 120-134)

Documentos relacionados