Equivalence of Deterministic Tree-to-String Transducers Is Decidable Helmut Seidl, Sebastian Maneth, Gregor Kemper TU M¨ unchen, U. of Edinburgh Dagstuhl, April 4, 2017
Equivalence of Deterministic Tree-to-String Transducers and More Is Decidable Helmut Seidl, Sebastian Maneth, Gregor Kemper TU M¨ unchen, U. of Edinburgh Dagstuhl, April 4, 2017
Overview Part 1: The General Setting Part 2: Tree-to-Matrix Transducers Part 3: Polynomial Invariants
Overview Part 1: The General Setting Part 2: Tree-to-Matrix Transducers Part 3: Polynomial Invariants
Tree-to-String Translation Input frame content button content defs Do not press! height defs width 20 end 50
Tree-to-String Translation Output <frame height=20 width=50> <button>Do not press!</button> ... </frame>
Tree-to-String Translation Output <frame height=20 width=50> <button>Do not press!</button> ... </frame> Realized by: q ( frame ( x 1 , x 2 )) → <frame q 1 ( x 1 ) q ( x 2 ) </frame> q 1 ( end ) → > q 1 ( defs ( x 1 , x 2 )) → q ( x 1 ) q 1 ( x 2 ) q ( height ( x 1 )) → height = q ( x 1 ) . . .
Tree-to-String Translation Output <frame height=20 width=50> <button>Do not press!</button> ... </frame> Or realized by: q ′ ( frame ( x 1 , x 2 )) → 1 ( x 1 ) > q ′ ( x 2 ) </frame> <frame q ′ q ′ 1 ( end ) → ǫ q ′ 1 ( defs ( x 1 , x 2 )) → q ′ ( x 1 ) q ′ 1 ( x 2 ) q ′ ( height ( x 1 )) → height = q ′ ( x 1 ) . . .
Tree-to-String Translation These two translations are equivalent.
Tree-to-String Translation These two translations are equivalent. Unstructured output can be generated in surprisingly different ways ... q ( f ( x 1 , x 2 , x 3 )) → q ( x 3 ) a q 1 ( x 2 ) b q ( x 2 ) q 1 ( f ( x 1 , x 2 , x 3 )) → q 1 ( x 3 ) q 1 ( x 2 ) q 1 ( x 2 ) ba q 1 ( e ) → ba q ( e ) → ab
Tree-to-String Translation These two translations are equivalent. Unstructured output can be generated in surprisingly different ways ... q ( f ( x 1 , x 2 , x 3 )) → q ( x 3 ) a q 1 ( x 2 ) b q ( x 2 ) q 1 ( f ( x 1 , x 2 , x 3 )) → q 1 ( x 3 ) q 1 ( x 2 ) q 1 ( x 2 ) ba q 1 ( e ) → ba q ( e ) → ab versus q ′ ( f ( x 1 , x 2 , x 3 )) → ab q ′ ( x 2 ) q ′ ( x 2 ) q ′ ( x 3 ) q ′ ( e ) → ab
Related Work problem statement Engelfriet, 1980
Related Work (cont.) with monadic input Culik II, Karhum¨ aki, 1986 Ruohonen, 1986 Honkala, 2000
Related Work (cont.) with monadic input Culik II, Karhum¨ aki, 1986 Ruohonen, 1986 Honkala, 2000 MSO-definable Engelfriet, Maneth, 2006 sequential Staworko et al., 2009 linear Boiret, Palenta, 2016 polynomial program invariants Letichevsky, Lvov, 1993 M¨ uller-Olm, S., 2004
Related Work (cont.) with monadic input Culik II, Karhum¨ aki, 1986 Ruohonen, 1986 Honkala, 2000 MSO-definable Engelfriet, Maneth, 2006 sequential Staworko et al., 2009 linear Boiret, Palenta, 2016 polynomial program invariants Letichevsky, Lvov, 1993 M¨ uller-Olm, S., 2004
General Idea Obvious: In-equivalence can be verified by counter example
General Idea Obvious: In-equivalence can be verified by counter example Required: Complete proof system for equivalence
General Idea Obvious: In-equivalence can be verified by counter example Required: Complete proof system for equivalence Issues: • Practical method for proof search • Extension to outputs in the free group
Overview Part 1: The General Setting Part 2: Tree-to-Matrix Transducers Part 3: Polynomial Invariants
Simplification • A single transducer with states Q = { 1 , . . . , n } . • The transducer is total.
Simplification • A single transducer with states Q = { 1 , . . . , n } . • The transducer is total. • There is a topdown-deterministic automaton B with states p ∈ P dom ( p ) is the set of trees accepted at state p
Simplification • A single transducer with states Q = { 1 , . . . , n } . • The transducer is total. • There is a topdown-deterministic automaton B with states p ∈ P // generalization of algebraic data type dom ( p ) is the set of trees accepted at state p // trees of type p
Topdown Automaton p 0 frame content button content defs Do not press! height defs width 20 end 50
Topdown Automaton p 0 frame p 2 content button content p 1 defs Do not press! height defs width 20 end 50
Simplified Question For states q , q ′ of the transducer, p 0 ∈ P , does it hold that [ q ′ ] [ [ q ] ]( t ) = [ ]( t ) ( t ∈ dom ( p 0 ))
From Arbitrary Output to Matrices Unary Output q ( f ( x 1 , x 2 )) → aa q 1 ( x 1 ) a q 1 ( x 1 ) q 2 ( x 2 )
From Arbitrary Output to Matrices Unary Output q ( f ( x 1 , x 2 )) → aa q 1 ( x 1 ) a q 1 ( x 1 ) q 2 ( x 2 ) Succinct representation: Tree-to-int transducer q ( f ( x 1 , x 2 )) → 3 + 2 · q 1 ( x 1 ) + q 2 ( x 2 )
From Arbitrary Output to Matrices Unary Output q ( f ( x 1 , x 2 )) → aa q 1 ( x 1 ) a q 1 ( x 1 ) q 2 ( x 2 ) Succinct representation: Tree-to-int transducer q ( f ( x 1 , x 2 )) → 3 + 2 · q 1 ( x 1 ) + q 2 ( x 2 ) Arbitary Output � 3 � 3 1 � 2 � letters a , b = ˆ matrices , 0 1 0 1
From Arbitrary Output to Matrices Unary Output q ( f ( x 1 , x 2 )) → aa q 1 ( x 1 ) a q 1 ( x 1 ) q 2 ( x 2 ) Succinct representation: Tree-to-int transducer q ( f ( x 1 , x 2 )) → 3 + 2 · q 1 ( x 1 ) + q 2 ( x 2 ) Arbitary Output � 3 � 3 1 � 2 � letters a , b = ˆ matrices , 0 1 0 1 � 3 � 3 � 3 � � � 1 1 2 = ˆ string aab · · 0 1 0 1 0 1
From Arbitrary Output to Matrices Unary Output q ( f ( x 1 , x 2 )) → aa q 1 ( x 1 ) a q 1 ( x 1 ) q 2 ( x 2 ) Succinct representation: Tree-to-int transducer q ( f ( x 1 , x 2 )) → 3 + 2 · q 1 ( x 1 ) + q 2 ( x 2 ) Arbitary Output � 3 � 3 1 � 2 � letters a , b = ˆ matrices , 0 1 0 1 � 3 � 3 � 3 � � � 1 1 2 = ˆ string aab · · 0 1 0 1 0 1 � 27 � 22 = 0 1
From Arbitrary Output to Matrices Unary Output q ( f ( x 1 , x 2 )) → aa q 1 ( x 1 ) a q 1 ( x 1 ) q 2 ( x 2 ) Succinct representation: Tree-to-int transducer q ( f ( x 1 , x 2 )) → 3 + 2 · q 1 ( x 1 ) + q 2 ( x 2 ) Arbitary Output � 1 � 1 � � 0 1 letters a , b = ˆ matrices , 1 1 0 1 � 1 � 1 � 1 0 � 0 � 1 � string aab = ˆ · · 1 1 1 1 0 1
From Arbitrary Output to Matrices Unary Output q ( f ( x 1 , x 2 )) → aa q 1 ( x 1 ) a q 1 ( x 1 ) q 2 ( x 2 ) Succinct representation: Tree-to-int transducer q ( f ( x 1 , x 2 )) → 3 + 2 · q 1 ( x 1 ) + q 2 ( x 2 ) Arbitary Output � 1 � 1 � � 0 1 letters a , b = ˆ matrices , 1 1 0 1 � 1 � 1 � 1 0 � 0 � 1 � string aab = ˆ · · 1 1 1 1 0 1 � 1 � 1 = 2 3
From Arbitrary Output to Matrices Unary Output q ( f ( x 1 , x 2 )) → aa q 1 ( x 1 ) a q 1 ( x 1 ) q 2 ( x 2 ) Succinct representation: Tree-to-int transducer q ( f ( x 1 , x 2 )) → 3 + 2 · q 1 ( x 1 ) + q 2 ( x 2 ) Arbitary Output � 1 � 1 � � 0 2 letters a , b = ˆ matrices , 2 1 0 1 � 1 � 1 � 1 0 � 0 � 2 � string aab = ˆ · · 2 1 2 1 0 1 � 1 � 2 = 4 9
Fact Let � 1 � 1 � � 0 2 M a = M b = 2 1 0 1
Fact Let � 1 � 1 � � 0 2 M a = M b = 2 1 0 1 The matrix monoid generated by M a , M b is free.
Fact Let � 1 � 1 � � 0 2 M a = M b = 2 1 0 1 The matrix monoid generated by M a , M b is free. The matrix group generated by M a , M b is free
Fact Let � 1 � 1 � � 0 2 M a = M b = 2 1 0 1 The matrix monoid generated by M a , M b is free. The matrix group generated by M a , M b is free � 1 � 1 � � � � 0 1 0 0 · = 2 1 − 2 1 0 1
Fact Let � 1 � 1 � � 0 2 M a = M b = 2 1 0 1 The matrix monoid generated by M a , M b is free. The matrix group generated by M a , M b is free � 1 � 1 � � � � 0 1 0 0 · = 2 1 − 2 1 0 1 Sanov group = ⇒
Transformation Wanted Transformation of tree-to-string into tree-to-matrix ...
Transformation Wanted Transformation of tree-to-string into tree-to-matrix ... q ( f ( x 1 , x 2 )) → a q 1 ( x 1 ) b q 2 ( x 2 )
Transformation Wanted Transformation of tree-to-string into tree-to-matrix ... q ( f ( x 1 , x 2 )) → a q 1 ( x 1 ) b q 2 ( x 2 ) is simulated by: q ( f ( x 1 , x 2 )) → M a · q 1 ( x 1 ) · M b · q 2 ( x 2 )
Overview Part 1: The General Setting Part 2: Tree-to-Matrix Transducers Part 3: Polynomial Invariants
Tree-to-Matrix Transducers q 1 ( f ( x 1 , x 2 )) → b q 2 ( x 1 ) q 2 ( x 2 ) q 2 ( f ( x 1 , x 2 )) → q 2 ( x 1 ) q 2 ( x 1 ) q 3 ( f ( x 1 , x 2 )) → q 4 ( x 2 ) q 4 ( x 1 ) b q 4 ( f ( x 1 , x 2 )) → q 4 ( x 1 ) q 4 ( x 1 ) q 1 ( c ) → b q 2 ( c ) → ab q 3 ( c ) → b q 4 ( c ) → ba translates to
Recommend
More recommend