Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A....

130
Tree Transformations and Dependencies Andreas Maletti Institute for Natural Language Processing University of Stuttgart [email protected] Nara — September 6, 2011 A. Maletti MOL 2011 1

Transcript of Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A....

Page 1: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Tree Transformations and Dependencies

Andreas Maletti

Institute for Natural Language ProcessingUniversity of Stuttgart

[email protected]

Nara — September 6, 2011

A. Maletti MOL 2011 1

Page 2: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Contents

1 Motivation

2 Extended top-down tree transducer

3 Extended multi bottom-up tree transducer

4 Synchronous tree-sequence substitution grammar

A. Maletti MOL 2011 2

Page 3: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Warning!

This won’t be a regular survey talk.

Rather I want to show a useful technique.

A. Maletti MOL 2011 3

Page 4: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Warning!

This won’t be a regular survey talk.

Rather I want to show a useful technique.

A. Maletti MOL 2011 4

Page 5: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Context-free Language

QuestionHow do you show that a language is not context-free?

Answers

• pumping lemma (BAR-HILLEL lemma)• semi-linearity (PARIKH’s theorem)• ...

A. Maletti MOL 2011 5

Page 6: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Context-free Language

QuestionHow do you show that a language is not context-free?

Answers

• pumping lemma (BAR-HILLEL lemma)• semi-linearity (PARIKH’s theorem)• ...

A. Maletti MOL 2011 6

Page 7: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Context-free Language

Hardly ever ...

Let us assume that there is a CFG ...(long case distinction on the shape of its rules)Contradiction!

A. Maletti MOL 2011 7

Page 8: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Tree Transformation

Application areas

• NLP• XML processing• syntax-directed semantics

Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

7→

δ

t1 δ

t2 δ

t3 δ

t4 δ

tn−3 δ

tn−2 δ

tn−1 tn

A. Maletti MOL 2011 8

Page 9: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Tree Transducer

DefinitionA formal model computing a tree transformation

Example

• top-down or bottom-up tree transducer• synchronous grammar (SCFG, STSG, STAG, etc.)• multi bottom-up tree transducer• bimorphism

A. Maletti MOL 2011 9

Page 10: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Tree Transducer

DefinitionA formal model computing a tree transformation

Example

• top-down or bottom-up tree transducer• synchronous grammar (SCFG, STSG, STAG, etc.)• multi bottom-up tree transducer• bimorphism

A. Maletti MOL 2011 10

Page 11: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Tree Transducer

QuestionHow do you show that a tree transformation cannot be computedby a class of tree transducers?

A. Maletti MOL 2011 11

Page 12: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Tree Transducer

QuestionHow do you show that a tree transformation cannot be computedby a class of tree transducers?

Answers

• pumping lemma (????)• size and height dependencies• domain and image properties• properties under composition (??)

A. Maletti MOL 2011 12

Page 13: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Tree Transducer

QuestionHow do you show that a tree transformation cannot be computedby a class of tree transducers?

Typical approach

• Assume that it can be computed .... Contradiction!

A. Maletti MOL 2011 13

Page 14: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

7→

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

QuestionCan this tree transformation be computed by a linear,nondeleting extended top-down tree transducer (XTOP)?

Answer [Arnold, Dauchet 1982]

No! (via indirect proof)

A. Maletti MOL 2011 14

Page 15: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

7→

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

QuestionCan this tree transformation be computed by a linear,nondeleting extended top-down tree transducer (XTOP)?

Answer [Arnold, Dauchet 1982]

No! (via indirect proof)

A. Maletti MOL 2011 15

Page 16: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Another Example

σ

γ

...

γ

σ

t1 t2

t3

7→δ

t1 t2 t3

QuestionCan this tree transformation becomputed by an XTOP?

Answer [∼, Graehl, Hopkins, Knight 2009]

No! (via indirect proof)

A. Maletti MOL 2011 16

Page 17: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Another Example

σ

γ

...

γ

σ

t1 t2

t3

7→δ

t1 t2 t3

QuestionCan this tree transformation becomputed by an XTOP?

Answer [∼, Graehl, Hopkins, Knight 2009]

No! (via indirect proof)

A. Maletti MOL 2011 17

Page 18: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Yet Another Exampleα

...

α

β

...

β

γ

...

γ

ε

σ

α

...

α

ε

β

...

β

ε

γ

...

γ

ε

7→

QuestionCan this tree transformation becomputed by an MBOT?

MBOTlinear, nondeleting multibottom-up tree transducer

AnswerWe’ll know at the end

A. Maletti MOL 2011 18

Page 19: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Yet Another Exampleα

...

α

β

...

β

γ

...

γ

ε

σ

α

...

α

ε

β

...

β

ε

γ

...

γ

ε

7→

QuestionCan this tree transformation becomputed by an MBOT?

MBOTlinear, nondeleting multibottom-up tree transducer

AnswerWe’ll know at the end

A. Maletti MOL 2011 19

Page 20: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Yet Another Exampleα

...

α

β

...

β

γ

...

γ

ε

σ

α

...

α

ε

β

...

β

ε

γ

...

γ

