RE: JavaMemoryModel: New approach to defining the Java Memory Model

From: Jon Skeet (
Date: Fri Aug 02 2002 - 06:06:10 EDT

> Jeremy and I have written up a very rough draft of a new approach to
> specifying the Java Memory Model:
> The write up is rough, but complete enough to ask for
> (forgiving) feedback on.
> We have changed the way we describe the semantics. Rather than
> talking about overwritten, previous and allWrite sets, we talk about
> execution traces and happens-before edges and paths. It is really
> just two ways of talking about the same thing.
> We made the change because I think it will be easier for others to
> understand. If people don't like the new way of talking about the
> memory model, we can easily go back to talking about allWrites,
> overwritten and previous.

I have only one comment, and you should feel *very* free to ignore it, given that I know very little indeed about this field. On the other hand, if the readership you'll eventually be targetting includes people such as myself, it might be worth bearing in mind.

"Happens-before" is a tricky concept, IMO. It's not *difficult*, but it ends up with things going a counterintuitive way. If you have "There is a happens-before edge from Tuesday to Monday" that's harder to parse than "There is a happens-after edge from Monday to Tuesday". It's just a case of reversing the direction and the source/destination, but going "from" an earlier event "to" a definitely later event seems more intuitive to me.

If there's a very important technical reason why this doesn't work, I'd be very interested to hear it as it probably means I've been reading everything incorrectly!


JavaMemoryModel mailing list -

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