0 JBC
↳1 JBCToGraph (⇒, 1076 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIntTRSProof (⇒, 19 ms)
↳6 intTRS
↳7 PolynomialOrderProcessor (⇔, 0 ms)
↳8 YES
/**
* 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 PastaB15 {
public static void main(String[] args) {
Random.args = args;
int x = Random.random();
int y = Random.random();
int z = Random.random();
while (x == y && x > z) {
while (y > z) {
x--;
y--;
}
}
}
}
public class Random {
static String[] args;
static int index = 0;
public static int random() {
String string = args[index];
index++;
return string.length();
}
}
Generated rules. Obtained 20 IRules
P rules:
f2188_0_main_Load(EOS, i405, i406, i87, i405) → f2191_0_main_NE(EOS, i405, i406, i87, i405, i406)
f2191_0_main_NE(EOS, i406, i406, i87, i406, i406) → f2195_0_main_NE(EOS, i406, i406, i87, i406, i406)
f2195_0_main_NE(EOS, i406, i406, i87, i406, i406) → f2198_0_main_Load(EOS, i406, i406, i87)
f2198_0_main_Load(EOS, i406, i406, i87) → f2202_0_main_Load(EOS, i406, i406, i87, i406)
f2202_0_main_Load(EOS, i406, i406, i87, i406) → f2204_0_main_LE(EOS, i406, i406, i87, i406, i87)
f2204_0_main_LE(EOS, i406, i406, i87, i406, i87) → f2208_0_main_LE(EOS, i406, i406, i87, i406, i87)
f2208_0_main_LE(EOS, i406, i406, i87, i406, i87) → f2219_0_main_Load(EOS, i406, i406, i87) | >(i406, i87)
f2219_0_main_Load(EOS, i406, i406, i87) → f3228_0_main_Load(EOS, i406, i406, i87)
f3228_0_main_Load(EOS, i625, i626, i87) → f3231_0_main_Load(EOS, i625, i626, i87, i626)
f3231_0_main_Load(EOS, i625, i626, i87, i626) → f3233_0_main_LE(EOS, i625, i626, i87, i626, i87)
f3233_0_main_LE(EOS, i625, i626, i87, i626, i87) → f3235_0_main_LE(EOS, i625, i626, i87, i626, i87)
f3233_0_main_LE(EOS, i625, i626, i87, i626, i87) → f3236_0_main_LE(EOS, i625, i626, i87, i626, i87)
f3235_0_main_LE(EOS, i625, i626, i87, i626, i87) → f3248_0_main_Load(EOS, i625, i626, i87) | <=(i626, i87)
f3248_0_main_Load(EOS, i625, i626, i87) → f2184_0_main_Load(EOS, i625, i626, i87)
f2184_0_main_Load(EOS, i405, i406, i87) → f2188_0_main_Load(EOS, i405, i406, i87, i405)
f3236_0_main_LE(EOS, i625, i626, i87, i626, i87) → f3251_0_main_Inc(EOS, i625, i626, i87) | >(i626, i87)
f3251_0_main_Inc(EOS, i625, i626, i87) → f4035_0_main_Inc(EOS, +(i625, -1), i626, i87)
f4035_0_main_Inc(EOS, i827, i626, i87) → f4037_0_main_JMP(EOS, i827, +(i626, -1), i87)
f4037_0_main_JMP(EOS, i827, i828, i87) → f4046_0_main_Load(EOS, i827, i828, i87)
f4046_0_main_Load(EOS, i827, i828, i87) → f3228_0_main_Load(EOS, i827, i828, i87)
Combined rules. Obtained 1 IRules
P rules:
f3233_0_main_LE(EOS, x0, x1, x2, x1, x2) → f3233_0_main_LE(EOS, -(x0, 1), -(x1, 1), x2, -(x1, 1), x2) | <(x2, x1)
Filtered ground terms:
f3233_0_main_LE(x1, x2, x3, x4, x5, x6) → f3233_0_main_LE(x2, x3, x4, x5, x6)
Cond_f3233_0_main_LE(x1, x2, x3, x4, x5, x6, x7) → Cond_f3233_0_main_LE(x1, x3, x4, x5, x6, x7)
Filtered duplicate terms:
f3233_0_main_LE(x1, x2, x3, x4, x5) → f3233_0_main_LE(x1, x4, x5)
Cond_f3233_0_main_LE(x1, x2, x3, x4, x5, x6) → Cond_f3233_0_main_LE(x1, x2, x5, x6)
Filtered unneeded terms:
Cond_f3233_0_main_LE(x1, x2, x3, x4) → Cond_f3233_0_main_LE(x1, x3, x4)
f3233_0_main_LE(x1, x2, x3) → f3233_0_main_LE(x2, x3)
Prepared 1 rules for path length conversion:
P rules:
f3233_0_main_LE(x1, x2) → f3233_0_main_LE(-(x1, 1), x2) | <(x2, x1)
Finished conversion. Obtained 1 rules.
P rules:
f3233_0_main_LE(x0, x1) → f3233_0_main_LE(-(x0, 1), x1) | <(x1, x0)
Found the following polynomial interpretation:
Therefore the following rule(s) have been dropped: