0 JBC
↳1 JBCToGraph (⇒, 493 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIntTRSProof (⇒, 69 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 PastaB7 {
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) {
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 12 IRules
P rules:
f1007_0_main_Load(EOS, i152, i153, i88, i152) → f1008_0_main_LE(EOS, i152, i153, i88, i152, i88)
f1008_0_main_LE(EOS, i152, i153, i88, i152, i88) → f1011_0_main_LE(EOS, i152, i153, i88, i152, i88)
f1011_0_main_LE(EOS, i152, i153, i88, i152, i88) → f1015_0_main_Load(EOS, i152, i153, i88) | >(i152, i88)
f1015_0_main_Load(EOS, i152, i153, i88) → f1018_0_main_Load(EOS, i152, i153, i88, i153)
f1018_0_main_Load(EOS, i152, i153, i88, i153) → f1020_0_main_LE(EOS, i152, i153, i88, i153, i88)
f1020_0_main_LE(EOS, i152, i153, i88, i153, i88) → f1023_0_main_LE(EOS, i152, i153, i88, i153, i88)
f1023_0_main_LE(EOS, i152, i153, i88, i153, i88) → f1032_0_main_Inc(EOS, i152, i153, i88) | >(i153, i88)
f1032_0_main_Inc(EOS, i152, i153, i88) → f1035_0_main_Inc(EOS, +(i152, -1), i153, i88)
f1035_0_main_Inc(EOS, i160, i153, i88) → f1037_0_main_JMP(EOS, i160, +(i153, -1), i88)
f1037_0_main_JMP(EOS, i160, i161, i88) → f1057_0_main_Load(EOS, i160, i161, i88)
f1057_0_main_Load(EOS, i160, i161, i88) → f1003_0_main_Load(EOS, i160, i161, i88)
f1003_0_main_Load(EOS, i152, i153, i88) → f1007_0_main_Load(EOS, i152, i153, i88, i152)
Combined rules. Obtained 1 IRules
P rules:
f1007_0_main_Load(EOS, x0, x1, x2, x0) → f1007_0_main_Load(EOS, -(x0, 1), -(x1, 1), x2, -(x0, 1)) | &&(<(x2, x0), <(x2, x1))
Filtered ground terms:
f1007_0_main_Load(x1, x2, x3, x4, x5) → f1007_0_main_Load(x2, x3, x4, x5)
Cond_f1007_0_main_Load(x1, x2, x3, x4, x5, x6) → Cond_f1007_0_main_Load(x1, x3, x4, x5, x6)
Filtered duplicate terms:
f1007_0_main_Load(x1, x2, x3, x4) → f1007_0_main_Load(x2, x3, x4)
Cond_f1007_0_main_Load(x1, x2, x3, x4, x5) → Cond_f1007_0_main_Load(x1, x3, x4, x5)
Prepared 1 rules for path length conversion:
P rules:
f1007_0_main_Load(x1, x2, x0) → f1007_0_main_Load(-(x1, 1), x2, -(x0, 1)) | &&(<(x2, x0), <(x2, x1))
Finished conversion. Obtained 1 rules.
P rules:
f1007_0_main_Load(x0, x1, x2) → f1007_0_main_Load(-(x0, 1), x1, -(x2, 1)) | &&(<(x1, x0), >(x2, x1))
Found the following polynomial interpretation:
Therefore the following rule(s) have been dropped: