Re: JavaMemoryModel: Causality Test 16

From: Sylvia Else (sylviae@optushome.com.au)
Date: Sat Dec 20 2003 - 16:51:41 EST


At 01:15 AM 19/12/2003 -0500, Jeremy Manson wrote:
>[Charset iso-8859-1 unsupported, filtering to ASCII...]
> > Bill, Jeremy,
> >
> > Can you can say if the behavior of the Causality Test Case 16 is allowed
> > or prohibited?
> > (http://www.cs.umd.edu/~pugh/java/memoryModel/CausalityTestCases.html)
> >
>
>Sorry about that. It's allowed.

 From the web page...

=========================

Causality test case 16

Initially, x = 0

Thread 1:
r1 = x
x = 1

Thread 2:
r2 = x
x = 2

Behavior in question: r1 == 2; r2 == 1

Decision: Allowed.

==========================

I'm having some difficulty seeing why this isn't like test case 5. Although
there are executions that result in r1 == 2, and executions that result in
r2 ==1, I cannot see an execution that produces both, so one or other value
is out of thin air even though there are other non-out-of-thin air
executions that store that value.

Sylvia.

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



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