A Nivat Theorem for Weighted Timed Automata and Weighted Relative - - PowerPoint PPT Presentation

a nivat theorem for weighted timed automata and weighted
SMART_READER_LITE
LIVE PREVIEW

A Nivat Theorem for Weighted Timed Automata and Weighted Relative - - PowerPoint PPT Presentation

A Nivat Theorem for Weighted Timed Automata and Weighted Relative Distance Logic Manfred Droste and Vitaly Perevoshchikov Leipzig University ICALP, Track B 9 th of July 2014 Timed automata 1 Nondeterministic finite automata A with clocks a ,


slide-1
SLIDE 1

A Nivat Theorem for Weighted Timed Automata and Weighted Relative Distance Logic

Manfred Droste and Vitaly Perevoshchikov

Leipzig University

ICALP, Track B 9th of July 2014

slide-2
SLIDE 2

Timed automata1

1 2

a, x ≥ 2, y ← 0 b, x ≤ 4 y ≥ 1 , x ← 0

A Nondeterministic finite automata with clocks Edges: ❵

a❀ ✣❀ Λ

  • → ❵′ ∶

a ∈ Σ is a letter ✣ is a clock constraint Λ is a set of clocks to be reset.

1Alur, Dill ’92

slide-3
SLIDE 3

Timed automata1

1 2

a, x ≥ 2, y ← 0 b, x ≤ 4 y ≥ 1 , x ← 0

A Nondeterministic finite automata with clocks Edges: ❵

a❀ ✣❀ Λ

  • → ❵′ ∶

a ∈ Σ is a letter ✣ is a clock constraint Λ is a set of clocks to be reset.

Run ✚ ( 1 ❀ x=0

y=0) 2✿1

delay ( 1 ❀ x=2✿1 y=2✿1) a

switch ( 2 ❀ x=2✿1 y=0 ) 1✿1

delay ( 2 ❀ x=3✿2 y=1✿1) b

switch ( 1 ❀ x=0 y=1✿1)

Label(✚) ∶= (a❀2✿1)(b❀1✿1) ∈ (Σ × R≥0)+ =∶ TΣ+ is a timed word

1Alur, Dill ’92

slide-4
SLIDE 4

Timed automata1

1 2

a, x ≥ 2, y ← 0 b, x ≤ 4 y ≥ 1 , x ← 0

A Nondeterministic finite automata with clocks Edges: ❵

a❀ ✣❀ Λ

  • → ❵′ ∶

a ∈ Σ is a letter ✣ is a clock constraint Λ is a set of clocks to be reset.

Run ✚ ( ❵0 ❀✗0)

t1

e1

  • → ( ❵1 ❀✗1)

t2

e2

  • → ✿✿✿

tn

en

  • → ( ❵n ❀✗n)

1Alur, Dill ’92

slide-5
SLIDE 5

Weighted Timed Automata (WTA)12

1 2

a, x ≥ 2, y ← 0 3 b, x ≤ 4 y ≥ 1 , x ← 0 2

A

5 6

Both edges and locations carry weights (costs):

discrete : costs of edges (for switches) continuous : cost rates of locations (for delays)

Run ✚ ( ❵0 ❀✗0)

t1

e1

  • → ( ❵1 ❀✗1)

t2

e2

  • → ✿✿✿

tn

en

  • → ( ❵n ❀✗n)

weight(✚) = ( wt(❵0) ⋅t1 + wt(e1) )+✿✿✿+( wt(❵n−1) ⋅tn + wt(en) ) Behavior: quantitative timed language: ∣∣A∣∣ ∶ TΣ+ → R ∪ {∞}: ∣∣A∣∣(w) = min{weight(✚) ∣ ✚ is a run with label w}

1Alur, La Torre, Pappas ’01 2Larsen, Behrmann, Brinksma, Fehnker, Hune, Pettersson, Romijn ’01

slide-6
SLIDE 6

Average behavior1

1 2

