• Non ci sono risultati.

Reachability via saturation Gabriele Puppis

N/A
N/A
Protected

Academic year: 2021

Condividi "Reachability via saturation Gabriele Puppis"

Copied!
108
0
0

Testo completo

(1)

Reachability via saturation

Gabriele Puppis

LaBRI / CNRS

(2)

Reachability is semi-decidable

A path connecting two sets, if exists, can be found in finitely many steps.

Forward analysis

III FFF

The problem is of course termination, namely, to detect non-reachability...

(3)

Reachability is semi-decidable

A path connecting two sets, if exists, can be found in finitely many steps.

Forward analysis

III FFF

The problem is of course termination, namely, to detect non-reachability...

(4)

Reachability is semi-decidable

A path connecting two sets, if exists, can be found in finitely many steps.

Forward analysis

III FFF

The problem is of course termination, namely, to detect non-reachability...

(5)

Reachability is semi-decidable

A path connecting two sets, if exists, can be found in finitely many steps.

Forward analysis

III FFF

The problem is of course termination, namely, to detect non-reachability...

(6)

Reachability is semi-decidable

A path connecting two sets, if exists, can be found in finitely many steps.

Forward analysis

III FFF

The problem is of course termination, namely, to detect non-reachability...

(7)

Reachability is semi-decidable

A path connecting two sets, if exists, can be found in finitely many steps.

Forward analysis

III FFF

Backward analysis

III FFF

The problem is of course termination, namely, to detect non-reachability...

(8)

Sometimes non-reachability can be checked effectively using “safe” over-approximations of reachable sets

guess a separator

Both approaches require symbolic representations of infinite sets

(9)

Sometimes non-reachability can be checked effectively using “safe” over-approximations of reachable sets

a

Acceleration / pumping

III FFF

guess a separator

Both approaches require symbolic representations of infinite sets

(10)

Sometimes non-reachability can be checked effectively using “safe” over-approximations of reachable sets

a a

Acceleration / pumping

III FFF

guess a separator

Both approaches require symbolic representations of infinite sets

(11)

Sometimes non-reachability can be checked effectively using “safe” over-approximations of reachable sets

a

b a

Acceleration / pumping

III FFF

guess a separator

Both approaches require symbolic representations of infinite sets

(12)

Sometimes non-reachability can be checked effectively using “safe” over-approximations of reachable sets

a

b a

b

Acceleration / pumping

III FFF

guess a separator

Both approaches require symbolic representations of infinite sets

(13)

Sometimes non-reachability can be checked effectively using “safe” over-approximations of reachable sets

a

b a

b π

Acceleration / pumping

III FFF

guess a separator

Both approaches require symbolic representations of infinite sets

(14)

Sometimes non-reachability can be checked effectively using “safe” over-approximations of reachable sets

a

b a

b π

π

Acceleration / pumping

III FFF

guess a separator

Both approaches require symbolic representations of infinite sets

(15)

Sometimes non-reachability can be checked effectively using “safe” over-approximations of reachable sets

a

b a

b π

π

Acceleration / pumping

III FFF

Invariant analysis

III FFF

guess a separator

Both approaches require symbolic representations of infinite sets

(16)

Sometimes non-reachability can be checked effectively using “safe” over-approximations of reachable sets

a

b a

b π

π

Acceleration / pumping

III FFF

Invariant analysis

III FFF

guess a separator

guess a separator

Both approaches require symbolic representations of infinite sets

(17)

Sometimes non-reachability can be checked effectively using “safe” over-approximations of reachable sets

a

b a

b π

π

Acceleration / pumping

III FFF

Invariant analysis

III FFF

guess a separator

Both approaches require symbolic representations of infinite sets

(18)

Backward reachability for pushdown systems Given a pushdown system P = (Q, Σ, Γ, ∆) and a set B0 ⊆ Q ⋅ Γ of target configurations, define:

Bn+1 = Bn ∪ {qz ∣ ∃qz∈Bn. ∃a ∈ Σ. qzqzqzÐÐÐÐÐÐÐÐaÐaa→ q→ q→ qzzz} Bω =

n ∈ NBn

Bω contains the configurations from which one can reach B0

Bω is usually infinite, but is it perhaps regular?

Example

Consider the pushdown system

q pop γ

B0 = {qε} B1 = {qε, qγ} B2 = {qε, qγ, qγγ} . . . Bω = qε is indeed regular, but how to efficiently compute it?

(19)

Backward reachability for pushdown systems Given a pushdown system P = (Q, Σ, Γ, ∆) and a set B0 ⊆ Q ⋅ Γ of target configurations, define:

