Memory-Model-Sensitive Data Race Analysis

  • Yue Yang
  • Ganesh Gopalakrishnan
  • Gary Lindstrom
Conference paper

DOI: 10.1007/978-3-540-30482-1_11

Part of the Lecture Notes in Computer Science book series (LNCS, volume 3308)
Cite this paper as:
Yang Y., Gopalakrishnan G., Lindstrom G. (2004) Memory-Model-Sensitive Data Race Analysis. In: Davies J., Schulte W., Barnett M. (eds) Formal Methods and Software Engineering. ICFEM 2004. Lecture Notes in Computer Science, vol 3308. Springer, Berlin, Heidelberg

Abstract

We present a “memory-model-sensitive” approach to validating correctness properties for multithreaded programs. Our key insight is that by specifying both the inter-thread memory consistency model and the intra-thread program semantics as constraints, a program verification task can be reduced to an equivalent constraint solving problem, thus allowing an exhaustive examination of all thread interleavings precisely allowed by a given memory model. To demonstrate, this paper formalizes race conditions according to the new Java memory model, for a simplified but non-trivial source language. We then describe the implementation of a memory-model-sensitive race detector using constraint logic programming (CLP). In comparison with conventional program analysis, our approach does not offer the same kind of performance and scalability due to the complexity involved in exact formal reasoning. However, we show that a formal semantics can serve more than documentation purposes — it can be applied as a sound basis for rigorous property checking, upon which more scalable methods can be derived.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Yue Yang
    • 1
  • Ganesh Gopalakrishnan
    • 2
  • Gary Lindstrom
    • 2
  1. 1.Microsoft Research, One Microsoft WayRedmond
  2. 2.School of ComputingUniversity of UtahSalt Lake City

Personalised recommendations