Context-Bounded Analysis for POWER

We propose an under-approximate reachability analysis algorithm for programs running under the POWER memory model, in the spirit of the work on context-bounded analysis intitiated by Qadeer et al. in 2005 for detecting bugs in concurrent programs supposed to be running under the classical SC model. To that end, we first introduce a new notion of context-bounding that is suitable for reasoning about computations under POWER, which generalizes the one defined by Atig et al. in 2011 for the TSO memory model. Then, we provide a polynomial size reduction of the context-bounded state reachability problem under POWER to the same problem under SC: Given an input concurrent program $$\mathcal {P}$$, our method produces a concurrent program $$\mathcal {P}'$$ such that, for a fixed number of context switches, running $$\mathcal {P}'$$ under SC yields the same set of reachable states as running $$\mathcal {P}$$ under POWER. The generated program $$\mathcal {P}'$$ contains the same number of processes as $$\mathcal {P}$$, and operates on the same data domain. By leveraging the standard model checker CBMC, we have implemented a prototype tool and applied it on a set of benchmarks, showing the feasibility of our approach.

[1]  Koushik Sen,et al.  Testing concurrent programs on relaxed memory models , 2011, ISSTA '11.

[2]  Jeff Huang,et al.  Maximal causality reduction for TSO and PSO , 2016, OOPSLA.

[3]  Patrick Lam,et al.  SATCheck: SAT-directed stateless model checking for SC and TSO , 2015, OOPSLA.

[4]  Leslie Lamport,et al.  How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs , 2016, IEEE Transactions on Computers.

[5]  Eran Yahav,et al.  Predicate Abstraction for Relaxed Memory Models , 2013, SAS.

[6]  Roland Meyer,et al.  Robustness against Power is PSpace-complete , 2014, ICALP.

[7]  Eran Yahav,et al.  Automatic inference of memory fences , 2010, Formal Methods in Computer Aided Design.

[8]  Eran Yahav,et al.  Partial-coherence abstractions for relaxed memory models , 2011, PLDI '11.

[9]  Yue Yang,et al.  Nemos: a framework for axiomatic and executable specifications of memory consistency models , 2004, 18th International Parallel and Distributed Processing Symposium, 2004. Proceedings..

[10]  Salvatore La Torre,et al.  Lazy sequentialization for TSO and PSO via shared memory abstractions , 2016, 2016 Formal Methods in Computer-Aided Design (FMCAD).

[11]  Daniel Kroening,et al.  Partial Orders for Efficient Bounded Model Checking of Concurrent Software , 2013, CAV.

[12]  Oleg Travkin,et al.  Verification of Concurrent Programs on Weak Memory Models , 2016, ICTAC.

[13]  Parosh Aziz Abdulla,et al.  The Best of Both Worlds: Trading Efficiency and Optimality in Fence Insertion for TSO , 2015, ESOP.

[14]  Roland Meyer,et al.  Checking and Enforcing Robustness against TSO , 2013, ESOP.

[15]  Parosh Aziz Abdulla,et al.  Stateless model checking for TSO and PSO , 2015, Acta Informatica.

[16]  Sebastian Burckhardt,et al.  CheckFence: checking consistency of concurrent data types on relaxed memory models , 2007, PLDI '07.

[17]  Parosh Aziz Abdulla,et al.  Counter-Example Guided Fence Insertion under TSO , 2012, TACAS.

[18]  Madan Musuvathi,et al.  Iterative context bounding for systematic testing of multithreaded programs , 2007, PLDI '07.

[19]  YahavEran,et al.  Dynamic synthesis for relaxed memory models , 2012 .

[20]  Parosh Aziz Abdulla,et al.  Precise and Sound Automatic Fence Insertion Procedure under PSO , 2015, NETYS.

[21]  Feng Liu,et al.  Dynamic synthesis for relaxed memory models , 2012, PLDI.

[22]  Rajeev Alur,et al.  An Axiomatic Memory Model for POWER Multiprocessors , 2012, CAV.

[23]  Salvatore La Torre,et al.  Reducing Context-Bounded Concurrent Reachability to Sequential Reachability , 2009, CAV.

[24]  Parosh Aziz Abdulla,et al.  Automatic Fence Insertion in Integer Programs via Predicate Abstraction , 2012, SAS.

[25]  Ori Lahav,et al.  Explaining Relaxed Memory Models with Program Transformations , 2016, FM.

[26]  Thomas W. Reps,et al.  Reducing Concurrent Analysis Under a Context Bound to Sequential Analysis , 2008, CAV.

[27]  YahavEran,et al.  Partial-coherence abstractions for relaxed memory models , 2011 .

[28]  Chao Wang,et al.  Dynamic partial order reduction for relaxed memory models , 2015, PLDI.

[29]  Peter Sewell,et al.  A Better x86 Memory Model: x86-TSO , 2009, TPHOLs.

[30]  Jakob Rehof,et al.  Context-Bounded Model Checking of Concurrent Software , 2005, TACAS.

[31]  Parosh Aziz Abdulla,et al.  Stateless Model Checking for POWER , 2016, CAV.

[32]  Salvatore La Torre,et al.  Embedding weak memory models within eager sequentialization , 2016 .

[33]  Daniel Kroening,et al.  A Tool for Checking ANSI-C Programs , 2004, TACAS.

[34]  Eran Yahav,et al.  Effective Abstractions for Verification under Relaxed Memory Models , 2015, VMCAI.

[35]  Daniel Kroening,et al.  Software Verification for Weak Memory via Program Transformation , 2012, ESOP.

[36]  Mohamed Faouzi Atig,et al.  Getting Rid of Store-Buffers in TSO Analysis , 2011, CAV.

[37]  Parosh Aziz Abdulla,et al.  The Benefits of Duality in Verifying Concurrent Programs under TSO , 2017, CONCUR.

[38]  Jade Alglave,et al.  Understanding POWER multiprocessors , 2011, PLDI '11.

[39]  Sebastian Burckhardt,et al.  Effective Program Verification for Relaxed Memory Models , 2008, CAV.

[40]  Francesco Zappa Nardelli,et al.  x86-TSO , 2010, Commun. ACM.