Explaining Relaxed Memory Models with Program Transformations
نویسندگان
چکیده
Weak memory models determine the behavior of concurrent programs. While they are often understood in terms of reorderings that the hardware or the compiler may perform, their formal definitions are typically given in a very different style—either axiomatic or operational. In this paper, we investigate to what extent weak behaviors of existing memory models can be fully explained in terms of reorderings and other program transformations. We prove that TSO is equivalent to a set of two local transformations over sequential consistency, but that nonmulti-copy-atomic models (such as C11, Power and ARM) cannot be explained in terms of local transformations over sequential consistency. We then show that transformations over a basic non-multi-copy-atomic model account for the relaxed behaviors of (a large fragment of) Power, but that ARM’s relaxed behaviors cannot be explained in a similar way. Our positive results may be used to simplify correctness of compilation proofs from a high-level language to TSO or Power.
منابع مشابه
Verifying Local Transformations on Relaxed Memory Models
The problem of locally transforming or translating programs without altering their semantics is central to the construction of correct compilers. For concurrent shared-memory programs this task is challenging because (1) concurrent threads can observe transformations that would be undetectable in a sequential program, and (2) contemporary multiprocessors commonly use relaxed memory models that ...
متن کاملCompositional Verification of Relaxed-Memory Program Transformations
is paper is about verifying program transformations on an axiomatic relaxed memory model of the kind used in C/C++ and Java. Relaxed models present particular challenges for verifying program transformations, because they generate many additional modes of interaction between code and context. For a block of code being transformed, we dene a denotation from its behaviour in a set of representa...
متن کامل(Relative) Safety Properties for Relaxed Approximate Programs
Researchers have recently begun to explore a new class of program transformations called approximate program transformations. These program transformations take an existing program and produce a new, relaxed approximate program that trades accuracy of its results for increased performance. In this paper, we explore how developers can use relational reasoning to verify relative properties of rel...
متن کاملVerifying Compiler Transformations for Concurrent Programs
Compilers transform programs, either to optimize performance orto translate language-level constructs into hardware primitives. Forconcurrent programs, ensuring that a transformation preserves thesemantics of the input program can be challenging. In particu-lar, the emitted code must correctly emulate the semantics of thelanguage-level memory model when running on hardware w...
متن کاملParameterized Memory Models and Concurrent Separation Logic (extended version)
Formal reasoning about concurrent programs is usually done with the assumption that the underlying memory model is sequentially consistent, i.e. the execution outcome is equivalent to an interleaving of instructions according to the program order. However, memory models in reality are weaker in order to accommodate compiler and hardware optimizations. To simplify the reasoning, many memory mode...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2016