a, x ≥ 2, y ← 0 3 b, x ≤ 4 y ≥ 1 , x ← 0 2

A

5 6

Both edges and locations carry weights (costs):

discrete : costs of edges (for switches) continuous : cost rates of locations (for delays)

Run ✚ ( ❵0 ❀✗0)

t1

e1

  • → ( ❵1 ❀✗1)

t2

e2

  • → ✿✿✿

tn

en

  • → ( ❵n ❀✗n)

weight(✚) = ( wt(❵0) ⋅ t1 + wt(e1) ) + ✿✿✿ + ( wt(❵n−1) ⋅ tn + wt(en) ) t1 + ✿✿✿ + tn

1Bouyer, Brinksma, Larsen ’04

slide-7
SLIDE 7

Discounting1

1 2

a, x ≥ 2, y ← 0 3 b, x ≤ 4 y ≥ 1 , x ← 0 2

A

5 6

Discounting factor 0 < ✕ < 1 Weights (costs) wt:

discrete : costs of edges (in R≥0) continuous : cost rates of locations (in R≥0)

Run ✚ ( ❵0 ❀✗0)

t1

e1

  • → ( ❵1 ❀✗1)

t2

e2

  • → ✿✿✿

tn

en

  • → ( ❵n ❀✗n)

Weight of ✚:

n

i=1

✕t1+✿✿✿+ti−1 (∫

ti

wt(❵i−1) ⋅ ✕✜d✜ + wt(ei) ⋅ ✕ti)

1Fahrenberg, Larsen ’08

slide-8
SLIDE 8

Timed valuation monoids

Definition A timed valuation monoid (M❀⊕❀val❀0): (M❀⊕❀0) is a commutative monoid; val ∶ T(M × M)+ → M is a timed valuation function

slide-9
SLIDE 9

Timed valuation monoids

Definition A timed valuation monoid (M❀⊕❀val❀0): (M❀⊕❀0) is a commutative monoid; val ∶ T(M × M)+ → M is a timed valuation function Runs in WTA: ✚ ∶ (❵0❀✗0)

t1

e1

  • → (❵1❀✗1)

t2

e2

  • → ✿✿✿

tn

en

  • → (❵n❀✗n)

Weight of ✚: val[ ⟨(wt(❵0)❀wt(e1))❀t1⟩ ❀✿✿✿❀ ⟨(wt(❵n−1)❀wt(en))❀tn⟩ ]

slide-10
SLIDE 10

Timed valuation monoids

Definition A timed valuation monoid (M❀⊕❀val❀0): (M❀⊕❀0) is a commutative monoid; val ∶ T(M × M)+ → M is a timed valuation function Runs in WTA: ✚ ∶ (❵0❀✗0)

t1

e1

  • → (❵1❀✗1)

t2

e2

  • → ✿✿✿

tn

en

  • → (❵n❀✗n)

Weight of ✚: val[ ⟨(wt(❵0)❀wt(e1))❀t1⟩ ❀✿✿✿❀ ⟨(wt(❵n−1)❀wt(en))❀tn⟩ ] The behavior of A: ∣∣A∣∣ ∶ TΣ+ → M w ↦ ⊕(weight(✚) ∣ ✚ is a run on w)

slide-11
SLIDE 11

Unambiguous and deterministic TA

A timed automaton A = (L❀C❀I❀E❀F) over an alphabet Σ is: unambiguous if for each w ∈ TΣ+ there exists at most one accepting run. deterministic if for all e1 = ( ❵❀a ❀✣1❀Λ1❀❵1) ∈ E and e2 = ( ❵❀a ❀✣2❀Λ2❀❵2) ∈ E with e1 ≠ e2: ✣1 ∧ ✣2 is unsatisfiable.

slide-12
SLIDE 12

Unambiguous and deterministic TA

A timed automaton A = (L❀C❀I❀E❀F) over an alphabet Σ is: unambiguous if for each w ∈ TΣ+ there exists at most one accepting run. deterministic if for all e1 = ( ❵❀a ❀✣1❀Λ1❀❵1) ∈ E and e2 = ( ❵❀a ❀✣2❀Λ2❀❵2) ∈ E with e1 ≠ e2: ✣1 ∧ ✣2 is unsatisfiable.

slide-13
SLIDE 13

Operations for quantitative timed languages (QTL)

Let M = (M❀⊕❀val❀0) be a timed valuation monoid with val ∶ T(M × M)+ → M and Σ, Γ alphabets. Let h ∶ Γ → Σ be a renaming, v = (✌1❀t1)✿✿✿(✌n❀tn) ∈ TΓ+ and h(v) = (h(✌1)❀t1)✿✿✿(h(✌n)❀tn)

slide-14
SLIDE 14

Operations for quantitative timed languages (QTL)

Let M = (M❀⊕❀val❀0) be a timed valuation monoid with val ∶ T(M × M)+ → M and Σ, Γ alphabets. Let h ∶ Γ → Σ be a renaming and r ∶ TΓ+ → M. Let h(r) ∶ TΣ+ → M w ↦ ⊕(r(v) ∣ v ∈ TΓ+ and h(v) = w)✿

slide-15
SLIDE 15

Operations for quantitative timed languages (QTL)

Let M = (M❀⊕❀val❀0) be a timed valuation monoid with val ∶ T(M × M)+ → M and Σ, Γ alphabets. Let g ∶ Γ → M × M be a renaming and val○g ∶ TΓ+ → M v ↦ val(g(v))

slide-16
SLIDE 16

Operations for quantitative timed languages (QTL)

Let M = (M❀⊕❀val❀0) be a timed valuation monoid with val ∶ T(M × M)+ → M and Σ, Γ alphabets. Let r ∶ TΓ+ → M and L ⊆ TΓ+. Let (r ∩ L) ∶ TΓ+ → M v ↦ ⎧ ⎪ ⎪ ⎨ ⎪ ⎪ ⎩ r(v)❀ if v ∈ L❀ 0❀

  • therwise
slide-17
SLIDE 17

A Nivat Decomposition Theorem for WTA

Let Σ be an alphabet and M = (M❀⊕❀val❀0) a timed valuation monoid. Let N(Σ❀M) be the class of QTL L ∶ TΣ+ → M with L = h((val○g) ∩ L ) where h ∶ Γ → Σ, g ∶ Γ → M × M are renamings, Γ an alphabet and L ⊆ TΓ+ is recognizable. N Det(Σ❀M) ⊆ N Unamb(Σ❀M) ⊆ N(Σ❀M). ❀

slide-18
SLIDE 18

A Nivat Decomposition Theorem for WTA

Let Σ be an alphabet and M = (M❀⊕❀val❀0) a timed valuation monoid. Let N(Σ❀M) be the class of QTL L ∶ TΣ+ → M with L = h((val○g) ∩ L ) where h ∶ Γ → Σ, g ∶ Γ → M × M are renamings, Γ an alphabet and L ⊆ TΓ+ is recognizable. N Det(Σ❀M) ⊆ N Unamb(Σ❀M) ⊆ N(Σ❀M). Let Rec(Σ❀M) be the class of recognizable QTL.

slide-19
SLIDE 19

A Nivat Decomposition Theorem for WTA

Let Σ be an alphabet and M = (M❀⊕❀val❀0) a timed valuation monoid. Let N(Σ❀M) be the class of QTL L ∶ TΣ+ → M with L = h((val○g) ∩ L ) where h ∶ Γ → Σ, g ∶ Γ → M × M are renamings, Γ an alphabet and L ⊆ TΓ+ is recognizable. N Det(Σ❀M) ⊆ N Unamb(Σ❀M) ⊆ N(Σ❀M). Let Rec(Σ❀M) be the class of recognizable QTL.

slide-20
SLIDE 20

A Nivat Decomposition Theorem for WTA

Let Σ be an alphabet and M = (M❀⊕❀val❀0) a timed valuation monoid. Let N(Σ❀M) be the class of QTL L ∶ TΣ+ → M with L = h((val○g) ∩ L ) where h ∶ Γ → Σ, g ∶ Γ → M × M are renamings, Γ an alphabet and L ⊆ TΓ+ is recognizable. N Det(Σ❀M) ⊆ N Unamb(Σ❀M) ⊆ N(Σ❀M). Let Rec(Σ❀M) be the class of recognizable QTL. Theorem

1 Rec(Σ❀M) = N Det(Σ❀M) = N Unamb(Σ❀M). 2 If ⊕ is idempotent, then Rec(Σ❀M) = N(Σ❀M). 3 There exist an alphabet Σ0 and a timed valuation monoid M0

with Rec(Σ0❀M0) ≠ N(Σ0❀M0).

slide-21
SLIDE 21

Relative distance logic (RDL)1

Let Σ be an alphabet. Definition The timed MSO logic tMSO(Σ): ✬ ∶∶= Pa(x) ∣ x ≤ y ∣ X(x) ∣

d(Y ❀x) ∼ c ∣ ¬✬ ∣ ✬ ∨ ✬ ∣ ∃x✿✬ ∣ ∃X✿✬ where a ∈ Σ, ∼ ∈ {<❀≤❀=❀≥❀>}, c ∈ N

1Wilke ’94

slide-22
SLIDE 22

Relative distance logic (RDL)1

Let Σ be an alphabet. Definition The timed MSO logic tMSO(Σ): ✬ ∶∶= Pa(x) ∣ x ≤ y ∣ X(x) ∣

d(Y ❀x) ∼ c ∣ ¬✬ ∣ ✬ ∨ ✬ ∣ ∃x✿✬ ∣ ∃X✿✬ where a ∈ Σ, ∼ ∈ {<❀≤❀=❀≥❀>}, c ∈ N Model: a timed word w = (a1❀t1)✿✿✿(an❀tn) ∈ TΣ+. (w❀✛) ⊧

d(Y ❀x) ∼ c 1 2 3 i ti tj ✛(x) j

position time

t1 t2 t3

∆t ∼ c

✛(Y ) ✛(Y )

1Wilke ’94

slide-23
SLIDE 23

Relative distance logic (RDL)1

Let Σ be an alphabet. Definition The timed MSO logic tMSO(Σ): ✬ ∶∶= Pa(x) ∣ x ≤ y ∣ X(x) ∣

d(Y ❀x) ∼ c ∣ ¬✬ ∣ ✬ ∨ ✬ ∣ ∃x✿✬ ∣ ∃X✿✬ where a ∈ Σ, ∼ ∈ {<❀≤❀=❀≥❀>}, c ∈ N Relative distance logic RDL(Σ) ⊂ tMSO(Σ): consists of all formulas ∃Y1✿ ✿✿✿ ✿∃Yn✿✬ with ✬ ∈ tMSO(Σ) s.t. the SO variables in all relative distance predicates in ✬ are *not* quantified. Theorem (Wilke ’94) Let L ⊆ TΣ+ be a timed language. Then: L is recognizable by a timed automaton over Σ iff L is definable by a RDL(Σ)-sentence.

1Wilke ’94

slide-24
SLIDE 24

Relative distance logic (RDL)1

Let Σ be an alphabet. Definition The timed MSO logic tMSO(Σ): ✬ ∶∶= Pa(x) ∣ x ≤ y ∣ X(x) ∣

d(Y ❀x) ∼ c ∣ ¬✬ ∣ ✬ ∨ ✬ ∣ ∃x✿✬ ∣ ∃X✿✬ where a ∈ Σ, ∼ ∈ {<❀≤❀=❀≥❀>}, c ∈ N Relative distance logic RDL(Σ) ⊂ tMSO(Σ): consists of all formulas ∃Y1✿ ✿✿✿ ✿∃Yn✿✬ with ✬ ∈ tMSO(Σ) s.t. the SO variables in all relative distance predicates in ✬ are *not* quantified.

1Wilke ’94

slide-25
SLIDE 25

Weighted relative distance logic

Let Σ be an alphabet and M = (M❀⊕❀val 1❀0) a timed valuation monoid. Definition The weighted timed MSO logic wtMSO(Σ❀M): ✬ ∶∶= m ∣ ☞?(✬ ∶ ✬) ∣ ⊕x✬ ∣ ⊕X✬ ∣ valx(✬❀✬) where ☞ ∈ tMSO(Σ) and m ∈ M Relative distance logic RDL(Σ❀M) ⊂ wtMSO(Σ❀M): relative distance variables in ☞ are not quantified.

1We also assume: val(✿✿✿((mk❀ 0)❀ tk)✿✿✿) = 0

slide-26
SLIDE 26

Weighted RDL: the semantics

Let Σ be an alphabet, M = (M❀⊕❀ val ❀0) a timed valuation monoid, w = (a1❀t1)✿✿✿(an❀tn) ∈ TΣ+ and ✛ an assignment of variables. [[m]](w❀✛) = m [[☞?(✬1 ∶ ✬2)]](w❀✛) = ⎧ ⎪ ⎪ ⎨ ⎪ ⎪ ⎩ [[✬1]](w❀✛)❀ if (w❀✛) ⊧ ☞❀ [[✬2]](w❀✛)❀

  • therwise

[[✬1 ⊕ ✬2]](w❀✛) = [[✬1]](w❀✛) ⊕ [[✬2]](w❀✛) [[⊕x✬]](w❀✛) = ⊕([[✬]](w❀✛[x/i]) ∣ i ∈ dom(w)) [[⊕X✬]](w❀✛) = ⊕([[✬]](w❀✛[X/I]) ∣ I ⊆ dom(w)) [[ val x(✬1❀✬2)]] = val(([[✬1]](w❀✛[x/i])❀[[✬2]](w❀✛[x/i]))❀ti)1≤i≤n

slide-27
SLIDE 27

Restricted weighted RDL

Let Σ be an alphabet and M = (M❀⊕❀val❀0) a timed valuation monoid. Weighted RDL is more expressive than WTA. Restricted weighted RDL: val is applied only to formulas ✌ ∶∶= m ∣ ☞?(✌ ∶ ✌) with m ∈ M and ☞ ∈ tMSO(Σ❀S). Theorem Let L ∶ TΣ+ → M. TFAE:

1 L is recognizable by a WTA. 2 L is definable by a restricted weighted RDL sentence.

Proof: using the Nivat theorem for WTA

slide-28
SLIDE 28

A Nivat theorem for weighted RDL

Let Σ be an alphabet and M = (M❀⊕❀val❀0) a timed valuation monoid. Theorem Let L ∶ TΣ+ → M. TFAE:

1 L is definable by a restricted weighted RDL sentence. 2 There exists an alphabet Γ such that

L = h((val○g) ∩ L) where:

h ∶ Γ → Σ and g ∶ Γ → M × M are renamings; L ⊆ TΓ+ is unambiguously definable.

slide-29
SLIDE 29

Future work

1 Is there an extension of WTA which is equally expressive as

N(Σ❀M)?

2 Extension to other structures, e.g., infinite words, searchable

graphs.

slide-30
SLIDE 30

Future work

1 Is there an extension of WTA which is equally expressive as

N(Σ❀M)?

2 Extension to other structures, e.g., infinite words, searchable

graphs.

3 Multi-weighted timed setting.

slide-31
SLIDE 31

Future work

1 Is there an extension of WTA which is equally expressive as

N(Σ❀M)?

2 Extension to other structures, e.g., infinite words, searchable

graphs.

3 Multi-weighted timed setting.

slide-32
SLIDE 32

Future work

1 Is there an extension of WTA which is equally expressive as

N(Σ❀M)?

2 Extension to other structures, e.g., infinite words, searchable

graphs.

3 Multi-weighted timed setting.

THANK YOU!