0 JBC
↳1 JBCToGraph (⇒, 2016 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIntTRSProof (⇒, 30 ms)
↳6 intTRS
↳7 TerminationGraphProcessor (⇒, 0 ms)
↳8 AND
↳9 intTRS
↳10 PolynomialOrderProcessor (⇔, 1 ms)
↳11 YES
↳12 intTRS
↳13 PolynomialOrderProcessor (⇒, 0 ms)
↳14 intTRS
↳15 TerminationGraphProcessor (⇔, 0 ms)
↳16 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 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();
}
}
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))
Constructed the termination graph and obtained 2 non-trivial SCCs.
Found the following polynomial interpretation:
Therefore the following rule(s) have been dropped:
Found the following polynomial interpretation:
Therefore the following rule(s) have been dropped:
Constructed the termination graph and obtained no non-trivial SCC(s).