Bn+1 = Bn ∪ {qz ∣ ∃qz∈Bn. ∃a ∈ Σ. qzqzqzÐÐÐÐÐÐÐÐaÐaa→ q→ q→ qzzz} Bω =

n ∈ NBn

Bω contains the configurations from which one can reach B0

Bω is usually infinite, but is it perhaps regular?

Example

Consider the pushdown system

q pop γ

B0 = {qε} B1 = {qε, qγ} B2 = {qε, qγ, qγγ} . . . Bω = qε is indeed regular, but how to efficiently compute it?

(20)

Backward reachability for pushdown systems Given a pushdown system P = (Q, Σ, Γ, ∆) and a set B0 ⊆ Q ⋅ Γ of target configurations, define:

Bn+1 = Bn ∪ {qz ∣ ∃qz∈Bn. ∃a ∈ Σ. qzqzqzÐÐÐÐÐÐÐÐaÐaa→ q→ q→ qzzz} Bω =

n ∈ NBn

Bω contains the configurations from which one can reach B0

Bω is usually infinite, but is it perhaps regular?

Example

Consider the pushdown system

q pop γ

B0 = {qε} B1 = {qε, qγ} B2 = {qε, qγ, qγγ} . . . Bω = qε is indeed regular, but how to efficiently compute it?

(21)

Backward reachability for pushdown systems Given a pushdown system P = (Q, Σ, Γ, ∆) and a set B0 ⊆ Q ⋅ Γ of target configurations, define:

Bn+1 = Bn ∪ {qz ∣ ∃qz∈Bn. ∃a ∈ Σ. qzqzqzÐÐÐÐÐÐÐÐaÐaa→ q→ q→ qzzz} Bω =

n ∈ NBn

Bω contains the configurations from which one can reach B0

Bω is usually infinite, but is it perhaps regular?

Example

Consider the pushdown system

q pop γ

B0 = {qε} B1 = {qε, qγ} B2 = {qε, qγ, qγγ} . . .

Bω = qε is indeed regular, but how to efficiently compute it?

(22)

Backward reachability for pushdown systems Given a pushdown system P = (Q, Σ, Γ, ∆) and a set B0 ⊆ Q ⋅ Γ of target configurations, define:

Bn+1 = Bn ∪ {qz ∣ ∃qz∈Bn. ∃a ∈ Σ. qzqzqzÐÐÐÐÐÐÐÐaÐaa→ q→ q→ qzzz} Bω =

n ∈ NBn

Bω contains the configurations from which one can reach B0

Bω is usually infinite, but is it perhaps regular?

Example

Consider the pushdown system

q pop γ

B0 = {qε} B1 = {qε, qγ} B2 = {qε, qγ, qγγ} . . . Bω = qε is indeed regular, but how to efficiently compute it?

(23)

“Pump” the changes from Bn to Bn+1 to obtain

a new sequence C0, C1, . . . that converges more quickly:

(completeness) ∀n ∈ N. BBBnnn ⊆⊆⊆ CCCnnn

(soundness) ∀n ∈ N. CCCnnn ⊆⊆⊆ BBBωωω

(termination) ∃n ∈ N. CCCnnn === CCCn+1n+1n+1

the limit

n∈NCn coincides with Bω

The sets C0, C1, . . . will be defined by

automata A0, A1, . . . sharing the same state spacesame state spacesame state space...

(24)

“Pump” the changes from Bn to Bn+1 to obtain

a new sequence C0, C1, . . . that converges more quickly:

(completeness) ∀n ∈ N. BBBnnn ⊆⊆⊆ CCCnnn

(soundness) ∀n ∈ N. CCCnnn ⊆⊆⊆ BBBωωω

(termination) ∃n ∈ N. CCCnnn === CCCn+1n+1n+1

the limit

n∈NCn coincides with Bω

The sets C0, C1, . . . will be defined by

automata A0, A1, . . . sharing the same state spacesame state spacesame state space...

(25)

Initial conditions

The pushdown system P has m states q1, . . . ,qm

The automaton A0 recognizing C0=B0 has a single initial non-final state s0, m distinct statess1, . . . ,sm, and possibly other states

No transition in A0reaches the initial state s0 The uniqueqi-labelled transition in A0is (s0, qi, si) The other transitions in A0 are labelled by stack symbols

A0 s0 s0

s1

⋮ sm

. . .

. . .

× ×

×

q1

qm

Γ

Γ

(26)

Initial conditions

The pushdown system P has m states q1, . . . ,qm The automaton A0 recognizing C0=B0 has a single initial non-final state s0, m distinct statess1, . . . ,sm, and possibly other states

