0 JBC
↳1 JBCToGraph (⇒, 434 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIntTRSProof (⇒, 18 ms)
↳6 intTRS
↳7 TerminationGraphProcessor (⇒, 13 ms)
↳8 intTRS
↳9 PolynomialOrderProcessor (⇔, 0 ms)
↳10 YES
public class MinusMin{
public static int min (int x, int y) {
if (x < y) return x;
else return y;
}
public static void main(String[] args) {
Random.args = args;
int x = Random.random();
int y = Random.random();
int res = 0;
while (min(x-1,y) == y) {
y++;
res++;
}
}
}
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 23 IRules
P rules:
f771_0_main_ConstantStackPush(EOS, i18, i105, i18) → f775_0_main_IntArithmetic(EOS, i18, i105, i18, 1)
f775_0_main_IntArithmetic(EOS, i18, i105, i18, matching1) → f776_0_main_Load(EOS, i18, i105, -(i18, 1)) | &&(>=(i18, 0), =(matching1, 1))
f776_0_main_Load(EOS, i18, i105, i111) → f780_0_main_InvokeMethod(EOS, i18, i105, i111, i105)
f780_0_main_InvokeMethod(EOS, i18, i105, i111, i105) → f781_0_min_Load(EOS, i18, i105, i111, i105, i111, i105)
f781_0_min_Load(EOS, i18, i105, i111, i105, i111, i105) → f784_0_min_Load(EOS, i18, i105, i111, i105, i111, i105, i111)
f784_0_min_Load(EOS, i18, i105, i111, i105, i111, i105, i111) → f787_0_min_GE(EOS, i18, i105, i111, i105, i111, i105, i111, i105)
f787_0_min_GE(EOS, i18, i105, i111, i105, i111, i105, i111, i105) → f789_0_min_GE(EOS, i18, i105, i111, i105, i111, i105, i111, i105)
f787_0_min_GE(EOS, i18, i105, i111, i105, i111, i105, i111, i105) → f790_0_min_GE(EOS, i18, i105, i111, i105, i111, i105, i111, i105)
f789_0_min_GE(EOS, i18, i105, i111, i105, i111, i105, i111, i105) → f793_0_min_Load(EOS, i18, i105, i111, i105, i105) | >=(i111, i105)
f793_0_min_Load(EOS, i18, i105, i111, i105, i105) → f797_0_min_Return(EOS, i18, i105, i111, i105, i105)
f797_0_min_Return(EOS, i18, i105, i111, i105, i105) → f801_0_main_Load(EOS, i18, i105, i105)
f801_0_main_Load(EOS, i18, i105, i105) → f811_0_main_Load(EOS, i18, i105, i105)
f811_0_main_Load(EOS, i18, i105, i111) → f816_0_main_NE(EOS, i18, i105, i111, i105)
f816_0_main_NE(EOS, i18, i105, i105, i105) → f819_0_main_NE(EOS, i18, i105, i105, i105)
f819_0_main_NE(EOS, i18, i105, i105, i105) → f824_0_main_Inc(EOS, i18, i105)
f824_0_main_Inc(EOS, i18, i105) → f827_0_main_Inc(EOS, i18, +(i105, 1)) | >=(i105, 0)
f827_0_main_Inc(EOS, i18, i117) → f831_0_main_JMP(EOS, i18, i117)
f831_0_main_JMP(EOS, i18, i117) → f858_0_main_Load(EOS, i18, i117)
f858_0_main_Load(EOS, i18, i117) → f768_0_main_Load(EOS, i18, i117)
f768_0_main_Load(EOS, i18, i105) → f771_0_main_ConstantStackPush(EOS, i18, i105, i18)
f790_0_min_GE(EOS, i18, i105, i111, i105, i111, i105, i111, i105) → f795_0_min_Load(EOS, i18, i105, i111, i105, i111, i105) | <(i111, i105)
f795_0_min_Load(EOS, i18, i105, i111, i105, i111, i105) → f799_0_min_Return(EOS, i18, i105, i111, i105, i105, i111)
f799_0_min_Return(EOS, i18, i105, i111, i105, i105, i111) → f811_0_main_Load(EOS, i18, i105, i111)
Combined rules. Obtained 2 IRules
P rules:
f771_0_main_ConstantStackPush(EOS, x0, x1, x0) → f771_0_main_ConstantStackPush(EOS, x0, +(x1, 1), x0) | &&(&&(>(+(x1, 1), 0), >(+(x0, 1), 0)), <=(x1, -(x0, 1)))
f771_0_main_ConstantStackPush(EOS, arith, -(arith, 1), arith) → f771_0_main_ConstantStackPush(EOS, arith, arith, arith) | &&(<(-(arith, 1), -(arith, 1)), >(+(arith, 1), 1))
Filtered ground terms:
f771_0_main_ConstantStackPush(x1, x2, x3, x4) → f771_0_main_ConstantStackPush(x2, x3, x4)
Cond_f771_0_main_ConstantStackPush(x1, x2, x3, x4, x5) → Cond_f771_0_main_ConstantStackPush(x1, x3, x4, x5)
Cond_f771_0_main_ConstantStackPush1(x1, x2, x3, x4, x5) → Cond_f771_0_main_ConstantStackPush1(x1, x3, x4, x5)
Filtered duplicate terms:
f771_0_main_ConstantStackPush(x1, x2, x3) → f771_0_main_ConstantStackPush(x2, x3)
Cond_f771_0_main_ConstantStackPush(x1, x2, x3, x4) → Cond_f771_0_main_ConstantStackPush(x1, x3, x4)
Cond_f771_0_main_ConstantStackPush1(x1, x2, x3, x4) → Cond_f771_0_main_ConstantStackPush1(x1, x3)
Prepared 2 rules for path length conversion:
P rules:
f771_0_main_ConstantStackPush(x1, x0) → f771_0_main_ConstantStackPush(+(x1, 1), x0) | &&(&&(>(+(x1, 1), 0), >(+(x0, 1), 0)), <=(x1, -(x0, 1)))
f771_0_main_ConstantStackPush(-(arith, 1), arith) → f771_0_main_ConstantStackPush(arith, arith) | &&(<(-(arith, 1), -(arith, 1)), >(+(arith, 1), 1))
Finished conversion. Obtained 2 rules.
P rules:
f771_0_main_ConstantStackPush(x0, x1) → f771_0_main_ConstantStackPush(+(x0, 1), x1) | &&(&&(>(x1, -1), >(x0, -1)), >=(-(x1, 1), x0))
f771_0_main_ConstantStackPush(arith, x2) → f771_0_main_ConstantStackPush(x2, x2) | &&(&&(<(-(x2, 1), -(x2, 1)), >(x2, 0)), =(arith, -(x2, 1)))
Constructed the termination graph and obtained one non-trivial SCC.
Found the following polynomial interpretation:
Therefore the following rule(s) have been dropped: