Copyful Streaming String Transducers Emmanuel Filiot Pierre-Alain - - PowerPoint PPT Presentation

copyful streaming string transducers
SMART_READER_LITE
LIVE PREVIEW

Copyful Streaming String Transducers Emmanuel Filiot Pierre-Alain - - PowerPoint PPT Presentation

Copyful Streaming String Transducers Emmanuel Filiot Pierre-Alain Reynier ULB, Computer Science LIF, Aix-Marseille University Department & CNRS RP2017, Royal Holloway Automata based formal methods Automata-based approaches: model


slide-1
SLIDE 1

Copyful Streaming String Transducers

Emmanuel Filiot ULB, Computer Science Department Pierre-Alain Reynier LIF, Aix-Marseille University & CNRS RP’2017, Royal Holloway

slide-2
SLIDE 2

Automata based formal methods

Automata-based approaches: model checking controller synthesis performance evaluation model optimization

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 2 / 14

slide-3
SLIDE 3

Automata based formal methods

Automata-based approaches: model checking controller synthesis performance evaluation model optimization Lift this study to transducers: language and speech processing model-checking infinite state-space systems reactive systems verification of web sanitizers

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 2 / 14

slide-4
SLIDE 4

Overview

1

Introduction

2

Streaming String Transducers

3

HDT0L systems to the rescue

4

From copyful to copyless SST

5

Conclusion

slide-5
SLIDE 5

Overview

1

Introduction

2

Streaming String Transducers

3

HDT0L systems to the rescue

4

From copyful to copyless SST

5

Conclusion

slide-6
SLIDE 6

Streaming String Transducers [Alur, Cerny, 2010]

SST= Deterministic Finite-state Automata extended with registers

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 3 / 14

slide-7
SLIDE 7

Streaming String Transducers [Alur, Cerny, 2010]

SST= Deterministic Finite-state Automata extended with registers Registers: output words Register updates: X := u · Y · v X := YZ X, Y , Z: registers u, v: words in Σ∗ XY σ, updσ : X := X.σ Y := σY w → w . mirror(w)

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 3 / 14

slide-8
SLIDE 8

Streaming String Transducers [Alur, Cerny, 2010]

SST= Deterministic Finite-state Automata extended with registers Registers: output words Register updates: X := u · Y · v X := YZ X, Y , Z: registers u, v: words in Σ∗ a XY b YX a, upda b, updb b, updb a, upda w → w . mirror(w) if last(w) = a mirror(w) . w if last(w) = b

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 3 / 14

slide-9
SLIDE 9

Streaming String Transducers [Alur, Cerny, 2010]

SST= Deterministic Finite-state Automata extended with registers Registers: output words Register updates: X := u · Y · v X := YZ X, Y , Z: registers u, v: words in Σ∗ a XY b YX a, upda b, updb b, updb a, upda w → w . mirror(w) if last(w) = a mirror(w) . w if last(w) = b Copyless restriction: a register cannot be copied OK    X := XY Y := aZb Z := bb KO    X := Y a Y := X Z := bY KO    X := Y aY Y := XZ Z := bb

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 3 / 14

slide-10
SLIDE 10

Semantics of SST: two views

q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Forward interpretation: register valuations X: ε Y: ε

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 4 / 14

slide-11
SLIDE 11

Semantics of SST: two views

q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Forward interpretation: register valuations X: ε a Y: ε b

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 4 / 14

slide-12
SLIDE 12

Semantics of SST: two views

q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Forward interpretation: register valuations X: ε a ab Y: ε b a

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 4 / 14

slide-13
SLIDE 13

Semantics of SST: two views

q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Forward interpretation: register valuations X: ε a ab abbab Y: ε b a c

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 4 / 14

slide-14
SLIDE 14

Semantics of SST: two views

q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Forward interpretation: register valuations X: ε a ab abbab Y: ε b a c ➜ the final output is abbabc

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 4 / 14

slide-15
SLIDE 15

Semantics of SST: two views

q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Forward interpretation: register valuations X: ε a ab abbab Y: ε b a c ➜ the final output is abbabc Backward interpretation: word over registers

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 4 / 14

slide-16
SLIDE 16

Semantics of SST: two views

q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Forward interpretation: register valuations X: ε a ab abbab Y: ε b a c ➜ the final output is abbabc Backward interpretation: word over registers XY ρf (q)

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 4 / 14

slide-17
SLIDE 17

Semantics of SST: two views

q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Forward interpretation: register valuations X: ε a ab abbab Y: ε b a c ➜ the final output is abbabc Backward interpretation: word over registers XbXc XY ρ3(ρf (q))

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 4 / 14

slide-18
SLIDE 18

Semantics of SST: two views

