Using Shared Memory Abstractions to Design Eager Sequentializations for Weak Memory Models

Sequentialization translates concurrent programs into equivalent nondeterministic sequential programs so that the different concurrent schedules no longer need to be handled explicitly. However, existing sequentializations assume sequential consistency, which modern hardware architectures no longer guarantee. Here we describe a new approach to embed weak memory models within eager sequentializations. Our approach is based on the separation of intra-thread computations from inter-thread communications by means of a shared memory abstraction (SMA). We give details of SMA implementations for the SC, TSO, and PSO memory models that are based on the idea of individual memory unwindings. We use our approach to implement a new, efficient BMC-based bug finding tool for multi-threaded C programs under SC, TSO, or PSO based on these SMAs, and show experimentally that it is competitive to existing tools.

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

[2]  Salvatore La Torre,et al.  Sequentializing Parameterized Programs , 2012, FIT.

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

[4]  Toshiyuki Maeda,et al.  A general model checking framework for various memory consistency models , 2014, 2014 IEEE International Parallel & Distributed Processing Symposium Workshops.

[5]  Matthew B. Dwyer,et al.  CIVL: Formal Verification of Parallel Programs , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[6]  Roland Meyer,et al.  Lazy TSO Reachability , 2015, FASE.

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

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

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

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

[11]  Salvatore La Torre,et al.  Lazy-CSeq: A Context-Bounded Model Checking Tool for Multi-threaded C-Programs , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[12]  Salvatore La Torre,et al.  Bounded Model Checking of Multi-threaded C Programs via Lazy Sequentialization , 2014, CAV.

[13]  Parosh Aziz Abdulla,et al.  Context-Bounded Analysis for POWER , 2017, TACAS.

[14]  Salvatore La Torre,et al.  Verifying Concurrent Programs by Memory Unwinding , 2015, TACAS.

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

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

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

[18]  Oleg Travkin,et al.  TSO to SC via Symbolic Execution , 2015, Haifa Verification Conference.

[19]  Jonathan Whitaker,et al.  SMACK Software Verification Toolchain , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering Companion (ICSE-C).

[20]  Salvatore La Torre,et al.  Model-Checking Parameterized Concurrent Programs Using Linear Interfaces , 2010, CAV.

[21]  Salvatore La Torre,et al.  MU-CSeq 0.4: Individual Memory Location Unwindings - (Competition Contribution) , 2016, TACAS.

[22]  Dirk Beyer,et al.  Reliable and Reproducible Competition Results with BenchExec and Witnesses (Report on SV-COMP 2016) , 2016, TACAS.

[23]  Adam Betts,et al.  Concurrency testing using schedule bounding: an empirical study , 2014, PPoPP '14.

[24]  Daniel Kroening,et al.  On Partial Order Semantics for SAT/SMT-Based Symbolic Encodings of Weak Memory Concurrency , 2015, FORTE.

[25]  Gang Chen,et al.  SafeStack: Automatically Patching Stack-Based Buffer Overflow Vulnerabilities , 2013, IEEE Transactions on Dependable and Secure Computing.