0 JBC
↳1 JBCToGraph (⇒, 110 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIntTRSProof (⇒, 54 ms)
↳6 intTRS
↳7 PolynomialOrderProcessor (⇔, 0 ms)
↳8 YES
/**
* A recursive loop.
*
* All calls terminate.
*
* Julia + BinTerm prove that all calls terminate.
*
* @author <A HREF="mailto:fausto.spoto@univr.it">Fausto Spoto</A>
*/
public class Double3 {
private static void test(int n) {
while (--n > 0) test(n);
}
public static void main(String[] args) {
test(10);
}
}
Generated rules. Obtained 14 IRules
P rules:
f322_0_test_Inc(EOS, i27, i38) → f325_0_test_Load(EOS, i27, +(i38, -1))
f325_0_test_Load(EOS, i27, i41) → f327_0_test_LE(EOS, i27, i41, i41)
f327_0_test_LE(EOS, i27, i45, i45) → f330_0_test_LE(EOS, i27, i45, i45)
f330_0_test_LE(EOS, i27, i45, i45) → f333_0_test_Load(EOS, i27, i45) | >(i45, 0)
f333_0_test_Load(EOS, i27, i45) → f337_0_test_InvokeMethod(EOS, i27, i45, i45)
f337_0_test_InvokeMethod(EOS, i27, i45, i45) → f343_0_test_Inc(EOS, i45, i45)
f337_0_test_InvokeMethod(EOS, i27, i45, i45) → f343_1_test_Inc(EOS, i27, i45, i45, i45)
f343_0_test_Inc(EOS, i45, i45) → f348_0_test_Inc(EOS, i45, i45)
f348_0_test_Inc(EOS, i45, i45) → f269_0_test_Inc(EOS, i45, i45)
f269_0_test_Inc(EOS, i27, i27) → f322_0_test_Inc(EOS, i27, i27)
f355_0_test_Return(EOS, i27, i50, i50) → f357_0_test_JMP(EOS, i27, i50)
f357_0_test_JMP(EOS, i27, i50) → f360_0_test_Inc(EOS, i27, i50)
f360_0_test_Inc(EOS, i27, i50) → f322_0_test_Inc(EOS, i27, i50)
f343_1_test_Inc(EOS, i27, i50, i50, i50) → f355_0_test_Return(EOS, i27, i50, i50)
Combined rules. Obtained 2 IRules
P rules:
f322_0_test_Inc(EOS, x0, x1) → f322_0_test_Inc(EOS, -(x1, 1), -(x1, 1)) | >(x1, 1)
f322_0_test_Inc(EOS, x0, x1) → f322_0_test_Inc(EOS, x0, -(x1, 1)) | >(x1, 1)
Filtered ground terms:
f322_0_test_Inc(x1, x2, x3) → f322_0_test_Inc(x2, x3)
Cond_f322_0_test_Inc(x1, x2, x3, x4) → Cond_f322_0_test_Inc(x1, x3, x4)
Cond_f322_0_test_Inc1(x1, x2, x3, x4) → Cond_f322_0_test_Inc1(x1, x3, x4)
Filtered unneeded terms:
Cond_f322_0_test_Inc(x1, x2, x3) → Cond_f322_0_test_Inc(x1, x3)
Cond_f322_0_test_Inc1(x1, x2, x3) → Cond_f322_0_test_Inc1(x1, x3)
f322_0_test_Inc(x1, x2) → f322_0_test_Inc(x2)
Prepared 1 rules for path length conversion:
P rules:
f322_0_test_Inc(x1) → f322_0_test_Inc(-(x1, 1)) | >(x1, 1)
Finished conversion. Obtained 1 rules.
P rules:
f322_0_test_Inc(x0) → f322_0_test_Inc(-(x0, 1)) | >(x0, 1)
Found the following polynomial interpretation:
Therefore the following rule(s) have been dropped: