Download Dynamic Invariant Generation for Multithreaded

Transcript
Arijit Chattopadhyay
Chapter2. Preliminaries
20
of a shared object, we will try to generate the transition invariants. The partitioning of the source
code into code regions was performed by our new LLVM based instrumentation tool, as shown in
Figure 1.1, which gradually increases the number of load/store instructions over global variables
in the code block, to allow the determination of the largest possible atomic code region.
For example, in Figure 2.5, ..main.c 10 15 0() means that R Tool is considering the code
block from Line 10 to Line 15 in Figure 2.4, whereas ..main.c 12 15 1() means that R Tool
is considering the code block from Line 12 to Line 15. In both cases, R Tool is able to generate
invariant (::p==orig(::p)), which indicates that the value of the pointer p is never changed
in between. By comparing these automatically generated invariants with the transition relation of
the source code, the developer can reach a conclusion that, for the test runs to pass, the code block
from Line 10 to Line 15 must be kept atomic.