THE COST OF REPAIRS Gabriele Puppis LaBRI / CNRS based on joint - - PowerPoint PPT Presentation

the cost of repairs
SMART_READER_LITE
LIVE PREVIEW

THE COST OF REPAIRS Gabriele Puppis LaBRI / CNRS based on joint - - PowerPoint PPT Presentation

THE COST OF REPAIRS Gabriele Puppis LaBRI / CNRS based on joint works with Michael Benedikt, Pierre Bourhis, Cristian Riveros, Slawek Staworko What do you do when a computational object fails a specification? 5 Source 10000 X Target


slide-1
SLIDE 1

THE COST OF REPAIRS

Gabriele Puppis

LaBRI / CNRS based on joint works with

Michael Benedikt, Pierre Bourhis, Cristian Riveros, Slawek Staworko

slide-2
SLIDE 2

What do you do when a computational object fails a specification?

10000

X

5

Source

1000 10000 100000

. . . Target

1050 10050 100050

. . .

slide-3
SLIDE 3

What do you do when a computational object fails a specification?

10000

X

5

Source

1000 10000 100000

. . . Target

1050 10050 100050

. . .

Worst-case cost of repairing source into target: max

s∈S min t∈T dist(s,t)

slide-4
SLIDE 4

What do you do when a computational object fails a specification?

10000

X

5

Source

1000 10000 100000

. . . Target

1050 10050 100050

. . .

Worst-case cost of repairing source into target: max

s∈S min t∈T dist(s,t)

Depends on distance (e.g., Levenstein distance)

slide-5
SLIDE 5

What do you do when a computational object fails a specification?

100000

X X

1 1

Source

1000 100000 10000000

. . . Target

1010 101010 10101010

. . .

Worst-case cost of repairing source into target: max

s∈S min t∈T dist(s,t)

Depends on distance (e.g., Levenstein distance) Can be infinite!

slide-6
SLIDE 6

Plan A.

Bounded repairability of regular word languages

1) characterization 2) streaming setting 3) complexity

B.

Bounded repairability of regular tree languages

1) curry encodings, stepwise automata, contexts 2) characterization 3) complexity

slide-7
SLIDE 7

Part A. Problem setting:

Given two languages S ⊆ Σ∗ and T ⊆ ∆∗ (represented by finite state automata) Decide whether max

s∈S min t∈T dist(s,t)

is finite.

slide-8
SLIDE 8

Part A. Problem setting:

Given two languages S ⊆ Σ∗ and T ⊆ ∆∗ (represented by finite state automata) Decide whether max

s∈S min t∈T dist(s,t)

is finite.

Examples 10∗ is bounded repairable into 10∗50 10∗ is not bounded repairable into (10)∗ (1 + 0)∗ is not bounded repairable into (1 + 0∗5)∗

slide-9
SLIDE 9

Rule of thumb:

If you need to edit, you’d better do it outside a loop!

Source automaton

X

1 1 1

Target automaton

Y

1 1 1 5

slide-10
SLIDE 10

Rule of thumb:

If you need to edit, you’d better do it outside a loop!

Source automaton

X

1 1 1

Target automaton

Y

1 1 1 5

slide-11
SLIDE 11

Rule of thumb:

If you need to edit, you’d better do it outside a loop!

Source automaton

X

1 1 1

Target automaton

Y

1 1 1 5

For any strategy that repairs traces of X into traces of Y:

  • 1. either traces(X) ⊆ traces(Y )
  • 2. or

the strategy has unbounded cost.

slide-12
SLIDE 12

Characterization of bounded repairability of word languages S is repairable into T with uniformly bounded cost

Given some (trimmed) automata for S and T and the DAGs of strongly connected components... Source DAG Target DAG

slide-13
SLIDE 13

Characterization of bounded repairability of word languages S is repairable into T with uniformly bounded cost

Given some (trimmed) automata for S and T and the DAGs of strongly connected components... Source DAG Target DAG ...every chain of components in the source is covered by a chain of components in the target.

slide-14
SLIDE 14

Characterization of bounded repairability of word languages S is repairable into T with uniformly bounded cost

Given some (trimmed) automata for S and T and the DAGs of strongly connected components... Source DAG Target DAG ...every chain of components in the source is covered by a chain of components in the target.

slide-15
SLIDE 15

An example

All chains of source DAG are covered by chains of target DAG

⇒ S is repairable into T with uniformly bounded cost. S = 30∗1∗+ 30∗2∗

3 1 2 1 2

T = 10∗1∗+ 20∗2∗

1 2 1 2 1 2

slide-16
SLIDE 16

An example

All chains of source DAG are covered by chains of target DAG

⇒ S is repairable into T with uniformly bounded cost. S = 30∗1∗+ 30∗2∗

3 1 2 1 2

T = 10∗1∗+ 20∗2∗

1 2 1 2 1 2

slide-17
SLIDE 17

An example

All chains of source DAG are covered by chains of target DAG

⇒ S is repairable into T with uniformly bounded cost. S = 30∗1∗+ 30∗2∗

3 1 2 1 2

T = 10∗1∗+ 20∗2∗

1 2 1 2 1 2

slide-18
SLIDE 18

An example

All chains of source DAG are covered by chains of target DAG

⇒ S is repairable into T with uniformly bounded cost. S = 30∗1∗+ 30∗2∗

3 1 2 1 2

T = 10∗1∗+ 20∗2∗

1 2 1 2 1 2

There is no covering relation compatible with prefixes ⇒

the repair strategy is not streaming (i.e. implementable by a sequential transducer)

slide-19
SLIDE 19

An example

All chains of source DAG are covered by chains of target DAG

⇒ S is repairable into T with uniformly bounded cost. S = 30∗1∗+ 30∗2∗

3 1 2 1 2

T = 10∗1∗+ 20∗2∗

1 2 1 2 1 2

There is no covering relation compatible with prefixes ⇒

the repair strategy is not streaming (i.e. implementable by a sequential transducer)

slide-20
SLIDE 20

Complexity of non-streaming bounded repairability problem:

NFA PTIME coNP PSPACE DFA P coNP PSPACE fixed CONST P PSPACE fixed DFA NFA

slide-21
SLIDE 21

Complexity of non-streaming bounded repairability problem:

NFA PTIME coNP PSPACE DFA P coNP PSPACE fixed CONST P PSPACE fixed DFA NFA

Complexity of streaming bounded repairability problem:

NFA

≤ PSPACE ≥ P ≤ PSPACE ≥ P ≤ EXP ≥ PSPACE

DFA P P PSPACE fixed CONST P PSPACE fixed DFA NFA

slide-22
SLIDE 22

Part B. New tools for a more general setting...

Languages of words: insersions / deletions finite state automata components & traces coverability of chains Languages of unranked trees: insertions / deletions stepwise tree automata components & contexts coverability of synopsis trees

slide-23
SLIDE 23

Edit operations on unranked trees: deletions ⋮ ... ... ... ... ... ... ... ... ...

X

slide-24
SLIDE 24

Edit operations on unranked trees: deletions ⋮ ... ... ... ... ... ... ... ... ...

slide-25
SLIDE 25

Edit operations on unranked trees: insertions ⋮ ... ... ... ... ... ... ... ... ...

+

slide-26
SLIDE 26

Edit operations on unranked trees: insertions ⋮ ... ... ... ... ... ... ... ... ...

slide-27
SLIDE 27

An example

Source

r d a ... a b ... b c ... c

Target

r a ... a e b ... b c ... c

slide-28
SLIDE 28

An example

Source

r d a ... a b ... b c ... c

Target

r a ... a e b ... b c ... c r d a ... a b ... b c ... c

X

slide-29
SLIDE 29

An example

Source

r d a ... a b ... b c ... c

Target

r a ... a e b ... b c ... c r a ... a b ... b c ... c

+

slide-30
SLIDE 30

An example

Source

r d a ... a b ... b c ... c

Target

r a ... a e b ... b c ... c r a ... a b ... b c ... c e

slide-31
SLIDE 31

Bottom-up automata on ranked (binary) trees: ... q1 q2 δ(q1,q2) How to parse unranked trees?

slide-32
SLIDE 32

Bottom-up automata on ranked (binary) trees: ... q1 q2 δ(q1,q2) How to parse unranked trees? Encode them using binary trees!

slide-33
SLIDE 33

The curry encoding 1 2 ... n ≅

@ ... @ @

1 2 n 1 2 ⋮ n

@ @

1

@

2

...

n

slide-34
SLIDE 34

The curry encoding 1 2 ... n ≅

@ ... @ @

1 2 n 1 2 ⋮ n

@ @

1

@

2

...

n

slide-35
SLIDE 35

The curry encoding 1 2 ... n ≅

