diff --git a/exec/multiple_phi_cycles.java b/exec/multiple_phi_cycles.java new file mode 100755 index 0000000000000000000000000000000000000000..5629ea4087803995f8f52c710dfcc32433ab9f92 --- /dev/null +++ b/exec/multiple_phi_cycles.java @@ -0,0 +1,97 @@ +class Test { + public static void main(String[] args) { + int a = 0; + int b = 1; + int c = 2; + int d = 3; + int e = 4; + int f = 5; + int g = 6; + int h = 7; + int i = 8; + int j = 9; + int k = 10; + int l = 11; + int m = 12; + int n = 13; + int o = 14; + int p = 15; + int q = 16; + int r = 17; + int s = 18; + int t = 19; + int u = 20; + int v = 21; + int w = 22; + int x = 23; + int y = 24; + int z = 25; + while (a < 3) { + a = a + 1; + int tmp = b; + b = c; + c = d; + d = tmp; + + tmp = e; + e = f; + f = g; + g = tmp; + + tmp = h; + h = i; + i = j; + j = tmp; + + tmp = k; + k = l; + l = m; + m = tmp; + + tmp = n; + n = o; + o = p; + p = tmp; + + tmp = n; + q = r; + r = s; + s = tmp; + + tmp = t; + t = u; + u = v; + v = w; + w = x; + x = y; + y = z; + z = tmp; + } + System.out.println(b); + System.out.println(c); + System.out.println(d); + System.out.println(e); + System.out.println(f); + System.out.println(g); + System.out.println(h); + System.out.println(i); + System.out.println(j); + System.out.println(k); + System.out.println(l); + System.out.println(m); + System.out.println(n); + System.out.println(o); + System.out.println(p); + System.out.println(q); + System.out.println(r); + System.out.println(s); + System.out.println(t); + System.out.println(u); + System.out.println(v); + System.out.println(w); + System.out.println(x); + System.out.println(y); + System.out.println(z); + + } +} diff --git a/exec/phi_cycle_large.java b/exec/phi_cycle_large.java new file mode 100755 index 0000000000000000000000000000000000000000..1b52a9dbe0c463471f4a00d2decf5737a897d775 --- /dev/null +++ b/exec/phi_cycle_large.java @@ -0,0 +1,85 @@ +class Test { + public static void main(String[] args) { + int a = 0; + int b = 1; + int c = 2; + int d = 3; + int e = 4; + int f = 5; + int g = 6; + int h = 7; + int i = 8; + int j = 9; + int k = 10; + int l = 11; + int m = 12; + int n = 13; + int o = 14; + int p = 15; + int q = 16; + int r = 17; + int s = 18; + int t = 19; + int u = 20; + int v = 21; + int w = 22; + int x = 23; + int y = 24; + int z = 25; + while (a < 3) { + a = a + 1; + int tmp = b; + b = c; + c = d; + d = e; + e = f; + f = g; + g = h; + h = i; + i = j; + j = k; + k = l; + l = m; + m = n; + n = o; + o = p; + p = q; + q = r; + r = s; + s = t; + t = u; + u = v; + v = w; + w = x; + x = y; + y = z; + z = tmp; + } + System.out.println(b); + System.out.println(c); + System.out.println(d); + System.out.println(e); + System.out.println(f); + System.out.println(g); + System.out.println(h); + System.out.println(i); + System.out.println(j); + System.out.println(k); + System.out.println(l); + System.out.println(m); + System.out.println(n); + System.out.println(o); + System.out.println(p); + System.out.println(q); + System.out.println(r); + System.out.println(s); + System.out.println(t); + System.out.println(u); + System.out.println(v); + System.out.println(w); + System.out.println(x); + System.out.println(y); + System.out.println(z); + + } +} diff --git a/exec/phi_cycle_small.java b/exec/phi_cycle_small.java new file mode 100755 index 0000000000000000000000000000000000000000..da510f0fbb9b646795e56f8113069c46571a9415 --- /dev/null +++ b/exec/phi_cycle_small.java @@ -0,0 +1,18 @@ +class Test { + public static void main(String[] args) { + int a = 0; + int b = 1; + int c = 2; + int d = 3; + while (a < 3) { + a = a + 1; + int t = b; + b = c; + c = d; + d = t; + } + System.out.println(b); + System.out.println(c); + System.out.println(d); + } +} diff --git a/exec/phi_loop_many_vars.java b/exec/phi_loop_many_vars.java new file mode 100644 index 0000000000000000000000000000000000000000..2ba5e9546868f535c4b482f606d851013fd05aa0 --- /dev/null +++ b/exec/phi_loop_many_vars.java @@ -0,0 +1,70 @@ +class Test { + public static void main(String[] args) { + int x1 = 1; + int x2 = 2; + int x3 = 3; + int x4 = 4; + int x5 = 5; + int x6 = 6; + int x7 = 7; + int x8 = 8; + int x9 = 9; + int x10 = 10; + int x11 = 11; + int x12 = 12; + int x13 = 13; + int x14 = 14; + int x15 = 15; + int x16 = 16; + int x17 = 17; + int x18 = 18; + int x19 = 19; + int x20 = 20; + int i = 0; + while (i < 5) { + int t = x1; + x1 = x2; + x2 = x3; + x3 = x4; + x4 = x5; + x5 = x6; + x6 = x7; + x7 = x8; + x8 = x9; + x9 = x10; + x10 = x11; + x11 = x12; + x12 = x13; + x13 = x14; + x14 = x15; + x15 = x16; + x16 = x17; + x17 = x18; + x18 = x19; + x19 = x20; + x20 = t; + i = i + 1; + } + System.out.println(x1); + System.out.println(x2); + System.out.println(x3); + System.out.println(x4); + System.out.println(x5); + System.out.println(x6); + System.out.println(x7); + System.out.println(x8); + System.out.println(x9); + System.out.println(x10); + System.out.println(x11); + System.out.println(x12); + System.out.println(x13); + System.out.println(x14); + System.out.println(x15); + System.out.println(x16); + System.out.println(x17); + System.out.println(x18); + System.out.println(x19); + System.out.println(x20); + + } +} diff --git a/exec/phi_loop_swap.java b/exec/phi_loop_swap.java new file mode 100644 index 0000000000000000000000000000000000000000..ba2d5f2ef77174fb2867732a17faf99b1b112ed2 --- /dev/null +++ b/exec/phi_loop_swap.java @@ -0,0 +1,16 @@ +class Test { + public static void main(String[] args) { + int x = 1; + int y = 2; + int i = 0; + while (i < 5) { + int t = x; + x = y; + y = t; + i = i + 1; + } + System.out.println(x); + System.out.println(y); + + } +} diff --git a/exec/phi_simple_if.java b/exec/phi_simple_if.java new file mode 100644 index 0000000000000000000000000000000000000000..072571a8e3a39471fa88432e72ff7d9ed95daba3 --- /dev/null +++ b/exec/phi_simple_if.java @@ -0,0 +1,11 @@ +class Test { + public static void main(String[] args) { + int i = 0; + if (32 > 12) { + i = 1; + } else { + i = 2; + } + System.out.println(i); + } +} diff --git a/exec/phi_simple_loop.java b/exec/phi_simple_loop.java new file mode 100644 index 0000000000000000000000000000000000000000..1df0afa86d84275c538990dada8c18a2ee6d9cbc --- /dev/null +++ b/exec/phi_simple_loop.java @@ -0,0 +1,8 @@ +class Test { + public static void main(String[] args) { + int i = 0; + while (i < 10) { + System.out.println(i = i + 1); + } + } +}