q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Forward interpretation: register valuations X: ε a ab abbab Y: ε b a c ➜ the final output is abbabc Backward interpretation: word over registers XYbXYc XbXc XY ρ2(ρ3(ρf (q)))

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 4 / 14

slide-19
SLIDE 19

Semantics of SST: two views

q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Forward interpretation: register valuations X: ε a ab abbab Y: ε b a c ➜ the final output is abbabc Backward interpretation: word over registers aXbbaXbc XYbXYc XbXc XY ρ1(ρ2(ρ3(ρf (q))))

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 4 / 14

slide-20
SLIDE 20

Semantics of SST: two views

q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Forward interpretation: register valuations X: ε a ab abbab Y: ε b a c ➜ the final output is abbabc Backward interpretation: word over registers abbabc aXbbaXbc XYbXYc XbXc XY ρini(ρ1(ρ2(ρ3(ρf (q))))) ➜ composition of homomorphisms

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 4 / 14

slide-21
SLIDE 21

Why are SST worth being studied?

“Regular” word-to-word functions: copyless SST (and also 1-bounded SST, k-bounded SST) deterministic two-way transducers MSO-definable word transducers ➜ most simple and intuitive model

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 5 / 14

slide-22
SLIDE 22

Why are SST worth being studied?

“Regular” word-to-word functions: copyless SST (and also 1-bounded SST, k-bounded SST) deterministic two-way transducers MSO-definable word transducers ➜ most simple and intuitive model Positive results: equivalence of copyless SST is in PSPACE functionality of non-deterministic SST is in PSPACE type checking is in PSPACE (Given A, B and T, does T(A) ⊆ B?) closed under composition

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 5 / 14

slide-23
SLIDE 23

What about copyful SST?

Non-linear updates ➜ not anymore linear-size increase ➜ strictly increases the expressive power X a, X := a a, X := XX

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 6 / 14

slide-24
SLIDE 24

What about copyful SST?

Non-linear updates ➜ not anymore linear-size increase ➜ strictly increases the expressive power X a, X := a a, X := XX A second example: u#v → v[a ← u] (quadratic blow-up)

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 6 / 14

slide-25
SLIDE 25

What about copyful SST?

Non-linear updates ➜ not anymore linear-size increase ➜ strictly increases the expressive power X a, X := a a, X := XX A second example: u#v → v[a ← u] (quadratic blow-up) σ = #, X := X.σ Y := ε

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 6 / 14

slide-26
SLIDE 26

What about copyful SST?

Non-linear updates ➜ not anymore linear-size increase ➜ strictly increases the expressive power X a, X := a a, X := XX A second example: u#v → v[a ← u] (quadratic blow-up) σ = #, X := X.σ Y := ε Y #

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 6 / 14

slide-27
SLIDE 27

What about copyful SST?

Non-linear updates ➜ not anymore linear-size increase ➜ strictly increases the expressive power X a, X := a a, X := XX A second example: u#v → v[a ← u] (quadratic blow-up) σ = #, X := X.σ Y := ε Y # σ = a, X := X Y := Y σ

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 6 / 14

slide-28
SLIDE 28

What about copyful SST?

Non-linear updates ➜ not anymore linear-size increase ➜ strictly increases the expressive power X a, X := a a, X := XX A second example: u#v → v[a ← u] (quadratic blow-up) σ = #, X := X.σ Y := ε Y # σ = a, X := X Y := Y σ a, X := X Y := YX

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 6 / 14

slide-29
SLIDE 29

Our results for copyful SST

We obtain decidability results for copyful SST: equivalence functionality copyless-definability: given an SST, does there exist an equivalent copyless one? Note: decidability of SST equivalence is also a consequence of: decidability of the equivalence of top-down tree-to-string transducers [STOC’15] recent result on polynomial automata [LICS’17]

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 7 / 14

slide-30
SLIDE 30

Overview

1

Introduction

2

Streaming String Transducers

3

HDT0L systems to the rescue

4

From copyful to copyless SST

5

Conclusion

slide-31
SLIDE 31

HDT0L systems

An HDT0L system is defined by: three alphabets Σ (input), A (working) and Γ (output) an initial word v ∈ A∗ for each σ ∈ Σ, a homomorphism hσ : A∗ → A∗ a final morphism h : A∗ → Γ∗ Behaviour: v ∈ A∗

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 8 / 14

slide-32
SLIDE 32

HDT0L systems

An HDT0L system is defined by: three alphabets Σ (input), A (working) and Γ (output) an initial word v ∈ A∗ for each σ ∈ Σ, a homomorphism hσ : A∗ → A∗ a final morphism h : A∗ → Γ∗ Behaviour: σ1 . . . σk ∈ Σ∗ hσ1 . . . hσk(v) ∈ A∗

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 8 / 14

