Counter-Example guided fence insertion under TSO

  • Authors:
  • Parosh Aziz Abdulla;Mohamed Faouzi Atig;Yu-Fang Chen;Carl Leonardsson;Ahmed Rezine

  • Affiliations:
  • Uppsala University, Sweden;Uppsala University, Sweden;Academia Sinica, Taiwan;Uppsala University, Sweden;Linköping University, Sweden

  • Venue:
  • TACAS'12 Proceedings of the 18th international conference on Tools and Algorithms for the Construction and Analysis of Systems
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

We give a sound and complete fence insertion procedure for concurrent finite-state programs running under the classical TSO memory model. This model allows "write to read" relaxation corresponding to the addition of an unbounded store buffer between each processor and the main memory. We introduce a novel machine model, called the Single-Buffer (SB) semantics, and show that the reachability problem for a program under TSO can be reduced to the reachability problem under SB. We present a simple and effective backward reachability analysis algorithm for the latter, and propose a counter-example guided fence insertion procedure. The procedure is augmented by a placement constraint that allows the user to choose places inside the program where fences may be inserted. For a given placement constraint, we automatically infer all minimal sets of fences that ensure correctness. We have implemented a prototype and run it successfully on all standard benchmarks together with several challenging examples that are beyond the applicability of existing methods.