Parity to Safety in Polynomial Time for Pushdown and Collapsible - - PowerPoint PPT Presentation

parity to safety in polynomial time for pushdown and
SMART_READER_LITE
LIVE PREVIEW

Parity to Safety in Polynomial Time for Pushdown and Collapsible - - PowerPoint PPT Presentation

Parity to Safety in Polynomial Time for Pushdown and Collapsible Pushdown Games Matthew Hague Royal Holloway, University of London with Roland Meyer, Sebastian Muskalla,and Martin Zimmermann Abstract Safety games for pushdown systems:


slide-1
SLIDE 1

Matthew Hague

with Roland Meyer, Sebastian Muskalla,and Martin Zimmermann

Royal Holloway, University of London

Parity to Safety in Polynomial Time for Pushdown and Collapsible Pushdown Games

slide-2
SLIDE 2

Abstract

Safety games for pushdown systems: n-EXPTIME-complete Parity games for pushdown systems: n-EXPTIME-complete (for order-n collapsible pushdown)

slide-3
SLIDE 3

Abstract

Safety games for pushdown systems: n-EXPTIME-complete Parity games for pushdown systems: n-EXPTIME-complete (for order-n collapsible pushdown) We give a "natural" parity->safety reduction

slide-4
SLIDE 4

Abstract

Safety games for pushdown systems: n-EXPTIME-complete Parity games for pushdown systems: n-EXPTIME-complete (for order-n collapsible pushdown) We give a "natural" parity->safety reduction

(i.e. not parity algorithm -> TM -> safety)

slide-5
SLIDE 5

Motivation

Safety is easy to reason about (Parity is hard) Parity is more expressive To know the relationship

slide-6
SLIDE 6

Ideas We Start With

Finite-state parity to safety using counters (Bernet et al, 2002)

slide-7
SLIDE 7

Ideas We Start With

Finite-state parity to safety using counters (Bernet et al, 2002) Pushdown parity to safety with large counters (Fridman and Zimmermann, 2012)

slide-8
SLIDE 8

Ideas We Start With

Finite-state parity to safety using counters (Bernet et al, 2002) Pushdown parity to safety with large counters (Fridman and Zimmermann, 2012) Reduction order-n -> order-(n-1) Rank awareness (H, Murawski, Ong, Serre, 2008)

slide-9
SLIDE 9

Ideas We Start With

Finite-state parity to safety using counters (Bernet et al, 2002) Pushdown parity to safety with large counters (Fridman and Zimmermann, 2012) Reduction order-n -> order-(n-1) Rank awareness (H, Murawski, Ong, Serre, 2008) Encoding large counters in a pushdown stack (Cachat and Walukiewicz, 2007)

slide-10
SLIDE 10

Contributions

Generalise counter encoding to collapse Direct proof based on commutativity of Counters encoding Stack removal Counters behave like a stack

slide-11
SLIDE 11

Parity Game

Elvis Anarchist 4 1 2 4

slide-12
SLIDE 12

Parity Game

Elvis Anarchist 4 1 2 4 Play: 4

slide-13
SLIDE 13

Parity Game

Elvis Anarchist 4 1 2 4 Play: 4 1

slide-14
SLIDE 14

Parity Game

Elvis Anarchist 4 1 2 4 Play: 4 1 2

slide-15
SLIDE 15

Parity Game

Elvis Anarchist 4 1 2 4 Play: 4 1 2 4

slide-16
SLIDE 16

Parity Game

Elvis Anarchist 4 1 2 4 Play: 4 1 2 4 4

slide-17
SLIDE 17

Parity Game

Elvis Anarchist 4 1 2 4 Play: 4 1 2 4 4 1 4 4 1 2 4...

slide-18
SLIDE 18

Parity Game

Elvis Anarchist 4 1 2 4 Play: 4 1 2 4 4 1 4 4 1 2 4...

Winner: Elvis if least infinitely

  • ccuring rank is even
slide-19
SLIDE 19

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller)

slide-20
SLIDE 20

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-21
SLIDE 21

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-22
SLIDE 22

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-23
SLIDE 23

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-24
SLIDE 24

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-25
SLIDE 25

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-26
SLIDE 26

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-27
SLIDE 27

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-28
SLIDE 28

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-29
SLIDE 29

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-30
SLIDE 30

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-31
SLIDE 31

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-32
SLIDE 32

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-33
SLIDE 33

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-34
SLIDE 34

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-35
SLIDE 35

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-36
SLIDE 36

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4:

slide-37
SLIDE 37

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4: There is a loop! (Hit 1 five times over 4 states)

slide-38
SLIDE 38

Parity with Counters

4 1 2 4 Count: number of each rank (without seeing anything smaller) Counters: 1: 2: 3: 4: There is a loop! (Hit 1 five times over 4 states) The smallest rank is odd: Elvis loses!

slide-39
SLIDE 39

Parity to Safety

Reduce parity to safety game (Bernet et al): Keep counters in state (n * n^k states) Elvis loses if odd counter is high

slide-40
SLIDE 40

Parity to Safety

Reduce parity to safety game (Bernet et al): Keep counters in state (n * n^k states) Elvis loses if odd counter is high Exponential blow up!

slide-41
SLIDE 41

Pushdown Games

a a b b b b b b p1 c p2 c p3 c p4 c Each state has: Control state (from finite set) Stack of characters Model recursive programs

slide-42
SLIDE 42

Pushdown Parity to Safety

Pushdown Parity Finite-state Parity Finite-State Safety Pushdown Safety

(Walukiewicz 1996)

slide-43
SLIDE 43

Pushdown Parity to Safety

Pushdown Parity Finite-state Parity Finite-State Safety Pushdown Safety

(Walukiewicz 1996) (Bernet et al 2002)

slide-44
SLIDE 44

Pushdown Parity to Safety

Pushdown Parity Finite-state Parity Finite-State Safety Pushdown Safety

(Walukiewicz 1996) (Bernet et al 2002) (Fridman and Zimmermann 2012)

slide-45
SLIDE 45

Pushdown Parity to Safety

Pushdown Parity Finite-state Parity Finite-State Safety Pushdown Safety

(Walukiewicz 1996) (Bernet et al 2002) (Fridman and Zimmermann 2012) Commutes!

slide-46
SLIDE 46

Pushdown Parity to Safety

a a b b b b b b p1 c p2 c p3 c p4 c (a, c1, c2) (b, c1, c2) (b, c1, c2') p1 (c, c1, c2) p2 (c, c1, c2) From: To:

slide-47
SLIDE 47

Pushdown Parity to Safety

a a b b b b b b p1 c p2 c p3 c p4 c (a, c1, c2) (b, c1, c2) (b, c1, c2') p1 (c, c1, c2) p2 (c, c1, c2) From: To: Counters

slide-48
SLIDE 48

Exponential Blow Up?

(a, c1, c2') p (b, c1, c2) Counter values: can be exponential (Pushdown->finite-state has 2^n states) Number of stack characters: (2^n)^k (For k ranks)

slide-49
SLIDE 49

Exponential Blow Up?

(a, c1, c2') p (b, c1, c2) Counter values: can be exponential (Pushdown->finite-state has 2^n states) Number of stack characters: (2^n)^k (For k ranks)

slide-50
SLIDE 50

Reducing Size

(a, c1, c2') p (b, c1, c2) a c2' c1 b c2 p c1 From: To:

slide-51
SLIDE 51

Reducing Size

(a, c1, c2') p (b, c1, c2) a c2' c1 b c2 p c1 From: To: Number of characters: 2^n

slide-52
SLIDE 52

Updating Counters

a c2' c1 b c2 p c1 Increment c1

slide-53
SLIDE 53

Updating Counters

a c2' c1 b c2 p c1 Increment c1 ( , a)

slide-54
SLIDE 54

Updating Counters

a c2' c1 b c2 p c1 Increment c1 ( , a)

slide-55
SLIDE 55

Updating Counters

a c2' c1 b c2 p c1 Increment c1 ( , a) Lost c2' (It will be reset)

slide-56
SLIDE 56

Updating Counters

a c2' c1 b c2 p c1 Increment c1 ( , a) Lost c2' (It will be reset)

'

slide-57
SLIDE 57

Updating Counters

a c2' c1 b c2 p c1 Increment c1 ( , a) Lost c2' (It will be reset)

'

slide-58
SLIDE 58

Updating Counters

a c2' c1 b c2 p c1 Increment c1 ( , a) Lost c2' (It will be reset)

'

a

slide-59
SLIDE 59

Polynomial No. of Characters

a c2' c1 b c2 p c1 Counters up to 2^n Alphabet exponential

slide-60
SLIDE 60

Polynomial No. of Characters

a c2' c1 b c2 p c1 Counters up to 2^n Alphabet exponential

a 1 1 1 . . p .

c2' in binary c1 in binary

slide-61
SLIDE 61

Polynomial No. of Characters

a c2' c1 b c2 p c1 Counters up to 2^n Alphabet exponential

a 1 1 1 . . p .

c2' in binary c1 in binary Pushdowns handle length-n binary Alphabet polynomial!

slide-62
SLIDE 62

Pushdown Parity to Safety

Pushdown parity game -> pushdown safety game Naively exponential Use stack discipline of counters Binary counter encoding of pushdowns Polynomial time reduction

slide-63
SLIDE 63

Collapsible Pushdown Systems

Pushdown Systems = First-Order Recursion Collapsible Pushdown Systems = Higher-Order Recursion

slide-64
SLIDE 64

Higher-Order Programming: Niche?

Almost all modern languages support it Scala, Go, JavaScript, Python, ... Retro-fitted to C++ and Java Asynchronous programs/callbacks Map/Reduce

slide-65
SLIDE 65

Collapsible Pushdown Systems

Higher-order program: functions of functions Higher-order pushdown: stack of stacks a b p c

slide-66
SLIDE 66

Collapsible Pushdown Systems

Higher-order program: functions of functions Higher-order pushdown: stack of stacks a b p c a b c

b c

d a c p

slide-67
SLIDE 67

Collapsible Pushdown Systems

Higher-order program: functions of functions Higher-order pushdown: stack of stacks a b p c a b c

b c

d a c p a b b a a c c c b a b a a c c p

slide-68
SLIDE 68

Collapsible Pushdown Systems

Higher-order program: functions of functions Higher-order pushdown: stack of stacks a b p c a b c

b c

d a c p a b b a a c c c b a b a a c c p (+links)

slide-69
SLIDE 69

Generalising Parity->Safety

Collapsible Pushdown -> Finite-State (n-Exponential blow up) n-Exponential Counters Can encode in binary on order-n stack!

slide-70
SLIDE 70

Summary

Parity -> Safety Counters look out for loops (Even with infinite states) Reduction to finite-state Counters behave like stacks Counter values match limits of system Polynomial-time encoding

slide-71
SLIDE 71

Future and Related Work

Can these ideas lead to implementations? Direct implementation Abstraction/refinement of counters Counter size vs. structure of game Backend: HorSat, Preface, &c. Parity->Safety: Berwanger and Doyen, 2008 Sohail and Somenzi, 2009 Biere et al, 2002 Podelski and Rybalchenko, 2011 Konnov et al, 2017