changeset 100:236597b2feab

Migrate causality.* tests to new API.
author shade
date Fri, 14 Mar 2014 01:16:11 +0400
parents 4e65f3ea2e35
children a955202e329e
files tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/BooleanLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/ByteLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/CharLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/DoubleLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/FloatLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/IntLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/LongLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/ObjectLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/ShortLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/BooleanLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/ByteLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/CharLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/DoubleLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/FloatLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/IntLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/LongLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/ObjectLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/ShortLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/BooleanLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/ByteLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/CharLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/DoubleLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/FloatLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/IntLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/LongLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/ObjectLazyTest.java tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/ShortLazyTest.java
diffstat 27 files changed, 469 insertions(+), 639 deletions(-) [+]
line wrap: on
line diff
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/BooleanLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/BooleanLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,42 +24,36 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.cached;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.BooleanResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class BooleanLazyTest implements Actor2_Test<BooleanLazyTest.State, BooleanResult2> {
+@ConcurrencyStressTest
+@State
+public class BooleanLazyTest {
 
-    @Override
-    public void actor1(State s, BooleanResult2 r) {
-        boolean f = s.f;
+    boolean f;
+
+    @Actor
+    public void actor1(BooleanResult2 r) {
+        boolean f = this.f;
         if (!f) {
             f = true;
-            s.f = f;
+            this.f = f;
         }
         r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, BooleanResult2 r) {
-        boolean f = s.f;
+    @Actor
+    public void actor2(BooleanResult2 r) {
+        boolean f = this.f;
         if (!f) {
             f = true;
-            s.f = f;
+            this.f = f;
         }
         r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public BooleanResult2 newResult() {
-        return new BooleanResult2();
-    }
-
-    public static class State {
-        boolean f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/ByteLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/ByteLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,42 +24,36 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.cached;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.ByteResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class ByteLazyTest implements Actor2_Test<ByteLazyTest.State, ByteResult2> {
+@ConcurrencyStressTest
+@State
+public class ByteLazyTest {
 
-    @Override
-    public void actor1(State s, ByteResult2 r) {
-        byte f = s.f;
+    byte f;
+
+    @Actor
+    public void actor1(ByteResult2 r) {
+        byte f = this.f;
         if (f == 0) {
             f = 1;
-            s.f = f;
+            this.f = f;
         }
         r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, ByteResult2 r) {
-        byte f = s.f;
+    @Actor
+    public void actor2(ByteResult2 r) {
+        byte f = this.f;
         if (f == 0) {
             f = 1;
-            s.f = f;
+            this.f = f;
         }
         r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public ByteResult2 newResult() {
-        return new ByteResult2();
-    }
-
-    public static class State {
-        byte f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/CharLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/CharLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,42 +24,36 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.cached;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.CharResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class CharLazyTest implements Actor2_Test<CharLazyTest.State, CharResult2> {
+@ConcurrencyStressTest
+@State
+public class CharLazyTest {
 
-    @Override
-    public void actor1(State s, CharResult2 r) {
-        char f = s.f;
+    char f;
+
+    @Actor
+    public void actor1(CharResult2 r) {
+        char f = this.f;
         if (f == 0) {
             f = 1;
-            s.f = f;
+            this.f = f;
         }
         r.r1 = (char) (f + 'A');
     }
 
-    @Override
-    public void actor2(State s, CharResult2 r) {
-        char f = s.f;
+    @Actor
+    public void actor2( CharResult2 r) {
+        char f = this.f;
         if (f == 0) {
             f = 1;
-            s.f = f;
+            this.f = f;
         }
         r.r2 = (char) (f + 'A');
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public CharResult2 newResult() {
-        return new CharResult2();
-    }
-
-    public static class State {
-        char f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/DoubleLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/DoubleLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,42 +24,36 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.cached;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.DoubleResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class DoubleLazyTest implements Actor2_Test<DoubleLazyTest.State, DoubleResult2> {
+@ConcurrencyStressTest
+@State
+public class DoubleLazyTest {
 
-    @Override
-    public void actor1(State s, DoubleResult2 r) {
-        double f = s.f;
+    double f;
+
+    @Actor
+    public void actor1(DoubleResult2 r) {
+        double f = this.f;
         if (f == 0D) {
             f = 1D;
-            s.f = f;
+            this.f = f;
         }
         r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, DoubleResult2 r) {
-        double f = s.f;
+    @Actor
+    public void actor2(DoubleResult2 r) {
+        double f = this.f;
         if (f == 0D) {
             f = 1D;
-            s.f = f;
+            this.f = f;
         }
         r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public DoubleResult2 newResult() {
-        return new DoubleResult2();
-    }
-
-    public static class State {
-        double f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/FloatLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/FloatLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,42 +24,37 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.cached;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.FloatResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
+import org.openjdk.jcstress.tests.Actor4_Test;
 
-public class FloatLazyTest implements Actor2_Test<FloatLazyTest.State, FloatResult2> {
+@ConcurrencyStressTest
+@State
+public class FloatLazyTest {
 
-    @Override
-    public void actor1(State s, FloatResult2 r) {
-        float f = s.f;
+    float f;
+
+    @Actor
+    public void actor1(FloatResult2 r) {
+        float f = this.f;
         if (f == 0F) {
             f = 1F;
-            s.f = f;
+            this.f = f;
         }
         r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, FloatResult2 r) {
-        float f = s.f;
+    @Actor
+    public void actor2(FloatResult2 r) {
+        float f = this.f;
         if (f == 0F) {
             f = 1F;
-            s.f = f;
+            this.f = f;
         }
         r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public FloatResult2 newResult() {
-        return new FloatResult2();
-    }
-
-    public static class State {
-        float f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/IntLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/IntLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,42 +24,36 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.cached;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.IntResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class IntLazyTest implements Actor2_Test<IntLazyTest.State, IntResult2> {
+@ConcurrencyStressTest
+@State
+public class IntLazyTest {
 
-    @Override
-    public void actor1(State s, IntResult2 r) {
-        int f = s.f;
+    int f;
+
+    @Actor
+    public void actor1(IntResult2 r) {
+        int f = this.f;
         if (f == 0) {
             f = 1;
-            s.f = f;
+            this.f = f;
         }
         r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, IntResult2 r) {
-        int f = s.f;
+    @Actor
+    public void actor2(IntResult2 r) {
+        int f = this.f;
         if (f == 0) {
             f = 1;
-            s.f = f;
+            this.f = f;
         }
         r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public IntResult2 newResult() {
-        return new IntResult2();
-    }
-
-    public static class State {
-        int f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/LongLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/LongLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,42 +24,36 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.cached;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class LongLazyTest implements Actor2_Test<LongLazyTest.State, LongResult2> {
+@ConcurrencyStressTest
+@State
+public class LongLazyTest {
 
-    @Override
-    public void actor1(State s, LongResult2 r) {
-        long f = s.f;
+    long f;
+
+    @Actor
+    public void actor1(LongResult2 r) {
+        long f = this.f;
         if (f == 0) {
             f = 1;
-            s.f = f;
+            this.f = f;
         }
         r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, LongResult2 r) {
-        long f = s.f;
+    @Actor
+    public void actor2(LongResult2 r) {
+        long f = this.f;
         if (f == 0) {
             f = 1;
-            s.f = f;
+            this.f = f;
         }
         r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public LongResult2 newResult() {
-        return new LongResult2();
-    }
-
-    public static class State {
-        long f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/ObjectLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/ObjectLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,42 +24,36 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.cached;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.IntResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class ObjectLazyTest implements Actor2_Test<ObjectLazyTest.State, IntResult2> {
+@ConcurrencyStressTest
+@State
+public class ObjectLazyTest {
 
-    @Override
-    public void actor1(State s, IntResult2 r) {
-        Object f = s.f;
+    Object f;
+
+    @Actor
+    public void actor1(IntResult2 r) {
+        Object f = this.f;
         if (f == null) {
             f = new Object();
-            s.f = f;
+            this.f = f;
         }
         r.r1 = (f == null) ? 0 : 1;
     }
 
-    @Override
-    public void actor2(State s, IntResult2 r) {
-        Object f = s.f;
+    @Actor
+    public void actor2(IntResult2 r) {
+        Object f = this.f;
         if (f == null) {
             f = new Object();
-            s.f = f;
+            this.f = f;
         }
         r.r2 = (f == null) ? 0 : 1;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public IntResult2 newResult() {
-        return new IntResult2();
-    }
-
-    public static class State {
-        Object f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/ShortLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/cached/ShortLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,42 +24,36 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.cached;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.ShortResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class ShortLazyTest implements Actor2_Test<ShortLazyTest.State, ShortResult2> {
+@ConcurrencyStressTest
+@State
+public class ShortLazyTest {
 
-    @Override
-    public void actor1(State s, ShortResult2 r) {
-        short f = s.f;
+    short f;
+
+    @Actor
+    public void actor1(ShortResult2 r) {
+        short f = this.f;
         if (f == 0) {
             f = 1;
-            s.f = f;
+            this.f = f;
         }
         r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, ShortResult2 r) {
-        short f = s.f;
+    @Actor
+    public void actor2(ShortResult2 r) {
+        short f = this.f;
         if (f == 0) {
             f = 1;
-            s.f = f;
+            this.f = f;
         }
         r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public ShortResult2 newResult() {
-        return new ShortResult2();
-    }
-
-    public static class State {
-        short f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/BooleanLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/BooleanLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,32 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.plain;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.BooleanResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class BooleanLazyTest implements Actor2_Test<BooleanLazyTest.State, BooleanResult2> {
+@ConcurrencyStressTest
+@State
+public class BooleanLazyTest {
 
-    @Override
-    public void actor1(State s, BooleanResult2 r) {
-        if (!s.f) {
-            s.f = true;
+    boolean f;
+
+    @Actor
+    public void actor1(BooleanResult2 r) {
+        if (!f) {
+            f = true;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, BooleanResult2 r) {
-        if (!s.f) {
-            s.f = true;
+    @Actor
+    public void actor2(BooleanResult2 r) {
+        if (!f) {
+            f = true;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public BooleanResult2 newResult() {
-        return new BooleanResult2();
-    }
-
-    public static class State {
-        boolean f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/ByteLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/ByteLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,32 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.plain;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.ByteResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class ByteLazyTest implements Actor2_Test<ByteLazyTest.State, ByteResult2> {
+@ConcurrencyStressTest
+@State
+public class ByteLazyTest {
 
-    @Override
-    public void actor1(State s, ByteResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    byte f;
+
+    @Actor
+    public void actor1(ByteResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, ByteResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    @Actor
+    public void actor2(ByteResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public ByteResult2 newResult() {
-        return new ByteResult2();
-    }
-
-    public static class State {
-        byte f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/CharLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/CharLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,32 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.plain;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.CharResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class CharLazyTest implements Actor2_Test<CharLazyTest.State, CharResult2> {
+@ConcurrencyStressTest
+@State
+public class CharLazyTest {
 
-    @Override
-    public void actor1(State s, CharResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    char f;
+
+    @Actor
+    public void actor1(CharResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r1 = (char) (s.f + 'A');
+        r.r1 = (char) (f + 'A');
     }
 
-    @Override
-    public void actor2(State s, CharResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    @Actor
+    public void actor2(CharResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r2 = (char) (s.f + 'A');
+        r.r2 = (char) (f + 'A');
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public CharResult2 newResult() {
-        return new CharResult2();
-    }
-
-    public static class State {
-        char f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/DoubleLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/DoubleLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,32 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.plain;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.DoubleResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class DoubleLazyTest implements Actor2_Test<DoubleLazyTest.State, DoubleResult2> {
+@ConcurrencyStressTest
+@State
+public class DoubleLazyTest {
 
-    @Override
-    public void actor1(State s, DoubleResult2 r) {
-        if (s.f == 0D) {
-            s.f = 1D;
+    double f;
+
+    @Actor
+    public void actor1(DoubleResult2 r) {
+        if (f == 0D) {
+            f = 1D;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, DoubleResult2 r) {
-        if (s.f == 0D) {
-            s.f = 1D;
+    @Actor
+    public void actor2(DoubleResult2 r) {
+        if (f == 0D) {
+            f = 1D;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public DoubleResult2 newResult() {
-        return new DoubleResult2();
-    }
-
-    public static class State {
-        double f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/FloatLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/FloatLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,32 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.plain;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.FloatResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class FloatLazyTest implements Actor2_Test<FloatLazyTest.State, FloatResult2> {
+@ConcurrencyStressTest
+@State
+public class FloatLazyTest {
 
-    @Override
-    public void actor1(State s, FloatResult2 r) {
-        if (s.f == 0F) {
-            s.f = 1F;
+    float f;
+
+    @Actor
+    public void actor1(FloatResult2 r) {
+        if (f == 0F) {
+            f = 1F;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, FloatResult2 r) {
-        if (s.f == 0F) {
-            s.f = 1F;
+    @Actor
+    public void actor2(FloatResult2 r) {
+        if (f == 0F) {
+            f = 1F;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public FloatResult2 newResult() {
-        return new FloatResult2();
-    }
-
-    public static class State {
-        float f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/IntLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/IntLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,32 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.plain;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.IntResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class IntLazyTest implements Actor2_Test<IntLazyTest.State, IntResult2> {
+@ConcurrencyStressTest
+@State
+public class IntLazyTest {
 
-    @Override
-    public void actor1(State s, IntResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    int f;
+
+    @Actor
+    public void actor1(IntResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, IntResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    @Actor
+    public void actor2(IntResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public IntResult2 newResult() {
-        return new IntResult2();
-    }
-
-    public static class State {
-        int f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/LongLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/LongLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,32 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.plain;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class LongLazyTest implements Actor2_Test<LongLazyTest.State, LongResult2> {
+@ConcurrencyStressTest
+@State
+public class LongLazyTest {
 
-    @Override
-    public void actor1(State s, LongResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    long f;
+
+    @Actor
+    public void actor1(LongResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, LongResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    @Actor
+    public void actor2(LongResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public LongResult2 newResult() {
-        return new LongResult2();
-    }
-
-    public static class State {
-        long f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/ObjectLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/ObjectLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,32 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.plain;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.IntResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class ObjectLazyTest implements Actor2_Test<ObjectLazyTest.State, IntResult2> {
+@ConcurrencyStressTest
+@State
+public class ObjectLazyTest {
 
-    @Override
-    public void actor1(State s, IntResult2 r) {
-        if (s.f == null) {
-            s.f = new Object();
+    Object f;
+
+    @Actor
+    public void actor1(IntResult2 r) {
+        if (f == null) {
+            f = new Object();
         }
-        r.r1 = (s.f == null) ? 0 : 1;
+        r.r1 = (f == null) ? 0 : 1;
     }
 
-    @Override
-    public void actor2(State s, IntResult2 r) {
-        if (s.f == null) {
-            s.f = new Object();
+    @Actor
+    public void actor2(IntResult2 r) {
+        if (f == null) {
+            f = new Object();
         }
-        r.r2 = (s.f == null) ? 0 : 1;
+        r.r2 = (f == null) ? 0 : 1;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public IntResult2 newResult() {
-        return new IntResult2();
-    }
-
-    public static class State {
-        Object f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/ShortLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/plain/ShortLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,32 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.plain;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.ShortResult2;
 import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class ShortLazyTest implements Actor2_Test<ShortLazyTest.State, ShortResult2> {
+@ConcurrencyStressTest
+@State
+public class ShortLazyTest {
 
-    @Override
-    public void actor1(State s, ShortResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    short f;
+
+    @Actor
+    public void actor1(ShortResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, ShortResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    @Actor
+    public void actor2(ShortResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public ShortResult2 newResult() {
-        return new ShortResult2();
-    }
-
-    public static class State {
-        short f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/BooleanLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/BooleanLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,31 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.volatiles;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.BooleanResult2;
-import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class BooleanLazyTest implements Actor2_Test<BooleanLazyTest.State, BooleanResult2> {
+@ConcurrencyStressTest
+@State
+public class BooleanLazyTest {
 
-    @Override
-    public void actor1(State s, BooleanResult2 r) {
-        if (!s.f) {
-            s.f = true;
+    volatile boolean f;
+
+    @Actor
+    public void actor1(BooleanResult2 r) {
+        if (!f) {
+            f = true;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, BooleanResult2 r) {
-        if (!s.f) {
-            s.f = true;
+    @Actor
+    public void actor2(BooleanResult2 r) {
+        if (!f) {
+            f = true;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public BooleanResult2 newResult() {
-        return new BooleanResult2();
-    }
-
-    public static class State {
-        volatile boolean f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/ByteLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/ByteLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,31 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.volatiles;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.ByteResult2;
-import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class ByteLazyTest implements Actor2_Test<ByteLazyTest.State, ByteResult2> {
+@ConcurrencyStressTest
+@State
+public class ByteLazyTest {
 
-    @Override
-    public void actor1(State s, ByteResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    volatile byte f;
+
+    @Actor
+    public void actor1(ByteResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, ByteResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    @Actor
+    public void actor2(ByteResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public ByteResult2 newResult() {
-        return new ByteResult2();
-    }
-
-    public static class State {
-        volatile byte f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/CharLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/CharLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,31 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.volatiles;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.CharResult2;
-import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class CharLazyTest implements Actor2_Test<CharLazyTest.State, CharResult2> {
+@ConcurrencyStressTest
+@State
+public class CharLazyTest {
 
-    @Override
-    public void actor1(State s, CharResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    volatile char f;
+
+    @Actor
+    public void actor1(CharResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r1 = (char) (s.f + 'A');
+        r.r1 = (char) (f + 'A');
     }
 
-    @Override
-    public void actor2(State s, CharResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    @Actor
+    public void actor2(CharResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r2 = (char) (s.f + 'A');
+        r.r2 = (char) (f + 'A');
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public CharResult2 newResult() {
-        return new CharResult2();
-    }
-
-    public static class State {
-        volatile char f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/DoubleLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/DoubleLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,31 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.volatiles;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.DoubleResult2;
-import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class DoubleLazyTest implements Actor2_Test<DoubleLazyTest.State, DoubleResult2> {
+@ConcurrencyStressTest
+@State
+public class DoubleLazyTest {
 
-    @Override
-    public void actor1(State s, DoubleResult2 r) {
-        if (s.f == 0D) {
-            s.f = 1D;
+    volatile double f;
+
+    @Actor
+    public void actor1(DoubleResult2 r) {
+        if (f == 0D) {
+            f = 1D;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, DoubleResult2 r) {
-        if (s.f == 0D) {
-            s.f = 1D;
+    @Actor
+    public void actor2(DoubleResult2 r) {
+        if (f == 0D) {
+            f = 1D;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public DoubleResult2 newResult() {
-        return new DoubleResult2();
-    }
-
-    public static class State {
-        volatile double f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/FloatLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/FloatLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,31 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.volatiles;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.FloatResult2;
-import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class FloatLazyTest implements Actor2_Test<FloatLazyTest.State, FloatResult2> {
+@ConcurrencyStressTest
+@State
+public class FloatLazyTest {
 
-    @Override
-    public void actor1(State s, FloatResult2 r) {
-        if (s.f == 0F) {
-            s.f = 1F;
+    volatile float f;
+
+    @Actor
+    public void actor1(FloatResult2 r) {
+        if (f == 0F) {
+            f = 1F;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, FloatResult2 r) {
-        if (s.f == 0F) {
-            s.f = 1F;
+    @Actor
+    public void actor2(FloatResult2 r) {
+        if (f == 0F) {
+            f = 1F;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public FloatResult2 newResult() {
-        return new FloatResult2();
-    }
-
-    public static class State {
-        volatile float f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/IntLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/IntLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,31 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.volatiles;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.IntResult2;
-import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class IntLazyTest implements Actor2_Test<IntLazyTest.State, IntResult2> {
+@ConcurrencyStressTest
+@State
+public class IntLazyTest {
 
-    @Override
-    public void actor1(State s, IntResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    volatile int f;
+
+    @Actor
+    public void actor1(IntResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, IntResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    @Actor
+    public void actor2(IntResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public IntResult2 newResult() {
-        return new IntResult2();
-    }
-
-    public static class State {
-        volatile int f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/LongLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/LongLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,31 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.volatiles;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.LongResult2;
-import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class LongLazyTest implements Actor2_Test<LongLazyTest.State, LongResult2> {
+@ConcurrencyStressTest
+@State
+public class LongLazyTest {
 
-    @Override
-    public void actor1(State s, LongResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    volatile long f;
+
+    @Actor
+    public void actor1(LongResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, LongResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    @Actor
+    public void actor2(LongResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public LongResult2 newResult() {
-        return new LongResult2();
-    }
-
-    public static class State {
-        volatile long f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/ObjectLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/ObjectLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,31 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.volatiles;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.IntResult2;
-import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class ObjectLazyTest implements Actor2_Test<ObjectLazyTest.State, IntResult2> {
+@ConcurrencyStressTest
+@State
+public class ObjectLazyTest {
 
-    @Override
-    public void actor1(State s, IntResult2 r) {
-        if (s.f == null) {
-            s.f = new Object();
+    volatile Object f;
+
+    @Actor
+    public void actor1(IntResult2 r) {
+        if (f == null) {
+            f = new Object();
         }
-        r.r1 = (s.f == null) ? 0 : 1;
+        r.r1 = (f == null) ? 0 : 1;
     }
 
-    @Override
-    public void actor2(State s, IntResult2 r) {
-        if (s.f == null) {
-            s.f = new Object();
+    @Actor
+    public void actor2(IntResult2 r) {
+        if (f == null) {
+            f = new Object();
         }
-        r.r2 = (s.f == null) ? 0 : 1;
+        r.r2 = (f == null) ? 0 : 1;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public IntResult2 newResult() {
-        return new IntResult2();
-    }
-
-    public static class State {
-        volatile Object f;
-    }
 }
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/ShortLazyTest.java	Fri Mar 14 00:35:06 2014 +0400
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/causality/lazyinit/volatiles/ShortLazyTest.java	Fri Mar 14 01:16:11 2014 +0400
@@ -24,38 +24,31 @@
  */
 package org.openjdk.jcstress.tests.causality.lazyinit.volatiles;
 
+import org.openjdk.jcstress.infra.annotations.Actor;
+import org.openjdk.jcstress.infra.annotations.ConcurrencyStressTest;
+import org.openjdk.jcstress.infra.annotations.State;
 import org.openjdk.jcstress.infra.results.ShortResult2;
-import org.openjdk.jcstress.tests.Actor2_Test;
 
-public class ShortLazyTest implements Actor2_Test<ShortLazyTest.State, ShortResult2> {
+@ConcurrencyStressTest
+@State
+public class ShortLazyTest {
 
-    @Override
-    public void actor1(State s, ShortResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    volatile short f;
+
+    @Actor
+    public void actor1(ShortResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r1 = s.f;
+        r.r1 = f;
     }
 
-    @Override
-    public void actor2(State s, ShortResult2 r) {
-        if (s.f == 0) {
-            s.f = 1;
+    @Actor
+    public void actor2(ShortResult2 r) {
+        if (f == 0) {
+            f = 1;
         }
-        r.r2 = s.f;
+        r.r2 = f;
     }
 
-    @Override
-    public State newState() {
-        return new State();
-    }
-
-    @Override
-    public ShortResult2 newResult() {
-        return new ShortResult2();
-    }
-
-    public static class State {
-        volatile short f;
-    }
 }