No transition in A0reaches the initial state s0 The uniqueqi-labelled transition in A0is (s0, qi, si) The other transitions in A0 are labelled by stack symbols

A0 s0 s0

s1

⋮ sm

. . .

. . .

× ×

×

q1

qm

Γ

Γ

(27)

Initial conditions

The pushdown system P has m states q1, . . . ,qm The automaton A0 recognizing C0=B0 has a single initial non-final state s0, m distinct statess1, . . . ,sm, and possibly other states

No transition in A0reaches the initial state s0

The uniqueqi-labelled transition in A0is (s0, qi, si) The other transitions in A0 are labelled by stack symbols

A0 s0 s0

s1

⋮ sm

. . .

. . .

× ×

×

q1

qm

Γ

Γ

(28)

Initial conditions

The pushdown system P has m states q1, . . . ,qm The automaton A0 recognizing C0=B0 has a single initial non-final state s0, m distinct statess1, . . . ,sm, and possibly other states

No transition in A0reaches the initial state s0 The uniqueqi-labelled transition in A0is (s0, qi, si)

The other transitions in A0 are labelled by stack symbols

A0 s0 s0

s1

⋮ sm

. . .

. . .

× ×

×

q1

qm

Γ

Γ

(29)

Initial conditions

The pushdown system P has m states q1, . . . ,qm The automaton A0 recognizing C0=B0 has a single initial non-final state s0, m distinct statess1, . . . ,sm, and possibly other states

No transition in A0reaches the initial state s0 The uniqueqi-labelled transition in A0is (s0, qi, si) The other transitions in A0 are labelled by stack symbols

A0 s0 s0

s1

⋮ sm

. . .

. . .

× ×

×

q1

qm

Γ

Γ

(30)

Saturation procedure

Construct An+1 from An by adding transitions, as follows:

1 select a transition rule (qqqiiiγ, a, qγγ qqjjjzzz )in the pushdown system P

2 select a state sss in An reachable fromsss000 via aqqqjjjzzz-labelled path

3 add transition (sssiii, γγγ, sss)

An

s0 s0

si

⋮ sj

. . .

. . . qi

qj

s z

γ

Termination: straightforward Only polynomially many transitions can be added (⇒ reachability in PTIME)

Soundness: by induction on n s0

s0 s0 qqqzzz

ÐÐÐ→

An+1 sss

⇓ s0 s0

s0 ÐÐqzqzqzÐ→

A0 sss ∧ qqqzzz ÐÐÐ→

P qzqzqz Completeness:

config. qqqiiiγwγwγw ∈ Bn+1Bn

trans. qqqiiiγwγwγw ÐÐÐa

P qqqjjjzwzwzw with qqqjjjzwzwzw ∈ Bn

Select rule (qqqiiiγ, a, qγγ qqjjjzzz )in P and path sss000

qjz qjz qjz

ÐÐÐ

An sss in An

to prove that qqqiiiγwγwγw L (An+1)

(31)

Saturation procedure

Construct An+1 from An by adding transitions, as follows:

1 select a transition rule (qqqiiiγ, a, qγγ qqjjjzzz )in the pushdown system P

2 select a statesss in An reachable fromsss000 via aqqqjjjzzz-labelled path

3 add transition (sssiii, γγγ, sss)

An

s0 s0

si

⋮ sj

. . .

. . . qi

qj

s z

γ

Termination: straightforward Only polynomially many transitions can be added (⇒ reachability in PTIME)

Soundness: by induction on n s0

s0 s0 qqqzzz

ÐÐÐ→

An+1 sss

⇓ s0 s0

s0 ÐÐqzqzqzÐ→

A0 sss ∧ qqqzzz ÐÐÐ→

P qzqzqz Completeness:

config. qqqiiiγwγwγw ∈ Bn+1Bn

trans. qqqiiiγwγwγw ÐÐÐa

P qqqjjjzwzwzw with qqqjjjzwzwzw ∈ Bn

Select rule (qqqiiiγ, a, qγγ qqjjjzzz )in P and path sss000

qjz qjz qjz

ÐÐÐ

An sss in An

to prove that qqqiiiγwγwγw L (An+1)

(32)

Saturation procedure

Construct An+1 from An by adding transitions, as follows:

1 select a transition rule (qqqiiiγ, a, qγγ qqjjjzzz )in the pushdown system P

2 select a statesss in An reachable fromsss000 via aqqqjjjzzz-labelled path

3 add transition (sssiii, γγγ, sss)

An

s0 s0

si

⋮ sj

. . .

. . . qi

qj

s z

γ

Termination: straightforward Only polynomially many transitions can be added (⇒ reachability in PTIME)

Soundness: by induction on n s0

s0 s0 qqqzzz

ÐÐÐ→

An+1 sss

⇓ s0 s0

s0 ÐÐqzqzqzÐ→

A0 sss ∧ qqqzzz ÐÐÐ→

P qzqzqz Completeness:

config. qqqiiiγwγwγw ∈ Bn+1Bn

trans. qqqiiiγwγwγw ÐÐÐa

P qqqjjjzwzwzw with qqqjjjzwzwzw ∈ Bn

Select rule (qqqiiiγ, a, qγγ qqjjjzzz )in P and path sss000

qjz qjz qjz

ÐÐÐ

An sss in An

to prove that qqqiiiγwγwγw L (An+1)

(33)

Saturation procedure

Construct An+1 from An by adding transitions, as follows:

1 select a transition rule (qqqiiiγ, a, qγγ qqjjjzzz )in the pushdown system P

2 select a statesss in An reachable fromsss000 via aqqqjjjzzz-labelled path

3 add transition (sssiii, γγγ, sss)

An

s0 s0

si

⋮ sj

. . .

. . . qi

qj

s z

γ

Termination: straightforward Only polynomially many transitions can be added (⇒ reachability in PTIME)

Soundness: by induction on n s0

s0 s0 qqqzzz

ÐÐÐ→

An+1 sss

⇓ s0 s0

s0 ÐÐqzqzqzÐ→

A0 sss ∧ qqqzzz ÐÐÐ→

P qzqzqz Completeness:

config. qqqiiiγwγwγw ∈ Bn+1Bn

trans. qqqiiiγwγwγw ÐÐÐa

P qqqjjjzwzwzw with qqqjjjzwzwzw ∈ Bn

Select rule (qqqiiiγ, a, qγγ qqjjjzzz )in P and path sss000

qjz qjz qjz

ÐÐÐ

An sss in An

to prove that qqqiiiγwγwγw L (An+1)

(34)

Saturation procedure

Construct An+1 from An by adding transitions, as follows:

1 select a transition rule (qqqiiiγ, a, qγγ qqjjjzzz )in the pushdown system P

2 select a statesss in An reachable fromsss000 via aqqqjjjzzz-labelled path

3 add transition (sssiii, γγγ, sss)

An

s0 s0

si

⋮ sj

. . .

. . . qi

qj

s z

γ

Termination: straightforward Only polynomially many transitions can be added (⇒ reachability in PTIME)

Soundness: by induction on n s0

s0 s0 qqqzzz

ÐÐÐ→

An+1 sss

⇓ s0 s0

s0 ÐÐqzqzqzÐ→

A0 sss ∧ qqqzzz ÐÐÐ→

P qzqzqz

Completeness:

config. qqqiiiγwγwγw ∈ Bn+1Bn

trans. qqqiiiγwγwγw ÐÐÐa

P qqqjjjzwzwzw with qqqjjjzwzwzw ∈ Bn

Select rule (qqqiiiγ, a, qγγ qqjjjzzz )in P and path sss000

qjz qjz qjz

ÐÐÐ

An sss in An

to prove that qqqiiiγwγwγw L (An+1)

(35)

Saturation procedure

Construct An+1 from An by adding transitions, as follows:

1 select a transition rule (qqqiiiγ, a, qγγ qqjjjzzz )in the pushdown system P

2 select a statesss in An reachable fromsss000 via aqqqjjjzzz-labelled path

3 add transition (sssiii, γγγ, sss)

An

s0 s0

si

⋮ sj

. . .

. . . qi

qj

s z

γ

Termination: straightforward Only polynomially many transitions can be added (⇒ reachability in PTIME)

Soundness: by induction on n s0

s0 s0 qqqzzz

ÐÐÐ→

An+1 sss

⇓ s0 s0

s0 ÐÐqzqzqzÐ→

A0 sss ∧ qqqzzz ÐÐÐ→

P qzqzqz Completeness:

config. qqqiiiγwγwγw ∈ Bn+1Bn

trans. qqqiiiγwγwγw ÐÐÐa

P qqqjjjzwzwzw with qqqjjjzwzwzw ∈ Bn

Select rule (qqqiiiγ, a, qγγ qqjjjzzz )in P and path sss000

qjz qjz qjz

ÐÐÐ

An sss in An

to prove that qqqiiiγwγwγw L (An+1)

(36)

Example

Consider the target set B0 = {q2γ1γ2γ3}over the pushdown system

q1 q2

γ6

γ6 γ6/εεε γ6

γ54γ3

γ4

γ4 γ4/γγγ111γγγ222

γ41γ2

s0

s1

s2 s3 s4 s5

q1

q2

γ1

γγγ111 γ2 γγγγ3333

C0= {q2γ1γ2γ3}

C1= {q2γ1γ2γ3, q2γ4γ3} C2= {q2γ1γ2γ3, q2γ4γ3, q1γ5} C3= {q2γ1γ2γ3, q2γ4γ3, q1γ6γ5}

(37)

Example

Consider the target set B0 = {q2γ1γ2γ3}over the pushdown system

q1 q2

γ6

γ6 γ6/εεε γ6

γ54γ3

γ4

γ4 γ4/γγγ111γγγ222

γ4

γ4 γ4/γγγ111γγγ222

s0

s1

s2 s3 s4 s5

q1

qqq222

γ1

γγ11

γ1

γγ11 γγγγγγ222222 γγγγ3333

γ4

γ4 γ4

C0= {q2γ1γ2γ3}

C1= {q2γ1γ2γ3, q2γ4γ3} C2= {q2γ1γ2γ3, q2γ4γ3, q1γ5} C3= {q2γ1γ2γ3, q2γ4γ3, q1γ6γ5}

(38)

Example

Consider the target set B0 = {q2γ1γ2γ3}over the pushdown system

q1 q2

γ6

γ6 γ6/εεε γ6

γ54γ3

γ4

γ4 γ4/γγγ111γγγ222

γ41γ2

s0

s1

s2 s3 s4 s5

q1

q2

γ1

γγγ111 γ2 γγγγ3333

γ4

C0= {q2γ1γ2γ3}

C1= {q2γ1γ2γ3, q2γ4γ3} C2= {q2γ1γ2γ3, q2γ4γ3, q1γ5} C3= {q2γ1γ2γ3, q2γ4γ3, q1γ6γ5}

(39)

Example

Consider the target set B0 = {q2γ1γ2γ3}over the pushdown system

q1 q2

γ6

γ6 γ6/εεε γ6

γ5

γ5

γ5/γγγ444γγγ333

γ4

γ4 γ4/γγγ111γγγ222

γ41γ2

s0

s1

s2 s3 s4 s5

q1

qqq222

γ1

γγγ111 γ2 γγγγγγ333333

γ4

γ4 γ4

γγγ555

C0= {q2γ1γ2γ3}

C1= {q2γ1γ2γ3, q2γ4γ3} C2= {q2γ1γ2γ3, q2γ4γ3, q1γ5} C3= {q2γ1γ2γ3, q2γ4γ3, q1γ6γ5}

(40)

Example

Consider the target set B0 = {q2γ1γ2γ3}over the pushdown system

q1 q2

γ6

γ6 γ6/εεε γ6

γ54γ3

γ4

γ4 γ4/γγγ111γγγ222

γ41γ2

s0

s1

s2 s3 s4 s5

q1

q2

γ1

γγγ111 γ2 γγγγ3333

γ4

γ5

C0= {q2γ1γ2γ3}

C1= {q2γ1γ2γ3, q2γ4γ3} C2= {q2γ1γ2γ3, q2γ4γ3, q1γ5} C3= {q2γ1γ2γ3, q2γ4γ3, q1γ6γ5}

(41)

Example

Consider the target set B0 = {q2γ1γ2γ3}over the pushdown system

q1 q2

γ6

γ6 γ6/εεε γ6

γ6 γ6/εεε

γ54γ3

γ4

γ4 γ4/γγγ111γγγ222

γ41γ2

s0

s1

s2 s3 s4 s5

qqq111

q2

γ1

γγγ111 γ2 γγγγ3333

γ4

γ5

γ6 γ6 γ6

C0= {q2γ1γ2γ3}

C1= {q2γ1γ2γ3, q2γ4γ3} C2= {q2γ1γ2γ3, q2γ4γ3, q1γ5} C3= {q2γ1γ2γ3, q2γ4γ3, q1γ6γ5}

(42)

Example

Consider the target set B0 = {q2γ1γ2γ3}over the pushdown system

q1 q2

γ6

γ6 γ6/εεε γ6

γ54γ3

γ4

γ4 γ4/γγγ111γγγ222

γ41γ2

s0

s1

s2 s3 s4 s5

q1

q2

γ1

γγγ111 γ2 γγγγ3333

γ4

γ5

γ6

C0= {q2γ1γ2γ3}

C1= {q2γ1γ2γ3, q2γ4γ3} C2= {q2γ1γ2γ3, q2γ4γ3, q1γ5} C3= {q2γ1γ2γ3, q2γ4γ3, q1γ6γ5}

=Bω

(43)

Theorem (Bouajjani, Esparza & Maler ’97)

Given a pushdown system P and a regular set B of configurations, the set of configurations that can reach B

is regular and can be computed in polynomial time.

Similar generalizations can be proved for:

tree rewriting systems (L¨oding ’06, . . . )

reachability games on higher-order pushdown systems (Bouajjani & Meyer ’04, Hague & Ong ’07, . . . )

. . .

(44)

Theorem (Bouajjani, Esparza & Maler ’97)

Given an alternatingalternatingalternating pushdown system P and a regular set B of conf., the winning regionwinning regionwinning region for the B-reachability gameB-reachability gameB-reachability game

is regular and can be computed in polynomial time.

Similar generalizations can be proved for:

tree rewriting systems (L¨oding ’06, . . . )

reachability games on higher-order pushdown systems (Bouajjani & Meyer ’04, Hague & Ong ’07, . . . )

. . .

(45)

Theorem (Bouajjani, Esparza & Maler ’97)

Given an alternatingalternatingalternating pushdown system P and a regular set B of conf., the winning regionwinning regionwinning region for the B-reachability gameB-reachability gameB-reachability game

is regular and can be computed in polynomial time.

Similar generalizations can be proved for:

tree rewriting systems (L¨oding ’06, . . . )

reachability games on higher-order pushdown systems (Bouajjani & Meyer ’04, Hague & Ong ’07, . . . )

. . .

(46)

Next we will focus on reachability for systems that use variables over natural numbers instead of a stack...

(x , y ) ∶= (0, 0) (x , y ) ∶= (0, 0) (x , y ) ∶= (0, 0) while (x , y ) ≠ (0, 1)(x , y ) ≠ (0, 1)(x , y ) ≠ (0, 1) do

if [input is north west] then (x , y ) ∶= (x , y ) + (1, 3)(x , y ) ∶= (x , y ) + (1, 3)(x , y ) ∶= (x , y ) + (1, 3) else if [input is north east] then

(x , y ) ∶= (x , y ) + (−1, 1)(x , y ) ∶= (x , y ) + (−1, 1)(x , y ) ∶= (x , y ) + (−1, 1) else if [input is south] then (x , y ) ∶= (x , y ) + (0, −2)(x , y ) ∶= (x , y ) + (0, −2)(x , y ) ∶= (x , y ) + (0, −2)

x y

?

Definition

A vector addition system (VAS) is a transition system (Nk, ∆), where ∆ is a finite subset of Zk and

¯

x ÐÐÐ→ ¯y

¯

x ÐÐÐ→ ¯y

¯

x ÐÐÐ→ ¯y iff

⎧⎪

⎪⎪

¯ x , ¯¯ y ≥ 0 x , ¯¯ y ≥ 0 x , ¯y ≥ 0

¯

y − ¯¯ x ∈ ∆ y − ¯¯ x ∈ ∆ y − ¯x ∈ ∆

(47)

Next we will focus on reachability for systems that use variables over natural numbers instead of a stack...

(x , y ) ∶= (0, 0) (x , y ) ∶= (0, 0) (x , y ) ∶= (0, 0) while (x , y ) ≠ (0, 1)(x , y ) ≠ (0, 1)(x , y ) ≠ (0, 1) do

if [input is north west] then (x , y ) ∶= (x , y ) + (1, 3)(x , y ) ∶= (x , y ) + (1, 3)(x , y ) ∶= (x , y ) + (1, 3) else if [input is north east] then

(x , y ) ∶= (x , y ) + (−1, 1)(x , y ) ∶= (x , y ) + (−1, 1)(x , y ) ∶= (x , y ) + (−1, 1) else if [input is south] then (x , y ) ∶= (x , y ) + (0, −2)(x , y ) ∶= (x , y ) + (0, −2)(x , y ) ∶= (x , y ) + (0, −2)

x y

?

Definition

A vector addition system (VAS) is a transition system (Nk, ∆), where ∆ is a finite subset of Zk and

¯

x ÐÐÐ→ ¯y

¯

x ÐÐÐ→ ¯y

¯

x ÐÐÐ→ ¯y iff

⎧⎪

⎪⎪

¯ x , ¯¯ y ≥ 0 x , ¯¯ y ≥ 0 x , ¯y ≥ 0

¯

y − ¯¯ x ∈ ∆ y − ¯¯ x ∈ ∆ y − ¯x ∈ ∆

(48)

Definition

A lossy VAS is a transition system (Nk, ∆), where ∆ is a finite subset of Q × Zk ×Q and

¯x ÐÐÐ→ ¯y

¯x ÐÐÐ→ ¯y

¯x ÐÐÐ→ ¯y iff

⎧⎪

⎪⎪

⎪⎪

⎪⎩

¯ x , ¯¯x , ¯¯x , ¯y ≥ 0y ≥ 0y ≥ 0

¯

y¯yy¯−−−x ∈ ∆¯x ∈ ∆¯x ∈ ∆¯ for some ¯y≥y¯

A VAS with states is a transition system (Q × Nk, ∆), where ∆ is a finite subset of Q × Zk ×Q and

(p, ¯x ) ÐÐÐ→ (q, ¯y ) (p, ¯x ) ÐÐÐ→ (q, ¯y ) (p, ¯x ) ÐÐÐ→ (q, ¯y ) iff

⎧⎪

⎪⎪

⎪⎪

⎪⎩

¯ x , ¯¯x , ¯¯x , ¯y ≥ 0y ≥ 0y ≥ 0

(p, ¯(p, ¯(p, ¯y − ¯y − ¯y − ¯x , q) ∈ ∆x , q) ∈ ∆x , q) ∈ ∆

States do not add power, as they can be implemented by counters e.g. 2 states = 2 additional counters that sum up to 1

(p, ¯x ) ÐÐ→ (q, ¯y ) becomes (0, 1, ¯x ) ÐÐ→ (1, 0, ¯y )

(49)

Definition

A lossy VAS is a transition system (Nk, ∆), where ∆ is a finite subset of Q × Zk ×Q and

¯x ÐÐÐ→ ¯y

¯x ÐÐÐ→ ¯y

¯x ÐÐÐ→ ¯y iff

⎧⎪

⎪⎪

⎪⎪

⎪⎩

¯ x , ¯¯x , ¯¯x , ¯y ≥ 0y ≥ 0y ≥ 0

¯

y¯yy¯−−−x ∈ ∆¯x ∈ ∆¯x ∈ ∆¯ for some ¯y≥y¯

A VAS with states is a transition system (Q × Nk, ∆), where ∆ is a finite subset of Q × Zk ×Q and

(p, ¯x ) ÐÐÐ→ (q, ¯y ) (p, ¯x ) ÐÐÐ→ (q, ¯y ) (p, ¯x ) ÐÐÐ→ (q, ¯y ) iff

⎧⎪

⎪⎪

⎪⎪

⎪⎩

¯ x , ¯¯x , ¯¯x , ¯y ≥ 0y ≥ 0y ≥ 0

(p, ¯(p, ¯(p, ¯y − ¯y − ¯y − ¯x , q) ∈ ∆x , q) ∈ ∆x , q) ∈ ∆

States do not add power, as they can be implemented by counters e.g. 2 states = 2 additional counters that sum up to 1

(p, ¯x ) ÐÐ→ (q, ¯y ) becomes (0, 1, ¯x ) ÐÐ→ (1, 0, ¯y )

(50)

Definition

A lossy VAS is a transition system (Nk, ∆), where ∆ is a finite subset of Q × Zk ×Q and

¯x ÐÐÐ→ ¯y

¯x ÐÐÐ→ ¯y

¯x ÐÐÐ→ ¯y iff

⎧⎪

⎪⎪

⎪⎪

⎪⎩

¯ x , ¯¯x , ¯¯x , ¯y ≥ 0y ≥ 0y ≥ 0

¯

y¯yy¯−−−x ∈ ∆¯x ∈ ∆¯x ∈ ∆¯ for some ¯y≥y¯

A VAS with states is a transition system (Q × Nk, ∆), where ∆ is a finite subset of Q × Zk ×Q and

(p, ¯x ) ÐÐÐ→ (q, ¯y ) (p, ¯x ) ÐÐÐ→ (q, ¯y ) (p, ¯x ) ÐÐÐ→ (q, ¯y ) iff

⎧⎪

⎪⎪

⎪⎪

⎪⎩

¯ x , ¯¯x , ¯¯x , ¯y ≥ 0y ≥ 0y ≥ 0

(p, ¯(p, ¯(p, ¯y − ¯y − ¯y − ¯x , q) ∈ ∆x , q) ∈ ∆x , q) ∈ ∆

States do not add power, as they can be implemented by counters e.g. 2 states = 2 additional counters that sum up to 1

(p, ¯x ) ÐÐ→ (q, ¯y ) becomes (0, 1, ¯x ) ÐÐ→ (1, 0, ¯y )

(51)

VAS are the same as Petri nets:

configurations = tokens per location (e.g. (2, 1, 3, 0, 0)) transitions = transfers of tokens (e.g. (0, −1, −1, 0, 1))

(52)

VAS are the same as Petri nets:

configurations = tokens per location (e.g. (2, 1, 3, 0, 0)) transitions = transfers of tokens (e.g. (0, −1, −1, 0, 1))

(53)

VAS are the same as Petri nets:

configurations = tokens per location (e.g. (2, 1, 3, 0, 0)) transitions = transfers of tokens (e.g. (0, −1, −1, 0, 1))

(54)

VAS are the same as Petri nets:

configurations = tokens per location (e.g. (2, 1, 3, 0, 0)) transitions = transfers of tokens (e.g. (0, −1, −1, 0, 1))

(55)

VAS are the same as Petri nets:

configurations = tokens per location (e.g. (2, 1, 3, 0, 0)) transitions = transfers of tokens (e.g. (0, −1, −1, 0, 1))

(56)

VAS are the same as Petri nets:

configurations = tokens per location (e.g. (2, 1, 3, 0, 0)) transitions = transfers of tokens (e.g. (0, −1, −1, 0, 1))

(57)

VAS are the same as Petri nets:

configurations = tokens per location (e.g. (2, 1, 3, 0, 0)) transitions = transfers of tokens (e.g. (0, −1, −1, 0, 1))

(58)

VAS are the same as Petri nets:

configurations = tokens per location (e.g. (2, 1, 3, 0, 0)) transitions = transfers of tokens (e.g. (0, −1, −1, 0, 1))

(59)

VAS are the same as Petri nets:

configurations = tokens per location (e.g. (2, 1, 3, 0, 0)) transitions = transfers of tokens (e.g. (0, −1, −1, 0, 1))

(60)

VAS are the same as Petri nets:

configurations = tokens per location (e.g. (2, 1, 3, 0, 0)) transitions = transfers of tokens (e.g. (0, −1, −1, 0, 1))

(61)

We may expect that reachable sets are linear...

but they are not!

(0, 0)

+ (3, 1)N + (−1, 1)N + (0, −2)N

Theorem (Ginsburg ’66) Finite unions of linear sets are precisely the Presburger sets i.e. sets definable in FO[N, +]FO[N, +]FO[N, +] e.g. ϕ(x , y ) = ∃z . x + y = z + z

x + y x y

(x + y ) ≤ zzz ≤ O((x + y )2)

(62)

We may expect that reachable sets are linear...

but they are not!

(0, 0) + (3, 1)N

+ (−1, 1)N + (0, −2)N

Theorem (Ginsburg ’66) Finite unions of linear sets are precisely the Presburger sets i.e. sets definable in FO[N, +]FO[N, +]FO[N, +] e.g. ϕ(x , y ) = ∃z . x + y = z + z

x + y x y

(x + y ) ≤ zzz ≤ O((x + y )2)

(63)

We may expect that reachable sets are linear...

but they are not!

(0, 0) + (3, 1)N + (−1, 1)N

+ (0, −2)N

Theorem (Ginsburg ’66) Finite unions of linear sets are precisely the Presburger sets i.e. sets definable in FO[N, +]FO[N, +]FO[N, +] e.g. ϕ(x , y ) = ∃z . x + y = z + z

x + y x y

(x + y ) ≤ zzz ≤ O((x + y )2)

(64)

We may expect that reachable sets are linear...

but they are not!

(0, 0) + (3, 1)N + (−1, 1)N + (0, −2)N

Theorem (Ginsburg ’66) Finite unions of linear sets are precisely the Presburger sets i.e. sets definable in FO[N, +]FO[N, +]FO[N, +] e.g. ϕ(x , y ) = ∃z . x + y = z + z

x + y x y

(x + y ) ≤ zzz ≤ O((x + y )2)

Riferimenti

Documenti correlati

To illustrate the general performance of the features described in the previous section we consider a simple prediction task, where we observe the first 5 reshares of the cascade

Section 4 describes the problem of identifying filaments from point-process data, showing that the path density is large near filaments and small elsewhere.. We close with some

Solution proposed by Roberto Tauraso, Dipartimento di Matematica, Universit`a di Roma “Tor Vergata”, via della Ricerca Scientifica, 00133 Roma,

Consequences (Church ’36, Turing ’37, Trakhtenbrot ’50, ...) The FO theory of the class of all finite structures is undecidable (provided that signature contains a binary

We can recursively factorize factors until we get single characters only a few nested factorizations a few nested factorizations a few nested factorizations (linear in ∣S ∣,

Need of non-determinism and stronger acceptance

The graphs that can be defined in the binary tree using rational restrictions and inverse finite / rational mappings are context-free / prefix-recognizable.... We just

The second type of query, called fuzzy conjunctive query, asks for the best entailment degree; i.e., the largest possible degree d such that every model of the ontology has a match