(0) Obligation:

JBC Problem based on JBC Program:
/**
* Example taken from "A Term Rewriting Approach to the Automated Termination
* Analysis of Imperative Programs" (http://www.cs.unm.edu/~spf/papers/2009-02.pdf)
* and converted to Java.
*/

public class PastaB13 {
public static void main(String[] args) {
Random.args = args;
int x = Random.random();
int y = Random.random();
int z = Random.random();

while (x > z || y > z) {
if (x > z) {
x--;
} else if (y > z) {
y--;
} else {
continue;
}
}
}
}


public class Random {
static String[] args;
static int index = 0;

public static int random() {
String string = args[index];
index++;
return string.length();
}
}


(1) JBCToGraph (SOUND transformation)

Constructed TerminationGraph.

(2) Obligation:

Termination Graph based on JBC Program:
PastaB13.main([Ljava/lang/String;)V: Graph of 269 nodes with 1 SCC.


(3) TerminationGraphToSCCProof (SOUND transformation)

Splitted TerminationGraph to 1 SCCs.

(4) Obligation:

SCC of termination graph based on JBC Program.
SCC contains nodes from the following methods: PastaB13.main([Ljava/lang/String;)V
SCC calls the following helper methods:
Performed SCC analyses:
  • Used field analysis yielded the following read fields:
  • Marker field analysis yielded the following relations that could be markers:

(5) SCCToIntTRSProof (SOUND transformation)

Transformed FIGraph SCCs to intTRSs. Log:

Generated rules. Obtained 30 IRules

P rules:
f8118_0_main_Load(EOS, i119, i1462, i84, i119) → f8119_0_main_GT(EOS, i119, i1462, i84, i119, i84)
f8119_0_main_GT(EOS, i119, i1462, i84, i119, i84) → f8121_0_main_GT(EOS, i119, i1462, i84, i119, i84)
f8119_0_main_GT(EOS, i119, i1462, i84, i119, i84) → f8122_0_main_GT(EOS, i119, i1462, i84, i119, i84)
f8121_0_main_GT(EOS, i119, i1462, i84, i119, i84) → f8123_0_main_Load(EOS, i119, i1462, i84) | >(i119, i84)
f8123_0_main_Load(EOS, i119, i1462, i84) → f8148_0_main_Load(EOS, i119, i1462, i84)
f8148_0_main_Load(EOS, i119, i1462, i84) → f8153_0_main_Load(EOS, i119, i1462, i84, i119)
f8153_0_main_Load(EOS, i119, i1462, i84, i119) → f8155_0_main_LE(EOS, i119, i1462, i84, i119, i84)
f8155_0_main_LE(EOS, i119, i1462, i84, i119, i84) → f8157_0_main_LE(EOS, i119, i1462, i84, i119, i84)
f8155_0_main_LE(EOS, i119, i1462, i84, i119, i84) → f8158_0_main_LE(EOS, i119, i1462, i84, i119, i84)
f8157_0_main_LE(EOS, i119, i1462, i84, i119, i84) → f8161_0_main_Load(EOS, i119, i1462, i84) | <=(i119, i84)
f8161_0_main_Load(EOS, i119, i1462, i84) → f8165_0_main_Load(EOS, i119, i1462, i84, i1462)
f8165_0_main_Load(EOS, i119, i1462, i84, i1462) → f8169_0_main_LE(EOS, i119, i1462, i84, i1462, i84)
f8169_0_main_LE(EOS, i119, i1462, i84, i1462, i84) → f8176_0_main_LE(EOS, i119, i1462, i84, i1462, i84)
f8169_0_main_LE(EOS, i119, i1462, i84, i1462, i84) → f8177_0_main_LE(EOS, i119, i1462, i84, i1462, i84)
f8176_0_main_LE(EOS, i119, i1462, i84, i1462, i84) → f8600_0_main_Load(EOS, i119, i1462, i84) | <=(i1462, i84)
f8600_0_main_Load(EOS, i119, i1462, i84) → f8113_0_main_Load(EOS, i119, i1462, i84)
f8113_0_main_Load(EOS, i119, i1462, i84) → f8118_0_main_Load(EOS, i119, i1462, i84, i119)
f8177_0_main_LE(EOS, i119, i1462, i84, i1462, i84) → f8601_0_main_Inc(EOS, i119, i1462, i84) | >(i1462, i84)
f8601_0_main_Inc(EOS, i119, i1462, i84) → f9003_0_main_JMP(EOS, i119, +(i1462, -1), i84)
f9003_0_main_JMP(EOS, i119, i1762, i84) → f9007_0_main_Load(EOS, i119, i1762, i84)
f9007_0_main_Load(EOS, i119, i1762, i84) → f8113_0_main_Load(EOS, i119, i1762, i84)
f8158_0_main_LE(EOS, i119, i1462, i84, i119, i84) → f8164_0_main_Inc(EOS, i119, i1462, i84) | >(i119, i84)
f8164_0_main_Inc(EOS, i119, i1462, i84) → f8167_0_main_JMP(EOS, +(i119, -1), i1462, i84)
f8167_0_main_JMP(EOS, i1468, i1462, i84) → f8174_0_main_Load(EOS, i1468, i1462, i84)
f8174_0_main_Load(EOS, i1468, i1462, i84) → f8113_0_main_Load(EOS, i1468, i1462, i84)
f8122_0_main_GT(EOS, i119, i1462, i84, i119, i84) → f8125_0_main_Load(EOS, i119, i1462, i84) | <=(i119, i84)
f8125_0_main_Load(EOS, i119, i1462, i84) → f8128_0_main_Load(EOS, i119, i1462, i84, i1462)
f8128_0_main_Load(EOS, i119, i1462, i84, i1462) → f8135_0_main_LE(EOS, i119, i1462, i84, i1462, i84)
f8135_0_main_LE(EOS, i119, i1462, i84, i1462, i84) → f8140_0_main_LE(EOS, i119, i1462, i84, i1462, i84)
f8140_0_main_LE(EOS, i119, i1462, i84, i1462, i84) → f8148_0_main_Load(EOS, i119, i1462, i84) | >(i1462, i84)

Combined rules. Obtained 5 IRules

P rules:
f8118_0_main_Load(EOS, x0, x1, x2, x0) → f8155_0_main_LE(EOS, x0, x1, x2, x0, x2) | <(x2, x0)
f8155_0_main_LE(EOS, x0, x1, x2, x0, x2) → f8118_0_main_Load(EOS, x0, x1, x2, x0) | &&(>=(x2, x0), >=(x2, x1))
f8155_0_main_LE(EOS, x0, x1, x2, x0, x2) → f8118_0_main_Load(EOS, x0, -(x1, 1), x2, x0) | &&(<(x2, x1), >=(x2, x0))
f8155_0_main_LE(EOS, x0, x1, x2, x0, x2) → f8118_0_main_Load(EOS, -(x0, 1), x1, x2, -(x0, 1)) | <(x2, x0)
f8118_0_main_Load(EOS, x0, x1, x2, x0) → f8155_0_main_LE(EOS, x0, x1, x2, x0, x2) | &&(<(x2, x1), >=(x2, x0))

Filtered ground terms:


f8118_0_main_Load(x1, x2, x3, x4, x5) → f8118_0_main_Load(x2, x3, x4, x5)
Cond_f8118_0_main_Load(x1, x2, x3, x4, x5, x6) → Cond_f8118_0_main_Load(x1, x3, x4, x5, x6)
f8155_0_main_LE(x1, x2, x3, x4, x5, x6) → f8155_0_main_LE(x2, x3, x4, x5, x6)
Cond_f8155_0_main_LE(x1, x2, x3, x4, x5, x6, x7) → Cond_f8155_0_main_LE(x1, x3, x4, x5, x6, x7)
Cond_f8155_0_main_LE1(x1, x2, x3, x4, x5, x6, x7) → Cond_f8155_0_main_LE1(x1, x3, x4, x5, x6, x7)
Cond_f8155_0_main_LE2(x1, x2, x3, x4, x5, x6, x7) → Cond_f8155_0_main_LE2(x1, x3, x4, x5, x6, x7)
Cond_f8118_0_main_Load1(x1, x2, x3, x4, x5, x6) → Cond_f8118_0_main_Load1(x1, x3, x4, x5, x6)

Filtered duplicate terms:


f8118_0_main_Load(x1, x2, x3, x4) → f8118_0_main_Load(x2, x3, x4)
Cond_f8118_0_main_Load(x1, x2, x3, x4, x5) → Cond_f8118_0_main_Load(x1, x3, x4, x5)
f8155_0_main_LE(x1, x2, x3, x4, x5) → f8155_0_main_LE(x2, x4, x5)
Cond_f8155_0_main_LE(x1, x2, x3, x4, x5, x6) → Cond_f8155_0_main_LE(x1, x3, x5, x6)
Cond_f8155_0_main_LE1(x1, x2, x3, x4, x5, x6) → Cond_f8155_0_main_LE1(x1, x3, x5, x6)
Cond_f8155_0_main_LE2(x1, x2, x3, x4, x5, x6) → Cond_f8155_0_main_LE2(x1, x3, x5, x6)
Cond_f8118_0_main_Load1(x1, x2, x3, x4, x5) → Cond_f8118_0_main_Load1(x1, x3, x4, x5)

Prepared 5 rules for path length conversion:

P rules:
f8118_0_main_Load(x1, x2, x0) → f8155_0_main_LE(x1, x0, x2) | <(x2, x0)
f8155_0_main_LE(x1, x0, x2) → f8118_0_main_Load(x1, x2, x0) | &&(>=(x2, x0), >=(x2, x1))
f8155_0_main_LE(x1, x0, x2) → f8118_0_main_Load(-(x1, 1), x2, x0) | &&(<(x2, x1), >=(x2, x0))
f8155_0_main_LE(x1, x0, x2) → f8118_0_main_Load(x1, x2, -(x0, 1)) | <(x2, x0)
f8118_0_main_Load(x1, x2, x0) → f8155_0_main_LE(x1, x0, x2) | &&(<(x2, x1), >=(x2, x0))

Finished conversion. Obtained 5 rules.

P rules:
f8118_0_main_Load(x0, x1, x2) → f8155_0_main_LE(x0, x2, x1) | >(x2, x1)
f8155_0_main_LE(x3, x4, x5) → f8118_0_main_Load(x3, x5, x4) | &&(>=(x5, x3), >=(x5, x4))
f8155_0_main_LE(x6, x7, x8) → f8118_0_main_Load(-(x6, 1), x8, x7) | &&(<(x8, x6), >=(x8, x7))
f8155_0_main_LE(x9, x10, x11) → f8118_0_main_Load(x9, x11, -(x10, 1)) | <(x11, x10)
f8118_0_main_Load(x12, x13, x14) → f8155_0_main_LE(x12, x14, x13) | &&(<(x13, x12), <=(x14, x13))

(6) Obligation:

Rules:
f8118_0_main_Load(x0, x1, x2) → f8155_0_main_LE(x0, x2, x1) | >(x2, x1)
f8155_0_main_LE(x3, x4, x5) → f8118_0_main_Load(x3, x5, x4) | &&(>=(x5, x3), >=(x5, x4))
f8155_0_main_LE(x6, x7, x8) → f8118_0_main_Load(-(x6, 1), x8, x7) | &&(<(x8, x6), >=(x8, x7))
f8155_0_main_LE(x9, x10, x11) → f8118_0_main_Load(x9, x11, -(x10, 1)) | <(x11, x10)
f8118_0_main_Load(x12, x13, x14) → f8155_0_main_LE(x12, x14, x13) | &&(<(x13, x12), <=(x14, x13))

(7) TerminationGraphProcessor (SOUND transformation)

Constructed the termination graph and obtained 2 non-trivial SCCs.


(8) Complex Obligation (AND)

(9) Obligation:

Rules:
f8118_0_main_Load(x0, x1, x2) → f8155_0_main_LE(x0, x2, x1) | >(x2, x1)
f8155_0_main_LE(x9, x10, x11) → f8118_0_main_Load(x9, x11, -(x10, 1)) | <(x11, x10)

(10) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f8118_0_main_Load(x7, x9, x11)] = 1 + 2·x11 - 2·x9
[f8155_0_main_LE(x14, x16, x18)] = 2·x16 - 2·x18

Therefore the following rule(s) have been dropped:


f8118_0_main_Load(x0, x1, x2) → f8155_0_main_LE(x0, x2, x1) | >(x2, x1)
f8155_0_main_LE(x3, x4, x5) → f8118_0_main_Load(x3, x5, -(x4, 1)) | <(x5, x4)

(11) YES

(12) Obligation:

Rules:
f8118_0_main_Load(x12, x13, x14) → f8155_0_main_LE(x12, x14, x13) | &&(<(x13, x12), <=(x14, x13))
f8155_0_main_LE(x6, x7, x8) → f8118_0_main_Load(-(x6, 1), x8, x7) | &&(<(x8, x6), >=(x8, x7))

(13) PolynomialOrderProcessor (SOUND transformation)

Found the following polynomial interpretation:


[f8118_0_main_Load(x7, x9, x11)] = x7 - x9
[f8155_0_main_LE(x14, x16, x18)] = -1 + x14 - x18

Therefore the following rule(s) have been dropped:


f8118_0_main_Load(x0, x1, x2) → f8155_0_main_LE(x0, x2, x1) | &&(<(x1, x0), <=(x2, x1))

(14) Obligation:

Rules:
f8155_0_main_LE(x3, x4, x5) → f8118_0_main_Load(-(x3, 1), x5, x4) | &&(<(x5, x3), >=(x5, x4))

(15) TerminationGraphProcessor (EQUIVALENT transformation)

Constructed the termination graph and obtained no non-trivial SCC(s).


(16) YES