@ ... @ @

1 2 n 1 2 ⋮ n

@ @

1

@

2

...

n

slide-36
SLIDE 36

The curry encoding 1 2 ... n ≅

@ ... @ @

1 2 n 1 2 ⋮ n ≅

@ @

1

@

2

...

n

slide-37
SLIDE 37

The curry encoding 1 2 ... n ≅

@ ... @ @

1 2 n 1 2 ⋮ n ≅

@ @

1

@

2

...

n Stepwise automata = bottom-up on curry encodings

slide-38
SLIDE 38

An example r a ... a b ⋮ b c ≅

@ @ ... @

r a a

@

b

... @

b c qr qa qc qfinal

slide-39
SLIDE 39

An example r a ... a b ⋮ b c ≅

@ @ ... @

r a a

@

b

... @

b c qr qa qc qfinal r ↦ qr a ↦ qa b ↦ qb c ↦ qc qr @ qa ↦ qr qb @ qc ↦ qc qr @ qc ↦ qfinal

slide-40
SLIDE 40

An example r a ... a b ⋮ b c ≅

@ @ ... @

r a a

@

b

... @

b c qr qa qa qb qb qc qfinal r ↦ qr a ↦ qa b ↦ qb c ↦ qc qr @ qa ↦ qr qb @ qc ↦ qc qr @ qc ↦ qfinal

slide-41
SLIDE 41

An example r a ... a b ⋮ b c ≅

@ @ ... @

r a a

@

b

... @

b c qr qa qa qb qb qc qr

...

qr qc

...

qc qfinal r ↦ qr a ↦ qa b ↦ qb c ↦ qc qr @ qa ↦ qr qb @ qc ↦ qc qr @ qc ↦ qfinal

slide-42
SLIDE 42

An example r a ... a b ⋮ b c ≅

@ @ ... @

r a a

@

b

... @

b c qr qa qa qb qb qc qr

...

qr qc

...

qc qfinal r ↦ qr a ↦ qa b ↦ qb c ↦ qc qr @ qa ↦ qr qb @ qc ↦ qc qr @ qc ↦ qfinal

slide-43
SLIDE 43

Contexts = trees with holes

?

1 2 ... n ≅

@ ... @ @ ?

1 2 n

?

2 ⋮ n ≅

@ @ ? @

2

...

n

slide-44
SLIDE 44

Contexts = trees with holes

?

1 2 ... n

?

@ ... @ @ ?

1 2 n

? ?

2 ⋮ n

?

@ @ ? @

2

...

n

?

slide-45
SLIDE 45

Contexts = trees with holes

?

1 2 ... n

?

@ ... @ @ ?

1 2 n

? ?

2 ⋮ n

?

@ @ ? @

2

...

n

?

Contexts can be parsed between two states:

p

C

  • → q

(accessibility of states and components are defined accordingly)

slide-46
SLIDE 46

Recall: a run of a finite state automaton induces a chain of components... Likewise, a run of a stepwise automaton induces a synopsis tree (i.e. a tree of components).

slide-47
SLIDE 47

Recall: a run of a finite state automaton induces a chain of components... Likewise, a run of a stepwise automaton induces a synopsis tree (i.e. a tree of components).

@ @ ... @

r a a

@

b

... @

b c qr qa qa qb qb qc qr

...

qr qc

...

qc qfinal ⇒

@

qfinal qr qc

?@a b@?

slide-48
SLIDE 48

Characterization of bounded repairability of tree languages S is repairable into T with uniformly bounded cost

Given some (trimmed) stepwise automata for S and T, all synopsis trees of S are covered by synopsis trees of T Source synopsis tree

@ @

“covered by” Target synopsis tree

@ @

i.e. ...

slide-49
SLIDE 49

Characterization of bounded repairability of tree languages S is repairable into T with uniformly bounded cost

Given some (trimmed) stepwise automata for S and T, all synopsis trees of S are covered by synopsis trees of T Source synopsis tree

@ @

“covered by” Target synopsis tree

@ @

i.e.

∃ λ

: cyclic components

cyclic components

slide-50
SLIDE 50

Given some (trimmed) stepwise automata for S and T, all synopsis trees of S are covered by synopsis trees of T Source synopsis tree

@ @

“covered by” Target synopsis tree

@ @

i.e.

∃ λ

: cyclic components

cyclic components

1. λ preserves contexts: contexts(X) ⊆ contexts(λ(X)) 2.

respects post-order of components:

slide-51
SLIDE 51

Given some (trimmed) stepwise automata for S and T, all synopsis trees of S are covered by synopsis trees of T Source synopsis tree

@ @

“covered by” Target synopsis tree

@ @

i.e.

∃ λ

: cyclic components

cyclic components

1. λ preserves contexts: contexts(X) ⊆ contexts(λ(X)) 2. λ respects post-order of components: X ≤postorder Y ↔ λ(X) ≤postorder λ(Y ) 3. λ preserves ancestorship of vertical components:

slide-52
SLIDE 52

Source synopsis tree

@ @

“covered by” Target synopsis tree

@ @

i.e.

∃ λ

: cyclic components

cyclic components

1. λ preserves contexts: contexts(X) ⊆ contexts(λ(X)) 2. λ respects post-order of components: X ≤postorder Y ↔ λ(X) ≤postorder λ(Y ) 3. λ preserves ancestorship of vertical components: X ⪯ancestor Y ↔ λ(X) ⪯ancestor λ(Y )

whenever

vertical−contexts(X) ≠ ∅

slide-53
SLIDE 53

r a ... a d b ... b c ... c r a ... a b ... b c ... c delete d @ ... @

@

@ ... @ r a a @ ... @ d b b c c @ ... @ @ ... @ @ ... @ r a a b b c c

slide-54
SLIDE 54

r a ... a d b ... b c ... c r a ... a b ... b c ... c delete d ≅ ≅ @ ... @

@

@ ... @ r a a @ ... @ d b b c c @ ... @ @ ... @ @ ... @ r a a b b c c

slide-55
SLIDE 55

r a ... a d b ... b c ... c r a ... a b ... b c ... c delete d ≅ ≅ @ ... @

@

@ ... @ r a a @ ... @ d b b c c @ ... @ @ ... @ @ ... @ r a a b b c c

slide-56
SLIDE 56

r a ... a d b ... b c ... c r a ... a b ... b c ... c delete d ≅ ≅ @ ... @

@

@ ... @ r a a @ ... @ d b b c c @ ... @ @ ... @ @ ... @ r a a b b c c

C A B C A B

slide-57
SLIDE 57

r a ... a d b ... b c ... c r a ... a b ... b c ... c delete d ≅ ≅ @ ... @

@

@ ... @ r a a @ ... @ d b b c c @ ... @ @ ... @ @ ... @ r a a b b c c

C A B C A B

horizontal horizontal

slide-58
SLIDE 58

Complexity of non-streaming bounded repairability problem:

  • det. DTD

DTD stepwise universal fixed alphabet

  • det. DTD

non recursive

  • det. DTD

stepwise P PSPACE EXP coNP PSPACE PSPACE coNEXP coNEXP coNEXP coNEXP coNEXP coNEXP

slide-59
SLIDE 59

Complexity of non-streaming bounded repairability problem:

  • det. DTD

DTD stepwise universal fixed alphabet

  • det. DTD

non recursive

  • det. DTD

stepwise P PSPACE EXP coNP PSPACE PSPACE coNEXP coNEXP coNEXP coNEXP coNEXP coNEXP

Complexity of streaming bounded repairability problem:

universal DTD

  • det. DTD

DTD P PSPACE EXP EXP

slide-60
SLIDE 60

Some references...

Regular Repair of Specifications Benedikt, Riveros, P . – LICS 2011 The cost of traveling between languages Benedikt, Riveros, P . – ICALP 2011 Bounded repairability for regular tree languages Riveros, Staworko, P . – ICDT 2012 Which DTDs are streaming bounded repairable? Bourhis, Riveros, Staworko, P . – ICDT 2013

...and other related topics

normalized edit cost

sup

s∈S

min

t∈T

dist(s,t) ∣s∣

distance automata and limitedness problem energy games with perfect/imperfect information

slide-61
SLIDE 61

Some references...

Regular Repair of Specifications Benedikt, Riveros, P . – LICS 2011 The cost of traveling between languages Benedikt, Riveros, P . – ICALP 2011 Bounded repairability for regular tree languages Riveros, Staworko, P . – ICDT 2012 Which DTDs are streaming bounded repairable? Bourhis, Riveros, Staworko, P . – ICDT 2013

...and other related topics

normalized edit cost

sup

s∈S

min

t∈T

dist(s,t) ∣s∣

distance automata and limitedness problem energy games with perfect/imperfect information