470 likes | 624 Views
State-Event Software Verification for Branching-Time Specifications. Sagar Chaki, Ed Clarke, Joel Ouaknine , Orna Grumberg Natasha Sharygina, Tayssir Touili , Helmut Veith. Software Model-Checking. Challenge in computer science Tools: SLAM, BLAST, MAGIC,…
E N D
State-Event Software Verification for Branching-Time Specifications Sagar Chaki, Ed Clarke, Joel Ouaknine, Orna Grumberg Natasha Sharygina, Tayssir Touili , Helmut Veith
Software Model-Checking • Challenge in computer science • Tools: SLAM, BLAST, MAGIC,… • Counter-Example Guided Abstraction Refinement (CEGAR)
Property Abstraction Model Yes System OK No Abstraction Refinement Yes Spurious Counterexample CEGAR Verification No Counterexample Counterexample Valid?
Property Abstraction Model Yes System OK No Counterexample No Yes Limitation of CEGAR applications LTL formula Predicate Abstraction Verification No branching time properties Abstraction Refinement Counterexample Valid?
Our Goal:Extension to branching-time properties Abstraction Model Yes System OK No Counterexample No Yes Branching-time formula LTL formula Predicate Abstraction Verification Abstraction Refinement Counterexample Valid?
First Problem • CEGAR cannot be applied to general branching-time logics
What are counterexamples? S property φ φuniversal
CEGAR natural for LTL • LTL: universal logic • Describes events along a single path G(Req→ F Ack) • S ╞ φ iff all the paths of S ╞ φ • ¬(S ╞ φ) iff exists one path p of S ¬( p╞ φ) • p: Counterexample
Branching-time properties are not universal • Existential operator: AG(EF Restart) CEGAR → Define a universalBranching-time logic
Our Goal:Extension to branching-time properties Abstraction Model Yes System OK No Counterexample No Yes Branching-time formula Predicate Abstraction Verification Abstraction Refinement Counterexample Valid?
We need to: • Define an expressiveuniversalbranching-time logic • Define a model-checking algorithm for this logic • Define suitable refinement techniques
State/event universal branching-time logic • Industrial applications need state/event reasoning • Bluetooth: when an action a is received in a q state, the next state has to be p • Need to a state/event framework
The state/event universal logic SE-AΩ • We view time operators as regular path patterns on the time line Fφ: Xφ: Gφ: φUψ:
Regular expression over a a a a b φ φ φ φ φ φ ψ The state/event universal logic SE-AΩ
Lφ: The state/event universal logic SE-AΩ K(φ,a): φ and a hold at all even time points K(φ,a): Lφ: no more than 4 time units between 2 occurrences of φ
p,q p a b c q,r The state/event universal logic SE-AΩ • Labeled Kripke Structure: M=(S,AP,L,Σ,T)
The state/event universal logic SE-AΩ • Labeled Kripke Structure: M=(S,AP,L,Σ,T)
We need to: • Define an expressiveuniversalbranching-time logic • Define a model-checking algorithm for this logic • Define suitable refinement techniques
Model-checking algorithm for SE-AΩ p,q b a p b c q,r
Model-checking algorithm for SE-AΩ p,q b a p b c q,r
Model-checking algorithm for SE-AΩ p,q b a p b c q,r
Model-checking algorithm for SE-AΩ p,q b a p b c q,r
Model-checking algorithm for SE-AΩ p,q a p b c q,r
Our Goal:Extension to branching-time properties Abstraction Model Yes System OK No Counterexample No Yes SE-AΩ Predicate Abstraction Verification Abstraction Refinement Counterexample Valid?
CounterExample generation for SE-AΩ Compute a counterexample either for
CounterExample generation for SE-AΩ Compute a counterexample for Compute a counterexample for
CounterExample generation for SE-AΩ AG ¬p vAF ¬q q q q p q
b a b c CounterExample generation for SE-AΩ b a
Our Goal:Extension to branching-time properties Abstraction Model Yes System OK No Counterexample No Yes SE-AΩ Predicate Abstraction Verification Abstraction Refinement Counterexample Valid?
Our Goal:Extension to branching-time properties Abstraction Model Yes System OK No Counterexample No Yes SE-AΩ Predicate Abstraction Verification Abstraction Refinement Counterexample Valid?
b a b c Projection a c
Weak simulation p,q p,q a a
Compositionality Theorem: iff
Our Goal:Extension to branching-time properties Abstraction Model Yes System OK No Counterexample No Yes SE-AΩ Predicate Abstraction Verification Abstraction Refinement Counterexample Valid?
Compositional refinement P1 P2 P3 P4 Spec Abstraction Spec A1 A2 A3 A4
Compositional refinement P1 P2 P3 P4 Spec Abstraction A1 Spec A1 A2 A3 A4 Refinement
Compositional refinement P1 P2 P3 P4 Spec A1 A3 Abstraction Spec A1 A2 A3 A4 Refinement
Compositional refinement P1 P2 P3 P4 Spec A1 A1 A3 Abstraction Spec A1 A2 A3 A4 Refinement
Compositional refinement P1 P2 P3 P4 Spec No more counterexamples A1 Abstraction A1 A2 A3 Spec Refinement A1 A2 A3 A4
Compositional refinement P1 P2 P3 P4 Spec Real counterexamples A1 Abstraction A1 A2 A3 Spec A1 A2 A3 A4 Refinement
Action-guided Refinement a a a b a a,b b a,b b b c c Counterexample Abstraction
Our Goal:Extension to branching-time properties Abstraction Model Yes System OK No Counterexample No Yes Branching-time formula Predicate Abstraction Verification Abstraction Refinement Counterexample Valid?
Case study: IPC • IPC (InterProcess Communication) Protocol: organize communication in a multithreaded robot controller • Bug discovery • Protocol has been used for 7 years • Bug undetected with earlier model-checking efforts using LTL
Conclusion • Definition of an advanced branching-time state-event logic SE-AΩ • Model-checking algorithm for SE-AΩ • Compositional counterexample validation and refinement techniques for SE-AΩ First application of compositional CEGAR to a branching-time specifications Bug discovery in the IPC protocol