• No se han encontrado resultados

2.2 FUNDAMENTACIÓN TEÓRICA

2.2.5 INSTRUMENTOS INTERNACIONALES DE LA ORGANIZACIÓN DE LAS

2.2.5.4 Las Reglas Mínimas de la ONU para el tratamiento del recluso

In this section, we will prove the correctness of the algorithms explained in the previous section.

Theorem 4.11 Let M be the constructed automaton for (pre-)formula A. Then a behaviorσ =s0s1. . .is a model of A iff there exists an accepting run

π=q0q1. . . such that σ[i..]|≈

d qi

Old∧ ◦q[iN ext holds for every i ∈N.

The two directions are proven in Lemma 4.17 and Lemma 4.18. Note that in the following proofs, we only consider the (pre-)formulas that can be rep- resented as the positive components of pnps. The other (pre-)formulas can be proven similarly.

Lemma 4.12 (node-splitting)

1. When a node N is split during the construction in lines 29-36 in ex- pand algorithm into two nodes N1 and N2, the following condition holds:

[

NOld∧N[Exp∧ ◦N\N ext ←→ N[Old1 ∧N[Exp1 ∧ ◦N\N ext1 ∨

[

N2

Automata on infinite words 49

2. When a node N is split during the construction in lines 37-46 in ex- pand algorithm into three nodes N1,N2 and N3, the following holds:

d

NOld∧N[Exp∧ ◦\NN ext ←→ NdOld1 ∧N[Exp1 ∧ ◦N\N ext1 ∨ d N2 Old ∧ [ N2 Exp∧ ◦ \ N2 N ext ∨ d N3

Old ∧N[Exp3 ∧ ◦N\N ext3

3. When a nodeN is updated to become a new node N1, as in lines 13-28 in expand algorithm the following holds:

d

NOld∧N[Exp∧ ◦\NN ext←→Nd1 Old∧ [ N1 Exp∧ ◦ \ N1 N ext

Proof. Directly from expand algorithm and the definition of the semantics of

pTLA*.

Let Rt denote the set of all the roots of the constructed formula graph

forA. Then for every root N inRt one of the following conditions holds:

1. N is the initial node, R, on line 2 in Algorithm formula-graph in Figure 4.3.

2. N is obtained at line 10 in Algorithmexpand in Figure 4.4 from some node N0 whose construction is finish. Thus, we have NExp =NN ext0 .

From the algorithmexpand, every rootN is propagated to produce some nodesN1, . . . ,Nksuch thatNExpi = (,). We call such nodes thesame-time descendant nodes of N. Moreover, since for every i 1..k, NLoci = true, these nodes become the locations of the constructed automaton.

Lemma 4.13 LetN0 be a root andN1, . . . ,Nk be its same-time descendant nodes. Then [ N0 Exp ←→ _ i∈1..k [ Ni Old∧ ◦ \ Ni N ext. Proof. Suppose [ N0

Exp represents a formula consisting only one single formulaF,

i.e. F(NExp0 ) =F.

Case 1:N0

Exp is of the form ({F},∅).

F =v forv ∈ V.

By Lemma 4.12, N0 will be propagated to produce one new node N1 such

that NExp1 = (∅,∅), NOld1 = ({v},∅) and NN ext1 = (∅,∅). N1 is the only

F =◦v forv ∈ V.

By Lemma 4.12, N0 will be propagated to produce one new node N1 such

that NExp1 = (∅,∅), NOld1 = ({◦v},∅) and NN ext1 = ({v},∅). N1 is the only

same-time descendant node ofN0. F =A→B forA and B some (pre-)formulas.

By Lemma 4.12,N0 will be propagated to produce two new nodesN1 such

that NExp1 = (∅,∅), NOld1 = (∅,{A}) and NN ext1 = (∅,∅); and N2 such that NExp2 = (∅,∅), NOld2 = ({B},∅) and NN ext2 = (∅,∅). N1 and N2 are the

same-time descendant nodes ofN0. F =2A for some (pre-)formulaA.

By Lemma 4.12, N0 will be propagated to produce one new node N1 such

thatNExp1 = ({A},∅),NOld1 = ({2A},∅) and NN ext1 = ({2A},∅). Applying

Lemma 4.12 once again, N1 will be propagated to produce one new node N2 such that N2

Exp = (∅,∅), NOld2 = ({2A, A},∅) and NN ext2 = ({2A},∅). N2 is the only same-time descendant node ofN0.

F =2[A]v for some (pre-)formulaA and some atomic propositionv ∈ V.

By Lemma 4.12,N0 will be propagated to produce three new nodesN1,N2

andN3 such that

• NExp1 = ({v},∅),NOld1 = ({2[A]v},∅), N 1 N ext = ({v,2[A]v},∅), • NExp2 = (∅,{v}),NOld2 = ({2[A]v},∅), N 2 N ext = ({2[A]v},{v}), • NExp3 = ({A},∅), NOld3 = ({2[A]v},∅) and N

3

N ext = ({2[A]v},∅).

Furthermore, by Lemma 4.12, N1 will be propagated to produce one new

node N4 such that N4

Exp = (∅,∅), NOld4 = ({2[A]v, v},∅) and NN ext4 =

({v,2[A]v},∅); N2 will be propagated to produce one new node N5 such

that NExp5 = (∅,∅), NOld5 = ({2[A]v},{v}) and N

5

N ext = ({2[A]v},{v});

whereas N3 will be propagated to produce one new node N6 such that NExp6 = (∅,∅),NOld6 = ({2[A]v, A},∅}) and NN ext6 = ({2[A]v},∅}). N4,N5

andN6 are the same-time descendant nodes ofN0.

Case 2:N0

Expis of the form (∅,{F}).

F =v forv ∈ V.

By Lemma 4.12, N0 will be propagated to produce one new node N1 such

that NExp1 = (∅,∅), NOld1 = (∅,{v}) and NN ext1 = (∅,∅). N1 is the only

Automata on infinite words 51

F =◦v forv∈ V.

By Lemma 4.12, N0 will be propagated to produce one new node N1 such

that N1

Exp= (∅,∅), NOld1 = (∅,{◦v}) and NN ext1 = (∅,{v}). N1 is the only

same-time descendant node of N0. F =A→B forA andB some (pre-)formulas.

By Lemma 4.12, N0 will be propagated to produce one new node N1 such

that N1

Exp = (∅,∅), NOld1 = (∅,{A → B}) and NN ext1 = ({A},{B}). N1 is

the only same-time descendant node of N0. F =2A for some (pre-)formulaA.

By Lemma 4.12, N0 will be propagated to produce two new nodes N1

and N2 such that N1

Exp = (∅,{A}), NOld1 = (∅,{2A}), NN ext1 = (∅,∅), NExp2 = (∅,∅), NOld2 = (∅,{2A}) and NN ext2 = (∅,{2A}). By Lemma 4.12, N1 will be propagated to produce one new nodeN3such thatN3

Exp= (∅,∅), NOld3 = (∅,{2A, A}) and NN ext3 = (∅,∅). N2 and N3 are the same-time

descendant nodes of N0.

F =2[A]v for some (pre-)formulaA and some atomic propositionv ∈ V.

By Lemma 4.12, N0 will be propagated to produce three new nodesN1,N2

and N3 such that

• NExp1 = ({v},{A}),NOld1 = (∅,{2[A]v}),NN ext1 = (∅,{v}), • NExp2 = (∅,{v, A}),NOld2 = (∅,{2[A]v}),NN ext2 = ({v},∅) • NExp3 = (∅,∅),NOld3 = (∅,{2[A]v}) andNN ext3 = (∅,{2[A]v}).

Applying Lemma 4.12 for the second time,N1will be propagated to produce

one new node N4 such that N4

Exp = (∅,{A}), NOld4 = ({v},{2[A]v}) and NN ext4 = (∅,{v}). N2 will be propagated to produce one new node N5

such that NExp5 = (,{A}), NOld5 = (,{2[A]v, v}) and NN ext5 = ({v},). Furthermore, Applying Lemma 4.12 for the third time, N4 and N5 will

be propagated to produce N6 and N7 such that N6

Exp = (∅,∅), NOld6 =

({v},{2[A]v, A}),NN ext6 = (∅,{v}),NExp7 = (∅,∅),NOld7 = (∅,{2[A]v, v, A})

and NN ext7 = ({v},∅).

N3,N6 and N7 are the same-time descendant nodes of N0.

For all those cases we have [

N0 Exp ←→ _ i∈1..k [ Ni Old ∧ ◦ \ Ni

N ext where k is the

number of the same-time descendant nodes ofN0.

Assume we have a procedure getSTDN1(N) that returns the set containing all same-time descendant nodes of some nodeN whereN\

Exp represents a formula

Algorithm stdn

Input : a nodeN, Output: a set of nodesS0.

1 S0 =∅

1 forevery F ∈ F(NExp) do

2 S =getSTDN1(F) 3 Stemp =S0 4 S0 =∅ 5 foreveryN1 S temp do 6 foreveryN2 S do

7 S0 =S0∪ hNInit,true,NExp1 ∪ NExp2 ,NOld1 ∪ NOld2 ,NN ext1 ∪ NN ext2 i

8 endfor

9 endfor

10 endfor

11 returnS0

Figure 4.7: Procedure stdn.

We consider the case where [

N0

Exprepresents a complex formula consisting more

than one single formula, i.e. |F(NExp0 )|>1. In order to compute the same-time

descendant nodes ofN0we can use procedurestdnin Figure 4.7. It can be shown

that for this case we also have [

N0 Exp←→ _ i∈1..k [ Ni Old∧◦ \ Ni

N extwherek is the number

of the same-time descendant nodes of N0.

Lemma 4.14 LetN0 be a root whose Exp component contains some promis- ing pnp p and σ =s0s1. . . be a behavior such that σ|≈ N[Exp0 . Let p1 be one of the fulfilling pnps of p. Then if σ|≈ pb1 then there exists some of the same-time descendant nodes of N0 whose Old component contains p1.

Proof. Let N0 be a root andp be some promising pnp contained by N0

Exp. We

consider two cases:

1. p= ({3A},∅) for some (pre-)formula A.

By Definition 4.8, the fulfilling formula of p is A, i.e. p1 = ({A},∅). Since σ|≈bpand σ|≈pb1 by assumption, there must be some same-time descendant

node ofN0,N, such that ({

3A,A},∅)⊆ NOld. In the proof of Lemma 4.13

we have shown that such node exists (N3).

2. p = ({3hAiv},∅) for some (pre-)formula A and some atomic proposition

Automata on infinite words 53

By Definition 4.8, the fulfilling formula of p isA∧v∧ ◦¬v orA∧ ¬v∧ ◦v,

i.e the fulfilling node of p is a node N such that ({A,v},∅) ⊆ NOld and

({v},∅)⊆ NNext or ({A},{v})⊆ NOld and (∅,{v}) ⊆ NNext. In the proof

of Lemma 4.13 we have shown that such nodes exist (N6 orN7).

Lemma 4.15 Let σ = sisi+1. . . be a behavior and q be a location of M

such that σ|≈qdOld∧ ◦q[N ext. Then there exists a transition (q,x,q0)∈∆ (for

some x ΣM) such that σ[i..]|≈ qd0Old ∧ ◦q[N ext0 . Moreover, if qOld contains some promisingpnp p but qOld is not a fulfillingpnp of p andσ[i+ 1..]|≈p1

for p1 is a fulfilling pnp of p, then in particular there exists a transition (q,x,q0)∆(for some x ΣM) such that qOld0 contains p1. .

Proof. Let σ = sisi+1. . . be a behavior and q be a location of M such that σ |≈ qdOld ∧ ◦q[N ext. Since q is a location by assumption, then by the expand

algorithm a new rootN is created (line 10) such that NExp =qNext. By Lemma

4.13,N will be expanded to produce some locationsN1, . . . ,Nk such that

[ NExp←→ _ i∈1..k d Ni Old∧ ◦ \ Ni N ext.

SinceNExp =qNext, this implies that

[ qN ext←→ _ i∈1..k d Ni Old∧ ◦ \ Ni N ext.

By assumptionσ |≈ qdOld∧ ◦q[N ext. It follows that σ[1..]|≈ _ i∈1..k d Ni Old∧ ◦ \ Ni N ext.

Byexpand algorithm, for everyi ∈1..k, there exists a path fromq toNi. Thus,

since every Ni is a location, by Construction 4.10, these edges will become the

transitions ofM.

Now assume that qOld contains a promising pnp p but q is not a fulfilling node

of p and σ[i+ 1..] satisfies one of the fulfilling formulas of p. Then Lemma 4.14

guarantees that there exists some of the same-time descendant nodes of N, Ni,

such thatNi is a fulfilling node ofp.

Lemma 4.16 Let p be a pnp and M be the constructed automaton for bp. Then b p←→ _ q∈Q0 d qOld∧ ◦q[N ext.

Proof. By Lemma 4.13 with N0 is the initial nodeR. Since R

Lemma 4.17 Let p be a pnp, M be the constructed automaton for bp and π = q0q1. . . be an accepting run of M. Then a behavior σ = s

0s1. . . such

that σ[i..]|≈qdi Old ∧ ◦

[

qi

N ext holds for every i ∈N is a model of bp.

Proof. Letpbe apnp,Mbe the constructed automaton forpb,π=q0q1. . .be an

accepting run ofMand σ=s0s1. . .be a behavior such thatσ[i..]|≈qdi

Old∧ ◦

[

qiN ext

holds for everyi ∈N.

Thus, N0 = htrue,false,p,(,),(,)i. By expand algorithm N0 will be

expanded to produce some same-time descendant nodes,N1, . . . ,Nk. SinceN0 is

the initial node,N1, . . . ,Nk will become the initial locations of M. We consider

the following cases:

• Iffalse or¬falseis contained by F(p). Trivial.

• If F(p) contains a single formulaF of the form v or ¬v for v ∈ V. Based on the proof of Lemma 4.13 it can be shown that for every initial location

q∈Q0,F ∈ F(qOld).

• IfF(p) contains a formulaF of the formA→BforAandB(pre-)formulas.

Based on the proof of Lemma 4.13 it can be shown that for every initial locationq∈Q0,¬A∈ F(qOld) orB ∈ F(qOld).

• If F(p) contains a single formula F of the form ¬(A → B) for A and B

(pre-)-formulas. Based on the proof of Lemma 4.13 it can be shown that for every initial locationq ∈Q0,{¬A, B} ⊆ F(qOld.

• IfF(p) contains a single formulaF of the form◦v or¬ ◦v forv ∈ V. Based

on the proof of Lemma 4.13 it can be shown that for every initial location

q∈Q0,F ∈ F(qN ext).

• IfF(p) contains a single formulaF of the form2AforAsome (pre-)formula.

We will show that A ∈ F(qOldi ) holds for every i ∈ N. It is shown in the

proof of Lemma 4.13 thatA∈ F(q0Old) and 2A∈ F(qN ext0 ).

By expand algorithm a new root Nn is created such that 2A∈ F(NExpn ).

Repeatedly applying the similar argument for q1,q2, . . ., we conclude that

A∈ F(qOldi ) and A∈ F(qN exti ) holds for every i ∈N.

• If F(p) contains a single formula F of the form ¬2A for A some (pre-)-

formula.

In this case we have to prove that there exists somej Nsuch that¬2A∈

F(qiOld) holds for every i ≤ j, ¬A /∈ F(qOldi ) holds for every i < j and

¬A∈ F(qjOld).

Automata on infinite words 55

1. {¬2A,¬A} ⊆ F(qOld0 ) or

2. ¬2A∈ F(q0Old) and¬2A∈ F(q0N ext).

If the first case holds then the required condition is trivially satisfied. If the second case holds then by expandalgorithm, a new root Nn is created

such that ¬2A ∈ F(NExpn ). Repeatedly applying the similar argument for

q1,q2, . . ., we conclude that for every i N, either

2A,¬A} ⊆ F(qiOld)

or2A∈ F(qiOld) and¬2A∈ F(qN exti ). Since by assumptionπis accepting,

it is ensured that such j exists.

• If F(p) contains a formula F of the form 2[A]v for A some (pre-)formula

and v ∈ V.

In this case it suffices to show that for every i ∈ N, one of the following

conditions hold:

– v∈ F(qiOld) andv ∈ F(qOldi+1),

– ¬v∈ F(qiOld) and¬v∈ F(qiOld+1) or

– A∈ F(qOldi ).

Referring to the proof of Lemma 4.13, there are three possibilities for q0,

namely:

1. {2[A]v, v} ⊆ F(qOld0 ) and {v,2[A]v} ⊆ F(q0N ext),

2. {2[A]v,¬v} ⊆ F(qOld0 ) and {2[A]v,¬v} ⊆ F(q0N ext) or 3. {2[A]v, A} ⊆ F(q

0

Old) and {2[A]v} ∈ F(q

0

N ext).

If condition 1 holds then byexpandalgorithm a new rootNn is created such

that {v,¬2[A]v} ⊆ F(Nn). By expand algorithm and Construction 4.10

either {2[A]v, v} ⊆ F(q

1

Old) and ({2[A]v, v} ⊆ F(q

1

N ext) or {2[A]v, v, A} ⊆ F(qOld1 ) and2[A]v ∈ F(qN ext1 ) holds. If the first case holds then byexpand

algorithm a new root N1 is created such that {v,¬

2[A]v} ⊆ F(NExp1 ),

otherwise 2[A]v ∈ F(N

1

Exp).

If condition 2 holds then byexpandalgorithm and Construction 4.10 either {2[A]v,¬v} ⊆ F(q 1 Old) and {2[A]v,¬v} ⊆ F(q 1 N ext) or {2[A]v, A,¬v} ⊆ F(qOld1 ) and 2[A]v ∈ F(q 1

N ext). If the first case holds then by expand

algorithm a new rootN1is created such that{

2[A]v,¬v} ⊆ NExp1 , otherwise

2[A]v ∈ N

1

Exp.

If condition 3 holds then by expand algorithm a new root N1 is created

such that 2[A]v ∈ F(NExp1 ).

Repeatedly applying the similar argument for q1,q2, . . ., we conclude that the required condition is satisfied.

• IfF(p) contains a formula F of the form ¬2[A]v forA some (pre-)formula

andv ∈ V.

In this case we have to prove that there exists somej ∈Nsuch that

– ¬2[A]v ∈ F(qOldi ) holds for every i ≤j,

– neither {¬A,¬v} ⊆ F(qOldi ) and v ∈ F(qiOld+1) nor {¬A, v} ⊆ F(qOldi ) and ¬v∈ F(qiOld+1) holds for every i <j and

– ¬A∈ F(qjOld).

Referring to the proof of Lemma 4.13, there are three possibilities for q0, namely:

1. {¬2[A]v,¬A,¬v} ⊆ F(q

0

Old) andv∈ F(qN ext0 ),

2. {¬2[A]v,¬A, v} ⊆ F(q

0

Old) and¬v∈ F(qN ext0 ) or

3. ¬2[A]v ∈ F(qOld0 ) and ¬2[A]v∈ F(qOld0 )∈ F(q0N ext).

If the first condition holds then by expand algorithm a new root Nn is

created such that v ∈ F(NExpn ). By expand algorithm and Construction

4.10v∈ F(q1Old). Thus the required condition is satisfied.

If the second condition holds then by expand algorithm a new root Nn is

created such that¬ ∈ F(NExpn ) . By expand algorithm and Construction

4.10¬v∈ F(q1Old). Thus the required condition is satisfied.

If the third condition holds then by expand algorithm a new root Nn is

created such that¬2[A]v ∈ F(N n

Exp). Repeatedly applying the same argu-

ment for q1,q2, . . . we conclude that for every i ∈N the condition 1,2 or 3

holds. Since by assumptionπ is accepting, it is ensured that suchj exists.

Lemma 4.18 Let p be a pnp and M be the constructed automaton for bp and σ =s0s1. . . be a model of bp. Then there exists an accepting run of M such that σ[i..]|≈qdi

Old ∧ ◦

[

qi

N ext holds for every i ∈N.

Proof. Let σ = s0s1. . . be a model of bp and P be a set of promising pnps

contained by p. We inductively define a sequence of locations π = q0q1. . . such that all the following conditions hold:

1. q0∈Q0.

2. (qi,x,qi+1)∆ holds for every i Nand for some element x Σ

Automata on infinite words 57

3. σ[i..]|≈qdi

Old∧ ◦

[

qi

N ext holds for everyi ∈N.

4. for every promising pnp p0 in P there exists some i ∈ N such that there

exists some pnp p1 contained by qOldi such thatp1 is a fulfillingpnp ofp0.

As induction base we choose some q ∈ Q0 as q0 such that bp ←→ qdOld ∧ ◦q[N ext

holds. The existence of such location is ensured by Lemma 4.16. By assumption

σ|≈bpwhich implies that σ[0..]|≈bp. It follows thatσ[0..]|≈qd 0

Old∧ ◦

[

q0

N ext.

Moreover, for every promisingpnp p0 inP, ifq0 contains some pnp p1 such that

p1 is one of the fulfilling pnps ofp0, we removep1 from P.

Now assume that we have already defined a sequence of locationsq0q1. . . qk such that condition 1 holds, condition 2 holds for every i ∈ 0..k−1 and condition 3 holds for everyi ∈0..k and there exists. We consider the following cases:

• If condition 4 holds orP 6=∅. Then by Lemma 4.5, there exists a transition (qk,x,q)∈∆ such that σ[k+ 1..]|≈qdOld∧ ◦q[N ext for some element x ∈ΣM.

Choose such a location q asqk+1.

• If condition 4 doesn’t hold and there exists some transition (qj−1,x,q)∈∆ such that for some promisingpnp p0inPthere exists somepnp p1contained

by qOld such that p1 is a fulfilling pnp of p0. Choose such a location q as

qk+1. Removep0 fromP.

Notice that sinceσ|≈bpholds by assumption, the existence of such location stated

in the second case of induction step is ensured by Lemma 4.15. Thus we can

constructπ which is accepting as required.

For the illustration of the formula graphs and the automaton for formulas v,v,p q,2p,¬2p,2[p]v and ¬2[p]v see Figure A.1-A.7 in Appendix A.

We also observe that everyscsof the constructed automaton is reachable

Documento similar