Re: JavaMemoryModel: specific Causality test cases

From: Martin Trotter (
Date: Wed Jul 30 2003 - 05:50:07 EDT

I agree that 1,2 and 3 can be justified but 4 and 5 cannot. The
interesting question is why ! All 5 of course break my previous causal
proposal since they require that one thread gain access to the future
writes of another thread. As Sarita observed this was a 'strong causality'
proposal and clearly too strong for some. I think the key difference is
that examples 1 to 3 only require access to writes which cannot fail to be
written in any executions of the code. I think that makes these cases
acceptable; by static analysis of the code we can see that certain outcomes
can be predicted and thus other threads are free to assume that they will
in fact occur. These outcomes can then appear in some interleavings with
other writes from the thread. Examples 4 and 5 require that a thread can
read a value which is dependent on one of the writes which that thread will
make in the future as a result of that read. It is these self justifying
cases that are not acceptable. I'd much prefer a few sentences to make the
distinction between these cases but if it takes a few pages as now then so
be it.

Martin Trotter

JavaMemoryModel mailing list -

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