Decidability and complexity issues for subclasses of counter systems Lecture 1 Vector Addition Systems with States St´ ephane Demri demri@lsv.ens-cachan.fr LSV, ENS Cachan, CNRS, INRIA Course 2.9 – MPRI – 2010/2011 “Verification of parametrized and dynamic systems”
Decidability and complexity issues for subclasses of counter systems • Lecture 1 (10/12/2010): Vector Addition Systems with States. • Lecture 2 (17/12/2010): Reversal-bounded counter automata. • Lecture 3 (07/01/2011): Counter systems with finite monoid and flatness. • Lecture 4 (14/01/2011): Linear-time temporal logics for counter systems. • Lecture 5 (21/01/2011): Exercises on data logics and counter systems,improving Rackoff’s proof and model-checking (if time permits). 2
Organizational matters • Slides available on-line on the 2.9 course web page: http://mpri.master.univ-paris7.fr/C-2-9.html • Structure of each lecture: • Course 1h15-1h30. • 10-min break. • 30-45 min course • 20 min exercises. 3
Internship proposals at LSV, ENS Cachan • “Counter Systems with Presburger-definable Reachability Sets: Decidability and Complexity” with Arnaud Sangnier (LIAFA, Paris VII). • “D´ ecidabilit´ e et complexit´ e de la reconnaissance de langages alg´ ebriques” with Alain Finkel (LSV, Cachan). • “Compl´ etude de la logique de s´ eparation” with Etienne Lozes (LSV, RWTH Aachen). • Other proposals can be found at the course web page. 4
Plan of the lecture • Recall on vector addition systems with states. • Coverability graphs. • E XP S PACE upper bound for the covering problem. • Other properties that can be checked in E XP S PACE . • If time permits, we start developments about the E XP S PACE -hardness of problems on VASS. • Exercise on VASS weakly computing multiplication. 5
Recapitulation about VASS 6
Recapitulation about VASS 0 1 − 1 0 B C B C 0 @ A 0 0 1 0 q 0 q 1 − 1 B C B C 1 @ A 0 0 1 0 0 B C B C 0 0 1 @ A 0 0 1 B C B C − 1 @ A 1 • VASS is a counter system with transitions of the form � b b ∈ Z n , which is a shortcut for q → q ′ with � − � i = x i + � b ( i ) x ′ i ∈ [ 1 , n ] • VAS = VASS with a unique control state. 7
Presburger arithmetic • Terms: t ::= 0 | 1 | x | t + t . • Presburger formulae ( k ≥ 2) ϕ ::= t ≡ k t | t < t | ¬ ϕ | ϕ ∧ ϕ | ∃ x ϕ | ∀ x ϕ • Valuation v : VAR → N + extension to all terms with v ( t + t ′ ) = v ( t ) + v ( t ′ ) v ( 0 ) = 0 v ( 1 ) = 1 • Formula ϕ ( x 1 , . . . , x n ) with n free variables: = { ( v ( x 1 ) , . . . , v ( x n )) ∈ N n : v | REL ( ϕ ( x 1 , . . . , x n )) def = ϕ } . 8
Counter systems x ′ x ′ x ′ 1 = x 1 + 1 2 = x 2 + 1 3 = x 3 + 1 x , � x , � ϕ ′ ( � ϕ ( � x ′ ) x ′ ) q 0 q 1 q 2 x ′ 1 = x ′ 2 = x ′ 3 = 0 • Counter system S = ( Q , n , δ ) of dimension n ≥ 1: • Q is a nonempty finite set of control states. • δ : 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 . a ) ∈ Q × N n . • Configuration ( q ,� a ) t • ( q ,� → ( q ′ , � a ′ ) a , � x ′ ← � a ′ ] | def − ⇔ v [ � x ← � = ϕ . • Runs as nonempty (possibly infinite) sequences ρ = ( q 0 , � a 0 ) − → ( q 1 , � a 1 ) · · · ( q k , � a k ) · · · 9
Subclasses of counter systems • Standard counter automaton ( Q , n , δ ) : transitions are of inc ( i ) dec ( i ) zero ( i ) the form either q → q ′ or q → q ′ or q → q ′ . − − − − − − − • Succinct counter automaton ( Q , n , δ ) : transitions of the b ) b ′ ) add ( � zero ( � → q ′ with � b ∈ Z n or q → q ′ with form either q − − − − − − b ′ ∈ { 0 , 1 } n (simultaneous zero-tests). � • Vector addition systems with states (VASS): succinct counter automata without zero-tests. A transition t is an element in Q × Z n × Q . • VAS T ⊆ Z n (finite sets of tuples). 10
Reachability problems • R EACHABILITY PROBLEM : Input: VASS V , ( q ,� x ) and ( q ′ , � x ′ ) . Question: is there a finite run with initial configuration ( q ,� x ) and final configuration ( q ′ , � x ′ ) ? (in symbols ( q ,� x ) ∗ → ( q ′ , � x ′ ) ?) − • C ONTROL STATE REACHABILITY PROBLEM : Input: VASS V , ( q ,� x ) and q ′ . Question: is there a finite run with initial configuration ( q ,� x ) and whose final configuration has control state q ′ ? x ′ ( q ,� x ) ∗ → ( q ′ , � x ′ ) ?) ( ∃ � − • C ONTROL STATE REPEATED REACHABILITY PROBLEM : Input: VASS V , ( q ,� x ) and q f . Question: is there an infinite run with initial configuration ( q ,� x ) such that the control state q f is repeated infinitely often? 11
Variant problems • C OVERING PROBLEM : Input: VASS V , ( q ,� x ) and ( q ′ , � x ′ ) . Question: is there a finite run with initial configuration ( q ,� x ) and whose final configuration is ( q ′ , � x ′′ ) x ′ � � x ′′ ? with � x ′ = � (control state reachability is an instance with � 0) • B OUNDEDNESS PROBLEM : Input: VASS V and ( q ,� x ) . Question: is the set { ( q ′ , � x ′ ) ∈ Q × N n : ( q ,� x ) ∗ → ( q ′ , � x ′ ) } − finite? • T ERMINATION PROBLEM : Input: VASS V and ( q ,� x ) . Question: is there an infinite run with initial configuration ( q ,� x ) ? 12
Witness run characterization for termination problem • VAS T ⊆ f Z n and initial configuration � x 0 ∈ N n . • Propositions below are equivalent: x 0 . 1 There is an infinite run from � x 0 y + y ′ such that � y � � y ′ . ∗ → � 2 There is a finite run � → � − − y � � y ′ ⇔ for i ∈ [ 1 , n ] , we have � def y ( i ) ≤ � y ′ ( i ) . • � ∗ • − → : reflexive and transitive closure of − → . + • − → : transitive closure of − → . • Use of Dickson’s Lemma: for any infinite sequence z 1 , . . . of tuples in N n , there are i < j such that � z 0 , � z i � � z j . � 13
From VASS to VAS (other direction is obvious) ( x 1 , A , B , C ) A ( 1 , − 1 , 1 , 0 ) + 1 0 ( 0 , 1 , − 1 , 0 ) B ( − 1 , 0 , − 1 , 1 ) − 1 0 ( 0 , 0 , 1 , − 1 ) C ( A , 4 ) ≈ ( 4 , 1 , 0 , 0 ) and ( C , 2 ) ≈ ( 2 , 0 , 0 , 1 ) Reduction is correct from VASS without self-loops 14
Reduction � b • W.l.o.g., V has no transition of the form q → q . Otherwise, − b b � � � replace q → q by q → q new and q new 0 → q . − − − • As an exercise, show that the reachability [resp. covering, boundedness] problem for VASS can be reduced to the same problem for VASS without self-loops. • VAS T built from VASS V = ( Q , n , δ ) has dimension n + card ( Q ) . Control states are encoded in the card ( Q ) last components. • Alternative reduction from VASS of dimension n to VAS of dimension n + 3 (instead of n + card ( Q ) ). [Hopcroft & Pansiot, TCS 79] 15
Bijection between configurations • VASS V = ( Q , n , δ ) without self-loop. • Bijection h : Q → { n + 1 , . . . , n + card ( Q ) } dedicated to relate each control state of V with a unique component in the VAS we shall build. • Bijection between configurations in V and elements from the set X : x ∈ N n + card ( Q ) : � x ([ n + 1 , n + card ( Q )]) = e i ∈ N card ( Q ) X = { � for some i ∈ [ 1 , card ( Q )] } , • e i ∈ N card ( Q ) : unit element with 1 for the i th component and zero otherwise. x ([ n + 1 , n + card ( Q )]) is the tuple in N card ( Q ) restricted to • � the card ( Q ) last components of � x . 16
• X = N × { ( 1 , 0 , 0 ) , ( 0 , 1 , 0 ) , ( 0 , 0 , 1 ) } for the VASS below: A + 1 0 B − 1 0 C 17
Defining the VAS T b � • VAS T such that for t = q → q ′ ∈ δ ( q � = q ′ ), the transition − t ′ ∈ T is defined as follows: • ( t ′ )([ 1 , n ]) = � b , • for q ′′ ∈ Q \ { q , q ′ } , t ′ ( h ( q ′′ )) = 0, • t ′ ( h ( q )) = − 1 and t ′ ( h ( q ′ )) = 1. • For each run ( q 0 ,� x 0 ) . . . ( q k ,� x k ) of V , f (( q 0 ,� x 0 )) . . . f (( q k ,� x k )) is a run in T . • Each configuration f (( q i ,� x i )) belongs to X . x 0 · · · � x k in T with � x 0 ∈ X , • Similarly, for each run � f − 1 ( � x 0 ) · · · f − 1 ( � x k ) is a run of V . 18
Reductions • ( q ′ , � x ′ ) is reachable from ( q ,� x ) in V iff f (( q ′ , � x ′ )) is reachable from f (( q ,� x )) in T . • This can be easily shown by induction on the lenght of the run. • Consequently, the reachability problem for VASS can be reduced to the reachability problem for VAS. • Given configurations ( q ,� x ) and ( q ′ , � x ′ ) , the propositions below are equivalent: • in V , there is a run of the form ( q ,� x ) → ( q ′ , � x ′′ ) with � x ′ � � x ′′ , ∗ − • in T , there is a run of the form f (( q ,� x )) z with ∗ → � − f (( q ′ , � x ′ )) � � z . • Consequently, the covering problem for VASS can be reduced to the covering problem for VAS. 19
Recommend
More recommend