tree automata with constraints
play

Tree Automata with Constraints and Tree Homomorphisms Carles Creus - PowerPoint PPT Presentation

Tree Automata with Constraints and Tree Homomorphisms Carles Creus L opez under the direction of Guillem Godoy Balil Departament de Cincies de la Computaci Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality


  1. Tree Automata with Constraints and Tree Homomorphisms Carles Creus L´ opez under the direction of Guillem Godoy Balil Departament de Ciències de la Computació

  2. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Outline Height and Equality Constraints 1 HOM in EXPTIME 2 Global Reflexive Disequality Constraints 3 Conclusions 4

  3. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Background: Terms Definition A term is a tree-like structure finite ranked ordered Example is a finite tree f f b a f a b

  4. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Background: Terms Definition A term is a tree-like structure finite ranked ordered Example arities are a :0 , b :0 , f :2 f f b a f a b

  5. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Background: Terms Definition A term is a tree-like structure finite ranked ordered Example � = f f f b b f a f a f a b b a

  6. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Background: Tree Automata Example A bottom-up tree automaton ( TA ) over Σ = { a :0 , b :0 , f :2 } is e.g.  a → q 1   b → q 0     f ( q 0 , q 0 ) → q 0  A : Final states: { q 0 } f ( q 0 , q 1 ) → q 1   f ( q 1 , q 0 ) → q 1     f ( q 1 , q 1 ) → q 0  → ∗ → → f q 0 f f f a q 1 f q 1 a q 1 f a f f a b q 0 a q 1 b a b a b a Recognized language L ( A ) = { t ∈ T (Σ) : | t | a is even } is regular

  7. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Background: Tree Automata Example A bottom-up tree automaton ( TA ) over Σ = { a :0 , b :0 , f :2 } is e.g.  a → q 1   b → q 0     f ( q 0 , q 0 ) → q 0  A : Final states: { q 0 } f ( q 0 , q 1 ) → q 1   f ( q 1 , q 0 ) → q 1     f ( q 1 , q 1 ) → q 0  → ∗ → → f q 0 f f f a q 1 f q 1 a q 1 f a f f a b q 0 a q 1 b a b a b a Recognized language L ( A ) = { t ∈ T (Σ) : | t | a is even } is regular

  8. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Background: Tree Automata Example A bottom-up tree automaton ( TA ) over Σ = { a :0 , b :0 , f :2 } is e.g.  a → q 1   b → q 0     f ( q 0 , q 0 ) → q 0  A : Final states: { q 0 } f ( q 0 , q 1 ) → q 1   f ( q 1 , q 0 ) → q 1     f ( q 1 , q 1 ) → q 0  → ∗ → → f q 0 f f f a q 1 f q 1 a q 1 f a f f a b q 0 a q 1 b a b a b a Recognized language L ( A ) = { t ∈ T (Σ) : | t | a is even } is regular

  9. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Background: Tree Automata Applications of TA : Circuit verification XML type representation Decidability of logics Solving equations Term rewriting . . .

  10. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Section 1 Height and Equality Constraints Carles Creus and Guillem Godoy, “ Tree automata with height constraints between brothers ,” in Rewriting Techniques and Applications , pp. 149–163, 2014.

  11. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Section 1 Height and Equality Constraints Carles Creus and Guillem Godoy, “ Tree automata with height constraints between brothers ,” in Rewriting Techniques and Applications , pp. 149–163, 2014.

  12. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Background: Local Constraints A local constraint c in a rule such as: c − − → q f q 0 q 1 . . . restricts the applicability of the rule: c must be satisfied. Definition ([BT92]) An AWCBB is an automaton with local constraints, where the constraints are arbitrary boolean combinations of atoms of the form i ≈ j or i �≈ j , where i , j ∈ N .

  13. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Background: Local Constraints Example An AWCBB over Σ = { a :0 , b :0 , f :2 } is e.g. a true  − − → q   b true A : Final states: { q } − − → q f ( q , q ) 1 ≈ 2  − − → q  → ∗ → f f f f b b q f q b q f a a a q a q a a The recognized language L ( A ) is the set of complete trees where all leaves are identical; non-regular

  14. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Background: Local Constraints Example An AWCBB over Σ = { a :0 , b :0 , f :2 } is e.g. a true  − − → q   b true A : Final states: { q } − − → q f ( q , q ) 1 ≈ 2  − − → q  → ∗ → f f f f b b q f q b q f a a a q a q a a The recognized language L ( A ) is the set of complete trees where all leaves are identical; non-regular

  15. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Background: Local Constraints Example An AWCBB over Σ = { a :0 , b :0 , f :2 } is e.g. a true  − − → q   b true A : Final states: { q } − − → q f ( q , q ) 1 ≈ 2  − − → q  → ∗ → f f f f b b q f q b q f a a a q a q a a The recognized language L ( A ) is the set of complete trees where all leaves are identical; non-regular

  16. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Height and Equality Constraints Definition A height and equality constraint is an arbitrary boolean combination of atoms of the forms: i ≈ j i �≈ j h ( i ) = h ( j ) + x h ( i ) < h ( j ) + x where i , j ∈ N and x ∈ Z . A TACBB He is a TA with the previous kind of local constraints.

  17. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Height and Equality Constraints Example Balanced tree (AVL) with f labelling the binary nodes: h (1) = h (2)+0 ∨ h (1) = h (2)+1 ∨ h (1) = h (2) − 1 − − − − − − − − − − → q f q q The constraint guarantees that the heights of the children of f differ by at most 1.

  18. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Height and Equality Constraints Goal To decide emptiness and finiteness for TACBB He .

  19. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Approach 1. Find a normal form of the automaton. 2. Prove bound for the height of the minimal recognized term.

  20. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Approach: Simplified Setting Simple height constraints Arbitrary boolean combinations of atoms of the form h ( i ) = h ( j ) + 0 h ( i ) < h ( j ) + 0 A TACBB h is a TA with the previous kind of local constraints.

  21. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Approach for TACBB h : 1. Normal Form Observation: a constraint need not be very precise, e.g., the height of two children may be unrelated. Nicer: each constraint only allows one permutation of the children (with respect to their heights).

  22. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Approach for TACBB h : 1. Normal Form Example Consider the symbol g with arity 4 and the rule h (1) < h (2)+0 ∧ h (1) < h (3)+0 ∧ h (2) = h (4)+0 g ( . . . ) − − − − − − − − − − → q The possible orderings for the children are: { 1 } < { 2 , 4 } < { 3 } { 1 } < { 3 } < { 2 , 4 } { 1 } < { 2 , 3 , 4 }

  23. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Approach for TACBB h : 1. Normal Form Definition Given arity m , a normalized constraint is an expression of the form: S 1 < S 2 < . . . < S n where { S 1 , S 2 , . . . , S n } is a partition of { 1 , . . . , m } . Each rule might generate up to 2 maxar 2 normalized rules.

  24. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Approach for TACBB h : 1. Normal Form Example The normalization of the rule h (1) < h (2)+0 ∧ h (1) < h (3)+0 ∧ h (2) = h (4)+0 g ( . . . ) − − − − − − − − − − → q produces these three rules: { 1 } < { 2 , 4 } < { 3 } g ( . . . ) − − − − − − − − − − → q { 1 } < { 3 } < { 2 , 4 } g ( . . . ) − − − − − − − − − − → q { 1 } < { 2 , 3 , 4 } g ( . . . ) − − − − − − − − − − → q

  25. Height and Equality Constraints HOM in EXPTIME Global Reflexive Disequality Constraints Conclusions Approach for TACBB h : 2. Bound on height Definition ExistTerm ( h , q ) = there exists a term of height h reaching q . Idea of the algorithm: Compute ExistTerm iteratively for increasing values of h . Question: Can each iteration be done efficiently? Yes, the results obtained for smaller h ’s ease the computation.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend