MemSAT: checking axiomatic specifications of memory models

  • Authors:
  • Emina Torlak;Mandana Vaziri;Julian Dolby

  • Affiliations:
  • IBM T. J. Watson Research Center, Hawthorne, NY, USA;IBM T. J. Watson Research Center, Hawthorne, NY, USA;IBM T. J. Watson Research Center, Hawthorne, NY, USA

  • Venue:
  • PLDI '10 Proceedings of the 2010 ACM SIGPLAN conference on Programming language design and implementation
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Memory models are hard to reason about due to their complexity, which stems from the need to strike a balance between ease-of-programming and allowing compiler and hardware optimizations. In this paper, we present an automated tool, MemSAT, that helps in debugging and reasoning about memory models. Given an axiomatic specification of a memory model and a multi-threaded test program containing assertions, MemSAT outputs a trace of the program in which both the assertions and the memory model axioms are satisfied, if one can be found. The tool is fully automatic and is based on a SAT solver. If it cannot find a trace, it outputs a minimal subset of the memory model and program constraints that are unsatisfiable. We used MemSAT to check several existing memory models against their published test cases, including the current Java Memory Model by Manson et al. and a revised version of it by Sevcik and Aspinall. We found subtle discrepancies between what was expected and the actual results of test programs.