0 JBC
↳1 JBCToGraph (⇒, 273 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIntTRSProof (⇒, 0 ms)
↳6 intTRS
↳7 PolynomialOrderProcessor (⇔, 0 ms)
↳8 YES
public class LogMult{
public static int log(int x, int y) {
int res = 1;
if (x < 0 || y < 1) return 0;
else {
while (x > y) {
y = y*y;
res = 2*res;
}
}
return res;
}
public static void main(String[] args) {
Random.args = args;
int x = Random.random();
log(x,2);
}
}
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 14 IRules
P rules:
f517_0_log_Load(EOS, i30, i30, i68, i30) → f518_0_log_LE(EOS, i30, i30, i68, i30, i68)
f518_0_log_LE(EOS, i30, i30, i68, i30, i68) → f520_0_log_LE(EOS, i30, i30, i68, i30, i68)
f520_0_log_LE(EOS, i30, i30, i68, i30, i68) → f522_0_log_Load(EOS, i30, i30, i68) | >(i30, i68)
f522_0_log_Load(EOS, i30, i30, i68) → f524_0_log_Load(EOS, i30, i30, i68, i68)
f524_0_log_Load(EOS, i30, i30, i68, i68) → f526_0_log_IntArithmetic(EOS, i30, i30, i68, i68)
f526_0_log_IntArithmetic(EOS, i30, i30, i68, i68) → f528_0_log_Store(EOS, i30, i30, *(i68, i68)) | &&(>(i68, 1), >(i68, 1))
f528_0_log_Store(EOS, i30, i30, i73) → f530_0_log_ConstantStackPush(EOS, i30, i30, i73)
f530_0_log_ConstantStackPush(EOS, i30, i30, i73) → f531_0_log_Load(EOS, i30, i30, i73)
f531_0_log_Load(EOS, i30, i30, i73) → f532_0_log_IntArithmetic(EOS, i30, i30, i73)
f532_0_log_IntArithmetic(EOS, i30, i30, i73) → f533_0_log_Store(EOS, i30, i30, i73)
f533_0_log_Store(EOS, i30, i30, i73) → f534_0_log_JMP(EOS, i30, i30, i73)
f534_0_log_JMP(EOS, i30, i30, i73) → f545_0_log_Load(EOS, i30, i30, i73)
f545_0_log_Load(EOS, i30, i30, i73) → f516_0_log_Load(EOS, i30, i30, i73)
f516_0_log_Load(EOS, i30, i30, i68) → f517_0_log_Load(EOS, i30, i30, i68, i30)
Combined rules. Obtained 1 IRules
P rules:
f517_0_log_Load(EOS, x0, x0, x1, x0) → f517_0_log_Load(EOS, x0, x0, *(x1, x1), x0) | &&(>(x1, 1), <(x1, x0))
Filtered ground terms:
f517_0_log_Load(x1, x2, x3, x4, x5) → f517_0_log_Load(x2, x3, x4, x5)
Cond_f517_0_log_Load(x1, x2, x3, x4, x5, x6) → Cond_f517_0_log_Load(x1, x3, x4, x5, x6)
Filtered duplicate terms:
f517_0_log_Load(x1, x2, x3, x4) → f517_0_log_Load(x3, x4)
Cond_f517_0_log_Load(x1, x2, x3, x4, x5) → Cond_f517_0_log_Load(x1, x4, x5)
Prepared 1 rules for path length conversion:
P rules:
f517_0_log_Load(x1, x0) → f517_0_log_Load(*(x1, x1), x0) | &&(>(x1, 1), <(x1, x0))
Finished conversion. Obtained 1 rules.
P rules:
f517_0_log_Load(x0, x1) → f517_0_log_Load(*(x0, x0), x1) | &&(>(x0, 1), >(x1, x0))
Found the following polynomial interpretation:
Therefore the following rule(s) have been dropped: