Is it a legitimate concern that the behavior in Case 2 is too relaxed
if the read obtains its value from a future write on the _same_
variable from the same thread?
-- Jason
On Wed, 3 Jul 2002, Bill Pugh wrote:
> At 9:56 AM -0600 7/2/02, Yue  Yang wrote:
> >Bill,
> >
> >Does your semantics allow r1 = 1 in the following cases?
> >
> >* Case 1:
> >
> >Thread 1	Thread 2
> >
> >r1 = x;		r2 = y;
> >y = 1;		x = r2;
> >
> >
> >* Case 2:
> >
> >Thread 1	Thread 2
> >
> >r1 = x;		r2 = x;
> >x = 1;		x = r2;
> >
> >
> >It's not clear if x = r2 would use the same GUID as x = 1 or if it would
> >use a different GUID since assignment with local varialbes is not
> >explicitly discussed in your semantics.
> >
> >Thanks!
> >
> >-- Jason
> >
> 
> I really want to encourage anyone with questions to download the 
> simulator and try it.
> 
> Both cases allow the same behaviors: r1 == r2 = 0, r1 == 0 and r2 == 
> 1, or r1 == r2 == 1.
> 
>   [savoir 23] JavaSim < yy1.jmm
> Execution:
>          Thread 0
>                  "r1" = IntVal 0
>          Thread 1
>                  "r2" = IntVal 0
> Execution:
>          Thread 0
>                  "r1" = IntVal 0
>          Thread 1
>                  "r2" = IntVal 1
> Execution:
>          Thread 0
>                  "r1" = IntVal 1
>          Thread 1
>                  "r2" = IntVal 1
> 
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:40 EDT