0 JBC
↳1 JBCToGraph (⇒, 162 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIntTRSProof (⇒, 10 ms)
↳6 intTRS
↳7 PolynomialOrderProcessor (⇔, 0 ms)
↳8 YES
package ClassAnalysis;
public class ClassAnalysis {
A field;
public static void main(String[] args) {
Random.args = args;
ClassAnalysis t = new ClassAnalysis();
t.field = new A();
t.field = new B();
t.eval();
}
public void eval() {
int x = Random.random() % 100;
this.field.test(x);
}
}
class A {
public boolean test(int x) {
while (x > 0) {
if (x > 10) {
x--;
} else {
x++;
}
}
return true;
}
}
class B extends A {
public boolean test(int x) {
while (x > 0) {
x--;
}
return true;
}
}
package ClassAnalysis;
public class Random {
static String[] args;
static int index = 0;
public static int random() {
final String string = args[index];
index++;
return string.length();
}
}
Generated rules. Obtained 6 IRules
P rules:
f366_0_test_LE(EOS, i56, i56) → f419_0_test_LE(EOS, i56, i56)
f419_0_test_LE(EOS, i56, i56) → f433_0_test_Inc(EOS, i56) | >(i56, 0)
f433_0_test_Inc(EOS, i56) → f439_0_test_JMP(EOS, +(i56, -1)) | >(i56, 0)
f439_0_test_JMP(EOS, i58) → f452_0_test_Load(EOS, i58)
f452_0_test_Load(EOS, i58) → f353_0_test_Load(EOS, i58)
f353_0_test_Load(EOS, i35) → f366_0_test_LE(EOS, i35, i35)
Combined rules. Obtained 1 IRules
P rules:
f366_0_test_LE(EOS, x0, x0) → f366_0_test_LE(EOS, -(x0, 1), -(x0, 1)) | >(x0, 0)
Filtered ground terms:
f366_0_test_LE(x1, x2, x3) → f366_0_test_LE(x2, x3)
Cond_f366_0_test_LE(x1, x2, x3, x4) → Cond_f366_0_test_LE(x1, x3, x4)
Filtered duplicate terms:
f366_0_test_LE(x1, x2) → f366_0_test_LE(x2)
Cond_f366_0_test_LE(x1, x2, x3) → Cond_f366_0_test_LE(x1, x3)
Prepared 1 rules for path length conversion:
P rules:
f366_0_test_LE(x0) → f366_0_test_LE(-(x0, 1)) | >(x0, 0)
Finished conversion. Obtained 1 rules.
P rules:
f366_0_test_LE(x0) → f366_0_test_LE(-(x0, 1)) | >(x0, 0)
Found the following polynomial interpretation:
Therefore the following rule(s) have been dropped: