Verification of Concurrent Programs Decidability, Complexity, Reductions. Ahmed Bouajjani U Paris Diderot – Paris 7 Locali Workshop, Beijing, November 2013 A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 1 / 16
Concurrency at different levels Application level: ◮ Needs abstraction: Abstract data structures, transactions, ... ◮ Assumes: Atomicity, isolation, ... (+ sequential specification...) A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 2 / 16
Concurrency at different levels Application level: ◮ Needs abstraction: Abstract data structures, transactions, ... ◮ Assumes: Atomicity, isolation, ... (+ sequential specification...) Implementation of concurrent data structures, and system services ◮ Performances ⇒ overlaps between parallel actions, sharing, etc. ◮ Ensures: (Illusion of) atomicity, isolation ... ◮ Assumes: Memory model (sequential consistency, causal delivery, etc. A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 2 / 16
Concurrency at different levels Application level: ◮ Needs abstraction: Abstract data structures, transactions, ... ◮ Assumes: Atomicity, isolation, ... (+ sequential specification...) Implementation of concurrent data structures, and system services ◮ Performances ⇒ overlaps between parallel actions, sharing, etc. ◮ Ensures: (Illusion of) atomicity, isolation ... ◮ Assumes: Memory model (sequential consistency, causal delivery, etc. Infrastructures ◮ Performances ⇒ Store buffers, cashes, replicas, etc. Relaxed memory models, weak consistency criteria. (action reordering, lossyness, duplication, etc.) A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 2 / 16
Issues at different levels Applications ◮ Correctness: Program (model) satisfies Specification (of some service) A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 3 / 16
Issues at different levels Applications ◮ Correctness: Program (model) satisfies Specification (of some service) ◮ Complexity (state-space explosion), Undecidability (recursion + synchronization, dynamic thread creation) A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 3 / 16
Issues at different levels Applications ◮ Correctness: Program (model) satisfies Specification (of some service) ◮ Complexity (state-space explosion), Undecidability (recursion + synchronization, dynamic thread creation) Libraries of concurrent objects ◮ Ensuring atomicity (+ specification): • Linearizability (shared concurrent data structures), equivalent to Observational Refinement: ∀ Client . ∀ n . Client n [ Impl ] ⊆ Client n [ Spec ] • Serializability (transactions), • Eventual consistency (distributed data structures), etc. A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 3 / 16
Issues at different levels Applications ◮ Correctness: Program (model) satisfies Specification (of some service) ◮ Complexity (state-space explosion), Undecidability (recursion + synchronization, dynamic thread creation) Libraries of concurrent objects ◮ Ensuring atomicity (+ specification): • Linearizability (shared concurrent data structures), equivalent to Observational Refinement: ∀ Client . ∀ n . Client n [ Impl ] ⊆ Client n [ Spec ] • Serializability (transactions), • Eventual consistency (distributed data structures), etc. ◮ Satisfaction of a specification over a relaxed memory model. ◮ Robustness against a memory model: Given a program P and two memory models M 1 ≤ M 2 , [ [ P ] ] M 1 = [ [ P ] ] M 2 ? A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 3 / 16
Issues at different levels Applications ◮ Correctness: Program (model) satisfies Specification (of some service) ◮ Complexity (state-space explosion), Undecidability (recursion + synchronization, dynamic thread creation) Libraries of concurrent objects ◮ Ensuring atomicity (+ specification): • Linearizability (shared concurrent data structures), equivalent to Observational Refinement: ∀ Client . ∀ n . Client n [ Impl ] ⊆ Client n [ Spec ] • Serializability (transactions), • Eventual consistency (distributed data structures), etc. ◮ Satisfaction of a specification over a relaxed memory model. ◮ Robustness against a memory model: Given a program P and two memory models M 1 ≤ M 2 , [ [ P ] ] M 1 = [ [ P ] ] M 2 ? ◮ Complexity (huge number of action orders), Undecidability (some commutations allow to encode TM! – queues). A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 3 / 16
Questions Limits of decidability? Complexity? Basic (conceptual/technical) tools? General and efficient algorithmic approaches? A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 4 / 16
Reductions to Basic Models Pushdown systems ( ≡ Recursive state machines) Unbounded Petri nets ( ≡ Vector Addition Systems) (Lossy) FIFO-channel systems A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 5 / 16
Reductions to Basic Models Pushdown systems ( ≡ Recursive state machines) ◮ Model for sequential programs (with recursive procedures). ◮ State reachability is polynomial. Unbounded Petri nets ( ≡ Vector Addition Systems) (Lossy) FIFO-channel systems A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 5 / 16
Reductions to Basic Models Pushdown systems ( ≡ Recursive state machines) ◮ Model for sequential programs (with recursive procedures). ◮ State reachability is polynomial. ◮ Also useful when concurrent behaviors can be “sequentialized”. Unbounded Petri nets ( ≡ Vector Addition Systems) (Lossy) FIFO-channel systems A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 5 / 16
Reductions to Basic Models Pushdown systems ( ≡ Recursive state machines) ◮ Model for sequential programs (with recursive procedures). ◮ State reachability is polynomial. ◮ Also useful when concurrent behaviors can be “sequentialized”. Unbounded Petri nets ( ≡ Vector Addition Systems) ◮ Model for dynamic concurrent programs with (an arbitrary number of) finite-state (anonymous) threads. ◮ State reachability is decidable (EXPSPACE-complete). Research on efficient algorithms + tools. (Lossy) FIFO-channel systems A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 5 / 16
Reductions to Basic Models Pushdown systems ( ≡ Recursive state machines) ◮ Model for sequential programs (with recursive procedures). ◮ State reachability is polynomial. ◮ Also useful when concurrent behaviors can be “sequentialized”. Unbounded Petri nets ( ≡ Vector Addition Systems) ◮ Model for dynamic concurrent programs with (an arbitrary number of) finite-state (anonymous) threads. ◮ State reachability is decidable (EXPSPACE-complete). Research on efficient algorithms + tools. ◮ Also useful when recursion (stacks) can be “eliminated” using summarization/finite-state abstraction of interfaces. (Lossy) FIFO-channel systems A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 5 / 16
Reductions to Basic Models Pushdown systems ( ≡ Recursive state machines) ◮ Model for sequential programs (with recursive procedures). ◮ State reachability is polynomial. ◮ Also useful when concurrent behaviors can be “sequentialized”. Unbounded Petri nets ( ≡ Vector Addition Systems) ◮ Model for dynamic concurrent programs with (an arbitrary number of) finite-state (anonymous) threads. ◮ State reachability is decidable (EXPSPACE-complete). Research on efficient algorithms + tools. ◮ Also useful when recursion (stacks) can be “eliminated” using summarization/finite-state abstraction of interfaces. (Lossy) FIFO-channel systems ◮ Model for message-passing programs, ◮ State reachability is decidable for the lossy model (using the theory of WQO). Highly complex (non-primitive recursive), but ... A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 5 / 16
Reductions to Basic Models Pushdown systems ( ≡ Recursive state machines) ◮ Model for sequential programs (with recursive procedures). ◮ State reachability is polynomial. ◮ Also useful when concurrent behaviors can be “sequentialized”. Unbounded Petri nets ( ≡ Vector Addition Systems) ◮ Model for dynamic concurrent programs with (an arbitrary number of) finite-state (anonymous) threads. ◮ State reachability is decidable (EXPSPACE-complete). Research on efficient algorithms + tools. ◮ Also useful when recursion (stacks) can be “eliminated” using summarization/finite-state abstraction of interfaces. (Lossy) FIFO-channel systems ◮ Model for message-passing programs, ◮ State reachability is decidable for the lossy model (using the theory of WQO). Highly complex (non-primitive recursive), but ... ◮ Also useful for reasoning about weak memory models: modeling of the effects of various kind of relaxations. A. Bouajjani (U Paris Diderot – UP7) Verification of Concurrent Programs Beijing, November 2013 5 / 16
Recommend
More recommend