0 JBC
↳1 JBCToGraph (⇒, 367 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIntTRSProof (⇒, 0 ms)
↳6 intTRS
↳7 PolynomialOrderProcessor (⇔, 0 ms)
↳8 YES
public class DivMinus {
public static int div(int x, int y) {
int res = 0;
while (x >= y && y > 0) {
x = x-y;
res = res + 1;
}
return res;
}
public static void main(String[] args) {
Random.args = args;
int x = Random.random();
int y = Random.random();
div(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 17 IRules
P rules:
f852_0_div_Load(EOS, i102, i101, i102, i101) → f855_0_div_LT(EOS, i102, i101, i102, i101, i102)
f855_0_div_LT(EOS, i102, i101, i102, i101, i102) → f859_0_div_LT(EOS, i102, i101, i102, i101, i102)
f859_0_div_LT(EOS, i102, i101, i102, i101, i102) → f863_0_div_Load(EOS, i102, i101, i102) | >=(i101, i102)
f863_0_div_Load(EOS, i102, i101, i102) → f868_0_div_LE(EOS, i102, i101, i102, i102)
f868_0_div_LE(EOS, i112, i101, i112, i112) → f874_0_div_LE(EOS, i112, i101, i112, i112)
f874_0_div_LE(EOS, i112, i101, i112, i112) → f883_0_div_Load(EOS, i112, i101, i112) | >(i112, 0)
f883_0_div_Load(EOS, i112, i101, i112) → f891_0_div_Load(EOS, i112, i112, i101)
f891_0_div_Load(EOS, i112, i112, i101) → f902_0_div_IntArithmetic(EOS, i112, i112, i101, i112)
f902_0_div_IntArithmetic(EOS, i112, i112, i101, i112) → f906_0_div_Store(EOS, i112, i112, -(i101, i112)) | >(i112, 0)
f906_0_div_Store(EOS, i112, i112, i114) → f911_0_div_Load(EOS, i112, i114, i112)
f911_0_div_Load(EOS, i112, i114, i112) → f913_0_div_ConstantStackPush(EOS, i112, i114, i112)
f913_0_div_ConstantStackPush(EOS, i112, i114, i112) → f915_0_div_IntArithmetic(EOS, i112, i114, i112)
f915_0_div_IntArithmetic(EOS, i112, i114, i112) → f917_0_div_Store(EOS, i112, i114, i112)
f917_0_div_Store(EOS, i112, i114, i112) → f920_0_div_JMP(EOS, i112, i114, i112)
f920_0_div_JMP(EOS, i112, i114, i112) → f948_0_div_Load(EOS, i112, i114, i112)
f948_0_div_Load(EOS, i112, i114, i112) → f848_0_div_Load(EOS, i112, i114, i112)
f848_0_div_Load(EOS, i102, i101, i102) → f852_0_div_Load(EOS, i102, i101, i102, i101)
Combined rules. Obtained 1 IRules
P rules:
f852_0_div_Load(EOS, x0, x1, x0, x1) → f852_0_div_Load(EOS, x0, -(x1, x0), x0, -(x1, x0)) | &&(>=(x1, x0), >(x0, 0))
Filtered ground terms:
f852_0_div_Load(x1, x2, x3, x4, x5) → f852_0_div_Load(x2, x3, x4, x5)
Cond_f852_0_div_Load(x1, x2, x3, x4, x5, x6) → Cond_f852_0_div_Load(x1, x3, x4, x5, x6)
Filtered duplicate terms:
f852_0_div_Load(x1, x2, x3, x4) → f852_0_div_Load(x3, x4)
Cond_f852_0_div_Load(x1, x2, x3, x4, x5) → Cond_f852_0_div_Load(x1, x4, x5)
Prepared 1 rules for path length conversion:
P rules:
f852_0_div_Load(x0, x1) → f852_0_div_Load(x0, -(x1, x0)) | &&(>=(x1, x0), >(x0, 0))
Finished conversion. Obtained 1 rules.
P rules:
f852_0_div_Load(x0, x1) → f852_0_div_Load(x0, -(x1, x0)) | &&(>(x0, 0), >=(x1, x0))
Found the following polynomial interpretation:
Therefore the following rule(s) have been dropped: