counter systems the quest for pushing the decidability
play

Counter Systems: The Quest for Pushing the Decidability Borders St - PowerPoint PPT Presentation

Counter Systems: The Quest for Pushing the Decidability Borders St ephane Demri NYU & CNRS Marie Curie Fellow FROCOS & TABLEAUX, September 19th, 2013 Collaborations A survey paper and abstract written with Clark Barrett &


  1. Counter Systems: The Quest for Pushing the Decidability Borders St´ ephane Demri NYU & CNRS – Marie Curie Fellow FROCOS & TABLEAUX, September 19th, 2013

  2. Collaborations • A survey paper and abstract written with Clark Barrett & Morgan Deters (NYU) in the proceedings. • Some of the presented results are still subject to on-going research: • ACSys group, NYU. • Amit Dhar, Arnaud Sangnier (LIAFA). • Members of ANR REACHARD (LSV, LABRI). • Less recent collaborations on the subject with M. Bersani, R. Gascon, V. Goranko, D. D’Souza, R. Lazi´ c, etc. 2

  3. Overview 1 Presburger Counter Systems Definition Decision Problems Subclasses of PCS 2 Loops, Path Schemas and Flatness Loops & Path Schemas Flatness 3 Verifying Temporal Properties Presburger LTL Model-Checking Complexity 4 Path Schema Subsumption: An Overview 3

  4. Presburger Counter Systems 4 Presburger Counter Systems

  5. Integer Programs • Finite-state automaton with counters interpreted by non-negative integers. x 1 −− x 2 ++ x 1 −− x 2 ++ x 3 == 0 ? 5 Presburger Counter Systems

  6. Integer Programs • Finite-state automaton with counters interpreted by non-negative integers. x 1 −− x 2 ++ x 1 −− x 2 ++ x 3 == 0 ? • Many applications: • Broadcast protocols, Petri nets, . . . • Programs with pointer variables. [Bouajjani et al., CAV’06] • Replicated finite-state programs. [Kaiser & Kroening & Wahl, CAV’10] • Relationships with data logics. [Boja´ nczyk et al., TOCL 11] 5 Presburger Counter Systems

  7. Integer Programs • Finite-state automaton with counters interpreted by non-negative integers. x 1 −− x 2 ++ x 1 −− x 2 ++ x 3 == 0 ? • Many applications: • Broadcast protocols, Petri nets, . . . • Programs with pointer variables. [Bouajjani et al., CAV’06] • Replicated finite-state programs. [Kaiser & Kroening & Wahl, CAV’10] • Relationships with data logics. [Boja´ nczyk et al., TOCL 11] • Techniques for model-checking infinite-state systems are required for formal verification. • But, integer programs can simulate Turing machines. • Checking safety or liveness properties is undecidable. 5 Presburger Counter Systems

  8. Taming Verification of Counter Machines • Design of subclasses with decidable reachability problems • Vector addition systems ( ≈ Petri nets) [Kosaraju, STOC’82] • Flat relational counter machines. [Comon & Jurski, CAV’98] • Reversal-bounded counter machines. [Ibarra, JACM 78] • Flat affine counter machines with finite monoids. [Boigelot, PhD 98; Finkel & Leroux, FSTTCS’02] . . . 6 Presburger Counter Systems

  9. Taming Verification of Counter Machines • Design of subclasses with decidable reachability problems • Vector addition systems ( ≈ Petri nets) [Kosaraju, STOC’82] • Flat relational counter machines. [Comon & Jurski, CAV’98] • Reversal-bounded counter machines. [Ibarra, JACM 78] • Flat affine counter machines with finite monoids. [Boigelot, PhD 98; Finkel & Leroux, FSTTCS’02] . . . • Decision procedures • Translation into Presburger arithmetic. [Fribourg & Ols´ en, CONCUR’97; Finkel & Leroux, FSTTCS’02] • Direct analysis on runs. [Rackoff, TCS 78] • Approximating reachability sets. [Karp & Miller, JCSS 69] • Well-structured transition systems. [Finkel & Schnoebelen, TCS 01] 6 Presburger Counter Systems

  10. Taming Verification of Counter Machines • Design of subclasses with decidable reachability problems • Vector addition systems ( ≈ Petri nets) [Kosaraju, STOC’82] • Flat relational counter machines. [Comon & Jurski, CAV’98] • Reversal-bounded counter machines. [Ibarra, JACM 78] • Flat affine counter machines with finite monoids. [Boigelot, PhD 98; Finkel & Leroux, FSTTCS’02] . . . • Decision procedures • Translation into Presburger arithmetic. [Fribourg & Ols´ en, CONCUR’97; Finkel & Leroux, FSTTCS’02] • Direct analysis on runs. [Rackoff, TCS 78] • Approximating reachability sets. [Karp & Miller, JCSS 69] • Well-structured transition systems. [Finkel & Schnoebelen, TCS 01] • Tools: F AST , L ASH , TR E X, FLATA, . . . 6 Presburger Counter Systems

  11. A Fundamental Decidable Theory • First-order theory of � N , + , ≤� introduced by Mojzesz Presburger (1929). • Use in guards and in symbolic representations for sets of tuples. • Many properties: decidability, quantifier elimination, quantifier-free fragment in NP, . . . 7 Presburger Counter Systems

  12. A Fundamental Decidable Theory • First-order theory of � N , + , ≤� introduced by Mojzesz Presburger (1929). • Use in guards and in symbolic representations for sets of tuples. • Many properties: decidability, quantifier elimination, quantifier-free fragment in NP, . . . • Terms t = a 1 x 1 + · · · + a n x n + k where a 1 , . . . , a n ∈ N , k is in N and the x i ’s are variables. • Presburger formulae: φ ::= t ≤ t ′ | ¬ φ | φ ∧ φ | ∃ x φ 7 Presburger Counter Systems

  13. Presburger Arithmetic • Linear fragment : no quantification. • Valuation v : VAR → N + extension to all terms with def v ( a 1 x 1 + · · · + a n x n + k ) = a 1 v ( x 1 ) + · · · + a n v ( x n ) + k 8 Presburger Counter Systems

  14. Presburger Arithmetic • Linear fragment : no quantification. • Valuation v : VAR → N + extension to all terms with def v ( a 1 x 1 + · · · + a n x n + k ) = a 1 v ( x 1 ) + · · · + a n v ( x n ) + k = t ≤ t ′ iff v ( t ) ≤ v ( t ′ ) ; v | = φ ∧ φ ′ iff v | = φ ′ , • v | = φ and v | def • v | = ∃ x φ ⇔ there is n ∈ N such that v [ x �→ n ] | = φ . 8 Presburger Counter Systems

  15. Presburger Arithmetic • Linear fragment : no quantification. • Valuation v : VAR → N + extension to all terms with def v ( a 1 x 1 + · · · + a n x n + k ) = a 1 v ( x 1 ) + · · · + a n v ( x n ) + k = t ≤ t ′ iff v ( t ) ≤ v ( t ′ ) ; v | = φ ∧ φ ′ iff v | = φ ′ , • v | = φ and v | def • v | = ∃ x φ ⇔ there is n ∈ N such that v [ x �→ n ] | = φ . • Formula φ ( x 1 , . . . , x n ) with n ≥ 1 free variables: = {� v ( x 1 ) , . . . , v ( x n ) � ∈ N n : v | def � φ ( x 1 , . . . , x n ) � = φ } . def • φ is satisfiable ⇔ there is v such that v | = φ . 8 Presburger Counter Systems

  16. Decision Procedures and Tools • Quantifier elimination and refinements [Cooper, ML 72; Reddy & Loveland, STOC’78] • Tools dealing with quantifier-free PA, full PA or quantifier elimination: Z3, CVC4, Alt-Ergo, Yices2, Omega test. 9 Presburger Counter Systems

  17. Decision Procedures and Tools • Quantifier elimination and refinements [Cooper, ML 72; Reddy & Loveland, STOC’78] • Tools dealing with quantifier-free PA, full PA or quantifier elimination: Z3, CVC4, Alt-Ergo, Yices2, Omega test. • Automata-based approach. [B¨ uchi, ZML 60; Boudet & Comon, CAAP’96] • Automata-based tools for Presburger arithmetic: LIRA, suite of libraries TAPAS, MONA, and LASH. 9 Presburger Counter Systems

  18. Presburger Counter Systems (PCS) • Presburger Counter System C = � Q , n , δ � of dimension n : • Q is a nonempty finite set of control states. • n ≥ 1 is the dimension. • δ = finite set of transitions of the form t = � q , φ, q ′ � where q , q ′ ∈ Q and φ is a Presburger formula with free variables x 1 , . . . , x n , x ′ 1 , . . . , x ′ n . inc ( 1 ) dec ( 1 ) inc ( 2 ) inc ( 2 ) zero ( 1 ) q 2 q 4 q 6 zero ( 2 ) inc ( 1 ) x 1 = 3x 3 dec ( 1 ) ∃ z x 1 = 2z q 1 q 10 q 11 q 8 q 9 zero ( 1 ) inc ( 1 ) inc ( 2 ) inc ( 2 ) inc ( 2 ) inc ( 1 ) zero ( 2 ) q 3 q 5 q 7 inc ( 2 ) dec ( 2 ) inc ( 1 ) • Configuration � q , x � ∈ S = Q × N n . 10 Presburger Counter Systems

  19. Transition System T ( C ) • Transition system T ( C ) = � S , − →� : def • � q , x � − → � q ′ , x’ � ⇔ there is t = � q , φ, q ′ � such that v [ x ← x , x ′ ← x ′ ] | = φ dec ( x ) q 2 dec ( x ) zero ( x ) inc ( x ) q 1 q 3 � q 1 , 0 � � q 1 , 1 � � q 1 , 2 � � q 1 , 3 � � q 1 , 4 � � q 2 , 0 � � q 2 , 1 � � q 2 , 2 � � q 2 , 3 � � q 3 , 0 � ∗ − → : reflexive and transitive closure of − → . • (sometimes written Reach C ) 11 Presburger Counter Systems

  20. Decision Problems • Reachability problem: Input: PCS C , � q 0 , x 0 � and � q f , x f � . Question: � q 0 , x 0 � ∗ − → � q f , x f � ? 12 Presburger Counter Systems

  21. Decision Problems • Reachability problem: Input: PCS C , � q 0 , x 0 � and � q f , x f � . Question: � q 0 , x 0 � ∗ − → � q f , x f � ? • Control state reachability problem: Input: PCS C , � q 0 , x 0 � and q f . Question: ∃ x f � q 0 , x 0 � ∗ − → � q f , x f � ? 12 Presburger Counter Systems

  22. Decision Problems • Reachability problem: Input: PCS C , � q 0 , x 0 � and � q f , x f � . Question: � q 0 , x 0 � ∗ − → � q f , x f � ? • Control state reachability problem: Input: PCS C , � q 0 , x 0 � and q f . Question: ∃ x f � q 0 , x 0 � ∗ − → � q f , x f � ? • Control state repeated reachability problem: Input: PCS C , � q 0 , x 0 � and q f . Question: is there an infinite run starting from � q 0 , x 0 � such that the control state q f is repeated infinitely often? 12 Presburger Counter Systems

Recommend


More recommend