Fair Termination for Parameterized Probabilistic Concurrent Systems - - PowerPoint PPT Presentation

fair termination for parameterized probabilistic
SMART_READER_LITE
LIVE PREVIEW

Fair Termination for Parameterized Probabilistic Concurrent Systems - - PowerPoint PPT Presentation

Fair Termination for Parameterized Probabilistic Concurrent Systems (TACAS17) al 1 Anthony W. Lin 2 Ond rej Leng Rupak Majumdar 3 ummer 4 Philipp R 1 Brno University of Technology, Czech Republic 2 Department of Computer Science,


slide-1
SLIDE 1

Fair Termination for Parameterized Probabilistic Concurrent Systems

(TACAS’17)

Ondˇ rej Leng´ al1 Anthony W. Lin2 Rupak Majumdar3 Philipp R¨ ummer4

1Brno University of Technology, Czech Republic 2Department of Computer Science, University of Oxford, UK 3MPI-SWS Kaiserslautern, Germany 4Uppsala University, Sweden

9 May 2019 (MOSCA’19)

slide-2
SLIDE 2

Outline

Parameterized probabilistic concurrent systems

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 2 / 21

slide-3
SLIDE 3

Outline

Parameterized probabilistic concurrent systems Liveness

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 2 / 21

slide-4
SLIDE 4

Outline

Parameterized probabilistic concurrent systems Liveness Fairness

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 2 / 21

slide-5
SLIDE 5

Outline

Parameterized probabilistic concurrent systems Liveness Fairness Regular model checking

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 2 / 21

slide-6
SLIDE 6

Motivating Example

Herman’s protocol (merging version)

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-7
SLIDE 7

Motivating Example

Herman’s protocol (merging version) ring topology, leader election

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-8
SLIDE 8

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-9
SLIDE 9

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-10
SLIDE 10

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-11
SLIDE 11

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

goal: | = ♦leader is elected

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-12
SLIDE 12

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

goal: | = ♦leader is elected Herman’s algorithm:

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-13
SLIDE 13

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

goal: | = ♦leader is elected Herman’s algorithm: when selected:

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-14
SLIDE 14

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

goal: | = ♦leader is elected Herman’s algorithm: when selected:

◮ if no token:

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-15
SLIDE 15

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

goal: | = ♦leader is elected Herman’s algorithm: when selected:

◮ if no token: return

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-16
SLIDE 16

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

goal: | = ♦leader is elected Herman’s algorithm: when selected:

◮ if no token: return ◮ if has token: flip a coin

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-17
SLIDE 17

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

goal: | = ♦leader is elected Herman’s algorithm: when selected:

◮ if no token: return ◮ if has token: flip a coin

  • heads: pass the token clockwise

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-18
SLIDE 18

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

goal: | = ♦leader is elected Herman’s algorithm: when selected:

◮ if no token: return ◮ if has token: flip a coin

  • heads: pass the token clockwise
  • tails: keep the token

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-19
SLIDE 19

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

goal: | = ♦leader is elected Herman’s algorithm: when selected:

◮ if no token: return ◮ if has token: flip a coin

  • heads: pass the token clockwise
  • tails: keep the token

if a process with a token gets another one:

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-20
SLIDE 20

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

goal: | = ♦leader is elected Herman’s algorithm: when selected:

◮ if no token: return ◮ if has token: flip a coin

  • heads: pass the token clockwise
  • tails: keep the token

if a process with a token gets another one: merge them

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-21
SLIDE 21

Motivating Example

Herman’s protocol (merging version) ring topology, leader election scheduler selects processes unstable configuration:

◮ > 1 tokens

stable configuration:

◮ 1 token (leader)

goal: | = ♦leader is elected Herman’s algorithm: when selected:

◮ if no token: return ◮ if has token: flip a coin

  • heads: pass the token clockwise
  • tails: keep the token

if a process with a token gets another one: merge them Pr(| = ♦leader is elected) = 1

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 3 / 21

slide-22
SLIDE 22

Motivating Example

Herman’s protocol (merging version)

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-23
SLIDE 23

Motivating Example

Herman’s protocol (merging version) Pr(| = ♦leader is elected) = 1

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-24
SLIDE 24

Motivating Example

Herman’s protocol (merging version) Pr(| = ♦leader is elected) = 1 really?

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-25
SLIDE 25

Motivating Example

Herman’s protocol (merging version) Pr(| = ♦leader is elected) = 1 really?

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-26
SLIDE 26

Motivating Example

Herman’s protocol (merging version) Pr(| = ♦leader is elected) = 1 really?

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-27
SLIDE 27

Motivating Example

Herman’s protocol (merging version) Pr(| = ♦leader is elected) = 1 really?

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-28
SLIDE 28

Motivating Example

Herman’s protocol (merging version) Pr(| = ♦leader is elected) = 1 really?

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-29
SLIDE 29

Motivating Example

Herman’s protocol (merging version) Pr(| = ♦leader is elected) = 1 really?

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-30
SLIDE 30

Motivating Example

Herman’s protocol (merging version) Pr(| = ♦leader is elected) = 1 really?

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-31
SLIDE 31

Motivating Example

Herman’s protocol (merging version) Pr(| = ♦leader is elected) = 1 really? Fairness needed!

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-32
SLIDE 32

Motivating Example

Herman’s protocol (merging version) Pr(| = ♦leader is elected) = 1 really? Fairness needed! But which fairness?

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-33
SLIDE 33

Motivating Example

Herman’s protocol (merging version) Pr(| = ♦leader is elected) = 1 really? Fairness needed! But which fairness? We use finitary fairness

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 4 / 21

slide-34
SLIDE 34

Setting

Liveness of Fair Parameterized Probabilistic Concurrent Systems

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 5 / 21

slide-35
SLIDE 35

Setting

Liveness of Fair Parameterized Probabilistic Concurrent Systems

◮ Parameterized Concurrent Systems: N finite-state processes

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 5 / 21

slide-36
SLIDE 36

Setting

Liveness of Fair Parameterized Probabilistic Concurrent Systems

◮ Parameterized Concurrent Systems: N finite-state processes ◮ Probabilistic: each process can flip a coin

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 5 / 21

slide-37
SLIDE 37

Setting

Liveness of Fair Parameterized Probabilistic Concurrent Systems

◮ Parameterized Concurrent Systems: N finite-state processes ◮ Probabilistic: each process can flip a coin ◮ Fair: each process will have the opportunity to move

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 5 / 21

slide-38
SLIDE 38

Setting

Liveness of Fair Parameterized Probabilistic Concurrent Systems

◮ Parameterized Concurrent Systems: N finite-state processes ◮ Probabilistic: each process can flip a coin ◮ Fair: each process will have the opportunity to move ◮ Liveness: a good configuration is always reachable with Pr = 1

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 5 / 21

slide-39
SLIDE 39

Setting

Liveness of Fair Parameterized Probabilistic Concurrent Systems

◮ Parameterized Concurrent Systems: N finite-state processes ◮ Probabilistic: each process can flip a coin ◮ Fair: each process will have the opportunity to move ◮ Liveness: a good configuration is always reachable with Pr = 1

Examples: Herman’s protocol, Israeli-Jalfon protocol, population protocols, . . .

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 5 / 21

slide-40
SLIDE 40

Setting

Liveness of Fair Parameterized Probabilistic Concurrent Systems

◮ Parameterized Concurrent Systems: N finite-state processes ◮ Probabilistic: each process can flip a coin ◮ Fair: each process will have the opportunity to move ◮ Liveness: a good configuration is always reachable with Pr = 1

Examples: Herman’s protocol, Israeli-Jalfon protocol, population protocols, . . . An infinite-state Markov Decision Process (MDP) F

1 2 1 2

1

1 2 1 2

Evil scheduler Random process

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 5 / 21

slide-41
SLIDE 41

Setting

Liveness of Fair Parameterized Probabilistic Concurrent Systems

◮ Parameterized Concurrent Systems: N finite-state processes ◮ Probabilistic: each process can flip a coin ◮ Fair: each process will have the opportunity to move ◮ Liveness: a good configuration is always reachable with Pr = 1

Examples: Herman’s protocol, Israeli-Jalfon protocol, population protocols, . . . An infinite-state Markov Decision Process (MDP) F

1 2 1 2

1

1 2 1 2

Evil scheduler Random process Pr(s0 | = ♦F) ? = 1

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 5 / 21

slide-42
SLIDE 42

Almost-Sure Liveness

Weakly-finite MDPs: for a fixed initial configuration, the set of reachable states is finite

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 6 / 21

slide-43
SLIDE 43

Almost-Sure Liveness

Weakly-finite MDPs: for a fixed initial configuration, the set of reachable states is finite Almost-sure liveness in weakly-finite MDPs:

  • nly distinguish = 0 and > 0 transitions

F

1 2 1 2

1

1 2 1 2

Evil scheduler Random process

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 6 / 21

slide-44
SLIDE 44

Almost-Sure Liveness

Weakly-finite MDPs: for a fixed initial configuration, the set of reachable states is finite Almost-sure liveness in weakly-finite MDPs:

  • nly distinguish = 0 and > 0 transitions

F Evil scheduler Angelic process

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 6 / 21

slide-45
SLIDE 45

Almost-Sure Liveness

Weakly-finite MDPs: for a fixed initial configuration, the set of reachable states is finite Almost-sure liveness in weakly-finite MDPs:

  • nly distinguish = 0 and > 0 transitions

F Evil scheduler Angelic process

Lemma

Pr(s0 | = ♦F) = 1 iff Proc. has winning strategy from all s ∈ Reach(s0).

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 6 / 21

slide-46
SLIDE 46

Symbolic Framework: Regular Model Checking

Regular Model Checking for liveness in param. prob. conc. systems under all schedulers

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 7 / 21

slide-47
SLIDE 47

Symbolic Framework: Regular Model Checking

Regular Model Checking for liveness in param. prob. conc. systems under all schedulers Regular Model Checking: Uppsala & Paris

◮ Bouajjani, Jonsson, Nilsson, and Touili [CAV’00]

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 7 / 21

slide-48
SLIDE 48

Symbolic Framework: Regular Model Checking

Regular Model Checking for liveness in param. prob. conc. systems under all schedulers Regular Model Checking: Uppsala & Paris

◮ Bouajjani, Jonsson, Nilsson, and Touili [CAV’00] ◮ usually safety of deterministic systems

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 7 / 21

slide-49
SLIDE 49

Symbolic Framework: Regular Model Checking

Regular Model Checking for liveness in param. prob. conc. systems under all schedulers Regular Model Checking: Uppsala & Paris

◮ Bouajjani, Jonsson, Nilsson, and Touili [CAV’00] ◮ usually safety of deterministic systems

liveness in parameterized probabilistic concurrent systems:

◮ extension of Lin & R¨ ummer [CAV’16]

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 7 / 21

slide-50
SLIDE 50

Symbolic Framework: Regular Model Checking

Regular Model Checking for liveness in param. prob. conc. systems under all schedulers Regular Model Checking: Uppsala & Paris

◮ Bouajjani, Jonsson, Nilsson, and Touili [CAV’00] ◮ usually safety of deterministic systems

liveness in parameterized probabilistic concurrent systems:

◮ extension of Lin & R¨ ummer [CAV’16]

this talk: embedding of fairness into the system

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 7 / 21

slide-51
SLIDE 51

Symbolic Framework: Regular Model Checking

Regular Model Checking

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 8 / 21

slide-52
SLIDE 52

Symbolic Framework: Regular Model Checking

Regular Model Checking A configuration: a word over Σ: T N T N N

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 8 / 21

slide-53
SLIDE 53

Symbolic Framework: Regular Model Checking

Regular Model Checking A configuration: a word over Σ: T N T N N A set of configurations: a finite automaton A over Σ T , N T T , N

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 8 / 21

