reasoning about data repetitions with counter systems
play

Reasoning about data repetitions with counter systems S. Demri - PowerPoint PPT Presentation

Reasoning about data repetitions with counter systems S. Demri Joint work with D. Figueira and M. Praveen Workshop LIA INFINIS, IRIF, Nov. 2016 Logics for Data Words A fundamental model: data words Timed words [Alur & Dill, TCS 94] a


  1. Reasoning about data repetitions with counter systems S. Demri Joint work with D. Figueira and M. Praveen Workshop LIA INFINIS, IRIF, Nov. 2016

  2. Logics for Data Words

  3. A fundamental model: data words ◮ Timed words [Alur & Dill, TCS 94] a b c a a b 0 0 . 3 1 2 . 3 3 . 5 3 . 51 ◮ Runs from counter machines q 0 q 2 q 3 q 2 q 3 q 2 0 0 1 2 3 4 ◮ Integer arrays [Habermehl & Iosif & Vojnar, FOSSACS’08] t [ 0 ] t [ 1 ] t [ 2 ] t [ 3 ] t [ 4 ] t [ 5 ] . . . ◮ Abstract data words [Bouyer & Petit & Th´ erien, IC 03] ◮ Extension to trees, e.g. data trees for XML documents [Boja´ nczyk et al., PODS’06; Jurdzi´ nski & Lazi´ c, LICS’07]

  4. Specifying classes of data words ◮ Automata ◮ Register automata [Kaminski & Francez, TCS 94] ◮ Data automata [Bouyer & Petit & Th´ erien, IC 03] ◮ EES automata [Choffrut & Grigorieff, TCS 09] ◮ See the survey [Segoufin, CSL ’06] ◮ First-order languages [Boja´ nczyk et al., LICS’06] ◮ Temporal logics ◮ Temporal logic with λ -abstraction [Lisitsa & Potapov, TIME’05] ◮ Freeze LTL [Demri & Lazi´ c & Nowak, IC 07] ◮ BD-LTL [Kara & Schwentick & Zeume, FSTTCS’10] ◮ Many other formalisms ◮ Rewriting systems with data [Bouajjani et al., FCT’07] ◮ Hybrid logics [Areces & Blackburn & Marx, JSL 01] ◮ Memory logics [Areces et al., TABLEAUX’09; Mera, PhD thesis 2009] ◮ . . .

  5. A mechanism for handling data ◮ A register can store a data value and equality tests are performed between registers and current data values. ◮ Storing the value of x in a register: ↓ r φ ≈ ∃ y r ( y r = x ) ∧ φ ◮ Equality test between a register and a value: ↑ r ≈ y r = x . c a a c a b b b d | = ↓ r F ( a ∧ ↑ r ∧ XF ↑ r ) 4 2 7 5 7 5 4 2 4 ◮ Generalisation with memory logics, e.g. memory bags have operations “register”, “forget” and “erase”. [Mera, PhD thesis 09]

  6. Ubiquity of the freeze operator ◮ Freeze quantifier in hybrid logics. [Goranko 94; Blackburn & Seligman, JOLLI 95] ◮ Temporal semantics of imperative programs. [Manna & Pnueli, 1992] Program variable x never decreases below its initial value: ∃ y ( x = y ) ∧ G ( x ≥ y ) ◮ Freeze quantifier in real-time logics. [Alur & Henzinger, JACM 94] y · φ ( y ) binds the variable y to the current time t . ◮ Predicate λ -abstraction. [Fitting, JLC 02] � y · F P ( y ) � ( c ) : current value of constant c satisfies the predicate P .

  7. Freeze LTL: LTL ↓ ◮ LTL ↓ formulae: φ ::= a | ↑ r | ¬ φ | φ ∧ φ | φ ∨ φ | φ U φ | X φ | ↓ r φ where a ∈ Σ and r ∈ N + . ◮ Register valuation f : finite partial map from N + to N . ◮ Models: finite or infinite data words over the alphabet Σ . ◮ Satisfaction relation: def dw , i | = f ↑ r ⇔ r ∈ dom ( f ) and f ( r ) = d i def dw , i | = f ↓ r φ ⇔ dw , i | = f [ r �→ d i ] φ ( d i : data value at position i )

  8. Complexity of satisfiability problems ◮ Finitary and infinitary satisfiability problem for LTL are PSPACE -complete. [Sistla & Clarke, JACM 85] ◮ Infinitary satisfiability problem for LTL ↓ restricted to X and F and to a single register is undecidable. ◮ Finitary satisfiability problem for LTL ↓ restricted to a single register is decidable but nonprimitive recursive. [Demri & Lazi´ c, TOCL 09] (nonprimitive recursiveness uses [Schnoebelen, IPL 02] ) ◮ Finitary satisfiability problem for LTL ↓ restricted to F and ◮ to a single register is nonprimitive recursive too. ◮ to two registers is undecidable. [Figueira & Segoufin, MFCS’09]

  9. A Logic for Repeating Values

  10. Models & basic constraints ◮ σ : [ 0 , ℓ − 1 ] → ( VAR → N ) , ℓ ≥ 1: 9 0 4 8 4 4 4 2 1 x y 7 9 7 5 7 5 4 2 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . z 8 4 2 4 8 4 2 4 4 ◮ Local constraints: ¬ ( x ≈ X 2 y ) x ≈ X y ¬ ( z ≈ X z ) 1 X 2 ↑ y 1 X ↑ y ↓ x ¬ ↓ x ¬ ↓ z 1 X ↑ z 1 1 1 ◮ Global (repeating) constraints: x ≈ �⊤ ? � y y ≈ � φ ? � y 1 XF ( ⊤∧ ↑ y ↓ y 1 XF ( φ ∧ ↑ y ↓ x 1 ) 1 ) ◮ + standard LTL operators.

  11. Syntax & semantics φ ::= x ≈ X i y | x ≈ � φ ? � y | x �≈ � φ ? � y | φ ∧ φ | ¬ φ | X φ | φ U φ | X − 1 φ | φ S φ = x ≈ X j y σ, i | i + j < | σ | and σ ( i )( x ) = σ ( i + j )( y ) iff σ, i | = x ≈ � φ ? � y iff there exists j such that i < j < | σ | , σ ( i )( x ) = σ ( j )( y ) and σ, j | = φ σ, i | = x �≈ � φ ? � y iff there exists j such that i < j < | σ | , σ ( i )( x ) � = σ ( j )( y ) and σ, j | = φ σ, i | = X φ iff i + 1 < | σ | and σ, i + 1 | = φ = φ ′ and = φ S φ ′ σ, i | iff there is 0 ≤ j ≤ i such that σ, j | for every j < l ≤ i we have σ, l | = φ .

  12. Related work ◮ Decidability of SAT( LRV ⊤ ) by translation into the reachability problem for VASS. [Demri & D’Souza & Gascon, JLC 09] ◮ Satisfiability for FO2 “equivalent” to the reachability problem for VASS. [Boja´ nczyk et al., LICS’06] ◮ Satisfiability of basic data LTL “equivalent” to the reachability problem for VASS. [Kara & Schwentick & Zeume, FST&TCS’10] ◮ Basic data LTL BD-LTL + extends LRV and in 2 EXPSPACE . [Decker et al., CONCUR’14]

  13. Repeating Values and Counting

  14. Restricting test formulae to ⊤ ◮ There is a polynomial-time reduction from SAT( LRV ) into SAT( LRV ≈ ) . ◮ Introduction of variables to eliminate the subformulae of the form x �≈ � ψ ? � y and ¬ ( x �≈ � ψ ? � y ) . ◮ There is a polynomial-time reduction from SAT( LRV ≈ ) to SAT( LRV ⊤ ) .

  15. From satisfiability to reachability ◮ Vector addition systems with states (VASS). c 1 −− c 2 ++ c 1 −− c 2 ++ c 3 ++ ◮ Reachability problem: � q 0 , 0 � ∗ → � q f , 0 � ? − Control state reachability: � q 0 , 0 � ∗ − → � q f , x � for some x ? ◮ φ ∈ LRV ⊤ is satisfiable iff � q 0 , 0 � ∗ − → � q f , 0 � in A φ . ◮ x ≈ �⊤ ? � y ∧ x ≈ �⊤ ? � z ∧ ¬ ( x ≈ X y ) ∧ ¬ ( x ≈ X z ) creates an obligation for the current value of x to appear on y and on z . ◮ Increment the counter { y , z } . ◮ Decrement the counter { y , z } when the obligation is satisfied, even partially.

  16. From reachability to control state reachability ◮ φ ∈ LRV ⊤ is satisfiable iff � q 0 , 0 � ∗ − → � q f , 0 � in A φ . (bookkeepping of obligations) ◮ � q 0 , 0 � ∗ → � q f , 0 � in A φ iff � q 0 , 0 � ∗ − − → gainy � q f , 0 � in A inc . (structural properties of A φ , A inc slight variant of A φ ) ◮ � q 0 , 0 � ∗ → gainy � q f , 0 � in A inc iff � q f , 0 � ∗ − − → lossy � q 0 , 0 � in A dec = reverse of A inc . –by the reverse construction. ◮ � q f , 0 � ∗ → lossy � q 0 , 0 � in A dec � q f , 0 � ∗ − − → � q 0 , x � in A dec for some x . –losses can be moved to the end. ◮ 2 EXPSPACE : control state reachability for VASS is in EXPSPACE and |A dec | ∈ O ( 2 p ( | φ | ) ) – use of [Rackoff, TCS 78] .

  17. Counter systems with chained counters ◮ VASS ≈ FSA with n counters, no zero-tests but increments and decrements. ◮ Chain system ≈ FSA with n chains of counters of exponential length and access to counters via pointers. c 0 c 1 · · · c i − 1 c i c i + 1 · · · c 2 N − 1 ↑ ◮ Updates and guards on transitions ( α ∈ [ 1 , n ] ): { inc ( α ) , dec ( α ) , next ( α ) , prev ( α ) , first ( α )? , first ( α )? , last ( α )? , last ( α )? } ◮ Control-state reachability problem for chain systems is in 2 EXPSPACE . ( EXPSPACE -complete for VASS) ◮ Chain system ≈ VASS with a succinct representation of an exponential number of counters.

  18. 2 EXPSPACE lower bound ◮ EXPSPACE -hardness of the control state reachability problem for VASS. [Lipton, TR 76] ◮ Reduction from the halting problem for counter automata with counters bounded doubly exponentially. ◮ CA has zero-tests, VASS has no such tests. ◮ Each counter c in CA is simulated by c , c with the invariant c + c = 2 2 NK ◮ O ( N K ) auxiliary counters (2 2 i + 1 = 2 2 i × 2 2 i ). ◮ 2 EXPSPACE -hardness for chain systems by adapting Lipton’s proof. ◮ O ( N K ) chains (instead of O ( 2 N K ) counters with VASS). ◮ To factorize the encoding for all counters by just moving pointers.

  19. SAT( LRV ) is 2 EXPSPACE -hard (ideas) ◮ Chain system A with n chains of size 2 N . ◮ We build a formula over the alphabet of transitions. (model = accepting run) ◮ Standard counter-blind conditions easily expressible. ◮ Variables x and x α inc , x α dec , x α i for every chain α and for every i ∈ [ 1 , N ] . ◮ The values for x and for the x α i ’s determine a counter c in [ 0 , 2 N − 1 ] .

  20. ◮ Any two positions have different values of x α inc . ◮ For each position operating on c containing an instruction ‘ first ( α )? ’ , we have c = 0. ◮ For each position operating on c , if it contains an instruction ‘ next ( α ) ’ , then the next position operates on c + 1.

  21. Extensions

Recommend


More recommend