slide-33
SLIDE 33

HDT0L systems

An HDT0L system is defined by: three alphabets Σ (input), A (working) and Γ (output) an initial word v ∈ A∗ for each σ ∈ Σ, a homomorphism hσ : A∗ → A∗ a final morphism h : A∗ → Γ∗ Behaviour: H : σ1 . . . σk ∈ Σ∗ → hhσ1 . . . hσk(v) ∈ Γ∗

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 8 / 14

slide-34
SLIDE 34

HDT0L systems

An HDT0L system is defined by: three alphabets Σ (input), A (working) and Γ (output) an initial word v ∈ A∗ for each σ ∈ Σ, a homomorphism hσ : A∗ → A∗ a final morphism h : A∗ → Γ∗ Behaviour: H : σ1 . . . σk ∈ Σ∗ → hhσ1 . . . hσk(v) ∈ Γ∗

Theorem (Culik II & Karhumaki’86, Ruhonen’86, Honkala’00)

Given two HDT0L systems H1 and H2, one can decide whether H1(w) = H2(w) for every w ∈ Σ∗.

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 8 / 14

slide-35
SLIDE 35

HDT0L systems: an example

Σ = Γ = {a, b} A = Σ ∪ {$1, $2} v = $1$2 ha : leaves Σ unchanged, $1 → $1a, $2 → a$2 hb : similar to ha h: leaves Σ unchanged, erases $1, $2

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 9 / 14

slide-36
SLIDE 36

HDT0L systems: an example

Σ = Γ = {a, b} A = Σ ∪ {$1, $2} v = $1$2 ha : leaves Σ unchanged, $1 → $1a, $2 → a$2 hb : similar to ha h: leaves Σ unchanged, erases $1, $2 Computation of H0(baa) $1$2

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 9 / 14

slide-37
SLIDE 37

HDT0L systems: an example

Σ = Γ = {a, b} A = Σ ∪ {$1, $2} v = $1$2 ha : leaves Σ unchanged, $1 → $1a, $2 → a$2 hb : similar to ha h: leaves Σ unchanged, erases $1, $2 Computation of H0(baa) $1$2 $1aa$2

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 9 / 14

slide-38
SLIDE 38

HDT0L systems: an example

Σ = Γ = {a, b} A = Σ ∪ {$1, $2} v = $1$2 ha : leaves Σ unchanged, $1 → $1a, $2 → a$2 hb : similar to ha h: leaves Σ unchanged, erases $1, $2 Computation of H0(baa) $1$2 $1aa$2 $1aaaa$2

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 9 / 14

slide-39
SLIDE 39

HDT0L systems: an example

Σ = Γ = {a, b} A = Σ ∪ {$1, $2} v = $1$2 ha : leaves Σ unchanged, $1 → $1a, $2 → a$2 hb : similar to ha h: leaves Σ unchanged, erases $1, $2 Computation of H0(baa) $1$2 $1aa$2 $1aaaa$2 $1baaaab$2

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 9 / 14

slide-40
SLIDE 40

HDT0L systems: an example

Σ = Γ = {a, b} A = Σ ∪ {$1, $2} v = $1$2 ha : leaves Σ unchanged, $1 → $1a, $2 → a$2 hb : similar to ha h: leaves Σ unchanged, erases $1, $2 Computation of H0(baa): $1$2 $1aa$2 $1aaaa$2 $1baaaab$2 baaaab

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 9 / 14

slide-41
SLIDE 41

HDT0L systems: an example

Σ = Γ = {a, b} A = Σ ∪ {$1, $2} v = $1$2 ha : leaves Σ unchanged, $1 → $1a, $2 → a$2 hb : similar to ha h: leaves Σ unchanged, erases $1, $2 Computation of H0(baa): $1$2 $1aa$2 $1aaaa$2 $1baaaab$2 baaaab Transformation w → w . mirror(w)

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 9 / 14

slide-42
SLIDE 42

HDT0L and SST

Theorem

HDT0L systems ≡ total copyful SST. Constructions are effective in both directions, in linear-time.

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 10 / 14

slide-43
SLIDE 43

HDT0L and SST

HDT0L total SST: q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Backward interpretation: word over registers abbabc aXbbaXbc XYbXYc XbXc XY ρini(ρ1(ρ2(ρ3(ρf (q)))))

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 10 / 14

slide-44
SLIDE 44

HDT0L and SST

HDT0L total SST: q XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Backward interpretation: word over registers abbabc aXbbaXbc XYbXYc XbXc XY ρini(ρ1(ρ2(ρ3(ρf (q))))) ➜ HDT0L are single-state SST! q1 v h σ, hσ

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 10 / 14

slide-45
SLIDE 45

HDT0L and SST (2)

total SST HDT0L: q0 q1 q2 q3 XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Backward interpretation: word over registers abbabc aXbbaXbc XYbXYc XbXc XY ρini(ρ1(ρ2(ρ3(ρf (q3)))))

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 11 / 14

slide-46
SLIDE 46

HDT0L and SST (2)

total SST HDT0L: q0 q1 q2 q3 XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Backward interpretation: word over registers abbabc aXbbaXbc XYbXYc Xq2bq2Xq2cq2 Xq3Yq3 ρini(ρ1(ρ2(ρ3(ρf (q3))))) Problem1: states ➜ annotate registers and elements of Σ with Q

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 11 / 14

slide-47
SLIDE 47

HDT0L and SST (2)

total SST HDT0L: q0 q1 q2 q3 XY

ρ1 X := aX Y := b ρ2 X := XY Y := a ρ3 X := XbX Y := c

Backward interpretation: word over registers abbabc aXbbaXbc XYbXYc Xq2bq2Xq2cq2 Xq3Yq3 ρini(ρ1(ρ2(ρ3(ρf (q3))))) Problem1: states ➜ annotate registers and elements of Σ with Q Problem2: SST are not co-deterministic (q1

a,ρ1

− − → q and q2

a,ρ2

− − → q) ➜ apply both updates! ∀w, ∀q, there is exactly one accepting run on w from q Final homomorphism h erases useless computations

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 11 / 14

slide-48
SLIDE 48

Consequences

Theorem

Equivalence of copyful SST is decidable, with same complexity as equivalence of HDT0L systems.

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 12 / 14

slide-49
SLIDE 49

Consequences

Theorem

Equivalence of copyful SST is decidable, with same complexity as equivalence of HDT0L systems. For non-deterministic SST, we can study the functionality problem: Is it the case that for any two runs on the same input word, the output words are equal? Using a squaring construction, we reduce it to equivalence:

Theorem

Functionality of non-deterministic copyful SST is decidable.

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 12 / 14

slide-50
SLIDE 50

Overview

1

Introduction

2

Streaming String Transducers

3

HDT0L systems to the rescue

4

From copyful to copyless SST

5

Conclusion

slide-51
SLIDE 51

From copyful to copyless SST

Exisiting result: Bounded copy SST ≡ copyless SST

A pair (p, X) is problematic iff

1 unbounded register content 2 unbounded copy Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 13 / 14

slide-52
SLIDE 52

From copyful to copyless SST

Exisiting result: Bounded copy SST ≡ copyless SST

A pair (p, X) is problematic iff

1 unbounded register content 2 unbounded copy

Condition 1.: fixpoint computation on sizes Condition 2.: reduction to a boundedness problem on products of matrices [Mandel & Simon’77] ➜ Decidability in polynomial time!

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 13 / 14

slide-53
SLIDE 53

From copyful to copyless SST

Exisiting result: Bounded copy SST ≡ copyless SST

A pair (p, X) is problematic iff

1 unbounded register content 2 unbounded copy

Condition 1.: fixpoint computation on sizes Condition 2.: reduction to a boundedness problem on products of matrices [Mandel & Simon’77] ➜ Decidability in polynomial time!

Theorem

Given a copyful SST, one can decide in PTime whether there exists an equivalent copyless SST.

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 13 / 14

slide-54
SLIDE 54

Overview

1

Introduction

2

Streaming String Transducers

3

HDT0L systems to the rescue

4

From copyful to copyless SST

5

Conclusion

slide-55
SLIDE 55

Summary and Perspectives

strong link between copyful SST and HDT0L systems: copyful SST and HDT0L systems are the same! positive results for copyful SST (equivalence, functionality) decision of copyless among copyful SST

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 14 / 14

slide-56
SLIDE 56

Summary and Perspectives

strong link between copyful SST and HDT0L systems: copyful SST and HDT0L systems are the same! positive results for copyful SST (equivalence, functionality) decision of copyless among copyful SST copyful SST deserve to be studied, they own good properties too! possible to transfer results between copyful SST and HDT0L systems

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 14 / 14

slide-57
SLIDE 57

Summary and Perspectives

strong link between copyful SST and HDT0L systems: copyful SST and HDT0L systems are the same! positive results for copyful SST (equivalence, functionality) decision of copyless among copyful SST copyful SST deserve to be studied, they own good properties too! possible to transfer results between copyful SST and HDT0L systems

Thanks!

Pierre-Alain Reynier (LIF, AMU & CNRS) Copyful Streaming String Transducers RP 2017 14 / 14