slide-54
SLIDE 54

Symbolic Framework: Regular Model Checking

Regular Model Checking A configuration: a word over Σ: T N T N N A set of configurations: a finite automaton A over Σ T , N T T , N Transition relation: a (length-preserving) transducer τ T / T N / N T / N N / T T / T T / T N / N

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 8 / 21

slide-55
SLIDE 55

Symbolic Framework: Regular Model Checking

Regular Model Checking for 2-player reachability games:

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 9 / 21

slide-56
SLIDE 56

Symbolic Framework: Regular Model Checking

Regular Model Checking for 2-player reachability games: Liveness:

◮ Start, Good, τ1, and τ2 given

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 9 / 21

slide-57
SLIDE 57

Symbolic Framework: Regular Model Checking

Regular Model Checking for 2-player reachability games: Liveness:

◮ Start, Good, τ1, and τ2 given ◮ Task: find

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 9 / 21

slide-58
SLIDE 58

Symbolic Framework: Regular Model Checking

Regular Model Checking for 2-player reachability games: Liveness:

◮ Start, Good, τ1, and τ2 given ◮ Task: find

  • FA Inv over-approximating reachable states

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 9 / 21

slide-59
SLIDE 59

Symbolic Framework: Regular Model Checking

Regular Model Checking for 2-player reachability games: Liveness:

◮ Start, Good, τ1, and τ2 given ◮ Task: find

  • FA Inv over-approximating reachable states, and
  • transducer P< encoding progress for Process

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 9 / 21

slide-60
SLIDE 60

Symbolic Framework: Regular Model Checking

Regular Model Checking for 2-player reachability games: Liveness:

◮ Start, Good, τ1, and τ2 given ◮ Task: find

  • FA Inv over-approximating reachable states, and
  • transducer P< encoding progress for Process
  • Advice bits

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 9 / 21

slide-61
SLIDE 61

Symbolic Framework: Regular Model Checking

Regular Model Checking for 2-player reachability games: Liveness: Start, Good, τ1, and τ2 given Advice bits: local conditions on FA Inv and transducer P< over Σ

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 10 / 21

slide-62
SLIDE 62

Symbolic Framework: Regular Model Checking

Regular Model Checking for 2-player reachability games: Liveness: Start, Good, τ1, and τ2 given Advice bits: local conditions on FA Inv and transducer P< over Σ

1 Start ⊆ Inv 2 τ∪(Inv) ⊆ Inv

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 10 / 21

slide-63
SLIDE 63

Symbolic Framework: Regular Model Checking

Regular Model Checking for 2-player reachability games: Liveness: Start, Good, τ1, and τ2 given Advice bits: local conditions on FA Inv and transducer P< over Σ

1 Start ⊆ Inv 2 τ∪(Inv) ⊆ Inv 3 P< is a strict preorder (i.e., irreflexive, transitive)

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 10 / 21

slide-64
SLIDE 64

Symbolic Framework: Regular Model Checking

Regular Model Checking for 2-player reachability games: Liveness: Start, Good, τ1, and τ2 given Advice bits: local conditions on FA Inv and transducer P< over Σ

1 Start ⊆ Inv 2 τ∪(Inv) ⊆ Inv 3 P< is a strict preorder (i.e., irreflexive, transitive) 4 For any evil transition from Inv \ Good to se, there is an angelic

transition from se that

  • goes to Inv and
  • progresses w.r.t. P<

∀x ∈ Inv \ Good, ∀y ∈ Σ∗ \ Good : (x →τ1 y) ⇒ (∃z ∈ Inv : (y →τ2 z ∧ z <P x))

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 10 / 21

slide-65
SLIDE 65

Finitary Fairness — [Alur & Henzinger’98]

k-Fairness

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 11 / 21

slide-66
SLIDE 66

Finitary Fairness — [Alur & Henzinger’98]

k-Fairness intuition: binds the scope of and ♦ operators to k steps.

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 11 / 21

slide-67
SLIDE 67

Finitary Fairness — [Alur & Henzinger’98]

k-Fairness intuition: binds the scope of and ♦ operators to k steps. weak (justice): ♦A ⇒ ♦B

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 11 / 21

slide-68
SLIDE 68

Finitary Fairness — [Alur & Henzinger’98]

k-Fairness intuition: binds the scope of and ♦ operators to k steps. weak (justice): ♦A ⇒ ♦B No (sub-)path of length k satisfies (A ∧ ¬B).

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 11 / 21

slide-69
SLIDE 69

Finitary Fairness — [Alur & Henzinger’98]

k-Fairness intuition: binds the scope of and ♦ operators to k steps. weak (justice): ♦A ⇒ ♦B No (sub-)path of length k satisfies (A ∧ ¬B).

◮ A cannot hold for k consecutive steps without B holding.

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 11 / 21

slide-70
SLIDE 70

Finitary Fairness — [Alur & Henzinger’98]

k-Fairness intuition: binds the scope of and ♦ operators to k steps. weak (justice): ♦A ⇒ ♦B No (sub-)path of length k satisfies (A ∧ ¬B).

◮ A cannot hold for k consecutive steps without B holding.

strong (compassion): ♦A ⇒ ♦B

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 11 / 21

slide-71
SLIDE 71

Finitary Fairness — [Alur & Henzinger’98]

k-Fairness intuition: binds the scope of and ♦ operators to k steps. weak (justice): ♦A ⇒ ♦B No (sub-)path of length k satisfies (A ∧ ¬B).

◮ A cannot hold for k consecutive steps without B holding.

strong (compassion): ♦A ⇒ ♦B No path satisfies ψk ∧ ¬B. ψ0 = true ψi = ♦(A ∧ ψi−1)

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 11 / 21

slide-72
SLIDE 72

Finitary Fairness — [Alur & Henzinger’98]

k-Fairness intuition: binds the scope of and ♦ operators to k steps. weak (justice): ♦A ⇒ ♦B No (sub-)path of length k satisfies (A ∧ ¬B).

◮ A cannot hold for k consecutive steps without B holding.

strong (compassion): ♦A ⇒ ♦B No path satisfies ψk ∧ ¬B. ψ0 = true ψi = ♦(A ∧ ψi−1)

◮ A cannot hold k times without B holding at some point.

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 11 / 21

slide-73
SLIDE 73

Finitary Fairness — [Alur & Henzinger’98]

k-Fairness intuition: binds the scope of and ♦ operators to k steps. weak (justice): ♦A ⇒ ♦B No (sub-)path of length k satisfies (A ∧ ¬B).

◮ A cannot hold for k consecutive steps without B holding.

strong (compassion): ♦A ⇒ ♦B No path satisfies ψk ∧ ¬B. ψ0 = true ψi = ♦(A ∧ ψi−1)

◮ A cannot hold k times without B holding at some point.

Finitary fairness: if k-fair for some k

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 11 / 21

slide-74
SLIDE 74

Encoding Finitary Fairness into RMC

Encoding Finitary Fairness into RMC:

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 12 / 21

slide-75
SLIDE 75

Encoding Finitary Fairness into RMC

Encoding Finitary Fairness into RMC: Fix some k

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 12 / 21

slide-76
SLIDE 76

Encoding Finitary Fairness into RMC

Encoding Finitary Fairness into RMC: Fix some k Example for process selection (weak fairness)

◮ every process is selected at least once in k steps

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 12 / 21

slide-77
SLIDE 77

Encoding Finitary Fairness into RMC

Encoding Finitary Fairness into RMC: Fix some k Example for process selection (weak fairness)

◮ every process is selected at least once in k steps

Append a counter to encoding of every process, initialized to maximum

◮ the maximum value is bounded

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 12 / 21

slide-78
SLIDE 78

Encoding Finitary Fairness into RMC

Encoding Finitary Fairness into RMC: Fix some k Example for process selection (weak fairness)

◮ every process is selected at least once in k steps

Append a counter to encoding of every process, initialized to maximum

◮ the maximum value is bounded

When a process is selected, reset its counter to max. value

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 12 / 21

slide-79
SLIDE 79

Encoding Finitary Fairness into RMC

Encoding Finitary Fairness into RMC: Fix some k Example for process selection (weak fairness)

◮ every process is selected at least once in k steps

Append a counter to encoding of every process, initialized to maximum

◮ the maximum value is bounded

When a process is selected, reset its counter to max. value When a process is not selected, decrement its counter

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 12 / 21

slide-80
SLIDE 80

Encoding Finitary Fairness into RMC

Encoding Finitary Fairness into RMC: Fix some k Example for process selection (weak fairness)

◮ every process is selected at least once in k steps

Append a counter to encoding of every process, initialized to maximum

◮ the maximum value is bounded

When a process is selected, reset its counter to max. value When a process is not selected, decrement its counter Good configurations are also those where some counter = 0

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 12 / 21

slide-81
SLIDE 81

Encoding Finitary Fairness into RMC

Encoding Finitary Fairness into RMC: Fix some k Example for process selection (weak fairness)

◮ every process is selected at least once in k steps

Append a counter to encoding of every process, initialized to maximum

◮ the maximum value is bounded

When a process is selected, reset its counter to max. value When a process is not selected, decrement its counter Good configurations are also those where some counter = 0 Generalized to arbitrary weak and strong fairness

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 12 / 21

slide-82
SLIDE 82

Encoding Finitary Fairness into RMC

Example: Herman’s protocol: w/o fairness: N | T | T | N

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 13 / 21

slide-83
SLIDE 83

Encoding Finitary Fairness into RMC

Example: Herman’s protocol: w/o fairness: N | T | T | N w/ fairness: N 1 1 0 | T 1 1 1 | T 1 1 0 | N 1 0 0

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 13 / 21

slide-84
SLIDE 84

Encoding Finitary Fairness into RMC

Example: Herman’s protocol: w/o fairness: N | T | T | N w/ fairness: N 1 1 0 | T 1 1 1 | T 1 1 0 | N 1 0 0 scheduler picks a process N 1 1 0 | T 1 1 1 | T 1 1 0 | N 1 0 0

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 13 / 21

slide-85
SLIDE 85

Encoding Finitary Fairness into RMC

Example: Herman’s protocol: w/o fairness: N | T | T | N w/ fairness: N 1 1 0 | T 1 1 1 | T 1 1 0 | N 1 0 0 scheduler picks a process N 1 1 0 | T 1 1 1 | T 1 1 0 | N 1 0 0 process player decrements/resets counters N 1 0 0 | T 1 1 0 | T 1 1 1 | N 0 0 0

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 13 / 21

slide-86
SLIDE 86

Encoding Finitary Fairness into RMC

Theorem

Let S be a regular representation of an MDP with finitary fairness constraints C. The presented transformation yields a regular representation of an MDP SF (without fairness constraints) such that (if C are realizable) Pr(Start | = ♦Good) = 1 iff Pr(StartF | = ♦GoodF) = 1

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 14 / 21

slide-87
SLIDE 87

Case Studies: Population Protocols

Moran process

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 15 / 21

slide-88
SLIDE 88

Case Studies: Population Protocols

Moran process a model of genetic drift

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 15 / 21

slide-89
SLIDE 89

Case Studies: Population Protocols

Moran process a model of genetic drift linear array

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 15 / 21

slide-90
SLIDE 90

Case Studies: Population Protocols

Moran process a model of genetic drift linear array alleles A or B

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 15 / 21

slide-91
SLIDE 91

Case Studies: Population Protocols

Moran process a model of genetic drift linear array alleles A or B rules:

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 15 / 21

slide-92
SLIDE 92

Case Studies: Population Protocols

Moran process a model of genetic drift linear array alleles A or B rules:

◮ . . . A . . . . . . A . . .

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 15 / 21

slide-93
SLIDE 93

Case Studies: Population Protocols

Moran process a model of genetic drift linear array alleles A or B rules:

◮ . . . A . . . . . . A . . . ◮ . . . A B . . . . . . A A . . . and . . . B A . . . . . . A A . . .

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 15 / 21

slide-94
SLIDE 94

Case Studies: Population Protocols

Moran process a model of genetic drift linear array alleles A or B rules:

◮ . . . A . . . . . . A . . . ◮ . . . A B . . . . . . A A . . . and . . . B A . . . . . . A A . . . ◮ . . . A B . . . . . . B B . . . and . . . B A . . . . . . B B . . .

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 15 / 21

slide-95
SLIDE 95

Case Studies: Population Protocols

Moran process a model of genetic drift linear array alleles A or B rules:

◮ . . . A . . . . . . A . . . ◮ . . . A B . . . . . . A A . . . and . . . B A . . . . . . A A . . . ◮ . . . A B . . . . . . B B . . . and . . . B A . . . . . . B B . . .

goal: A

  • r B

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 15 / 21

slide-96
SLIDE 96

Case Studies: Population Protocols

Moran process a model of genetic drift linear array alleles A or B rules:

◮ . . . A . . . . . . A . . . ◮ . . . A B . . . . . . A A . . . and . . . B A . . . . . . A A . . . ◮ . . . A B . . . . . . B B . . . and . . . B A . . . . . . B B . . .

goal: A

  • r B

Cell cycle switch — similar, but has an intermediate state

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 15 / 21

slide-97
SLIDE 97

Case Studies: Population Protocols

Clustering

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 16 / 21

slide-98
SLIDE 98

Case Studies: Population Protocols

Clustering linear array

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 16 / 21

slide-99
SLIDE 99

Case Studies: Population Protocols

Clustering linear array alleles A or B

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 16 / 21

slide-100
SLIDE 100

Case Studies: Population Protocols

Clustering linear array alleles A or B rules:

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 16 / 21

slide-101
SLIDE 101

Case Studies: Population Protocols

Clustering linear array alleles A or B rules:

◮ . . . A B . . . . . . B A . . . and . . . B A . . . . . . A B . . .

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 16 / 21

slide-102
SLIDE 102

Case Studies: Population Protocols

Clustering linear array alleles A or B rules:

◮ . . . A B . . . . . . B A . . . and . . . B A . . . . . . A B . . . ◮ . . . A B . . . . . . B A . . . and . . . B A . . . . . . A B . . .

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 16 / 21

slide-103
SLIDE 103

Case Studies: Population Protocols

Clustering linear array alleles A or B rules:

◮ . . . A B . . . . . . B A . . . and . . . B A . . . . . . A B . . . ◮ . . . A B . . . . . . B A . . . and . . . B A . . . . . . A B . . .

goal: A

∗ B ∗

  • r B

∗ A ∗

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 16 / 21

slide-104
SLIDE 104

Case Studies: Population Protocols

Coin game a population of agents every agent has one currency: Dollars or Euros in each step, an agent either:

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 17 / 21

slide-105
SLIDE 105

Case Studies: Population Protocols

Coin game a population of agents every agent has one currency: Dollars or Euros in each step, an agent either:

◮ keeps it currency or ◮ randomly selects k neighbours and changes currency to the majority

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 17 / 21

slide-106
SLIDE 106

Case Studies: Population Protocols

Coin game a population of agents every agent has one currency: Dollars or Euros in each step, an agent either:

◮ keeps it currency or ◮ randomly selects k neighbours and changes currency to the majority

goal: D∗ or E∗

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 17 / 21

slide-107
SLIDE 107

Evaluation

Encoding implemented in FAIRYTAIL

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 18 / 21

slide-108
SLIDE 108

Evaluation

Encoding implemented in FAIRYTAIL Input:

◮ FAs for Start, Good ◮ transducers for τ1, and τ2

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 18 / 21

slide-109
SLIDE 109

Evaluation

Encoding implemented in FAIRYTAIL Input:

◮ FAs for Start, Good ◮ transducers for τ1, and τ2

Output:

◮ FAs for StartF, GoodF ◮ transducers for τ F

1 , and τ F 2

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 18 / 21

slide-110
SLIDE 110

Evaluation

Encoding implemented in FAIRYTAIL Input:

◮ FAs for Start, Good ◮ transducers for τ1, and τ2

Output:

◮ FAs for StartF, GoodF ◮ transducers for τ F

1 , and τ F 2

SLRP [Lin & R¨ ummer, CAV’16] used to find advice bits

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 18 / 21

slide-111
SLIDE 111

Evaluation

Encoding implemented in FAIRYTAIL Input:

◮ FAs for Start, Good ◮ transducers for τ1, and τ2

Output:

◮ FAs for StartF, GoodF ◮ transducers for τ F

1 , and τ F 2

SLRP [Lin & R¨ ummer, CAV’16] used to find advice bits

◮ SYNTHESISE: use a SAT solver (Sat4j) to obtain a candidate

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 18 / 21

slide-112
SLIDE 112

Evaluation

Encoding implemented in FAIRYTAIL Input:

◮ FAs for Start, Good ◮ transducers for τ1, and τ2

Output:

◮ FAs for StartF, GoodF ◮ transducers for τ F

1 , and τ F 2

SLRP [Lin & R¨ ummer, CAV’16] used to find advice bits

◮ SYNTHESISE: use a SAT solver (Sat4j) to obtain a candidate ◮ VERIFY: check the candidate is OK/refine SAT formula

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 18 / 21

slide-113
SLIDE 113

Evaluation

Table: Results of experiments (timeout = 10 hours).

Case study Time Herman’s protocol (merge, line) 3.64 s Herman’s protocol (annih., line) 4.33 s Herman’s protocol (merge, ring) 4.31 s Herman’s protocol (annih., ring) 4.61 s Moran process (2 types, line) 2 m 48 s Moran process (3 types, line) 56 m 14 s Cell cycle switch (1 types, line) 43.94 s Cell cycle switch (2 types, line) 9 h 46 m Clustering (2 types, line) 10 m 30 s Clustering (3 types, line) T/O Coin game (k = 3, clique) 1 m 0 s

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 19 / 21

slide-114
SLIDE 114

Solution to Herman’s protocol (merge, ring)

q0 N , 1 q1 N q2 N , 1 T T T q3 N T

Inv

r0 ( N , N ), ( 0 , 0 ), ( 0 , T ), ( 1 , 0 ), ( 1 , 1 ) r1 ( 1 , 1 ) ( T , T ) r2 ( N , N ), ( N , T ), ( T , N ), ( T , T ) ( 0 , 0 ), ( 0 , 1 ), ( 1 , 0 ), ( 1 , 1 ) ( N , T ) ( 0 , 1 )

P<

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 20 / 21

slide-115
SLIDE 115

Conclusion

A nice symbolic framework for reasoning about parameterized probabilistic concurrent systems.

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 21 / 21

slide-116
SLIDE 116

Conclusion

A nice symbolic framework for reasoning about parameterized probabilistic concurrent systems. In this talk extended with finitary fairness.

◮ a natural notion of fairness in such systems

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 21 / 21

slide-117
SLIDE 117

Conclusion

A nice symbolic framework for reasoning about parameterized probabilistic concurrent systems. In this talk extended with finitary fairness.

◮ a natural notion of fairness in such systems

Future work: many optimizations possible

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 21 / 21

slide-118
SLIDE 118

Conclusion

A nice symbolic framework for reasoning about parameterized probabilistic concurrent systems. In this talk extended with finitary fairness.

◮ a natural notion of fairness in such systems

Future work: many optimizations possible more general systems (e.g., grid topology)

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 21 / 21

slide-119
SLIDE 119

Conclusion

A nice symbolic framework for reasoning about parameterized probabilistic concurrent systems. In this talk extended with finitary fairness.

◮ a natural notion of fairness in such systems

Future work: many optimizations possible more general systems (e.g., grid topology) more general fairness

Leng´ al, Lin, Majumdar, R¨ ummer Fair Termination for Probabilistic Systems MOSCA’19 21 / 21