Distributed local strategies in broadcast networks Arnaud Sangnier - - PowerPoint PPT Presentation

distributed local strategies in broadcast networks
SMART_READER_LITE
LIVE PREVIEW

Distributed local strategies in broadcast networks Arnaud Sangnier - - PowerPoint PPT Presentation

Distributed local strategies in broadcast networks Arnaud Sangnier LIAFA - Universit e Paris Diderot-Paris 7 joint work with: Nathalie Bertrand and Paulin Fournier ACTS - CMI - Chennai -10th February 2015 1 Motivation Verify network of


slide-1
SLIDE 1

Distributed local strategies in broadcast networks

Arnaud Sangnier LIAFA - Universit´ e Paris Diderot-Paris 7 joint work with: Nathalie Bertrand and Paulin Fournier ACTS - CMI - Chennai -10th February 2015

1

slide-2
SLIDE 2

Motivation

Verify network of processes of unbounded size Why to consider such networks?

  • Classical distributed algorithms (mutual exclusion, leader

election,...)

  • Telecommunication protocols (routing,...)
  • Algorithms for ad-hoc networks
  • Model for biological systems
  • and many more applications ...

Introduction

2

slide-3
SLIDE 3

Hypothesis

All the processes have the same behavior In [Esparza, STACS’14], such networks are called crowd More precisely:

  • Each process will follow the same protocol
  • Process can communicate
  • Communication way:
  • Message passing
  • Shared variable
  • Rendez-vous communication
  • Broadcast communication
  • Multi-diffusion (selective broadcast)

Question: Is there a network with N processes which allows to reach a goal ?

Introduction

3

slide-4
SLIDE 4

In this talk

Today: Decidability and complexity of reachability problems on parameterized networks Features:

  • Simple protocols with broadcast communication
  • Simple reachability questions
  • Take into account some locality assumptions

Introduction

4

slide-5
SLIDE 5

Outline

1

Ad Hoc Networks

2

Clique and Reconfigurable Networks

3

Considering local strategies

4

Conclusion

Introduction

5

slide-6
SLIDE 6

Outline

1

Ad Hoc Networks

2

Clique and Reconfigurable Networks

3

Considering local strategies

4

Conclusion

Ad Hoc Networks

6

slide-7
SLIDE 7

Defining a model for Ad Hoc Networks

Main characteristics [Delzanno et al., CONCUR’10]

  • No creation/deletion of nodes
  • Each node executes the same finite state process
  • Model based on the ω-calculus
  • Broadcast of the messages to the neighbors
  • Static topology represented by a connectivity graph

Ad Hoc Networks

7

slide-8
SLIDE 8

Ad Hoc Networks: syntax

A protocol P = Q, Σ, R, q0

Finite state system whose transitions are labeled with:

1 broadcast of messages - !!m 2 reception of messages - ??m 3 internal actions - τ

where m belongs to the finite alphabet Σ τ ??m !!m ??m A protocol defines an Ad Hoc Network (AHN)

Ad Hoc Networks

8

slide-9
SLIDE 9

Ad Hoc Networks: configurations

A configuration is a graph γ = V, E, L

  • V : finite set of vertices
  • E : V × V : finite set of edges
  • L : V → Q : labeling function
  • Initial configurations: all vertices are labeled with the initial

state q0

  • Notation : L(γ) all the labels present in γ

Remarks:

  • The size of the considered graphs is not bounded
  • Infinite number of configurations

⇒ AHN are infinite state systems

Ad Hoc Networks

9

slide-10
SLIDE 10

Ad Hoc Networks: semantics

Transition system AHN(P) = C, →, C0 associated to P

  • C : set of configurations
  • →: C × C : transition relation
  • C0 : initial configurations

The relation → respects the following rules during an execution:

  • The topology remains static
  • The number of vertices does not change
  • The edges do not change
  • Only the labels of the vertices can evolve
  • Two kind of transitions according to the given protocol

1 local actions - one process performs an internal action τ 2 broadcast - one process emits a message with !!m, all its

neighbors that can receive it with ??m have to receive it

Ad Hoc Networks

10

slide-11
SLIDE 11

Ad Hoc Networks: an example

τ ??m !!m ??m

Ad Hoc Networks

11

slide-12
SLIDE 12

Ad Hoc Networks: an example

τ ??m !!m ??m

Ad Hoc Networks

