143
Logics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille Université, France Based on joint works with Paul Gastin, Benedikt Bollig and Marc Zeitoun

Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Logics for Weighted Automata

and TransducersBenjamin Monmege

LIF, Aix-Marseille Université, France

Based on joint works with Paul Gastin, Benedikt Bollig and Marc Zeitoun

Page 2: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Software Verification

Page 3: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Software Verification

Critical Software• communication systems• e-commerce• health databases• energy production

Page 4: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Software Verification

Critical Software• communication systems• e-commerce• health databases• energy productionTO�BE��VERIFIED

Page 5: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Software Verification

Critical Software• communication systems• e-commerce• health databases• energy productionTO�BE��VERIFIED

Property to be verified

Page 6: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Software Verification

Critical Software• communication systems• e-commerce• health databases• energy productionTO�BE��VERIFIED

Is the property verified or not by the software?

Property to be verified

Page 7: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Software Verification

Critical Software• communication systems• e-commerce• health databases• energy productionTO�BE��VERIFIED

Is the property verified or not by the software?

Property to be verified

• May an error state be reached?• Is there a book written by X, rented by Y?• Does this leader election protocol permit to elect the leader?

Page 8: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Software Verification

Critical Software• communication systems• e-commerce• health databases• energy productionTO�BE��VERIFIED

Is the property verified or not by the software?

Property to be verified

• May an error state be reached?• Is there a book written by X, rented by Y?• Does this leader election protocol permit to elect the leader?

• What is the probability for an error state to be reached?• How many books, written by X, have been rented by Y?• What is the maximal delay ensuring that this leader election protocol permits the election?

From Boolean to Quantitative Verification

Page 9: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Formal Verification

Critical Software• communication systems• e-commerce• health databases• energy productionTO�

BE��VERIFIED

Is the property verified or not by the software?

Property to be verified

Page 10: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Formal Verification

Critical Software• communication systems• e-commerce• health databases• energy productionTO�

BE��VERIFIED

Formal Model

Property to be verified

ababcaabb

ababcaabb

a

b

c

a

c c

Is the property verified or not by the model?

Page 11: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Formal Verification

Critical Software• communication systems• e-commerce• health databases• energy productionTO�

BE��VERIFIED

Formal Model

Property to be verified

(a+ b)?c(ac)+

FG (pU q)

ababcaabb

ababcaabb

a

b

c

a

c c

Formal Specification

Is the property verified or not by the model?

Page 12: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Qualitative/QuantitativeQualitative, Boolean: [Büchi’60], [Elgot’61], [Trakhtenbrot’61]

Automata MSO logic

Page 13: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Qualitative/QuantitativeQualitative, Boolean: [Büchi’60], [Elgot’61], [Trakhtenbrot’61]

Quantitative, weights

Automata MSO logic

Weighted Automata

Page 14: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Qualitative/QuantitativeQualitative, Boolean: [Büchi’60], [Elgot’61], [Trakhtenbrot’61]

Quantitative, weights

Automata MSO logic

Weighted Automata

???

Page 15: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Qualitative/QuantitativeQualitative, Boolean: [Büchi’60], [Elgot’61], [Trakhtenbrot’61]

Quantitative, weights

Automata MSO logic

Weighted Automata

???

Find suitable weighted MSO logic

Page 16: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Qualitative/QuantitativeQualitative, Boolean: [Büchi’60], [Elgot’61], [Trakhtenbrot’61]

Quantitative, weights

Automata MSO logic

Weighted Automata

???

Find suitable weighted MSO logic

Focus on definability / qualitative

Page 17: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Qualitative/QuantitativeQualitative, Boolean: [Büchi’60], [Elgot’61], [Trakhtenbrot’61]

Quantitative, weights

Automata MSO logic

Weighted Automata

???

Find suitable weighted MSO logic

Focus on definability / qualitative

Focus on computation / quantitative

Page 18: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

Page 19: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

(Z,+,×,0,1)

Page 20: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

(Z,+,×,0,1)

0 a,1⎯ →⎯⎯ 1 b,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1 1

Page 21: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

(Z,+,×,0,1)

0 a,1⎯ →⎯⎯ 1 b,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,−1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

1

-1

Page 22: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

(Z,+,×,0,1)

0 a,1⎯ →⎯⎯ 1 b,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,−1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,1⎯ →⎯⎯ 0 a,1⎯ →⎯⎯ 1

1

-1

1

Page 23: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

(Z,+,×,0,1)

0 a,1⎯ →⎯⎯ 1 b,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,−1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,1⎯ →⎯⎯ 0 a,1⎯ →⎯⎯ 1

1

-1

1

Semantics of aba: 1+(-1)+1 = 1

Page 24: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

(Z,+,×,0,1)

0 a,1⎯ →⎯⎯ 1 b,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,−1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,1⎯ →⎯⎯ 0 a,1⎯ →⎯⎯ 1

1

-1

1

Semantics of aba: 1+(-1)+1 = 1

#a(w) - #b(w)

Page 25: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

(Z,+,×,0,1) (Z∪{−∞},max,+,−∞,0)

0 a,1⎯ →⎯⎯ 1 b,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,−1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,1⎯ →⎯⎯ 0 a,1⎯ →⎯⎯ 1

1

-1

1

Semantics of aba: 1+(-1)+1 = 1

#a(w) - #b(w)

Page 26: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

(Z,+,×,0,1) (Z∪{−∞},max,+,−∞,0)

0 a,1⎯ →⎯⎯ 1 b,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,−1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,1⎯ →⎯⎯ 0 a,1⎯ →⎯⎯ 1

1

-1

1

Semantics of aba: 1+(-1)+1 = 1

#a(w) - #b(w)

1 a,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1 b,0⎯ →⎯⎯ 2 a,0⎯ →⎯⎯ 2 2

Page 27: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

(Z,+,×,0,1) (Z∪{−∞},max,+,−∞,0)

0 a,1⎯ →⎯⎯ 1 b,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,−1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,1⎯ →⎯⎯ 0 a,1⎯ →⎯⎯ 1

1

-1

1

Semantics of aba: 1+(-1)+1 = 1

#a(w) - #b(w)

1 a,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1 b,0⎯ →⎯⎯ 2 a,0⎯ →⎯⎯ 2

0 a,0⎯ →⎯⎯ 0 a,0⎯ →⎯⎯ 0 b,0⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

2

1

Page 28: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

(Z,+,×,0,1) (Z∪{−∞},max,+,−∞,0)

0 a,1⎯ →⎯⎯ 1 b,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,−1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,1⎯ →⎯⎯ 0 a,1⎯ →⎯⎯ 1

1

-1

1

Semantics of aba: 1+(-1)+1 = 1

#a(w) - #b(w)

1 a,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1 b,0⎯ →⎯⎯ 2 a,0⎯ →⎯⎯ 2

0 a,0⎯ →⎯⎯ 0 a,0⎯ →⎯⎯ 0 b,0⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

2

1

Semantics of aaba: max(2,1) = 2

Page 29: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted Automata

0 1 2

a, 0

b, 0

a, 1

b, 0 b, 0

a, 0

b, 0

0 1

Σ, 1

a, 1

b,−1

Σ, 1

(Z,+,×,0,1) (Z∪{−∞},max,+,−∞,0)

0 a,1⎯ →⎯⎯ 1 b,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,−1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

0 a,1⎯ →⎯⎯ 0 b,1⎯ →⎯⎯ 0 a,1⎯ →⎯⎯ 1

1

-1

1

Semantics of aba: 1+(-1)+1 = 1

#a(w) - #b(w) max size of a’s blocks

1 a,1⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1 b,0⎯ →⎯⎯ 2 a,0⎯ →⎯⎯ 2

0 a,0⎯ →⎯⎯ 0 a,0⎯ →⎯⎯ 0 b,0⎯ →⎯⎯ 1 a,1⎯ →⎯⎯ 1

2

1

Semantics of aaba: max(2,1) = 2

Page 30: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

How to Specify Quantitative Properties?

Page 31: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

How to Specify Quantitative Properties?Weighted Monadic Second Order Logic [Droste&Gastin 05]generalized to trees [Droste&Vogler 06], infinite words [Droste&Rahonis 07], nested words [Mathissen 10] or pictures [Fichtner 11]

Page 32: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

How to Specify Quantitative Properties?Weighted Monadic Second Order Logic [Droste&Gastin 05]generalized to trees [Droste&Vogler 06], infinite words [Droste&Rahonis 07], nested words [Mathissen 10] or pictures [Fichtner 11]

Weighted Regular Expressions over finite words [Kleene 56, Schützenberger 61]

Page 33: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

How to Specify Quantitative Properties?Weighted Monadic Second Order Logic [Droste&Gastin 05]generalized to trees [Droste&Vogler 06], infinite words [Droste&Rahonis 07], nested words [Mathissen 10] or pictures [Fichtner 11]

Weighted Regular Expressions over finite words [Kleene 56, Schützenberger 61]

Weighted Temporal Logics: PCTL [Hansson&Jonsson 94], WLTL [Mandrali 12]

Page 34: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

How to Specify Quantitative Properties?Weighted Monadic Second Order Logic [Droste&Gastin 05]generalized to trees [Droste&Vogler 06], infinite words [Droste&Rahonis 07], nested words [Mathissen 10] or pictures [Fichtner 11]

Weighted Regular Expressions over finite words [Kleene 56, Schützenberger 61]

Weighted Temporal Logics: PCTL [Hansson&Jonsson 94], WLTL [Mandrali 12]

• Core weighted logic for weighted automata

• Enhancing the logic to handle more properties: FO vs pebbles

• A special case: the transducers

Page 35: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted MSOϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

[Droste-Gastin, 05]

Page 36: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted MSOϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

[Droste-Gastin, 05]

Negation restricted to atomic formulae

Page 37: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted MSOϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

[Droste-Gastin, 05]

Negation restricted to atomic formulae

Arbitrary constants from a semiring

Page 38: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Inspired from the boolean semiring

ϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

Semantics in a semiring S = (S,+,×, 0, 1)

Atomic formulae: 0,1

disjunction, existential quantifications: sum

conjunction, universal quantifications: product

B = ({0, 1},∨,∧, 0, 1)

[Droste-Gastin, 05]

Weighted MSO

Page 39: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

Examples

ϕ1 = ∃xPa(x)

[[ϕ1]](w) = |w|a

[Droste-Gastin, 05]

Weighted MSO

Page 40: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

Examples

ϕ1 = ∃xPa(x)

[[ϕ1]](w) = |w|a

ϕ2 = ∀x ∃y (y ! x ∧ Pa(y))

[[ϕ2]](abaab) = 1× 1× 2× 3× 3

[[ϕ2]](an) = n!

[Droste-Gastin, 05]

Weighted MSO

Page 41: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

Examples

ϕ1 = ∃xPa(x)

[[ϕ1]](w) = |w|a

ϕ2 = ∀x ∃y (y ! x ∧ Pa(y))

[[ϕ2]](abaab) = 1× 1× 2× 3× 3

[[ϕ2]](an) = n!

Too big to be computed by a

weighted automaton[Droste-Gastin, 05]

Weighted MSO

Page 42: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

Examples

ϕ1 = ∃xPa(x)

[[ϕ1]](w) = |w|a

ϕ2 = ∀x ∃y (y ! x ∧ Pa(y))

[[ϕ2]](abaab) = 1× 1× 2× 3× 3

[[ϕ2]](an) = n!

Too big to be computed by a

weighted automaton

We need to restrict weighted MSO

[Droste-Gastin, 05]

Weighted MSO

Page 43: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

Theorem: weighted automata = restricted wMSO

[Droste-Gastin, 05]

