unranked tree automata with sibling equalities and
play

Unranked Tree Automata with Sibling Equalities and Disequalities - PowerPoint PPT Presentation

Unranked Tree Automata with Sibling Equalities and Disequalities Wong Karianto Christof Lding Lehrstuhl fr Informatik 7 RWTH Aachen ICALP 2007 Wrocaw, 913 July 2007 Motivations(1): Tree Automata with Subtree Equalities Finite


  1. Unranked Tree Automata with Sibling Equalities and Disequalities Wong Karianto Christof Löding Lehrstuhl für Informatik 7 RWTH Aachen ICALP 2007 Wrocław, 9–13 July 2007

  2. Motivations(1): Tree Automata with Subtree Equalities Finite (bottom-up) tree automata: ▸ ranked alphabet: each symbol has fixed rank/arity ▸ nice closure properties, determinizable ▸ decidable emptiness Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 2/15

  3. Motivations(1): Tree Automata with Subtree Equalities Finite (bottom-up) tree automata: ▸ ranked alphabet: each symbol has fixed rank/arity ▸ nice closure properties, determinizable ▸ decidable emptiness f But language of trees t is not recognizable t Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 2/15

  4. Motivations(1): Tree Automata with Subtree Equalities Finite (bottom-up) tree automata: q ▸ ranked alphabet: each symbol has fixed rank/arity a ▸ nice closure properties, determinizable q 1 q 2 b b ▸ decidable emptiness t 1 t 2 a a f c c c c But language of trees t is not recognizable t ↝ tree automata with sibling equality constraints ( q 1 , q 2 , t 1 = t 2 , a , q ) ( Rec ≠ [Bogaert&Tison’92]) ▸ transitions: ( q 1 , . . . , q k , α , a , q ) ▸ α : Boolean combination of t i = t j , t i ≠ t j with i , j ∈ { 1, . . . , k } Example: “ t 1 = t 2 ” means “left and right subtree are equal” ▸ closed under Boolean operations, determinizable ▸ decidable emptiness Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 2/15

  5. Motivations(1): Tree Automata with Subtree Equalities Finite (bottom-up) tree automata: q ▸ ranked alphabet: each symbol has fixed rank/arity a ▸ nice closure properties, determinizable q 1 q 2 b b ▸ decidable emptiness t 1 t 2 a a f c c c c But language of trees t is not recognizable t ↝ tree automata with sibling equality constraints ( q 1 , q 2 , t 1 = t 2 , a , q ) ( Rec ≠ [Bogaert&Tison’92]) ▸ transitions: ( q 1 , . . . , q k , α , a , q ) ▸ α : Boolean combination of t i = t j , t i ≠ t j with i , j ∈ { 1, . . . , k } Example: “ t 1 = t 2 ” means “left and right subtree are equal” ▸ closed under Boolean operations, determinizable ▸ decidable emptiness In this talk: extend the class Rec ≠ to unranked trees Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 2/15

  6. Motivations(2): Unranked Trees Unranked trees: q ▸ Formal model for XML documents a ▸ Symbols have no fixed arities . . . q 1 q k ∈ L ▸ Number of successors of a node is unbounded ▸ Finite unranked tree automata: transitions ( L , a , q ) t k with L regular language over the state set t 1 Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 3/15

  7. Motivations(2): Unranked Trees Unranked trees: q ▸ Formal model for XML documents a ▸ Symbols have no fixed arities . . . q 1 q k ∈ L ▸ Number of successors of a node is unbounded ▸ Finite unranked tree automata: transitions ( L , a , q ) t k with L regular language over the state set t 1 Subtree equality in unranked trees: ▸ Subtrees as data encoding (e.g. of natural numbers) For instance, data words (e.g. [Bojańczyk et al.’06]) can be coded as trees: label from finite domain ● a k a 1 ( a 1 , i 1 ) . . . ( a k , i k ) . . . t 1 t k data from infinite domain Automata on data words: test equality between data ↝ data equalities ≈ subtree equalities Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 3/15

  8. Outline Unranked Tree Automata with Sibling (Dis)Equalities Decidability of Emptiness: the Deterministic Case Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 4/15

  9. Outline Unranked Tree Automata with Sibling (Dis)Equalities Decidability of Emptiness: the Deterministic Case Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 5/15

  10. Constraints among Unboundedly Many Siblings Transition ( L , α , a , q ) with L ⊆ Q ∗ regular ▸ Number of successors of a node is finite, but unbounded ▸ Constraint α has to consider all possible number of successors. ▸ Use of regular L ⊆ Q ∗ allows finite representation despite unbounded length. Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 6/15

  11. Constraints among Unboundedly Many Siblings Transition ( L , α , a , q ) with L ⊆ Q ∗ regular ▸ Number of successors of a node is finite, but unbounded ▸ Constraint α has to consider all possible number of successors. ▸ Use of regular L ⊆ Q ∗ allows finite representation despite unbounded length. Example constraint: a . . . q 1 q 2 q k − 1 q k Say “first and last subtrees are equal, but different from the others” ▸ for fixed number of successors k : “ t 1 = t k ∧ ⋀ t 1 ≠ t i ” 1 < i < k ▸ k is unbounded in unranked case ↝ we need a formalism to define unbounded number of constraints while still allowing finite representation Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 6/15

  12. Constraints among Unboundedly Many Siblings Transition ( L , α , a , q ) with L ⊆ Q ∗ regular ▸ Number of successors of a node is finite, but unbounded ▸ Constraint α has to consider all possible number of successors. ▸ Use of regular L ⊆ Q ∗ allows finite representation despite unbounded length. Example constraint: a . . . q 1 q 2 q k − 1 q k Say “first and last subtrees are equal, but different from the others” ▸ for fixed number of successors k : “ t 1 = t k ∧ ⋀ t 1 ≠ t i ” 1 < i < k ▸ k is unbounded in unranked case ↝ we need a formalism to define unbounded number of constraints while still allowing finite representation Proposal: use logic formulas over Q -sequences Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 6/15

  13. Using Logics over Q -Sequences First-order (FO) / monadic second-order (MSO) logic over Q -sequences: ▸ interpreted in word structures w = q 1 . . . q k ∈ Q + ▸ FO-variables x , y , z , . . . over positions in { 1, . . . , k } ▸ MSO-variables X , Y , Z , . . . over subsets of { 1, . . . , k } ▸ φ ∶∶ = x < y ∣ x = y ∣ X ( x ) ∣ q ( x ) ∣ ψ ∨ θ ∣ ¬ ψ ∣ ∃ x . ψ ∣ ∃ X . ψ ▸ write w ⊧ φ for “ w satisfies φ ” label q at position x Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 7/15

  14. Using Logics over Q -Sequences First-order (FO) / monadic second-order (MSO) logic over Q -sequences: ▸ interpreted in word structures w = q 1 . . . q k ∈ Q + ▸ FO-variables x , y , z , . . . over positions in { 1, . . . , k } ▸ MSO-variables X , Y , Z , . . . over subsets of { 1, . . . , k } ▸ φ ∶∶ = x < y ∣ x = y ∣ X ( x ) ∣ q ( x ) ∣ ψ ∨ θ ∣ ¬ ψ ∣ ∃ x . ψ ∣ ∃ X . ψ ▸ write w ⊧ φ for “ w satisfies φ ” label q at position x Saying “first and last subtrees are equal, but different from the others” with logic formulas: ▸ intuitively: extend the vocabulary by subtree equality and say ∃ x ∃ y ( x = min ∧ y = max ∧ t x = t y ∧ ∀ z ( z ≠ x ∧ z ≠ y → t z ≠ t x ) ) Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 7/15

  15. Using Logics over Q -Sequences First-order (FO) / monadic second-order (MSO) logic over Q -sequences: ▸ interpreted in word structures w = q 1 . . . q k ∈ Q + ▸ FO-variables x , y , z , . . . over positions in { 1, . . . , k } ▸ MSO-variables X , Y , Z , . . . over subsets of { 1, . . . , k } ▸ φ ∶∶ = x < y ∣ x = y ∣ X ( x ) ∣ q ( x ) ∣ ψ ∨ θ ∣ ¬ ψ ∣ ∃ x . ψ ∣ ∃ X . ψ ▸ write w ⊧ φ for “ w satisfies φ ” label q at position x Saying “first and last subtrees are equal, but different from the others” with logic formulas: ▸ intuitively: extend the vocabulary by subtree equality and say ∃ x ∃ y ( x = min ∧ y = max ∧ t x = t y ∧ ∀ z ( z ≠ x ∧ z ≠ y → t z ≠ t x ) ) ▸ But this could lead to an automaton with undecidable emptiness since using trees we can encode data words, and satisfiability of FO logic over data words is undecidable [Bojańczyk et al.’06]. Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 7/15

  16. Constraints among Unboundedly Many Siblings – cont’d Idea: separate addressing and subtree comparison ↝ use formula only to address pairs of positions to be compared φ ( x , y ) : MSO-formula with two ( φ ( x , y ) , type ) Atomic constraint: free variables Constraint types: ∃ EQ , ∀ EQ , ∃ NEQ , ∀ NEQ Wong Karianto | RWTH Aachen Unranked Tree Automata with Sibling Equalities & Disequalities | 8/15

Recommend


More recommend