JavaMemoryModel: Proposed Test Case 18b

From: Vijay Saraswat (vijay@saraswat.org)
Date: Thu Feb 26 2004 - 15:24:37 EST


I propose that the following test case be added to the suite.

I cant argue that its forced by other principles. I think we must take
this as axiomatic. But if we accept this, and accept the Linking
Principle, then this forces test case 18 to be forbidden.

<H2>Test case 18b</H2><PRE>Initially, x = y = 0

Thread 1:
1: r3 = x
2: if (r3 == 0)
3: x = 42
4: r1 = x
5: y = r1

Thread 2:
6: r2 = y
7: x = r2

Thread 3:
8: x=43;

Behavior in question: r1 == r2 == r3 == 42

Decision: Forbidden.

See also: Test case 18

</PRE>
<HR>

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:58 EDT