11

slide-13
SLIDE 13

Ad Hoc Networks: an example

τ ??m !!m ??m

Ad Hoc Networks

11

slide-14
SLIDE 14

Ad Hoc Networks: an example

τ ??m !!m ??m

Ad Hoc Networks

11

slide-15
SLIDE 15

Ad Hoc Networks: an example

τ ??m !!m ??m

Ad Hoc Networks

11

slide-16
SLIDE 16

Ad Hoc Networks: an example

τ ??m !!m ??m

Ad Hoc Networks

11

slide-17
SLIDE 17

Ad Hoc Networks: an example

τ ??m !!m ??m

Ad Hoc Networks

11

slide-18
SLIDE 18

Reachability question

Parameters: Number of processes

Control State Reachability (REACH)

Input: A protocol and a control state q ∈ Q; Output: Does there exist γ ∈ C0 and γ′ ∈ C s.t. γ →∗ γ′ and q ∈ L(γ′)?

Target State Reachability (TARGET)

Input: A protocol and a set of control states T ⊆ Q; Output: Does there exist γ ∈ C0 and γ′ ∈ C s.t. γ →∗ γ′ and L(γ′) ⊆ T? Remarks:

  • These problems consider an infinite number of possible initial

configurations

  • Reachability of a configuration γ′ is certainly feasible, the

number of processes is in fact fixed

Ad Hoc Networks

12

slide-19
SLIDE 19

Encoding Minsky machine to prove undecidability

Minsky machine

  • Manipulates two counters c1 and c2
  • Finite set of labeled instructions of the form:

1 L : ci := ci + 1; goto L′ 2 L : if ci = 0 goto L′ else ci := ci − 1; goto L′′

  • An initial label L0
  • A special label LF with no output instruction

Halting problem: Is the label LF eventually reached?

Theorem [Minsky, 67]

The halting problem for Minsky machines is undecidable.

Ad Hoc Networks

13

slide-20
SLIDE 20

Undecidability result

Theorem [Delzanno et al, CONCUR’10]

REACH and TARGET for Ad Hoc Networks are undecidable. Idea of the proof:

  • Ensure that a topology is in a certain form
  • Simulate the behavior of a Minsky machine

Ad Hoc Networks

14

slide-21
SLIDE 21

Undecidability result

Theorem [Delzanno et al, CONCUR’10]

REACH and TARGET for Ad Hoc Networks are undecidable. Idea of the proof:

  • Ensure that a topology is in a certain form
  • Simulate the behavior of a Minsky machine

One way to regain decidability: restrict the considered graphs or change the semantics

Ad Hoc Networks

14

slide-22
SLIDE 22

Outline

1

Ad Hoc Networks

2

Clique and Reconfigurable Networks

3

Considering local strategies

4

Conclusion

Clique and Reconfigurable Networks

15

slide-23
SLIDE 23

Clique Networks

Clique Networks are Ad Hoc Networks restricted to clique graphs

A configuration is a multiset γ : Q → N

  • γ(q) gives the number of process in state q
  • We forget about the graphs since it always the same
  • Initial configurations: γ(q) > 0 iff q ∈ Q0

Remarks:

  • Clique Networks are Broadcast Networks with no rendez-vous

communication [Esparza et al., LICS’99]

  • In clique networks, a broadcast message is received by all

the processes

Clique and Reconfigurable Networks

16

slide-24
SLIDE 24

Clique Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

17

slide-25
SLIDE 25

Clique Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

17

slide-26
SLIDE 26

Clique Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

17

slide-27
SLIDE 27

Clique Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

17

slide-28
SLIDE 28

Clique Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

17

slide-29
SLIDE 29

Clique Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

17

slide-30
SLIDE 30

Clique Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

17

slide-31
SLIDE 31

Deciding REACH in Broadcast Networks

Theorem [Esperza et al., LICS’99] aa [Schmitz & Schnoebelen, CONCUR’13]

REACH is decidable in Clique Networks and Ackermann-complete. Idea of the proof (for decidability)

  • Use the fact that there is a well-quasi-oder on the set of

configurations

  • And that this order is a simulation
  • What can be done from a configuration, can be done from a bigger
  • ne
  • Class of Well Structured Transitions Systems

Clique and Reconfigurable Networks

18

slide-32
SLIDE 32

Concerning TARGET

Theorem

TARGET is undecidable in Clique Networks. Idea of the proof:

  • Simulate a two counter Minsky machines
  • Isolate one process (controller) thanks to the clique property
  • The other processes will simulate the counter values
  • Number of processes in state 1i: value of counter i
  • For zero-test, the controller can ’cheat’
  • Use the target set to know when this happens

Clique and Reconfigurable Networks

19

slide-33
SLIDE 33

Protocol for TARGET in Clique Networks

q0 L0 stock1 INIT !!start ??start L Laux L′′ L′ ⊥ CONTROL !!decr(i) ??ok ??start ??start !!zero(i) stock1 incri 1i decri stock2 ⊥ COUNTER ??incr(i) ??ok !!ok ??decr(i) ??ok !!ok ??zero(i) ??start ??start

Clique and Reconfigurable Networks

20

slide-34
SLIDE 34

Reconfigurable Networks

Transition system RN(P) = C, →, C0 associated to P

  • C : set of configurations
  • →: C × C : transition relation
  • C0 : initial configurations

The relation ⇒ respects the following rules during an execution:

  • The topology is not static anymore
  • The number of vertices does not change
  • The edges can change non deterministically
  • The labels of the vertices can evolve
  • Three kind of transitions according to the given protocol

1 local actions 2 broadcast 3 reconfiguration - the edges can change with no restriction

Clique and Reconfigurable Networks

21

slide-35
SLIDE 35

Reconfigurable Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

22

slide-36
SLIDE 36

Reconfigurable Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

22

slide-37
SLIDE 37

Reconfigurable Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

22

slide-38
SLIDE 38

Reconfigurable Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

22

slide-39
SLIDE 39

Reconfigurable Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

22

slide-40
SLIDE 40

Reconfigurable Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

22

slide-41
SLIDE 41

Reconfigurable Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

22

slide-42
SLIDE 42

Reconfigurable Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

22

slide-43
SLIDE 43

Reconfigurable Networks: an example

τ ??m !!m ??m

Clique and Reconfigurable Networks

22

slide-44
SLIDE 44

Results in Reconfigurable Networks

Theorem [Delzanno et al.,FSTTCS’12]

REACH in reconfigurable networks is PTIME-complete Idea of the proof:

  • Lower bound: LOGSPACE reduction from the Circuit Value

Problem

  • Upper bound: algorithm which builds the set of reachable states

Clique and Reconfigurable Networks

23

slide-45
SLIDE 45

Solving REACH in Reconfigurable Networks

PTIME algorithm to compute the set of reachable states Input : P = Q, Σ, R, q0 a protocol Output : S ⊆ Q the set of reachable control states in RAN(P)

1: S := {q0} 2: oldS := ∅ 3: while S = oldS do 4:

  • ldS := S

5:

for all q1, !!a, q2 ∈ R such that q1 ∈ oldS do

6:

S := S ∪ {q2} ∪ {q′ ∈ Q | q, ??a, q′ ∈ R ∧ q ∈ oldS}

7:

end for

8: end while

  • Each time, do all the possible transactions in the network
  • Terminates in at most |P| iterations of the main loop

Clique and Reconfigurable Networks

24

slide-46
SLIDE 46

What about TARGET

Theorem [Fournier,Phd’s thesis’15]

TARGET in reconfigurable networks is in PTIME Idea of the proof:

  • Same idea as for REACH
  • First compute the reachable states from q0
  • Then compute the reachable states S from the target set (by

inversing the transition relation)

  • If these two sets match, the algorithm returns S
  • Otherwise it repeats the preceding actions by restricting the

protocols to states in S

Clique and Reconfigurable Networks

25

slide-47
SLIDE 47

Outline

1

Ad Hoc Networks

2

Clique and Reconfigurable Networks

3

Considering local strategies

4

Conclusion

Considering local strategies

26

slide-48
SLIDE 48

Local strategies

Do all the processes really behave the same in the previous networks ?

  • No, they all follow the same protocol P
  • If the protocol is non-deterministic, each process can make a

different choice!

  • How to enforce, that each process behaves exactly the same ?

Local strategy σ = (σa, σr)

  • σa : Path(P) → (Q × ({!!m} ∪ {ε}) × Q) ∪ ⊥ (for actions)
  • σr : Path(P) × Σ → (Q × {??m} × Q) ∪ ⊥ (for receptions)
  • These two functions continue paths in the protocols

Local strategies tell a process what to do according to its (local) past Two processes with the same past will behave similarly

Considering local strategies

27

slide-49
SLIDE 49

Reachability question with local strategies

An execution respects a local strategy iff each process during the execution does a choice matching with the strategy

Control State Reachability (REACH[L])

Input: A protocol and a control state q ∈ Q; Output: Does there exist γ ∈ C0 and γ′ ∈ C and a local strategy σ s.t. γ →∗ γ′ respects σ and q ∈ L(γ′)?

Target State Reachability (TARGET[L])

Input: A protocol and a set of control state T ⊆ Q; Output: Does there exist γ ∈ C0 and γ′ ∈ C and a local strategy σ s.t. γ →∗ γ′ respects σ and L(γ′) ⊆ T?

Considering local strategies

28

slide-50
SLIDE 50

Example of reachability questions under local strategies

q0 q1 q2 q3 qF q4 q′

F

!!m ε !!m ??m ε ??m ??m ε, ??m ε, ??m

  • There exists a local strategy to reach qF in Clique and

Reconfigurable Networks

  • There does not exists a local strategy to reach q′

F in Clique and

Reconfigurable Networks

  • Either all the process will move in their first step to q1 or they will all

move to q4

Considering local strategies

29

slide-51
SLIDE 51

Strategy patterns for reconfigurable networks

To represent local strategies in reconfigurable networks, we will use trees

  • Each path in the tree will be an unfolded path of the protocol
  • From each node in the tree:
  • At most one edge labelled by an action (broadcast or internal

action)

  • At most one edge per message m labelled with ??m
  • Those trees can be seen as underspecified local strategies
  • They represent sets of local strategies

Considering local strategies

30

slide-52
SLIDE 52

Example of strategy patterns

q0 q1 q2 q1 q2 q3 qF !!m !!m ??m !!m ε ??m

Considering local strategies

31

slide-53
SLIDE 53

Admissible strategy patterns

q0 q1 q2 q1 q2 q3 qF ADMISSIBLE !!m !!m ??m !!m ε ??m An admissible strategy pattern:

  • A strategy pattern

Considering local strategies

32

slide-54
SLIDE 54

Admissible strategy patterns

q0 q1 q2 q1 q2 q3 qF ADMISSIBLE !!m !!m ??m !!m ε ??m An admissible strategy pattern:

  • A strategy pattern + a total order on the edge s.t.:
  • The order in the tree is satisfied
  • Each ??m is preceded by !!m

Considering local strategies

32

slide-55
SLIDE 55

Admissible strategy patterns

q0 q1 q2 q1 q2 q3 qF NOT ADMISSIBLE !!m !!m ??m !!m ε ??a An admissible strategy pattern:

  • A strategy pattern + a total order on the edge s.t.:
  • The order in the tree is satisfied
  • Each ??m is preceded by !!m

Considering local strategies

32

slide-56
SLIDE 56

Admissible strategy patterns

q0 q1 q2 q1 q2 q3 qF ADMISSIBLE !!m !!a ??m !!m ε ??a An admissible strategy pattern:

  • A strategy pattern + a total order on the edge s.t.:
  • The order in the tree is satisfied
  • Each ??m is preceded by !!m

Considering local strategies

32

slide-57
SLIDE 57

Admissible strategy patterns

q0 q1 q2 q1 q2 q3 qF ADMISSIBLE !!m !!a ??m !!m ε ??a An admissible strategy pattern:

  • A strategy pattern + a total order on the edge s.t.:
  • The order in the tree is satisfied
  • Each ??m is preceded by !!m

Checking whether a strategy pattern is admissible can be done in polynomial time

Considering local strategies

32

slide-58
SLIDE 58

Results

Why reason on strategy patterns ?

Soundness and correctness

A state is reachable in Reconfigurable Networks iff there is an admis- sible strategy pattern containing it.

Considering local strategies

33

slide-59
SLIDE 59

Results

Why reason on strategy patterns ?

Soundness and correctness

A state is reachable in Reconfigurable Networks iff there is an admis- sible strategy pattern containing it.

Minimization

If there exists an admissible strategy pattern containing q there exists

  • ne of polynomial size (in the size of P).

Considering local strategies

33

slide-60
SLIDE 60

Results

Why reason on strategy patterns ?

Soundness and correctness

A state is reachable in Reconfigurable Networks iff there is an admis- sible strategy pattern containing it.

Minimization

If there exists an admissible strategy pattern containing q there exists

  • ne of polynomial size (in the size of P).

Theorem

REACH[L] in Reconfigurable Networks is NP-complete.

Considering local strategies

33

slide-61
SLIDE 61

NP-hardness

  • Reduction from 3SAT
  • 3SAT formula of the form

i∈[1..k] ℓi 1 ∨ ℓi 2 ∨ ℓi 3 over the variables

{x1, . . . , xr}

q0 q′

1

q′

2

· · · q′

r+1

q1 · · · qk ε !!x1 !!¬x1 !!x2 !!¬x2 ! ! xr ! ! ¬ xr ? ? ℓ

1 1

??ℓ1

2

? ? ℓ

1 3

??ℓ2

1

??ℓ2

2

??ℓ2

3

??ℓk

1

??ℓk

2

??ℓk

3

  • The local strategy ensures that even if many processes

broadcast the xi or ¬xi, they will all make the same choices

  • The choices of the local strategy corresponds to a valuation

satisfying the formula

Considering local strategies

34

slide-62
SLIDE 62

Concerning target

Theorem

TARGET[L] in Reconfigurable Networks is NP-complete. Idea of the proof:

  • Used again the strategy pattern
  • Refine the notion of admissible
  • The order needs to ensure we can ’empty’ some nodes not in the

target set

  • The admissible tree might be bigger but is still of polynomial size

Considering local strategies

35

slide-63
SLIDE 63

Local strategies in clique networks

Theorem

REACH[L] and TARGET[L] are undecidable in Clique Networks. Idea of the proof:

  • Encode the behavior of a Minsky machine
  • For TARGET[L], as for TARGET in Clique Networks
  • For REACH[L]:
  • Simulate the same run twice
  • Locality ensures that we can do the same simulation
  • On the second run we ensure that we will use at most as manu

processes for the counters as in the first run

  • As for TARGET in Clique Networks, cliques are used to guarantee

that at most one process at a time changes state

Considering local strategies

36

slide-64
SLIDE 64

Protocol for REACH[L] in Clique Networks

q0 wC st L0 stock1 ⊥ CONTROL ǫ ǫ !!start ??start ??start L Laux L′′ L′ ⊥ CONTROL !!decr(i) ??ok ??start ??start !!zero(i) stock1 incri 1i decri stock2 ⊥ COUNTER ??incr(i) ??ok !!ok ??decr(i) ??ok !!ok ??zero(i) ??start ??start ??start

Considering local strategies

37

slide-65
SLIDE 65

How to regain decidability ?

A complete protocol

  • From each state, at least one edge labelled with an action

(internal or broadcast)

  • From each state, for each message m, an edge labelled with ??m

For a complete protocol in a clique network, at each broadcast, all processes change their past

Theorem

REACH[L] in Clique Networks is decidable when restricted to complete protocols. Idea of the proof:

  • Use an abstract system
  • Encode the number of process with the same history in a single

process

  • Such a system is then well-structured (the order on the

configuration is a simulation)

Considering local strategies

38

slide-66
SLIDE 66

Outline

1

Ad Hoc Networks

2

Clique and Reconfigurable Networks

3

Considering local strategies

4

Conclusion

Conclusion

39

slide-67
SLIDE 67

Conclusion

Results

Reconfigurable Networks Clique Networks REACH Ptime Ackermann-complete TARGET Ptime Undecidable Undecidable REACH[L] NP-complete Decidable for complete protocols TARGET[L] NP-complete Undecidable

  • When we get decidability, we obtain also a cutoff.

Conclusion

40

slide-68
SLIDE 68

Last remarks

Many many papers on this subject

  • See the survey [Esparza, STACS’14]
  • Aminof et al. studied model-checking with branching time logic
  • Esparza & Ganty studied communication through shared

variables with no locking mechanism

  • Bollig et al. studied expressivity of parameterized networks
  • Bertrand et al. studied Broadcast Networks and Ad Hoc

Networks with probability

And now ?

  • How can this knowledge be used to verify or synthesize real

distributed algorithms ?

  • Often you need identity (from an infinite alphabet)
  • You might have message passing systems with queues
  • Or parameterized shared memory (an array whose size depends
  • n the number of processes)

Conclusion

41