Weighted MSO

Page 44: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

Theorem: weighted automata = restricted wMSO

[Droste-Gastin, 05]

Weighted MSO

Page 45: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

Theorem: weighted automata = restricted wMSO

φ almost boolean

[Droste-Gastin, 05]

Weighted MSO

Page 46: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= s | Pa(x) | x ! y | x ∈ X | ¬Pa(x) | ¬(x ! y) | ¬(x ∈ X)

| ϕ ∨ ϕ | ϕ ∧ ϕ | ∃xϕ | ∀xϕ | ∃X ϕ | ∀X ϕ

Theorem: weighted automata = restricted wMSO

φ almost booleancommutativity

[Droste-Gastin, 05]

Weighted MSO

Page 47: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Core weighted MSO logic

[Gastin-Monmege, 15]

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Page 48: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Core weighted MSO logic

[Gastin-Monmege, 15]

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

Page 49: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Core weighted MSO logic

[Gastin-Monmege, 15]

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

if … then … else …

Page 50: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Core weighted MSO logic

[Gastin-Monmege, 15]

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

if … then … else …Pa(x) ? 1 : 0

Page 51: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Core weighted MSO logic

[Gastin-Monmege, 15]

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

if … then … else …Pa(x) ? 1 : 0

Pa(x) ? 1 : (Pb(x) ?−1 : 0)

Page 52: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Core weighted MSO logic

[Gastin-Monmege, 15]

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

if … then … else …Pa(x) ? 1 : 0

x ∈ X1 ? s1 : (x ∈ X2 ? s2 : · · ·(x ∈ Xn−1 ? sn−1 : sn) · · · )

Pa(x) ? 1 : (Pb(x) ?−1 : 0)

Page 53: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Core weighted MSO logic

[Gastin-Monmege, 15]

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

if … then … else …Pa(x) ? 1 : 0

x ∈ X1 ? s1 : (x ∈ X2 ? s2 : · · ·(x ∈ Xn−1 ? sn−1 : sn) · · · )

[[Ψ ]](w,σ) = s some value occurring in Ψ

Pa(x) ? 1 : (Pb(x) ?−1 : 0)

Page 54: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Pa(x) ? 1 : (Pb(x) ?−1 : 0)

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

if … then … else …Pa(x) ? 1 : 0

x ∈ X1 ? s1 : (x ∈ X2 ? s2 : · · ·(x ∈ Xn−1 ? sn−1 : sn) · · · )

[[Ψ ]](w,σ) = s some value occurring in Ψ

A step formula takes finitely many values

For each value, the pre-image is MSO-definable

[Gastin-Monmege, 15]

Core weighted MSO logic

Page 55: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

core wMSO Φ ::= 0 | ϕ ?Φ : Φ | Φ+ Φ |!

x Φ |!

X Φ |"

x Ψ

[Gastin-Monmege, 15]

Core weighted MSO logic

Page 56: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

core wMSO Φ ::= 0 | ϕ ?Φ : Φ | Φ+ Φ |!

x Φ |!

X Φ |"

x Ψ

no constants

[Gastin-Monmege, 15]

Core weighted MSO logic

Page 57: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

core wMSO Φ ::= 0 | ϕ ?Φ : Φ | Φ+ Φ |!

x Φ |!

X Φ |"

x Ψ

if … then … else …

no constants

[Gastin-Monmege, 15]

Core weighted MSO logic

Page 58: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

core wMSO Φ ::= 0 | ϕ ?Φ : Φ | Φ+ Φ |!

x Φ |!

X Φ |"

x Ψ

if … then … else …Assigns a value from Ψ

to each position

no constants

[Gastin-Monmege, 15]

Core weighted MSO logic

Page 59: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

core wMSO Φ ::= 0 | ϕ ?Φ : Φ | Φ+ Φ |!

x Φ |!

X Φ |"

x Ψ

if … then … else …Assigns a value from Ψ

to each position

{|!

x Ψ |}(w,σ) = {{([[Ψ ]](w,σ[x !→ i]))i}} ∈ N⟨R⋆⟩

no constants

[Gastin-Monmege, 15] singleton multiset

Core weighted MSO logic

Page 60: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Boolean fragment

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Step formulae Ψ ::= s | ϕ ?Ψ : Ψ

core wMSO Φ ::= 0 | ϕ ?Φ : Φ | Φ+ Φ |!

x Φ |!

X Φ |"

x Ψ

{|!

x Ψ |}(w,σ) = {{([[Ψ ]](w,σ[x !→ i]))i}} ∈ N⟨R⋆⟩

Semantics

sums over multisets

[Gastin-Monmege, 15]

Core weighted MSO logic

{| 0 |}(w,σ)=∅

Page 61: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Multisets of weight structures

[Gastin-Monmege, 15][Droste-Perevoshchikov, 14]

Abstract semantics

wgt(ρ) = s1s2 · · · sn

{|A|}(w) = {{wgt(ρ) | ρ run on w}}

multiset

A run generates a sequence of weights

Page 62: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Multisets of weight structures

[Gastin-Monmege, 15][Droste-Perevoshchikov, 14]

Abstract semantics

wgt(ρ) = s1s2 · · · sn

{|A|}(w) = {{wgt(ρ) | ρ run on w}}

{|A|} : Σ⋆ → N⟨R⋆⟩

weights of A

multiset

A run generates a sequence of weights

Page 63: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Multisets of weight structures

[Gastin-Monmege, 15][Droste-Perevoshchikov, 14]

Abstract semantics

wgt(ρ) = s1s2 · · · sn

{|A|}(w) = {{wgt(ρ) | ρ run on w}}

{|A|} : Σ⋆ → N⟨R⋆⟩

weights of A

Aggregation aggr : N⟨R⋆⟩ → S

multiset

A run generates a sequence of weights

Page 64: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

A run generates a sequence of weights

multiset

Abstract semantics

wgt(ρ) = s1s2 · · · sn

{|A|}(w) = {{wgt(ρ) | ρ run on w}}

{|A|} : Σ⋆ → N⟨R⋆⟩

weights of A

Aggregation aggr : N⟨R⋆⟩ → S

Semiring: sum-product aggrsp(A) =

!"

A =!

r1···rn∈A r1 × · · ·× rn

Multisets of weight structures

[Gastin-Monmege, 15][Droste-Perevoshchikov, 14]

Page 65: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

A run generates a sequence of weights

multiset

Abstract semantics

wgt(ρ) = s1s2 · · · sn

{|A|}(w) = {{wgt(ρ) | ρ run on w}}

{|A|} : Σ⋆ → N⟨R⋆⟩

weights of A

Aggregation aggr : N⟨R⋆⟩ → S

Semiring: sum-product aggrsp(A) =

!"

A =!

r1···rn∈A r1 × · · ·× rn

Valuation monoid: sum-valuation aggrsv(A) =

!

Val(A) =!

r1···rn∈A Val(r1 · · · rn)

Multisets of weight structures

[Gastin-Monmege, 15][Droste-Perevoshchikov, 14]

Page 66: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

A run generates a sequence of weights

multiset

Abstract semantics

wgt(ρ) = s1s2 · · · sn

{|A|}(w) = {{wgt(ρ) | ρ run on w}}

{|A|} : Σ⋆ → N⟨R⋆⟩

weights of A

Aggregation aggr : N⟨R⋆⟩ → S

Semiring: sum-product aggrsp(A) =

!"

A =!

r1···rn∈A r1 × · · ·× rn

Valuation monoid: sum-valuation aggrsv(A) =

!

Val(A) =!

r1···rn∈A Val(r1 · · · rn)

Multisets of weight structures

[Gastin-Monmege, 15][Droste-Perevoshchikov, 14]

Average value Discounted value…

Page 67: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Abstract semantics

wgt(ρ) = s1s2 · · · sn

{|A|}(w) = {{wgt(ρ) | ρ run on w}}

{|A|} : Σ⋆ → N⟨R⋆⟩

weights of A

Aggregation aggr : N⟨R⋆⟩ → S

Concrete semantics [[A]] = aggr ◦ {|A|} : Σ⋆ → S

multiset

Multisets of weight structures

[Gastin-Monmege, 15][Droste-Perevoshchikov, 14]

A run generates a sequence of weights

Page 68: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Ψ ::= s | ϕ ?Ψ : Ψ

Φ ::= 0 | ϕ ?Φ : Φ | Φ+ Φ |!

x Φ |!

X Φ |"

x Ψ

Theorem: weighted automata = core wMSO

[Gastin-Monmege, 15]

Core weighted MSO logic

Page 69: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Ψ ::= s | ϕ ?Ψ : Ψ

Φ ::= 0 | ϕ ?Φ : Φ | Φ+ Φ |!

x Φ |!

X Φ |"

x Ψ

Theorem: weighted automata = core wMSO

{|− |} : Σ⋆ → N⟨R⋆⟩Abstract semantics

[Gastin-Monmege, 15]

Core weighted MSO logic

Page 70: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Ψ ::= s | ϕ ?Ψ : Ψ

Φ ::= 0 | ϕ ?Φ : Φ | Φ+ Φ |!

x Φ |!

X Φ |"

x Ψ

Theorem: weighted automata = core wMSO

{|− |} : Σ⋆ → N⟨R⋆⟩Abstract semantics

Concrete semantics [[−]] = aggr ◦ {|− |} : Σ⋆ → S

[Gastin-Monmege, 15]

Core weighted MSO logic

Page 71: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Ψ ::= s | ϕ ?Ψ : Ψ

Φ ::= 0 | ϕ ?Φ : Φ | Φ+ Φ |!

x Φ |!

X Φ |"

x Ψ

Theorem: weighted automata = core wMSO

{|− |} : Σ⋆ → N⟨R⋆⟩Abstract semantics

Concrete semantics [[−]] = aggr ◦ {|− |} : Σ⋆ → SEasy constructive proofs

preservation of the constants

no restriction on core wMSO

no hypotheses on weights

[Gastin-Monmege, 15]

Core weighted MSO logic

Page 72: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Extensions

More general models than words:

trees, nested words…

More powerful logics: deciding if a wMSO formula

is expressible in core wMSO?

More powerful automata: finding equivalent fragments of wMSO

Page 73: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted FO logic

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕΨ ::= s | ϕ ?Ψ : ΨΦ ::= 0 | ϕ ?Φ : Φ | Φ+ Φ |

!

x Φ |!

X Φ |"

x Ψ

Page 74: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted FO logic

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Φ ::= s ϕ?Φ :Φ Φ+Φ Φ×Φ Φx∑ Φ

x∏

Reintroduction of the product Unconditional product

quantification

We can keep Boolean MSO or restrict to FO…

Page 75: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted FO logic

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Φ ::= s ϕ?Φ :Φ Φ+Φ Φ×Φ Φx∑ Φ

x∏

Reintroduction of the product Unconditional product

quantification

We can keep Boolean MSO or restrict to FO…

ϕ2 = ∀x ∃y (y ! x ∧ Pa(y)) [[ϕ2]](an) = n!

Page 76: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted FO logic

ϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Φ ::= s ϕ?Φ :Φ Φ+Φ Φ×Φ Φx∑ Φ

x∏

Reintroduction of the product Unconditional product

quantification

We can keep Boolean MSO or restrict to FO…

2y∏x∏!"# $%&(w)= 2

|w|2

Page 77: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

A = (Q,A, I, δ, T )

I ∈ SQ T ∈ SQ

δ : Q× Test×Move×Q→ S

Run as a finite sequence of configurations (W,σ, q, i,π)

σ : Peb→ pos(W )

π ∈ (Peb× pos(W ))∗with free pebbles

and a stack of currently dropped pebbles

