changeset 280:5e67118d550e

Chapter 1.a: VarHandles basic tests (actual tests)
author shade
date Tue, 31 May 2016 19:40:07 +0300
parents f1b557c22a53
children c80cab9599e4
files tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/BooleanTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/ByteTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/StringTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/BooleanTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/ByteTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/StringTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/BooleanTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/ByteTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/StringTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/BooleanTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/ByteTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/StringTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/plain/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/plain/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/plain/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/plain/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/plain/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/plain/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/volatiles/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/volatiles/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/volatiles/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/volatiles/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/volatiles/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/volatiles/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/acqrel/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/acqrel/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/acqrel/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/acqrel/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/acqrel/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/acqrel/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/opaque/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/opaque/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/opaque/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/opaque/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/opaque/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/opaque/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/plain/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/plain/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/plain/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/plain/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/plain/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/plain/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/volatiles/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/volatiles/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/volatiles/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/volatiles/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/volatiles/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/little/volatiles/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/acqrel/BooleanTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/acqrel/ByteTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/acqrel/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/acqrel/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/acqrel/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/acqrel/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/acqrel/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/acqrel/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/acqrel/StringTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/opaque/BooleanTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/opaque/ByteTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/opaque/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/opaque/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/opaque/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/opaque/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/opaque/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/opaque/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/opaque/StringTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/plain/BooleanTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/plain/ByteTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/plain/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/plain/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/plain/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/plain/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/plain/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/plain/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/plain/StringTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/volatiles/BooleanTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/volatiles/ByteTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/volatiles/CharTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/volatiles/DoubleTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/volatiles/FloatTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/volatiles/IntTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/volatiles/LongTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/volatiles/ShortTest.java tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/fields/volatiles/StringTest.java
diffstat 216 files changed, 11856 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/BooleanTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[false]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[true]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class BooleanTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(boolean[].class);
+
+    boolean[] xs = new boolean[1];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, 0, true);
+    }
+
+    @Actor
+    public void actor2(BooleanResult1 r) {
+        r.r1 = (boolean)VH.getAcquire(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/ByteTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ByteTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(byte[].class);
+
+    byte[] xs = new byte[1];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, 0, (byte) -1);
+    }
+
+    @Actor
+    public void actor2(ByteResult1 r) {
+        r.r1 = (byte)VH.getAcquire(xs, 0);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(double[].class);
+
+    double[] xs = new double[1];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, 0, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getAcquire(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(float[].class);
+
+    float[] xs = new float[1];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, 0, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getAcquire(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(int[].class);
+
+    int[] xs = new int[1];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, 0, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getAcquire(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(long[].class);
+
+    long[] xs = new long[1];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, 0, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getAcquire(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(short[].class);
+
+    short[] xs = new short[1];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, 0, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getAcquire(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/acqrel/StringTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[null]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[object]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class StringTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(String[].class);
+
+    String[] xs = new String[1];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, 0, "object");
+    }
+
+    @Actor
+    public void actor2(StringResult1 r) {
+        r.r1 = (String)VH.getAcquire(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/BooleanTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[false]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[true]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class BooleanTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(boolean[].class);
+
+    boolean[] xs = new boolean[1];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, 0, true);
+    }
+
+    @Actor
+    public void actor2(BooleanResult1 r) {
+        r.r1 = (boolean)VH.getOpaque(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/ByteTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ByteTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(byte[].class);
+
+    byte[] xs = new byte[1];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, 0, (byte) -1);
+    }
+
+    @Actor
+    public void actor2(ByteResult1 r) {
+        r.r1 = (byte)VH.getOpaque(xs, 0);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(double[].class);
+
+    double[] xs = new double[1];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, 0, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getOpaque(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(float[].class);
+
+    float[] xs = new float[1];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, 0, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getOpaque(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(int[].class);
+
+    int[] xs = new int[1];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, 0, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getOpaque(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(long[].class);
+
+    long[] xs = new long[1];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, 0, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getOpaque(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(short[].class);
+
+    short[] xs = new short[1];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, 0, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getOpaque(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/opaque/StringTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[null]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[object]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class StringTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(String[].class);
+
+    String[] xs = new String[1];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, 0, "object");
+    }
+
+    @Actor
+    public void actor2(StringResult1 r) {
+        r.r1 = (String)VH.getOpaque(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/BooleanTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[false]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[true]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class BooleanTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(boolean[].class);
+
+    boolean[] xs = new boolean[1];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, 0, true);
+    }
+
+    @Actor
+    public void actor2(BooleanResult1 r) {
+        r.r1 = (boolean)VH.get(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/ByteTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ByteTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(byte[].class);
+
+    byte[] xs = new byte[1];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, 0, (byte) -1);
+    }
+
+    @Actor
+    public void actor2(ByteResult1 r) {
+        r.r1 = (byte)VH.get(xs, 0);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.ACCEPTABLE_SPEC, desc = "Non-atomic access detected, allowed by spec")
+@Ref("http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(double[].class);
+
+    double[] xs = new double[1];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, 0, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.get(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(float[].class);
+
+    float[] xs = new float[1];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, 0, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.get(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(int[].class);
+
+    int[] xs = new int[1];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, 0, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.get(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.ACCEPTABLE_SPEC, desc = "Non-atomic access detected, allowed by spec")
+@Ref("http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(long[].class);
+
+    long[] xs = new long[1];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, 0, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.get(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(short[].class);
+
+    short[] xs = new short[1];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, 0, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.get(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/plain/StringTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[null]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[object]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class StringTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(String[].class);
+
+    String[] xs = new String[1];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, 0, "object");
+    }
+
+    @Actor
+    public void actor2(StringResult1 r) {
+        r.r1 = (String)VH.get(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/BooleanTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[false]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[true]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class BooleanTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(boolean[].class);
+
+    boolean[] xs = new boolean[1];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, 0, true);
+    }
+
+    @Actor
+    public void actor2(BooleanResult1 r) {
+        r.r1 = (boolean)VH.getVolatile(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/ByteTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ByteTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(byte[].class);
+
+    byte[] xs = new byte[1];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, 0, (byte) -1);
+    }
+
+    @Actor
+    public void actor2(ByteResult1 r) {
+        r.r1 = (byte)VH.getVolatile(xs, 0);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(double[].class);
+
+    double[] xs = new double[1];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, 0, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getVolatile(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(float[].class);
+
+    float[] xs = new float[1];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, 0, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getVolatile(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(int[].class);
+
+    int[] xs = new int[1];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, 0, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getVolatile(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(long[].class);
+
+    long[] xs = new long[1];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, 0, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getVolatile(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(short[].class);
+
+    short[] xs = new short[1];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, 0, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getVolatile(xs, 0);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/arrays/volatiles/StringTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.arrays.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[null]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[object]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class StringTest {
+
+    static final VarHandle VH = MethodHandles.arrayElementVarHandle(String[].class);
+
+    String[] xs = new String[1];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, 0, "object");
+    }
+
+    @Actor
+    public void actor2(StringResult1 r) {
+        r.r1 = (String)VH.getVolatile(xs, 0);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(double[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, OFF, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getAcquire(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(float[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, OFF, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getAcquire(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(int[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, OFF, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getAcquire(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(long[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, OFF, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getAcquire(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/acqrel/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(short[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, OFF, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getAcquire(xs, OFF);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(double[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, OFF, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getOpaque(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(float[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, OFF, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getOpaque(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(int[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, OFF, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getOpaque(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(long[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, OFF, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getOpaque(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/opaque/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(short[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, OFF, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getOpaque(xs, OFF);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.ACCEPTABLE_SPEC, desc = "Non-atomic access detected, allowed by spec")
+@Ref("http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7")
+@State
+public class DoubleTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(double[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, OFF, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.get(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(float[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, OFF, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.get(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(int[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, OFF, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.get(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.ACCEPTABLE_SPEC, desc = "Non-atomic access detected, allowed by spec")
+@Ref("http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7")
+@State
+public class LongTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(long[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, OFF, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.get(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/plain/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(short[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, OFF, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.get(xs, OFF);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(double[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, OFF, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getVolatile(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(float[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, OFF, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getVolatile(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(int[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, OFF, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getVolatile(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(long[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, OFF, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getVolatile(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/big/volatiles/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.big.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(short[].class, ByteOrder.BIG_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, OFF, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getVolatile(xs, OFF);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(double[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, OFF, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getAcquire(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(float[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, OFF, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getAcquire(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(int[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, OFF, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getAcquire(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(long[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, OFF, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getAcquire(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/acqrel/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(short[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(xs, OFF, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getAcquire(xs, OFF);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(double[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, OFF, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getOpaque(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(float[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, OFF, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getOpaque(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(int[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, OFF, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getOpaque(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(long[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, OFF, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getOpaque(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/opaque/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(short[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(xs, OFF, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getOpaque(xs, OFF);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.ACCEPTABLE_SPEC, desc = "Non-atomic access detected, allowed by spec")
+@Ref("http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7")
+@State
+public class DoubleTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(double[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, OFF, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.get(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(float[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, OFF, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.get(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(int[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, OFF, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.get(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.ACCEPTABLE_SPEC, desc = "Non-atomic access detected, allowed by spec")
+@Ref("http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7")
+@State
+public class LongTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(long[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, OFF, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.get(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/plain/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(short[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.set(xs, OFF, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.get(xs, OFF);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(double[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, OFF, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getVolatile(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(float[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, OFF, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getVolatile(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(int[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, OFF, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getVolatile(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(long[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, OFF, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getVolatile(xs, OFF);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteArray/little/volatiles/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteArray.little.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final int OFF = ByteBuffer.wrap(new byte[128]).alignmentOffset(0, 8);
+    static final VarHandle VH = MethodHandles.byteArrayViewVarHandle(short[].class, ByteOrder.LITTLE_ENDIAN);
+
+    byte[] xs = new byte[OFF + 8];
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(xs, OFF, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getVolatile(xs, OFF);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(double[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(float[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(int[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(long[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/acqrel/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(short[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getAcquire(buf, off);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(double[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(float[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(int[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(long[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/opaque/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(short[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getOpaque(buf, off);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.ACCEPTABLE_SPEC, desc = "Non-atomic access detected, allowed by spec")
+@Ref("http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(double[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.get(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(float[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.get(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(int[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.get(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.ACCEPTABLE_SPEC, desc = "Non-atomic access detected, allowed by spec")
+@Ref("http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(long[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.get(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/plain/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(short[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.get(buf, off);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(double[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(buf, off, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getVolatile(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(float[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(buf, off, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getVolatile(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(int[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(buf, off, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getVolatile(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(long[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(buf, off, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getVolatile(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/big/volatiles/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.big.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(short[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(buf, off, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getVolatile(buf, off);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(double[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(float[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(int[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(long[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/acqrel/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(short[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getAcquire(buf, off);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(double[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(float[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(int[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(long[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/opaque/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(short[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getOpaque(buf, off);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.ACCEPTABLE_SPEC, desc = "Non-atomic access detected, allowed by spec")
+@Ref("http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(double[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.get(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(float[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.get(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(int[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.get(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.ACCEPTABLE_SPEC, desc = "Non-atomic access detected, allowed by spec")
+@Ref("http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(long[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.get(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/plain/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(short[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.get(buf, off);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(double[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(buf, off, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getVolatile(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(float[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(buf, off, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getVolatile(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(int[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(buf, off, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getVolatile(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(long[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(buf, off, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getVolatile(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/direct/little/volatiles/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.direct.little.volatiles;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(short[].class, ByteOrder.LITTLE_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocateDirect(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setVolatile(buf, off, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getVolatile(buf, off);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(double[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(float[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(int[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(long[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getAcquire(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/acqrel/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.acqrel;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(short[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setRelease(buf, off, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getAcquire(buf, off);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(double[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(float[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class IntTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(int[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, -1);
+    }
+
+    @Actor
+    public void actor2(IntResult1 r) {
+        r.r1 = (int)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/LongTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class LongTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(long[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, -1L);
+    }
+
+    @Actor
+    public void actor2(LongResult1 r) {
+        r.r1 = (long)VH.getOpaque(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/opaque/ShortTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.opaque;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[-1]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class ShortTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(short[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.setOpaque(buf, off, (short) -1);
+    }
+
+    @Actor
+    public void actor2(ShortResult1 r) {
+        r.r1 = (short)VH.getOpaque(buf, off);
+    }
+
+}
+
+
Binary file tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/plain/CharTest.java has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/plain/DoubleTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[1.39067116124321E-309]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.ACCEPTABLE_SPEC, desc = "Non-atomic access detected, allowed by spec")
+@Ref("http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.7")
+@State
+public class DoubleTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(double[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, 1.39067116124321E-309);
+    }
+
+    @Actor
+    public void actor2(DoubleResult1 r) {
+        r.r1 = (double)VH.get(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/plain/FloatTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.openjdk.jcstress.tests.accessAtomic.varHandles.byteBuffer.heap.big.plain;
+
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
+import java.nio.ByteOrder;
+import java.nio.ByteBuffer;
+
+import org.openjdk.jcstress.annotations.*;
+import org.openjdk.jcstress.infra.results.*;
+
+// -- This file was mechanically generated: Do not edit! -- //
+
+/**
+ * Tests if fields experience non-atomic reads/writes.
+ */
+@JCStressTest
+@Outcome(id = "[0.0]", expect = Expect.ACCEPTABLE, desc = "Default value for the field. Allowed to see this: data race.")
+@Outcome(id = "[2.3509528E-38]", expect = Expect.ACCEPTABLE, desc = "The value set by the actor thread. Observer sees the complete update.")
+@Outcome(expect = Expect.FORBIDDEN, desc = "Other values are forbidden: atomicity violation.")
+@State
+public class FloatTest {
+
+    static final VarHandle VH = MethodHandles.byteBufferViewVarHandle(float[].class, ByteOrder.BIG_ENDIAN);
+
+    ByteBuffer buf = ByteBuffer.allocate(16);
+    int off = buf.alignmentOffset(0, 8);
+
+    @Actor
+    public void actor1() {
+        VH.set(buf, off, 2.3509528E-38F);
+    }
+
+    @Actor
+    public void actor2(FloatResult1 r) {
+        r.r1 = (float)VH.get(buf, off);
+    }
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests-chapter-1a/src/main/java/org/openjdk/jcstress/tests/accessAtomic/varHandles/byteBuffer/heap/big/plain/IntTest.java	Tue May 31 19:40:07 2016 +0300
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+