ε

7→

QuestionCan this tree transformation becomputed by an MBOT?

MBOTlinear, nondeleting multibottom-up tree transducer

AnswerWe’ll know at the end

A. Maletti MOL 2011 20

Page 21: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Contents

1 Motivation

2 Extended top-down tree transducer

3 Extended multi bottom-up tree transducer

4 Synchronous tree-sequence substitution grammar

A. Maletti MOL 2011 21

Page 22: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Extended Top-down Tree Transducer

Definition (XTOP)

tuple (Q,Σ,∆, I,R)

• Q: states• Σ, ∆: input and output symbols• I ⊆ Q: initial states

• R ⊆ TΣ(Q)×Q × T∆(Q): finite set of rules– l and r are linear in Q– var(l) = var(r)

for every l q— r ∈ R

[ARNOLD, DAUCHET: Morphismes et bimorphismes d’arbres. Theor. Comput.Sci. 1982]

A. Maletti MOL 2011 22

Page 23: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Extended Top-down Tree Transducer

Definition (XTOP)

tuple (Q,Σ,∆, I,R)

• Q: states• Σ, ∆: input and output symbols• I ⊆ Q: initial states• R ⊆ TΣ(Q)×Q × T∆(Q): finite set of rules

– l and r are linear in Q– var(l) = var(r)

for every l q— r ∈ R

[ARNOLD, DAUCHET: Morphismes et bimorphismes d’arbres. Theor. Comput.Sci. 1982]

A. Maletti MOL 2011 23

Page 24: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Example XTOP

Example

XTOP (Q,Σ,Σ, {?},R) with Q = {?,p,q, r} and Σ = {σ, δ, α, ε}

σ

p q ??—

δ

p δ

q ?

σ

p q r?—

δ

p δ

q r

δ

p ?

?—

δ

p ?

α

xx—

α

xε x— ε

A. Maletti MOL 2011 24

Page 25: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Sentential Form

L = {S | S ⊆ N∗ × N∗}

Definition (Sentential form)

〈ξ,D, ζ〉 ∈ TΣ(Q)× L× T∆(Q) such that

• v ∈ pos(ξ) and w ∈ pos(ζ) for every (v ,w) ∈ D.

A. Maletti MOL 2011 25

Page 26: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Sentential Form

L = {S | S ⊆ N∗ × N∗}

Definition (Sentential form)

〈ξ,D, ζ〉 ∈ TΣ(Q)× L× T∆(Q) such that

• v ∈ pos(ξ) and w ∈ pos(ζ) for every (v ,w) ∈ D.

A. Maletti MOL 2011 26

Page 27: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Link Structure

Definitionrule l q— r ∈ R, positions v ,w ∈ N∗

linksv ,w (l q— r) =⋃

p∈Q

{(vv ′,ww ′) | v ′ ∈ posp(l),w ′ ∈ posp(r)}

A. Maletti MOL 2011 27

Page 28: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Link Structure

Definitionrule l q— r ∈ R, positions v ,w ∈ N∗

linksv ,w (l q— r) =⋃

p∈Q

{(vv ′,ww ′) | v ′ ∈ posp(l),w ′ ∈ posp(r)}

σ

p q ??—

δ

p δ

q ?

A. Maletti MOL 2011 28

Page 29: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Link Structure

Definitionrule l q— r ∈ R, positions v ,w ∈ N∗

linksv ,w (l q— r) =⋃

p∈Q

{(vv ′,ww ′) | v ′ ∈ posp(l),w ′ ∈ posp(r)}

σ

p q ??—

δ

p δ

q ?

A. Maletti MOL 2011 29

Page 30: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Definition

〈ξ,D, ζ〉 ⇒ 〈ξ[l]v , D ∪ linksv ,w (l q— r), ζ[r ]w 〉

if• rule l q— r ∈ R• position v ∈ posq(ξ)

• position w ∈ posq(ζ) such that (v ,w) ∈ D

A. Maletti MOL 2011 30

Page 31: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rules

σ

p q ??—

δ

p δ

q ?

σ

p q r?—

δ

p δ

q r

δ

p ?

?—

δ

p ?

α

xx—

α

xε x— ε

? ?

A. Maletti MOL 2011 31

Page 32: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rules

σ

p q ??—

δ

p δ

q ?

σ

p q r?—

δ

p δ

q r

δ

p ?

?—

δ

p ?

α

xx—

α

xε x— ε

? ?

δ

p ?

δ

p ?

A. Maletti MOL 2011 32

Page 33: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rules

σ

p q ??—

δ

p δ

q ?

σ

p q r?—

δ

p δ

q r

δ

p ?

?—

δ

p ?

α

xx—

α

xε x— ε

δ

p ?

δ

p ?

δ

p σ

p q ?

δ

p δ

p δ

q ?

A. Maletti MOL 2011 33

Page 34: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rules

σ

p q ??—

δ

p δ

q ?

σ

p q r?—

δ

p δ

q r

δ

p ?

?—

δ

p ?

α

xx—

α

xε x— ε

δ

p σ

p q ?

δ

p δ

p δ

q ?

δ