Move = {→,←,↑}∪{↓xx ∈ Peb}

Pebble weighted automata

Page 78: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀x

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 79: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7

x

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 80: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 81: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 82: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 83: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1x3

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 84: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1x3x1

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 85: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1x3x1x1

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 86: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1x3x1x1x1

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 87: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1x3x1x1x1x1

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 88: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1x3x1x1

x2x2x2x2x2x1x1

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 89: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1x3x1x1

x2x2x2x2x2x1x3x3x3x1x1

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 90: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1x3x1x1

x2x2x2x2x2x1x3x3x3x1

x1x7

x1

x1 x1

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 91: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1x3x1x1

x2x2x2x2x2x1x3x3x3x1

x1x7

x1

x1 x1

Weight of

the run:

35 562 240

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 92: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1x3x1x1

x2x2x2x2x2x1x3x3x3x1

x1x7

x1

x1 x1

Weight of

the run:

35 562 240Non

determinism

Non determinism resolved by sum

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 93: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Weighted automata with pebbles

I Move = { ,!, "} [ {#x

| x 2 Peb}I Transition: q

weight test move������������! q0

I Run ⇢ over word u 2 A+: sequence of transitions.

I weight(⇢): product of weights of transitions

I Non determinism: [[Ap,q

]](u) =X

⇢ run over u

weight(⇢)

1▹?5

3 4

2

a?→ 7b?→

c? ↓x

2¬x?→

x?←

3¬◃?←

I =�5 0 0 0

M =

0

BB@

(a? + 7b?)! 0 c? #x

0! 0 0 00 0 2¬x?! x? 0 " 0 3¬.?

1

CCA

T =

0

BB@

/?000

1

CCA

▶ a b b c a c b a ◀

5 x1x7x7x1

x

x2x2x2x1x3x1x1

x2x2x2x2x2x1x3x3x3x1

x1x7

x1

x1 x1

Weight of

the run:

35 562 240Non

determinism

Non determinism resolved by sum

Sum of the weights

of the runs:

5.7|w|b.∏wi=c2i-2(3i-1)

[Globerman and Harel, 96][Engelfriet and Hoogeboom,99]

Pebble weighted automata

Page 94: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Translating a formula into an automaton

AΦ AΨlast?

first?

Sum by disjoint union of automata

Product:

Sum quantification:

Product quantification:

→ →

↓x last?, ↑

↓x last?, ↑

Page 95: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Challenging for the Boolean part: need unambiguous automata

Translating a formula into an automaton

Page 96: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Challenging for the Boolean part: need unambiguous automata

Use deterministic automataof size non-elementary...

Translating a formula into an automaton

Page 97: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Challenging for the Boolean part: need unambiguous automata

Take advantage of the pebblesto build a linear size automaton

Use deterministic automataof size non-elementary...

Translating a formula into an automaton

Page 98: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Challenging for the Boolean part: need unambiguous automata

Take advantage of the pebblesto build a linear size automaton

Use deterministic automataof size non-elementary...

Bϕokϕ

koϕBψ

okψ

koψlast?

←first?

okξ

koξ

last?

last?

last?

Disjunction/conjunctionξ = φ∨ψ

Translating a formula into an automaton

Page 99: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Challenging for the Boolean part: need unambiguous automata

Take advantage of the pebblesto build a linear size automaton

Use deterministic automataof size non-elementary...

Bϕokϕ

koϕBψ

okψ

koψlast?

←first?

okξ

koξ

last?

last?

last?

Disjunction/conjunctionξ = φ∨ψ

Bϕokϕ

koϕ↓xlast?↑

okξ

koξ

last?↑

last?

Existential/Universal quantificationsξ = ∃x φ

Translating a formula into an automaton

Page 100: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Logic equivalent to PWA?• Weighted FO misses a counting capability…

• Solution: weighted transitive closure operation

Page 101: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Logic equivalent to PWA?• Weighted FO misses a counting capability…

• Solution: weighted transitive closure operation

PebbleWA-ICALP.tex 1230 2010-07-07 13:59:03Z bm

Transitive closure logics! For ϕ with at least two first order free variables, define

ϕ1(x , y) = ϕ(x , y)

ϕn(x , y) = ∃z0 · · · ∃zn

!x = z0 ∧ zn = y ∧ diff(z0, . . . , zn) ∧

"#1≤ℓ≤n ϕ(zℓ−1, zℓ)

$%.

x yz2 z3 z1

ϕ

ϕ

ϕ ϕ

! The transitive closure operator is defined by TCxyϕ =&

n≥1ϕ

n.

! Bounded transitive closure : N-TCxyϕ = TCxy (x − N ≤ y ≤ x + N ∧ ϕ)

x yz1 z3 z2

≤ N

≤ N

≤ N

13/17

Page 102: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Logic equivalent to PWA?• Weighted FO misses a counting capability…

• Solution: weighted transitive closure operation

PebbleWA-ICALP.tex 1230 2010-07-07 13:59:03Z bm

Transitive closure logics! For ϕ with at least two first order free variables, define

ϕ1(x , y) = ϕ(x , y)

ϕn(x , y) = ∃z0 · · · ∃zn

!x = z0 ∧ zn = y ∧ diff(z0, . . . , zn) ∧

"#1≤ℓ≤n ϕ(zℓ−1, zℓ)

$%.

x yz2 z3 z1

ϕ

ϕ

ϕ ϕ

! The transitive closure operator is defined by TCxyϕ =&

n≥1ϕ

n.

! Bounded transitive closure : N-TCxyϕ = TCxy (x − N ≤ y ≤ x + N ∧ ϕ)

x yz1 z3 z2

≤ N

≤ N

≤ N

13/17

PebbleWA-ICALP.tex 1230 2010-07-07 13:59:03Z bm

Transitive closure logics! For ϕ with at least two first order free variables, define

ϕ1(x , y) = ϕ(x , y)

ϕn(x , y) = ∃z0 · · · ∃zn

!x = z0 ∧ zn = y ∧ diff(z0, . . . , zn) ∧

"#1≤ℓ≤n ϕ(zℓ−1, zℓ)

$%.

x yz2 z3 z1

ϕ

ϕ

ϕ ϕ

! The transitive closure operator is defined by TCxyϕ =&

n≥1ϕ

n.

! Bounded transitive closure : N-TCxyϕ = TCxy (x − N ≤ y ≤ x + N ∧ ϕ)

x yz1 z3 z2

≤ N

≤ N

≤ N

13/17

Page 103: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Logic equivalent to PWA?• Weighted FO misses a counting capability…

• Solution: weighted transitive closure operation

PebbleWA-ICALP.tex 1230 2010-07-07 13:59:03Z bm

Transitive closure logics! For ϕ with at least two first order free variables, define

ϕ1(x , y) = ϕ(x , y)

ϕn(x , y) = ∃z0 · · · ∃zn

!x = z0 ∧ zn = y ∧ diff(z0, . . . , zn) ∧

"#1≤ℓ≤n ϕ(zℓ−1, zℓ)

$%.

x yz2 z3 z1

ϕ

ϕ

ϕ ϕ

! The transitive closure operator is defined by TCxyϕ =&

n≥1ϕ

n.

! Bounded transitive closure : N-TCxyϕ = TCxy (x − N ≤ y ≤ x + N ∧ ϕ)

x yz1 z3 z2

≤ N

≤ N

≤ N

13/17 PebbleWA-ICALP.tex 1230 2010-07-07 13:59:03Z bm

Transitive closure logics! For ϕ with at least two first order free variables, define

ϕ1(x , y) = ϕ(x , y)

ϕn(x , y) = ∃z0 · · · ∃zn

!x = z0 ∧ zn = y ∧ diff(z0, . . . , zn) ∧

"#1≤ℓ≤n ϕ(zℓ−1, zℓ)

$%.

x yz2 z3 z1

ϕ

ϕ

ϕ ϕ

! The transitive closure operator is defined by TCxyϕ =&

n≥1ϕ

n.

! Bounded transitive closure : N-TCxyϕ = TCxy (x − N ≤ y ≤ x + N ∧ ϕ)

x yz1 z3 z2

≤ N

≤ N

≤ N

13/17

PebbleWA-ICALP.tex 1230 2010-07-07 13:59:03Z bm

Transitive closure logics! For ϕ with at least two first order free variables, define

ϕ1(x , y) = ϕ(x , y)

ϕn(x , y) = ∃z0 · · · ∃zn

!x = z0 ∧ zn = y ∧ diff(z0, . . . , zn) ∧

"#1≤ℓ≤n ϕ(zℓ−1, zℓ)

$%.

x yz2 z3 z1

ϕ

ϕ

ϕ ϕ

! The transitive closure operator is defined by TCxyϕ =&

n≥1ϕ

n.

! Bounded transitive closure : N-TCxyϕ = TCxy (x − N ≤ y ≤ x + N ∧ ϕ)

x yz1 z3 z2

≤ N

≤ N

≤ N

13/17

Page 104: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Logic equivalent to PWA?• Weighted FO misses a counting capability…

• Solution: weighted transitive closure operation

PebbleWA-ICALP.tex 1230 2010-07-07 13:59:03Z bm

Transitive closure logics! For ϕ with at least two first order free variables, define

ϕ1(x , y) = ϕ(x , y)

ϕn(x , y) = ∃z0 · · · ∃zn

!x = z0 ∧ zn = y ∧ diff(z0, . . . , zn) ∧

"#1≤ℓ≤n ϕ(zℓ−1, zℓ)

$%.

x yz2 z3 z1

ϕ

ϕ

ϕ ϕ

! The transitive closure operator is defined by TCxyϕ =&

n≥1ϕ

n.

! Bounded transitive closure : N-TCxyϕ = TCxy (x − N ≤ y ≤ x + N ∧ ϕ)

x yz1 z3 z2

≤ N

≤ N

≤ N

13/17 PebbleWA-ICALP.tex 1230 2010-07-07 13:59:03Z bm

Transitive closure logics! For ϕ with at least two first order free variables, define

ϕ1(x , y) = ϕ(x , y)

ϕn(x , y) = ∃z0 · · · ∃zn

!x = z0 ∧ zn = y ∧ diff(z0, . . . , zn) ∧

"#1≤ℓ≤n ϕ(zℓ−1, zℓ)

$%.

x yz2 z3 z1

ϕ

ϕ

ϕ ϕ

! The transitive closure operator is defined by TCxyϕ =&

n≥1ϕ

n.

! Bounded transitive closure : N-TCxyϕ = TCxy (x − N ≤ y ≤ x + N ∧ ϕ)

x yz1 z3 z2

≤ N

≤ N

≤ N

13/17

PebbleWA-ICALP.tex 1230 2010-07-07 13:59:03Z bm

Transitive closure logics! For ϕ with at least two first order free variables, define

ϕ1(x , y) = ϕ(x , y)

ϕn(x , y) = ∃z0 · · · ∃zn

!x = z0 ∧ zn = y ∧ diff(z0, . . . , zn) ∧

"#1≤ℓ≤n ϕ(zℓ−1, zℓ)

$%.

x yz2 z3 z1

ϕ

ϕ

ϕ ϕ

! The transitive closure operator is defined by TCxyϕ =&

n≥1ϕ

n.

! Bounded transitive closure : N-TCxyϕ = TCxy (x − N ≤ y ≤ x + N ∧ ϕ)

x yz1 z3 z2

≤ N

≤ N

≤ N

13/17

Theorem: PWA = wFO + bounded-TC

Page 105: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Application to transductions

Tinput word output word

Page 106: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Application to transductions

Tinput word output word

Pattern matching/replacement

Page 107: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Application to transductions

Tinput word output word

