On transducers determinization Pierre-Alain Reynier Modelization and Verification team LIF, Aix-Marseille University & CNRS
Formal methods to improve software Software systems are complex and ubiquitous critical systems ‹ reliability widespread ‹ e ffi ciency, scalability ‹ need for formal methods Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 2 / 25
Formal methods to improve software Software systems are complex and ubiquitous critical systems ‹ reliability widespread ‹ e ffi ciency, scalability ‹ need for formal methods Automata-based approaches: model checking controller synthesis performance evaluation model optimization Objective: Improve our theoretical understanding of automata models Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 2 / 25
From Languages to Transductions Languages Transductions Input ! { 0 , 1 } Input ! Outputs automata transducers accept inputs transform inputs Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 3 / 25
From Languages to Transductions Languages Transductions Input ! { 0 , 1 } Input ! Outputs automata transducers accept inputs transform inputs Applications: Word-to-word transducers: I language and speech processing I model-checking infinite state-space systems I reactive systems I verification of web sanitizers Nested-word-to-word transducers: I XML transformations I model for recursive programs Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 3 / 25
Simplification of models General Problem Given a (complex) model of a transformation, does there exist an equivalent simpler model? ‹ Natural question: minimization of automata determinism reduce number of registers 2way: reduce number of passes . . . Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 4 / 25
Overview Introduction 1 Determinization of transducers 2 Register minimization 3 Multi-sequentiality 4 Conclusion 5
Overview Introduction 1 Determinization of transducers 2 Register minimization 3 Multi-sequentiality 4 Conclusion 5
Finite-state Transducers = associate output words with transitions of a finite state automaton Example (A transducer T ) a | a ` | ✏ a | ✏ b | ✏ Semantics J T K : f : ` w a 7! a # a ( w ) , with w 2 { a , b } ⇤ Non-determinism: semantics is a relation Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 5 / 25
Finite-state Transducers = associate output words with transitions of a finite state automaton Example (A transducer T ) a | a ` | ✏ a | ✏ b | ✏ Semantics J T K : f : ` w a 7! a # a ( w ) , with w 2 { a , b } ⇤ Non-determinism: semantics is a relation A transducer is: functional if it realizes a function deterministic if the underlying automaton is deterministic Classes: DFT, fNFT, NFT Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 5 / 25
Comparison of classes DFT= Deterministic Finite-state Transducers fNFT= Functional Finite-state Transducers NFT= Non-deterministic Finite-state Transducers Theorem DFT ( fNFT ( NFT Examples: See blackboard Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 6 / 25
Determinization of Finite-state Transducers Determinization Problem Input: a fNFT T Question: does there exist an equivalent DFT? Standard technique: subset construction starting from the set of initial states. output longest common prefix store the unproduced outputs in the state States of the form { ( p , a ) , ( q , " ) , ( s , bb ) } Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 7 / 25
An example � | a a | a � | a p 1 p 2 p 3 dom ( f ) = Σ 3 i f ( u ) = last ( u ) | u | q 1 q 2 q 3 � | b � | b b | b Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 8 / 25
An example � | a a | a � | a p 1 p 2 p 3 dom ( f ) = Σ 3 i f ( u ) = last ( u ) | u | q 1 q 2 q 3 � | b � | b b | b { ( p 3 , ε ) } a | aaa ⇢ ( p 1 , a ) ⇢ ( p 2 , aa ) � | " � | " � � { ( i , ε ) } ( q 1 , b ) ( q 2 , bb ) b | bbb { ( q 3 , ε ) } Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 8 / 25
An example � | a a | a � | a p 1 p 2 p 3 dom ( f ) = Σ 3 i f ( u ) = last ( u ) | u | q 1 q 2 q 3 � | b � | b b | b { ( p 3 , ε ) } a | aaa ⇢ ( p 1 , a ) ⇢ ( p 2 , aa ) � | " � | " � � { ( i , ε ) } ( q 1 , b ) ( q 2 , bb ) b | bbb { ( q 3 , ε ) } Goal: characterize termination of subset construction Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 8 / 25
Delay between words Definition (Longest common prefix) Given two words u , v 2 Σ ⇤ , lcp( u , v ) denotes the longest common prefix of u and v . Example: lcp( aaa , aab ) = aa Definition (Delay) Given two words u , v 2 Σ ⇤ , we define: delay( u , v ) = lcp( u , v ) � 1 . ( u , v ) Example: delay( aaa , aab ) = ( a , b ) Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 9 / 25
Twinning Property [Cho ff rut77] Consider some NFT T . u 2 | v 2 Definition (Twinning Property) u 1 | v 1 We say that T satisfies the twinning property i ff for all situations as u 2 | w 2 depicted on the right, we have: u 1 | w 1 delay( v 1 , w 1 ) = delay( v 1 v 2 , w 1 w 2 ) Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 10 / 25
Characterization of sequentiality Lemma If a fNFT satisfies the Twinning Property, then the delays computed by the subset construction are bounded. Corollary Twinning Property ( ) Termination of subset construction. Theorem ( [WK95] ) Twinning Property can be decided in PTime. Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 11 / 25
An example violating the Twinning Property � | a a | a p 1 i 1 dom ( f ) = Σ + f ( u ) = last ( u ) | u | � | b b | b p 2 i 2 After reading an input word u : longest common prefix of outputs = " subset construction ◆ { ( i 1 , a | u | ) , ( i 2 , b | u | ) } ‹ The subset construction does not terminate. The TP is violated: consider synchronised loops around i 1 and i 2 . Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 12 / 25
Overview Introduction 1 Determinization of transducers 2 Register minimization 3 Multi-sequentiality 4 Conclusion 5
Streaming String Transducers [Alur and Cerny, 2010] Definition Streaming String Transducers (SST for short) are defined as deterministic Finite-state automata extended with registers. Register updates allowed have the following form: X := u · Y · v X := YZ where X , Y , Z denote registers and u , v are words in Σ ⇤ . Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 13 / 25
Streaming String Transducers [Alur and Cerny, 2010] Definition Streaming String Transducers (SST for short) are defined as deterministic Finite-state automata extended with registers. Register updates allowed have the following form: X := u · Y · v X := YZ where X , Y , Z denote registers and u , v are words in Σ ⇤ . Examples: a , X := X . a ` a X b , X := X ` w a 7! a # a ( w ) Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 13 / 25
Streaming String Transducers [Alur and Cerny, 2010] Definition Streaming String Transducers (SST for short) are defined as deterministic Finite-state automata extended with registers. Register updates allowed have the following form: X := u · Y · v X := YZ where X , Y , Z denote registers and u , v are words in Σ ⇤ . Examples: ⇢ X a := X a . a a , X b := X b ` a X a X b ⇢ X a := X a ` w a 7! a # a ( w ) b # b ( w ) b , X b := X b . b Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 13 / 25
Another example of SST Consider the following SST: a, upd b, upd b, upd ⇢ X a := X a . a where upd: p a p b X b := X b . b a, upd X a X b Which function does it realize? Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 14 / 25
Another example of SST Consider the following SST: a, upd b, upd b, upd ⇢ X a := X a . a where upd: p a p b X b := X b . b a, upd X a X b Which function does it realize? Solution: dom ( f ) = Σ ⇤ f ( u ) = last ( u ) | u | Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 14 / 25
Examples of SST How to implement these transformations? mirror u = a 1 . . . a n 7! ˜ u = a n . . . a 1 Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 15 / 25
Examples of SST How to implement these transformations? mirror u = a 1 . . . a n 7! ˜ u = a n . . . a 1 copy u 7! uu Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 15 / 25
Examples of SST How to implement these transformations? mirror u = a 1 . . . a n 7! ˜ u = a n . . . a 1 copy u 7! uu mirror and copy u 7! ˜ uu Pierre-Alain Reynier (LIF, team MoVe) On transducers determinization Nov 23, 2017 15 / 25
Recommend
More recommend