Tree Transformations and Dependencies
Andreas Maletti
Institute for Natural Language ProcessingUniversity of Stuttgart
Nara — September 6, 2011
A. Maletti MOL 2011 1
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
Warning!
This won’t be a regular survey talk.
Rather I want to show a useful technique.
A. Maletti MOL 2011 3
Warning!
This won’t be a regular survey talk.
Rather I want to show a useful technique.
A. Maletti MOL 2011 4
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
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
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
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
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
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
Tree Transducer
QuestionHow do you show that a tree transformation cannot be computedby a class of tree transducers?
A. Maletti MOL 2011 11
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Derivation
Rules
σ
p q ??—
δ
p δ
q ?
σ
p q r?—
δ
p δ
q r
δ
p ?
?—
δ
p ?
α
xx—
α
xε x— ε
? ?
A. Maletti MOL 2011 31
Derivation
Rules
σ
p q ??—
δ
p δ
q ?
σ
p q r?—
δ
p δ
q r
δ
p ?
?—
δ
p ?
α
xx—
α
xε x— ε
? ?
δ
p ?
δ
p ?
A. Maletti MOL 2011 32
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Dependencies
δ
ε σ
α
ε
ε σ
ε ε ε
δ
ε δ
α
ε
δ
ε δ
ε δ
ε ε
Example
This linking structure is strictly (input and output) hierarchical
A. Maletti MOL 2011 51
Dependencies
δ
ε σ
α
ε
ε σ
ε ε ε
δ
ε δ
α
ε
δ
ε δ
ε δ
ε ε
v1 w2
v2 w1
v1 w ′1
v2 w1 w2
A. Maletti MOL 2011 52
Dependencies
δ
ε σ
α
ε
ε σ
ε ε ε
δ
ε δ
α
ε
δ
ε δ
ε δ
ε ε
v1 w2
v2 w1
v1 w ′1
v2 w1 w2
A. Maletti MOL 2011 53
Dependencies
δ
ε σ
α
ε
ε σ
ε ε ε
δ
ε δ
α
ε
δ
ε δ
ε δ
ε ε
v1 w2
v2 w1
v1
v2 w1 w2
A. Maletti MOL 2011 54
Dependencies
δ
ε σ
α
ε
ε σ
ε ε ε
δ
ε δ
α
ε
δ
ε δ
ε δ
ε ε
v
w1 w2
v1
v2 w1 w2
A. Maletti MOL 2011 55
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
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
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
Bounded Distance
δ
ε σ
α
ε
ε σ
ε ε ε
δ
ε δ
α
ε
δ
ε δ
ε δ
ε ε
Example
• input side: bounded by 1• output side: bounded by 2
A. Maletti MOL 2011 59
Main Result
TheoremThe dependencies computed by an XTOP are:• strictly (input and output) hierarchical• bounded distance
A. Maletti MOL 2011 60
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
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
Compatibility
Illustration
Some computation
δ
ε σ
α
ε
ε σ
ε ε ε
δ
ε δ
α
ε
δ
ε δ
ε δ
ε ε
A. Maletti MOL 2011 63
Compatibility
Illustration
Implemented computation
δ
ε σ
α
ε
ε σ
ε ε ε
δ
ε δ
α
ε
δ
ε δ
ε δ
ε ε
A. Maletti MOL 2011 64
Compatibility
Illustration
Compatible computation
δ
ε σ
α
ε
ε σ
ε ε ε
δ
ε δ
α
ε
δ
ε δ
ε δ
ε ε
A. Maletti MOL 2011 65
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
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
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
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
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
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
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
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
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
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
A Second Instanceσ
γ
...
γ
σ
t1 t2
t3
7→δ
t1 t2 t3
A. Maletti MOL 2011 76
A Second Instanceσ
γ
...
γ
σ
t1 t2
t3
7→δ
t1 t2 t3
A. Maletti MOL 2011 77
A Second Instanceσ
γ
...
γ
σ
t1 t2
t3
7→δ
t1 t2 t3
use boundedness
A. Maletti MOL 2011 78
A Second Instanceσ
γ
...
γ
σ
t1 t2
t3
7→δ
t1 t2 t3
use boundedness
A. Maletti MOL 2011 79
A Second Instanceσ
γ
...
γ
σ
t1 t2
t3
7→δ
t1 t2 t3
v1 w2
v2 w1
v1
v2 w1 w2
A. Maletti MOL 2011 80
A Second Instanceσ
γ
...
γ
σ
t1 t2
t3
7→δ
t1 t2 t3
TheoremThe dependencies above are incompatible with any XTOP
A. Maletti MOL 2011 81
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
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
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
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
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
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
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
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
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
Derivation
Rulesδ
p ?f—
σ
? p ?
α
xx—
α
xε x— ε
σ
p q ??— p
σ
? q ?
σ
p q r?— p
δ
q r
? ?
A. Maletti MOL 2011 91
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
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
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
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
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
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
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
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
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
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
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
Semantics of MBOT
δ
ε σ
α
ε
ε σ
ε ε ε
σ
α
ε
ε σ
ε ε δ
ε ε
A. Maletti MOL 2011 103
Semantics of MBOT
δ
ε σ
α
ε
ε σ
ε ε ε
σ
α
ε
ε σ
ε ε δ
ε ε
Example
Above dependencies are• input hierarchical• strictly output hierarchical
A. Maletti MOL 2011 104
Semantics of MBOT
δ
ε σ
α
ε
ε σ
ε ε ε
σ
α
ε
ε σ
ε ε δ
ε ε
Example
Above dependencies are• input hierarchical but not strictly• strictly output hierarchical
A. Maletti MOL 2011 105
Semantics of MBOT
δ
ε σ
α
ε
ε σ
ε ε ε
σ
α
ε
ε σ
ε ε δ
ε ε
v
w1 w2
v1
v2 w1 w2
A. Maletti MOL 2011 106
Main Result
TheoremThe dependencies computed by an MBOT are:• input hierarchical• strictly output hierarchical• bounded distance
A. Maletti MOL 2011 107
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
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
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
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
β
γ
rr— r r
γ
r
q p— q q q r q— r r r ε r— ε ε ε
A. Maletti MOL 2011 111
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
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
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
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
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
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
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
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
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
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
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
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
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
Summary
Computed dependencies by device
input output
XTOP strictly hierarchical strictly hierarchical
MBOT hierarchical strictly hierarchicalSTSSG hierarchical hierarchical
STAG — —
A. Maletti MOL 2011 125
Summary
Computed dependencies by device
input output
XTOP strictly hierarchical strictly hierarchicalMBOT hierarchical strictly hierarchical
STSSG hierarchical hierarchicalSTAG — —
A. Maletti MOL 2011 126
Summary
Computed dependencies by device
input output
XTOP strictly hierarchical strictly hierarchicalMBOT hierarchical strictly hierarchical
STSSG hierarchical hierarchical
STAG — —
A. Maletti MOL 2011 127
Summary
Computed dependencies by device
input output
XTOP strictly hierarchical strictly hierarchicalMBOT hierarchical strictly hierarchical
STSSG hierarchical hierarchicalSTAG — —
A. Maletti MOL 2011 128
That’s all, folks!
Thank you for your attention!
A. Maletti MOL 2011 129
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
Top Related