Pattern matching/replacement Tree/Graph rewriting

Page 108: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Application to transductions

Tinput word output word

Pattern matching/replacement

Update of XML databases

Tree/Graph rewriting

Page 109: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Existing models over words• Two-way Deterministic Finite-State Transducers • Functional One-way Finite-State Transducers • MSOT (à la Courcelle)

• Copyless Streaming String Transducers (Alur et al)

{Functions

Page 110: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Existing models over words• Two-way Deterministic Finite-State Transducers • Functional One-way Finite-State Transducers • MSOT (à la Courcelle)

• Copyless Streaming String Transducers (Alur et al)

{Functions

{Relations

• Two-way Non-Deterministic Finite-State Transducers • Non-Deterministic Finite-State Transducers • Non-deterministic Copyless Streaming String Transducers

(Alur et Deshmukh) • NMSOT (with free second-order variables)

Page 111: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Existing models over words• Two-way Deterministic Finite-State Transducers • Functional One-way Finite-State Transducers • MSOT (à la Courcelle)

• Copyless Streaming String Transducers (Alur et al)

{Functions

{Relations

• Two-way Non-Deterministic Finite-State Transducers • Non-Deterministic Finite-State Transducers • Non-deterministic Copyless Streaming String Transducers

(Alur et Deshmukh) • NMSOT (with free second-order variables)

only finite valued relations…

Page 112: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Transduction as weights• Desire: weight transitions with words… Difficult to

equip A* with a semiring structure: how to combine several accepting runs?

• Works for deterministic or unambiguous automata: functional transducers

• For relations: semiring of languages

(2A*,∪,⋅,∅,{ε})

Page 113: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Examples(Px(a)?{aa} : (P

x(b)?{bb} :∅))

x∏

Page 114: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Examples(Px(a)?{aa} : (P

x(b)?{bb} :∅))

x∏ aba -> aabbaa

Page 115: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Examples(Px(a)?{aa} : (P

x(b)?{bb} :∅))

x∏ aba -> aabbaa

(Px(!)?{insert} :(P

x(a)?{a} :(P

x(b) : {b})))

x∏

Page 116: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Examples(Px(a)?{aa} : (P

x(b)?{bb} :∅))

x∏ aba -> aabbaa

(Px(!)?{insert} :(P

x(a)?{a} :(P

x(b) : {b})))

x∏ a*b -> ainsertb

Page 117: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Examples(Px(a)?{aa} : (P

x(b)?{bb} :∅))

x∏ aba -> aabbaa

(Px(!)?{insert} :(P

x(a)?{a} :(P

x(b) : {b})))

x∏ a*b -> ainsertb

Py(!)?

y∑ (x = y)?{insert} : (Px(!)?{ε} : (P

x(a)?{a} : (P

x(b)?{b})))

x∏⎡⎣⎢ ⎤⎦⎥

Page 118: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Examples(Px(a)?{aa} : (P

x(b)?{bb} :∅))

x∏ aba -> aabbaa

(Px(!)?{insert} :(P

x(a)?{a} :(P

x(b) : {b})))

x∏ a*b -> ainsertb

Py(!)?

y∑ (x = y)?{insert} : (Px(!)?{ε} : (P

x(a)?{a} : (P

x(b)?{b})))

x∏⎡⎣⎢ ⎤⎦⎥

a*b*a -> {ainsertba,abinserta}

Relation

Page 119: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ExamplesPx(a)?{a} : (P

x(b)?{ε})

x∏ × Px(a)?{ε} : (P

x(b) : {c})

x∏

Page 120: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ExamplesPx(a)?{a} : (P

x(b)?{ε})

x∏ × Px(a)?{ε} : (P

x(b) : {c})

x∏ababbaabb -> aaaaccccc

Page 121: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ExamplesPx(a)?{a} : (P

x(b)?{ε})

x∏ × Px(a)?{ε} : (P

x(b) : {c})

x∏ababbaabb -> aaaaccccc

Not comp. by 1-way Func Transducer

Page 122: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ExamplesPx(a)?{a} : (P

x(b)?{ε})

x∏ × Px(a)?{ε} : (P

x(b) : {c})

x∏ababbaabb -> aaaaccccc

Not comp. by 1-way Func Transducer

Px(a)?{a} : (P

x(b)?{ε})

x∏ + Px(a)?{ε} : (P

x(b)×{c})

x∏

Page 123: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ExamplesPx(a)?{a} : (P

x(b)?{ε})

x∏ × Px(a)?{ε} : (P

x(b) : {c})

x∏ababbaabb -> aaaaccccc

Not comp. by 1-way Func Transducer

Px(a)?{a} : (P

x(b)?{ε})

x∏ + Px(a)?{ε} : (P

x(b)×{c})

x∏ababbaabb -> {aaaa,ccccc}

Page 124: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ExamplesPx(a)?{a} : (P

x(b)?{ε})

x∏ × Px(a)?{ε} : (P

x(b) : {c})

x∏ababbaabb -> aaaaccccc

Not comp. by 1-way Func Transducer

Px(a)?{a} : (P

x(b)?{ε})

x∏ + Px(a)?{ε} : (P

x(b)×{c})

x∏ababbaabb -> {aaaa,ccccc}

Px(a)?{a,ε} : (P

x(b)?{b,ε})

x∏

Page 125: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ExamplesPx(a)?{a} : (P

x(b)?{ε})

x∏ × Px(a)?{ε} : (P

x(b) : {c})

x∏ababbaabb -> aaaaccccc

Not comp. by 1-way Func Transducer

Px(a)?{a} : (P

x(b)?{ε})

x∏ + Px(a)?{ε} : (P

x(b)×{c})

x∏ababbaabb -> {aaaa,ccccc}

Px(a)?{a,ε} : (P

x(b)?{b,ε})

x∏ aba -> {ε,a,b,ab,ba,aa,aba}

Page 126: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ExamplesPx(a)?{a} : (P

x(b)?{ε})

x∏ × Px(a)?{ε} : (P

x(b) : {c})

x∏ababbaabb -> aaaaccccc

Not comp. by 1-way Func Transducer

Px(a)?{a} : (P

x(b)?{ε})

x∏ + Px(a)?{ε} : (P

x(b)×{c})

x∏ababbaabb -> {aaaa,ccccc}

Px(a)?{a,ε} : (P

x(b)?{b,ε})

x∏ aba -> {ε,a,b,ab,ba,aa,aba}

Px(a)?A*aA* : (P

x(b)?A*bA*)

x∏

Page 127: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

ExamplesPx(a)?{a} : (P

x(b)?{ε})

x∏ × Px(a)?{ε} : (P

x(b) : {c})

x∏ababbaabb -> aaaaccccc

Not comp. by 1-way Func Transducer

Px(a)?{a} : (P

x(b)?{ε})

x∏ + Px(a)?{ε} : (P

x(b)×{c})

x∏ababbaabb -> {aaaa,ccccc}

Px(a)?{a,ε} : (P

x(b)?{b,ε})

x∏ aba -> {ε,a,b,ab,ba,aa,aba}

Px(a)?A*aA* : (P

x(b)?A*bA*)

x∏ aba -> A*aA*bA*aA*

Infinitely-valued relation

Page 128: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

TransducersPx(a)?A*aA* : (P

x(b)?A*bA*)

x∏

a|A*aA* b|A*bA*

Infinite-valued, but deterministic

Page 129: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Reverse?

a|a, ←

last?

A|ε, →

b|b, ←

first?

Page 130: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Reverse?

a|a, ←

last?

A|ε, →

b|b, ←

first?

Impossible in FO… … because of order of

interpretation of product

Page 131: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Reverse?

a|a, ←

last?

A|ε, →

b|b, ←

first?

Impossible in FO… … because of order of

interpretation of product

Solution: in this non-commutative setting, add right-to-left products

Page 132: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Reverse?

a|a, ←

last?

A|ε, →

b|b, ←

first?

Impossible in FO… … because of order of

interpretation of product

Solution: in this non-commutative setting, add right-to-left products

Px(a)?{a} : (P

x(b)?{b})

x⨿

Page 133: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Transitive closureϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Φ ::= L ϕ?Φ :Φ Φ+Φ Φ×Φ Φx∑ Φ

x∏ N -TCx ,yΦ

Page 134: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Transitive closureϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Φ ::= L ϕ?Φ :Φ Φ+Φ Φ×Φ Φx∑ Φ

x∏ N -TCx ,yΦ

Regular language

Page 135: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Transitive closureϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Φ ::= L ϕ?Φ :Φ Φ+Φ Φ×Φ Φx∑ Φ

x∏ N -TCx ,yΦ

Regular languageAble to define right-

to-left product

Φ(x) := [1-TCx ,yx⨿ (y = x −1?Φ(x))](last, first)×Φ(first)

Page 136: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Transitive closureϕ ::= ⊤ | Pa(x) | x ! y | x ∈ X | ¬ϕ | ϕ ∧ ϕ | ∀xϕ | ∀X ϕ

Φ ::= L ϕ?Φ :Φ Φ+Φ Φ×Φ Φx∑ Φ

x∏ N -TCx ,yΦ

Regular languageAble to define right-

to-left product

Φ(x) := [1-TCx ,yx⨿ (y = x −1?Φ(x))](last, first)×Φ(first)

Theorem: Pebble Transducers = FO + bounded-TC

with regular language productions linear transformation from logic to transducers

Page 137: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Algorithmic questions

Page 138: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Algorithmic questionsTheorem: Evaluation of FO + bounded-TC with

complexity O(|formula|x|input|#variables)

Page 139: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Algorithmic questionsTheorem: Evaluation of FO + bounded-TC with

complexity O(|formula|x|input|#variables)

• In functional setting: it is decidable if a 2-way transducer is recognisable by a 1-way transducer [Filiot,Gauwin,Reynier, Servais, 13]

Page 140: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Algorithmic questionsTheorem: Evaluation of FO + bounded-TC with

complexity O(|formula|x|input|#variables)

• In functional setting: it is decidable if a 2-way transducer is recognisable by a 1-way transducer [Filiot,Gauwin,Reynier, Servais, 13]

• What about the general setting, with pebbles?

Page 141: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Algorithmic questionsTheorem: Evaluation of FO + bounded-TC with

complexity O(|formula|x|input|#variables)

• In functional setting: it is decidable if a 2-way transducer is recognisable by a 1-way transducer [Filiot,Gauwin,Reynier, Servais, 13]

• What about the general setting, with pebbles?

• Determinisability of functional non-det transducers is decidable in PTIME [Schützenberger, 75]

Page 142: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Algorithmic questionsTheorem: Evaluation of FO + bounded-TC with

complexity O(|formula|x|input|#variables)

• In functional setting: it is decidable if a 2-way transducer is recognisable by a 1-way transducer [Filiot,Gauwin,Reynier, Servais, 13]

• What about the general setting, with pebbles?

• Determinisability of functional non-det transducers is decidable in PTIME [Schützenberger, 75]

• Extension to the general setting?

Page 143: Logics for Weighted Automata and Transducerspageperso.lif.univ-mrs.fr/~benjamin.monmege/talks/Infinity2015.pdfLogics for Weighted Automata and Transducers Benjamin Monmege LIF, Aix-Marseille

Algorithmic questionsTheorem: Evaluation of FO + bounded-TC with

complexity O(|formula|x|input|#variables)

• In functional setting: it is decidable if a 2-way transducer is recognisable by a 1-way transducer [Filiot,Gauwin,Reynier, Servais, 13]

• What about the general setting, with pebbles?

• Determinisability of functional non-det transducers is decidable in PTIME [Schützenberger, 75]

• Extension to the general setting?

Thank you!