ε σ

p q ?

δ

ε δ

p δ

q ?

A. Maletti MOL 2011 34

Page 35: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rules

σ

p q ??—

δ

p δ

q ?

σ

p q r?—

δ

p δ

q r

δ

p ?

?—

δ

p ?

α

xx—

α

xε x— ε

δ

ε σ

p q ?

δ

ε δ

p δ

q ?

δ

ε σ

α

p

q ?

δ

ε δ

α

p

δ

q ?

A. Maletti MOL 2011 35

Page 36: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rules

σ

p q ??—

δ

p δ

q ?

σ

p q r?—

δ

p δ

q r

δ

p ?

?—

δ

p ?

α

xx—

α

xε x— ε

δ

ε σ

α

p

q ?

δ

ε δ

α

p

δ

q ?

δ

ε σ

α

ε

q ?

δ

ε δ

α

ε

δ

q ?

A. Maletti MOL 2011 36

Page 37: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rules

σ

p q ??—

δ

p δ

q ?

σ

p q r?—

δ

p δ

q r

δ

p ?

?—

δ

p ?

α

xx—

α

xε x— ε

δ

ε σ

α

ε

q ?

δ

ε δ

α

ε

δ

q ?

δ

ε σ

α

ε

q σ

p q r

δ

ε δ

α

ε

δ

q δ

p δ

q r

A. Maletti MOL 2011 37

Page 38: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rules

σ

p q ??—

δ

p δ

q ?

σ

p q r?—

δ

p δ

q r

δ

p ?

?—

δ

p ?

α

xx—

α

xε x— ε

δ

ε σ

α

ε

q σ

p q r

δ

ε δ

α

ε

δ

q δ

p δ

q r

δ

ε σ

α

ε

ε σ

p q r

δ

ε δ

α

ε

δ

ε δ

p δ

q r

A. Maletti MOL 2011 38

Page 39: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rules

σ

p q ??—

δ

p δ

q ?

σ

p q r?—

δ

p δ

q r

δ

p ?

?—

δ

p ?

α

xx—

α

xε x— ε

δ

ε σ

α

ε

ε σ

p q r

δ

ε δ

α

ε

δ

ε δ

p δ

q r

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

A. Maletti MOL 2011 39

Page 40: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of XTOP

Definition

• the dependencies dep(M)

{〈t ,D,u〉 ∈ TΣ×L×T∆ | ∃q ∈ I : 〈q, {(ε, ε)},q〉 ⇒∗M 〈t ,D,u〉}

• the tree transformation M = {(t ,u) | 〈t ,D,u〉 ∈ dep(M)}

A. Maletti MOL 2011 40

Page 41: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of XTOP

Definition

• the dependencies dep(M)

{〈t ,D,u〉 ∈ TΣ×L×T∆ | ∃q ∈ I : 〈q, {(ε, ε)},q〉 ⇒∗M 〈t ,D,u〉}

• the tree transformation M = {(t ,u) | 〈t ,D,u〉 ∈ dep(M)}

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

7→

A. Maletti MOL 2011 41

Page 42: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of XTOP

Example

D = {(ε, ε), (1,1), (2,2), (21,21), (211,211), (22,221), (23,222),

(231,2221), (232,22221), (233,22222)}

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

A. Maletti MOL 2011 42

Page 43: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of XTOP

Example

D = {(ε, ε), (1,1), (2,2), (21,21), (211,211), (22,221), (23,222),

(231,2221), (232,22221), (233,22222)}

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

7→

A. Maletti MOL 2011 43

Page 44: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of XTOP

Example

D = {(ε, ε), (1,1), (2,2), (21,21), (211,211), (22,221), (23,222),

(231,2221), (232,22221), (233,22222)}

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

A. Maletti MOL 2011 44

Page 45: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Non-closure under Composition

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

7→

δ

t1 δ

t2 δ

t3 δ

t4 δ

tn−3 δ

tn−2 δ

tn−1 tn

7→

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

[ARNOLD, DAUCHET: Morphismes et bimorphismes d’arbres. Theor. Comput.Sci. 1982]

A. Maletti MOL 2011 45

Page 46: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Special Linking Structure

DefinitionD ∈ L is input hierarchical if for all (v1,w1), (v2,w2) ∈ D• v1 < v2 implies w2 6< w1 and ∃w ′1 ≤ w2 : (v1,w ′1) ∈ D

• w1 6≤ w2 implies v1 6≤ v2

A. Maletti MOL 2011 46

Page 47: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Special Linking Structure

DefinitionD ∈ L is input hierarchical if for all (v1,w1), (v2,w2) ∈ D• v1 < v2 implies w2 6< w1 and ∃w ′1 ≤ w2 : (v1,w ′1) ∈ D

• w1 6≤ w2 implies v1 6≤ v2

v1 w2

v2 w1

v1 w ′1

v2 w1 w2

A. Maletti MOL 2011 47

Page 48: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Special Linking Structure

DefinitionD ∈ L is input hierarchical if for all (v1,w1), (v2,w2) ∈ D• v1 < v2 implies w2 6< w1 and ∃w ′1 ≤ w2 : (v1,w ′1) ∈ D

• w1 6≤ w2 implies v1 6≤ v2

v1 w2

v2 w1

v1 w ′1

v2 w1 w2

A. Maletti MOL 2011 48

Page 49: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Special Linking Structure

DefinitionD ∈ L is strictly input hierarchical if for all (v1,w1), (v2,w2) ∈ D• v1 < v2 implies w2 6< w1 and ∃w ′1 ≤ w2 : (v1,w ′1) ∈ D• w1 6≤ w2 implies v1 6≤ v2

v1 w2

v2 w1

v1

v2 w1 w2

A. Maletti MOL 2011 49

Page 50: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Special Linking Structure

DefinitionD ∈ L is strictly input hierarchical if for all (v1,w1), (v2,w2) ∈ D• v1 < v2 implies w2 6< w1 and ∃w ′1 ≤ w2 : (v1,w ′1) ∈ D• w1 6≤ w2 implies v1 6≤ v2

v

w1 w2

v1

v2 w1 w2

A. Maletti MOL 2011 50

Page 51: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Dependencies

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

Example

This linking structure is strictly (input and output) hierarchical

A. Maletti MOL 2011 51

Page 52: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Dependencies

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

v1 w2

v2 w1

v1 w ′1

v2 w1 w2

A. Maletti MOL 2011 52

Page 53: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Dependencies

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

v1 w2

v2 w1

v1 w ′1

v2 w1 w2

A. Maletti MOL 2011 53

Page 54: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Dependencies

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

v1 w2

v2 w1

v1

v2 w1 w2

A. Maletti MOL 2011 54

Page 55: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Dependencies

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

v

w1 w2

v1

v2 w1 w2

A. Maletti MOL 2011 55

Page 56: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Another Property

DefinitionD ⊆ L has bounded distance if ∃k ∈ N such that ∀D ∈ D• if v , vw ∈ dom(D) with |w | > k , then ∃w ′ ≤ w with

– vw ′ ∈ dom(D)– |w ′| ≤ k

• (symmetric property for range)

Illustration:

v vw

> k

A. Maletti MOL 2011 56

Page 57: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Another Property

DefinitionD ⊆ L has bounded distance if ∃k ∈ N such that ∀D ∈ D• if v , vw ∈ dom(D) with |w | > k , then ∃w ′ ≤ w with

– vw ′ ∈ dom(D)– |w ′| ≤ k

• (symmetric property for range)

Illustration:

v vw ′ vw

≤ k

A. Maletti MOL 2011 57

Page 58: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Another Property

DefinitionD ⊆ L has bounded distance if ∃k ∈ N such that ∀D ∈ D• if v , vw ∈ dom(D) with |w | > k , then ∃w ′ ≤ w with

– vw ′ ∈ dom(D)– |w ′| ≤ k

• (symmetric property for range)

A. Maletti MOL 2011 58

Page 59: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Bounded Distance

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

Example

• input side: bounded by 1• output side: bounded by 2

A. Maletti MOL 2011 59

Page 60: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Main Result

TheoremThe dependencies computed by an XTOP are:• strictly (input and output) hierarchical• bounded distance

A. Maletti MOL 2011 60

Page 61: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Compatibility

Definition

• 〈ξ,D, ζ〉 is compatible with 〈ξ,D′, ζ〉 if D ⊆ D′

• set L is compatible with L′ iffor all 〈ξ,_, ζ〉 ∈ L (some computation)

– exists 〈ξ,D, ζ〉 ∈ L (implemented computation)– exists compatible 〈ξ,D′, ζ〉 ∈ L′ (compatible computation)

A. Maletti MOL 2011 61

Page 62: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Compatibility

Definition

• 〈ξ,D, ζ〉 is compatible with 〈ξ,D′, ζ〉 if D ⊆ D′

• set L is compatible with L′ iffor all 〈ξ,_, ζ〉 ∈ L (some computation)

– exists 〈ξ,D, ζ〉 ∈ L (implemented computation)– exists compatible 〈ξ,D′, ζ〉 ∈ L′ (compatible computation)

A. Maletti MOL 2011 62

Page 63: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Compatibility

Illustration

Some computation

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

A. Maletti MOL 2011 63

Page 64: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Compatibility

Illustration

Implemented computation

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

A. Maletti MOL 2011 64

Page 65: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Compatibility

Illustration

Compatible computation

δ

ε σ

α

ε

ε σ

ε ε ε

δ

ε δ

α

ε

δ

ε δ

ε δ

ε ε

A. Maletti MOL 2011 65

Page 66: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Back to the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

A. Maletti MOL 2011 66

Page 67: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Back to the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

use boundedness

A. Maletti MOL 2011 67

Page 68: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Back to the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

use boundedness

A. Maletti MOL 2011 68

Page 69: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Back to the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

A. Maletti MOL 2011 69

Page 70: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Back to the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

v1 w2

v2 w1

v1

v2 w1 w2

A. Maletti MOL 2011 70

Page 71: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Back to the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

v1 w2

v2 w1

v1 w ′1

v2 w1 w2

A. Maletti MOL 2011 71

Page 72: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Back to the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

v1 w2

v2 w1

v1 w ′1

v2 w1 w2

A. Maletti MOL 2011 72

Page 73: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Back to the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

v1 w2

v2 w1

v1

v2 w1 w2

A. Maletti MOL 2011 73

Page 74: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Back to the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

TheoremThe dependencies above are incompatible with any XTOP

A. Maletti MOL 2011 74

Page 75: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A First Instance

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

7→

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

Theorem (ARNOLD, DAUCHET 1982)

The transformation above cannot be computed by any XTOP

A. Maletti MOL 2011 75

Page 76: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Second Instanceσ

γ

...

γ

σ

t1 t2

t3

7→δ

t1 t2 t3

A. Maletti MOL 2011 76

Page 77: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Second Instanceσ

γ

...

γ

σ

t1 t2

t3

7→δ

t1 t2 t3

A. Maletti MOL 2011 77

Page 78: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Second Instanceσ

γ

...

γ

σ

t1 t2

t3

7→δ

t1 t2 t3

use boundedness

A. Maletti MOL 2011 78

Page 79: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Second Instanceσ

γ

...

γ

σ

t1 t2

t3

7→δ

t1 t2 t3

use boundedness

A. Maletti MOL 2011 79

Page 80: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Second Instanceσ

γ

...

γ

σ

t1 t2

t3

7→δ

t1 t2 t3

v1 w2

v2 w1

v1

v2 w1 w2

A. Maletti MOL 2011 80

Page 81: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Second Instanceσ

γ

...

γ

σ

t1 t2

t3

7→δ

t1 t2 t3

TheoremThe dependencies above are incompatible with any XTOP

A. Maletti MOL 2011 81

Page 82: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Second Instanceσ

γ

...

γ

σ

t1 t2

t3

7→δ

t1 t2 t3

Theorem (∼, GRAEHL, HOPKINS, KNIGHT 2009)

The transformation above cannot be computed by any XTOP

A. Maletti MOL 2011 82

Page 83: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Contents

1 Motivation

2 Extended top-down tree transducer

3 Extended multi bottom-up tree transducer

4 Synchronous tree-sequence substitution grammar

A. Maletti MOL 2011 83

Page 84: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Extended Multi Bottom-up Tree Transducer

Definition (MBOT)

tuple (Q,Σ,∆, I,R)

• Q: ranked alphabet of states• Σ, ∆: input and output symbols• I ⊆ Q1: unary initial states

• R ⊆ TΣ(Q)×Q × T∆(Q)∗: finite set of rules– l is linear in Q– rk(q) = |~r |– var(~r) ⊆ var(l)

for every (l ,q,~r) ∈ R

A. Maletti MOL 2011 84

Page 85: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Extended Multi Bottom-up Tree Transducer

Definition (MBOT)

tuple (Q,Σ,∆, I,R)

• Q: ranked alphabet of states• Σ, ∆: input and output symbols• I ⊆ Q1: unary initial states• R ⊆ TΣ(Q)×Q × T∆(Q)∗: finite set of rules

– l is linear in Q– rk(q) = |~r |– var(~r) ⊆ var(l)

for every (l ,q,~r) ∈ R

A. Maletti MOL 2011 85

Page 86: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Example MBOT

Example

(Q,Σ,Σ, {f},R) with Q = {?(2),p(1),q(1), r (1), f (1)} andΣ = {σ, δ, α, ε}

δ

p ?f—

σ

? p ?

α

xx—

α

xε x— ε

σ

p q ??— p

σ

? q ?

σ

p q r?— p

δ

q r

A. Maletti MOL 2011 86

Page 87: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

New Linking Structure

Definitionrule l q— ~r ∈ R, positions v ,w1, . . . ,wn ∈ N∗~w = w1 · · ·wn with n = rk(q)

linksv ,~w (l q— ~r) =⋃

p∈Q

n⋃i=1

{(vv ′,wiw ′i ) | v ′ ∈ posp(l),w ′i ∈ posp(ri)}

A. Maletti MOL 2011 87

Page 88: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

New Linking Structure

Definitionrule l q— ~r ∈ R, positions v ,w1, . . . ,wn ∈ N∗~w = w1 · · ·wn with n = rk(q)

linksv ,~w (l q— ~r) =⋃

p∈Q

n⋃i=1

{(vv ′,wiw ′i ) | v ′ ∈ posp(l),w ′i ∈ posp(ri)}

Illustration:σ

p q ??— p

σ

? q ?

A. Maletti MOL 2011 88

Page 89: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

New Linking Structure

Definitionrule l q— ~r ∈ R, positions v ,w1, . . . ,wn ∈ N∗~w = w1 · · ·wn with n = rk(q)

linksv ,~w (l q— ~r) =⋃

p∈Q

n⋃i=1

{(vv ′,wiw ′i ) | v ′ ∈ posp(l),w ′i ∈ posp(ri)}

Illustration:σ

p q ??— p

σ

? q ?

A. Maletti MOL 2011 89

Page 90: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Definition

〈ξ,D, ζ〉 ⇒ 〈ξ[l]v , D ∪ linksv ,~w (l q— ~r), ζ[~r ]~w 〉

if• rule l q— ~r ∈ R with rk(q) = n• position v ∈ posq(ξ)

• ~w = w1 · · ·wn ∈ posq(ζ)∗ with– w1 @ · · · @ wn– {w1, . . . ,wn} = {w | (v ,w) ∈ D}

A. Maletti MOL 2011 90

Page 91: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rulesδ

p ?f—

σ

? p ?

α

xx—

α

xε x— ε

σ

p q ??— p

σ

? q ?

σ

p q r?— p

δ

q r

? ?

A. Maletti MOL 2011 91

Page 92: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rulesδ

p ?f—

σ

? p ?

α

xx—

α

xε x— ε

σ

p q ??— p

σ

? q ?

σ

p q r?— p

δ

q r

? ?

δ

p ?

σ

? p ?

A. Maletti MOL 2011 92

Page 93: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rulesδ

p ?f—

σ

? p ?

α

xx—

α

xε x— ε

σ

p q ??— p

σ

? q ?

σ

p q r?— p

δ

q r

δ

p ?

σ

? p ?

δ

ε ?

σ

? ε ?

A. Maletti MOL 2011 93

Page 94: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rulesδ

p ?f—

σ

? p ?

α

xx—

α

xε x— ε

σ

p q ??— p

σ

? q ?

σ

p q r?— p

δ

q r

δ

ε ?

σ

? ε ?

δ

ε σ

p q ?

σ

p ε σ

? q ?

A. Maletti MOL 2011 94

Page 95: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rulesδ

p ?f—

σ

? p ?

α

xx—

α

xε x— ε

σ

p q ??— p

σ

? q ?

σ

p q r?— p

δ

q r

δ

ε σ

p q ?

σ

p ε σ

? q ?

δ

ε σ

α

p

q ?

σ

α

p

ε σ

? q ?

A. Maletti MOL 2011 95

Page 96: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rulesδ

p ?f—

σ

? p ?

α

xx—

α

xε x— ε

σ

p q ??— p

σ

? q ?

σ

p q r?— p

δ

q r

δ

ε σ

α

p

q ?

σ

α

p

ε σ

? q ?

δ

ε σ

α

ε

q ?

σ

α

ε

ε σ

? q ?

A. Maletti MOL 2011 96

Page 97: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rulesδ

p ?f—

σ

? p ?

α

xx—

α

xε x— ε

σ

p q ??— p

σ

? q ?

σ

p q r?— p

δ

q r

δ

ε σ

α

ε

q ?

σ

α

ε

ε σ

? q ?

δ

ε σ

α

ε

ε ?

σ

α

ε

ε σ

? ε ?

A. Maletti MOL 2011 97

Page 98: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rulesδ

p ?f—

σ

? p ?

α

xx—

α

xε x— ε

σ

p q ??— p

σ

? q ?

σ

p q r?— p

δ

q r

δ

ε σ

α

ε

ε ?

σ

α

ε

ε σ

? ε ?

δ

ε σ

α

ε

ε σ

p q r

σ

α

ε

ε σ

p ε δ

q r

A. Maletti MOL 2011 98

Page 99: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Rulesδ

p ?f—

σ

? p ?

α

xx—

α

xε x— ε

σ

p q ??— p

σ

? q ?

σ

p q r?— p

δ

q r

δ

ε σ

α

ε

ε σ

p q r

σ

α

ε

ε σ

p ε δ

q r

δ

ε σ

α

ε

ε σ

ε ε ε

σ

α

ε

ε σ

ε ε δ

ε ε

A. Maletti MOL 2011 99

Page 100: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of MBOT

DefinitionMBOT M computes• dependencies dep(M)

{〈t ,D,u〉 ∈ TΣ×L×T∆ | ∃q ∈ I : 〈q, {(ε, ε)},q〉 ⇒∗M 〈t ,D,u〉}

• the tree transformation M = {(t ,u) | 〈t ,D,u〉 ∈ dep(M)}

A. Maletti MOL 2011 100

Page 101: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of MBOT

DefinitionMBOT M computes• dependencies dep(M)

{〈t ,D,u〉 ∈ TΣ×L×T∆ | ∃q ∈ I : 〈q, {(ε, ε)},q〉 ⇒∗M 〈t ,D,u〉}

• the tree transformation M = {(t ,u) | 〈t ,D,u〉 ∈ dep(M)}

δ

ε σ

α

ε

ε σ

ε ε ε

7→

σ

α

ε

ε σ

ε ε δ

ε ε

A. Maletti MOL 2011 101

Page 102: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of MBOT

δ

ε σ

α

ε

ε σ

ε ε ε

σ

α

ε

ε σ

ε ε δ

ε ε

Example

D = {(ε, ε), (1,2), (2,1), (2,3), (21,1), (211,11), (22,32),

(23,31), (23,33), (231,31), (232,331), (233,332)}

A. Maletti MOL 2011 102

Page 103: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of MBOT

δ

ε σ

α

ε

ε σ

ε ε ε

σ

α

ε

ε σ

ε ε δ

ε ε

A. Maletti MOL 2011 103

Page 104: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of MBOT

δ

ε σ

α

ε

ε σ

ε ε ε

σ

α

ε

ε σ

ε ε δ

ε ε

Example

Above dependencies are• input hierarchical• strictly output hierarchical

A. Maletti MOL 2011 104

Page 105: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of MBOT

δ

ε σ

α

ε

ε σ

ε ε ε

σ

α

ε

ε σ

ε ε δ

ε ε

Example

Above dependencies are• input hierarchical but not strictly• strictly output hierarchical

A. Maletti MOL 2011 105

Page 106: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Semantics of MBOT

δ

ε σ

α

ε

ε σ

ε ε ε

σ

α

ε

ε σ

ε ε δ

ε ε

v

w1 w2

v1

v2 w1 w2

A. Maletti MOL 2011 106

Page 107: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Main Result

TheoremThe dependencies computed by an MBOT are:• input hierarchical• strictly output hierarchical• bounded distance

A. Maletti MOL 2011 107

Page 108: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Link Structure for the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

TheoremAbove dependencies are compatible with an MBOT

A. Maletti MOL 2011 108

Page 109: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Link Structure for the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

TheoremAbove dependencies are compatible with an MBOT

A. Maletti MOL 2011 109

Page 110: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Link Structure for the Example

δ

t1 σ

t2 t3 σ

tn−4 tn−3 σ

tn−2 tn−1 tn

σ

t2 t1 σ

t4 t3 σ

tn−2 tn−3 δ

tn−1 tn

TheoremAbove dependencies are compatible with an MBOT

A. Maletti MOL 2011 110

Page 111: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Another MBOT

Example

(Q,Σ,∆, {f},R) with Q = {p(3),q(3), r (3), f (1)}Σ = {ε, α, β, γ} and ∆ = Σ ∪ {σ}

p f—

σ

p p p

α

pp—

α

pp p

β

qq— q

β

qq

γ

rr— r r

γ

r

q p— q q q r q— r r r ε r— ε ε ε

A. Maletti MOL 2011 111

Page 112: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Another MBOTα

...

α

β

...

β

γ

...

γ

ε

σ

α

...

α

ε

β

...

β

ε

γ

...

γ

ε

taken fromExample 4.5 of [RADMACHER: An automatatheoretic approach to the theory of rationaltree relations. TR AIB-2008-05, RWTHAachen, 2008]

{(α`(βm(γn(ε))), σ(α`(ε), βm(ε), γn(ε))) | `,m,n ∈ N}

A. Maletti MOL 2011 112

Page 113: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Another MBOTα

...

α

β

...

β

γ

...

γ

ε

σ

α

...

α

ε

β

...

β

ε

γ

...

γ

ε

TheoremThese inverse dependencies are notcompatible with any MBOT(because the displayed dependenciesare not strictly input hierarchical)

v1 w2

v2 w1

v1

v2 w1 w2

TheoremThis tree transformation cannot becomputed by any MBOT

A. Maletti MOL 2011 113

Page 114: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Another MBOTα

...

α

β

...

β

γ

...

γ

ε

σ

α

...

α

ε

β

...

β

ε

γ

...

γ

ε

7→

TheoremThese inverse dependencies are notcompatible with any MBOT(because the displayed dependenciesare not strictly input hierarchical)

v1 w2

v2 w1

v1

v2 w1 w2

TheoremThis tree transformation cannot becomputed by any MBOT

A. Maletti MOL 2011 114

Page 115: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Contents

1 Motivation

2 Extended top-down tree transducer

3 Extended multi bottom-up tree transducer

4 Synchronous tree-sequence substitution grammar

A. Maletti MOL 2011 115

Page 116: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Synchronous Tree-Sequence Substitution Grammar

Definition (STSSG)

tuple (Q,Σ,∆, I,R) with• Q: doubly ranked alphabet• Σ, ∆: input and output symbols• I ⊆ Q1,1: doubly unary initial states

• R ⊆ TΣ(Q)∗ ×Q × T∆(Q)∗: finite set of rules– rk(q) = (|~l |, |~r |) for every (~l ,q,~r) ∈ R

[ZHANG et al.: A tree sequence alignment-based tree-to-tree translation model.Proc. ACL, 2008]

A. Maletti MOL 2011 116

Page 117: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Synchronous Tree-Sequence Substitution Grammar

Definition (STSSG)

tuple (Q,Σ,∆, I,R) with• Q: doubly ranked alphabet• Σ, ∆: input and output symbols• I ⊆ Q1,1: doubly unary initial states• R ⊆ TΣ(Q)∗ ×Q × T∆(Q)∗: finite set of rules

– rk(q) = (|~l |, |~r |) for every (~l ,q,~r) ∈ R

[ZHANG et al.: A tree sequence alignment-based tree-to-tree translation model.Proc. ACL, 2008]

A. Maletti MOL 2011 117

Page 118: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Yet Another Linking Structure

Definitionrule~l q— ~r ∈ R, positions v1, . . . , vm,w1, . . . ,wn ∈ N∗with rk(q) = (m,n)

links~v ,~w (~l q— ~r)

=⋃

p∈Q

m⋃j=1

n⋃i=1

{(vjv ′j ,wiw ′i ) | v ′j ∈ posp(lj),w ′i ∈ posp(ri)}

where ~v = v1 · · · vm and ~w = w1 · · ·wn

A. Maletti MOL 2011 118

Page 119: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Derivation

Definition

〈ξ,D, ζ〉 ⇒ 〈ξ[~l]~v , D ∪ links~v ,~w (~l q— ~r), ζ[~r ]~w 〉

if• rule~l q— ~r ∈ R• ~v = v1 · · · vm ∈ posq(ξ)∗ and ~w = w1 · · ·wn ∈ posq(ζ)∗

• v1 @ · · · @ vm, w1 @ · · · @ wn, and rk(q) = (m,n)

• linked positions{w1, . . . ,wn} =

⋃mj=1{w | (vj ,w) ∈ D}

{v1, . . . , vm} =⋃n

i=1{v | (v ,wi) ∈ D}

A. Maletti MOL 2011 119

Page 120: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Final Theoremα

...

α

β

...

β

γ

...

γ

ε

σ

α

...

α

ε

β

...

β

ε

γ

...

γ

ε

7→

Example

This transformation can be computedby an STSSG(because it is an inverse MBOT)

TheoremDependencies computed by STSSG are• (input and output) hierarchical• bounded distance

A. Maletti MOL 2011 120

Page 121: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Final Theoremα

...

α

β

...

β

γ

...

γ

ε

σ

α

...

α

ε

β

...

β

ε

γ

...

γ

ε

Example

This transformation can be computedby an STSSG(because it is an inverse MBOT)

TheoremDependencies computed by STSSG are• (input and output) hierarchical• bounded distance

A. Maletti MOL 2011 121

Page 122: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Final Theoremα

...

α

β

...

β

γ

...

γ

ε

σ

α

...

α

ε

β

...

β

ε

γ

...

γ

ε

Example

This transformation can be computedby an STSSG(because it is an inverse MBOT)

TheoremDependencies computed by STSSG are• (input and output) hierarchical• bounded distance

A. Maletti MOL 2011 122

Page 123: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Final Instance

α

...

α

β

...

β

γ

...

γ

ε

γ

...

γ

β

...

β

α

...

α

ε

TheoremThese dependencies are notcompatible with any STSSG

v1 w2

v2 w1

v1 w ′1

v2 w1 w2

TheoremThis transformation cannot becomputed by any STSSG

A. Maletti MOL 2011 123

Page 124: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

A Final Instance

α

...

α

β

...

β

γ

...

γ

ε

γ

...

γ

β

...

β

α

...

α

ε

7→

TheoremThese dependencies are notcompatible with any STSSG

v1 w2

v2 w1

v1 w ′1

v2 w1 w2

TheoremThis transformation cannot becomputed by any STSSG

A. Maletti MOL 2011 124

Page 125: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Summary

Computed dependencies by device

input output

XTOP strictly hierarchical strictly hierarchical

MBOT hierarchical strictly hierarchicalSTSSG hierarchical hierarchical

STAG — —

A. Maletti MOL 2011 125

Page 126: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Summary

Computed dependencies by device

input output

XTOP strictly hierarchical strictly hierarchicalMBOT hierarchical strictly hierarchical

STSSG hierarchical hierarchicalSTAG — —

A. Maletti MOL 2011 126

Page 127: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Summary

Computed dependencies by device

input output

XTOP strictly hierarchical strictly hierarchicalMBOT hierarchical strictly hierarchical

STSSG hierarchical hierarchical

STAG — —

A. Maletti MOL 2011 127

Page 128: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

Summary

Computed dependencies by device

input output

XTOP strictly hierarchical strictly hierarchicalMBOT hierarchical strictly hierarchical

STSSG hierarchical hierarchicalSTAG — —

A. Maletti MOL 2011 128

Page 129: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

That’s all, folks!

Thank you for your attention!

A. Maletti MOL 2011 129

Page 130: Tree Transformations and Dependencies · 4 Synchronous tree-sequence substitution grammar A. Maletti MOL 2011 2. Warning! This won’t be a regular survey talk. Rather I want to show

References• ARNOLD, DAUCHET: Morphismes et bimorphismes d’arbres.

Theor. Comput. Sci. 20, 1982• ENGELFRIET, LILIN, MALETTI:

Extended multi bottom-up tree transducers.Acta Inf. 46, 2009

• MALETTI, GRAEHL, HOPKINS, KNIGHT:The power of extended top-down tree transducers.SIAM J. Comput. 39, 2009

• RADMACHER: An automata theoretic approach to rational treerelations.Proc. SOFSEM 2008

• RAOULT: Rational tree relations.Bull. Belg. Math. Soc. Simon Stevin 4, 1997

• ZHANG, JIANG, AW, LI, TAN, LI: A tree sequencealignment-based tree-to-tree translation model.Proc. ACL 2008

A. Maletti MOL 2011 130