Sigh, yet another typo.. here is Take 3...
----------------------------------------------------------
Test 14a
Initially: a=b=y=0
Thread 1
r1 =a
if (r1 == 0)
y =1
else
b =1
Thread 2
r2=y
r3=b
if (r2+r3 !=0)
a=1
Question: r1=r3=1, r2=0?
---------------------------------------------------------------
Sylvia Else wrote:
> Vijay,
>
> I don't see why this test case is an issue. The outcome you give can
> be obtained from an SC execution, so it's certainly permitted.
>
> r1 = 1
> b = 1
> r2 = 0 (from y)
> r3 = 1 (from b)
> a = 1
>
> Is the outcome guaranteed? No.
>
> Sylvia.
>
> At 06:06 PM 8/03/2004 -0500, Vijay Saraswat wrote:
>
>> Uh sorry, it looks like my formatting got mangled.. here it is again:
>> ----------------------------------------------------------
>> Test 14a
>> Initially: a=b=y=0
>>
>> Thread 1
>> r1 =1
>> if (r1 == 0)
>> y =1
>> else
>> b =1
>>
>> Thread 2
>> r2=y
>> r3=b
>> if (r2+r3 !=0)
>> a=1
>>
>> Question: r1=r3=1, r2=0?
>> -----------------------------------------------------------
>>
>>
>> Vijay Saraswat wrote:
>>
>>> I wonder whether this test case has been discussed before. If so,
>>> please point me to the discussion. If not, how should this be dealt
>>> with?
>>> -----------------------------------------------------------
>>> Test 14a
>>> Initially: a=b=y=0
>>>
>>> Thread 1 Thread 2
>>> r1=a if (r1==0) r2=y
>>> y=1 r3=b
>>> else if (r2+r3 != 0)
>>> b=1 a=1
>>>
>>> Question: r1=r3=1, r2=0?
>>> -----------------------------------------------------------
>>>
>>> The case is obtained from Test 14, without making the volatility
>>> assumption.
>>>
>>> Best,
>>> Vijay
>>>
>>> -------------------------------
>>> JavaMemoryModel mailing list -
>>> http://www.cs.umd.edu/~pugh/java/memoryModel
>>>
>>
>> -------------------------------
>> JavaMemoryModel mailing list -
>> http://www.cs.umd.edu/~pugh/java/memoryModel
>
>
> -------------------------------
> JavaMemoryModel mailing list -
> http://www.cs.umd.edu/~pugh/java/memoryModel
>
>
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:59 EDT