stateless model checking for tso and pso
play

Stateless Model Checking for TSO and PSO Parosh Aziz Abdulla - PowerPoint PPT Presentation

Introduction TSO Traces and Happens-Before Experiments Future Work Stateless Model Checking for TSO and PSO Parosh Aziz Abdulla Stavros Aronis Mohamed Faouzi Atig Bengt Jonsson Carl Leonardsson Konstantinos Sagonas Uppsala University,


  1. Introduction TSO Traces and Happens-Before Experiments Future Work Stateless Model Checking for TSO and PSO Parosh Aziz Abdulla Stavros Aronis Mohamed Faouzi Atig Bengt Jonsson Carl Leonardsson Konstantinos Sagonas Uppsala University, Sweden MM’15 2015-02-24 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  2. Introduction TSO Traces and Happens-Before Experiments Future Work Test Cases Goals Stateless Model Checking Find safety errors... in given test case (fixed input program) for all interleavings for all reorderings (TSO/PSO) Works on real code in C/pthreads Valid Test Case (in this presentation) 1 Terminates in bounded time 2 Nondeterminism: Interleavings, Reordering Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  3. Introduction TSO Traces and Happens-Before Experiments Future Work Test Cases Goals Stateless Model Checking Find safety errors... in given test case (fixed input program) for all interleavings for all reorderings (TSO/PSO) Works on real code in C/pthreads Valid Test Case (in this presentation) 1 Terminates in bounded time 2 Nondeterminism: Interleavings, Reordering Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  4. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR Partial Order Reduction (SC) volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; Executions p :wx1 p :wx1 p :wx1 p :ry0 q :wy1 q :wy1 q :wy1 p :ry1 q :rx1 q :rx1 q :rx1 p :ry1 q :wy1 q :wy1 q :wy1 q :rx0 p :wx1 p :wx1 p :wx1 q :rx1 p :ry1 p :ry1 p :ry1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  5. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR Partial Order Reduction (SC) volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; Executions p :wx1 p :wx1 p :wx1 p :ry0 q :wy1 q :wy1 q :wy1 p :ry1 q :rx1 q :rx1 q :rx1 p :ry1 q :wy1 q :wy1 q :wy1 q :rx0 p :wx1 p :wx1 p :wx1 q :rx1 p :ry1 p :ry1 p :ry1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  6. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR Partial Order Reduction (SC) volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; Executions (Happens-Before) p :wx1 p :wx1 p :wx1 p :ry0 q :wy1 q :wy1 q :wy1 p :ry1 q :rx1 q :rx1 q :rx1 p :ry1 q :wy1 q :wy1 q :wy1 q :rx0 p :wx1 p :wx1 p :wx1 q :rx1 p :ry1 p :ry1 p :ry1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  7. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR Partial Order Reduction (SC) volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; Mazurkiewicz Traces ∼ Equivalence Classes over Executions p :wx1 p :wx1 p :wx1 p :ry0 q :wy1 q :wy1 q :wy1 p :ry1 q :rx1 q :rx1 q :rx1 p :ry1 q :wy1 q :wy1 q :wy1 q :rx0 p :wx1 p :wx1 p :wx1 q :rx1 p :ry1 p :ry1 p :ry1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  8. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR Stateless Model Checking with DPOR [Flanagan, Godefroid 2005] Idea Explore one execution per Mazurkiewicz trace. → Cover all observable behaviours. Keep only one execution in memory. Examine happens-before relation to find the next trace. Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  9. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  10. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; p :wx1 p :ry0 q :wy1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  11. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; p :wx1 HB: Necessary Edges p :ry0 Program order (under SC) Thread spawning to child’s q :wy1 first event q :rx1 ... Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  12. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; p :wx1 HB: Races p :ry0 Conflicting stores and loads. ... q :wy1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  13. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; p :wx1 Reverse Races p :ry0 Start from the end of the execution. q :wy1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  14. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; p :wx1 Previous Trace p :wx1 q :wy1 p :ry0 p :ry1 q :wy1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  15. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; p :wx1 Previous Trace p :wx1 q :wy1 p :ry0 p :ry1 q :wy1 q :rx1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  16. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; p :wx1 Previous Trace p :wx1 q :wy1 p :ry0 p :ry1 q :wy1 q :rx1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  17. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; p :wx1 Previous Trace p :wx1 q :wy1 p :ry0 p :ry1 q :wy1 q :rx1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  18. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; q :wy1 Previous Traces p :wx1 p :wx1 q :rx0 p :ry0 q :wy1 p :wx1 q :wy1 p :ry1 q :rx1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  19. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; q :wy1 Previous Traces p :wx1 p :wx1 q :rx0 p :ry0 q :wy1 p :wx1 q :wy1 p :ry1 p :ry1 q :rx1 q :rx1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  20. Introduction TSO Traces and Happens-Before Experiments Future Work SMC & DPOR volatile int x = 0, y = 0; p q x = 1; y = 1; int a = y; int b = x; All Traces p :wx1 p :wx1 q :wy1 p :ry0 q :wy1 q :rx0 q :wy1 p :ry1 p :wx1 q :rx1 q :rx1 p :ry1 Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  21. Introduction TSO Traces and Happens-Before Experiments Future Work Summary TSO Relaxes W → R Store forwarding to own reads (ROWE) Operational semantics: store buffer per thread Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

  22. Introduction TSO Traces and Happens-Before Experiments Future Work Problem Defining Traces for TSO Extend Mazurkiewicz Traces to TSO Suitable equivalence classes Compatible with DPOR Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson , Konstantinos Sagonas Stateless Model Checking for TSO and PSO

Recommend


More recommend