(0) Obligation:

JBC Problem based on JBC Program:
public class McCarthyIterative {
public static int main(int x) {
int c = 1;
while (c > 0) {
if (x > 100) {
x -= 10;
c--;
} else {
x += 11;
c++;
}
}
return x;
}

public static void main(String[] args) {
Random.args = args;
main(Random.random());
}
}


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:
McCarthyIterative.main([Ljava/lang/String;)V: Graph of 126 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: McCarthyIterative.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 17 IRules

P rules:
f727_0_main_LE(EOS, i113, i179, i179) → f730_0_main_LE(EOS, i113, i179, i179)
f730_0_main_LE(EOS, i113, i179, i179) → f733_0_main_Load(EOS, i113, i179) | >(i179, 0)
f733_0_main_Load(EOS, i113, i179) → f736_0_main_ConstantStackPush(EOS, i113, i179, i113)
f736_0_main_ConstantStackPush(EOS, i113, i179, i113) → f740_0_main_LE(EOS, i113, i179, i113, 100)
f740_0_main_LE(EOS, i185, i179, i185, matching1) → f744_0_main_LE(EOS, i185, i179, i185, 100) | =(matching1, 100)
f740_0_main_LE(EOS, i186, i179, i186, matching1) → f745_0_main_LE(EOS, i186, i179, i186, 100) | =(matching1, 100)
f744_0_main_LE(EOS, i185, i179, i185, matching1) → f748_0_main_Inc(EOS, i185, i179) | &&(<=(i185, 100), =(matching1, 100))
f748_0_main_Inc(EOS, i185, i179) → f751_0_main_Inc(EOS, +(i185, 11), i179)
f751_0_main_Inc(EOS, i187, i179) → f754_0_main_JMP(EOS, i187, +(i179, 1)) | >(i179, 0)
f754_0_main_JMP(EOS, i187, i189) → f760_0_main_Load(EOS, i187, i189)
f760_0_main_Load(EOS, i187, i189) → f479_0_main_Load(EOS, i187, i189)
f479_0_main_Load(EOS, i113, i114) → f727_0_main_LE(EOS, i113, i114, i114)
f745_0_main_LE(EOS, i186, i179, i186, matching1) → f750_0_main_Inc(EOS, i186, i179) | &&(>(i186, 100), =(matching1, 100))
f750_0_main_Inc(EOS, i186, i179) → f753_0_main_Inc(EOS, +(i186, -10), i179) | >(i186, 0)
f753_0_main_Inc(EOS, i188, i179) → f756_0_main_JMP(EOS, i188, +(i179, -1)) | >(i179, 0)
f756_0_main_JMP(EOS, i188, i190) → f765_0_main_Load(EOS, i188, i190)
f765_0_main_Load(EOS, i188, i190) → f479_0_main_Load(EOS, i188, i190)

Combined rules. Obtained 2 IRules

P rules:
f727_0_main_LE(EOS, x0, x1, x1) → f727_0_main_LE(EOS, +(x0, 11), +(x1, 1), +(x1, 1)) | &&(>(x1, 0), <=(x0, 100))
f727_0_main_LE(EOS, x0, x1, x1) → f727_0_main_LE(EOS, -(x0, 10), -(x1, 1), -(x1, 1)) | &&(>(x1, 0), >(x0, 100))

Filtered ground terms:


f727_0_main_LE(x1, x2, x3, x4) → f727_0_main_LE(x2, x3, x4)
Cond_f727_0_main_LE(x1, x2, x3, x4, x5) → Cond_f727_0_main_LE(x1, x3, x4, x5)
Cond_f727_0_main_LE1(x1, x2, x3, x4, x5) → Cond_f727_0_main_LE1(x1, x3, x4, x5)

Filtered duplicate terms:


f727_0_main_LE(x1, x2, x3) → f727_0_main_LE(x1, x3)
Cond_f727_0_main_LE(x1, x2, x3, x4) → Cond_f727_0_main_LE(x1, x2, x4)
Cond_f727_0_main_LE1(x1, x2, x3, x4) → Cond_f727_0_main_LE1(x1, x2, x4)

Prepared 2 rules for path length conversion:

P rules:
f727_0_main_LE(x0, x1) → f727_0_main_LE(+(x0, 11), +(x1, 1)) | &&(>(x1, 0), <=(x0, 100))
f727_0_main_LE(x0, x1) → f727_0_main_LE(-(x0, 10), -(x1, 1)) | &&(>(x1, 0), >(x0, 100))

Finished conversion. Obtained 2 rules.

P rules:
f727_0_main_LE(x0, x1) → f727_0_main_LE(+(x0, 11), +(x1, 1)) | &&(<=(x0, 100), >(x1, 0))
f727_0_main_LE(x2, x3) → f727_0_main_LE(-(x2, 10), -(x3, 1)) | &&(>(x2, 100), >(x3, 0))

(6) Obligation:

Rules:
f727_0_main_LE(x0, x1) → f727_0_main_LE(+(x0, 11), +(x1, 1)) | &&(<=(x0, 100), >(x1, 0))
f727_0_main_LE(x2, x3) → f727_0_main_LE(-(x2, 10), -(x3, 1)) | &&(>(x2, 100), >(x3, 0))

(7) PolynomialOrderProcessor (SOUND transformation)

Found the following polynomial interpretation:


[f727_0_main_LE(x5, x7)] = 90 - x5 + 10·x7

Therefore the following rule(s) have been dropped:


f727_0_main_LE(x0, x1) → f727_0_main_LE(+(x0, 11), +(x1, 1)) | &&(<=(x0, 100), >(x1, 0))

(8) Obligation:

Rules:
f727_0_main_LE(x2, x3) → f727_0_main_LE(-(x2, 10), -(x3, 1)) | &&(>(x2, 100), >(x3, 0))

(9) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f727_0_main_LE(x3, x5)] = 10 + x5

Therefore the following rule(s) have been dropped:


f727_0_main_LE(x0, x1) → f727_0_main_LE(-(x0, 10), -(x1, 1)) | &&(>(x0, 100), >(x1, 0))

(10) YES