0 JBC
↳1 JBCToGraph (⇒, 126 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIntTRSProof (⇒, 44 ms)
↳6 intTRS
↳7 PolynomialOrderProcessor (⇔, 0 ms)
↳8 YES
package simple.whileDecr;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
WhileDecr.decrease(args.length);
}
}
package simple.whileDecr;
public class WhileDecr {
// this example does acutally terminate.
public static void decrease(int i) {
while (i > 5) {
i--;
}
}
}
Generated rules. Obtained 7 IRules
P rules:
f110_0_decrease_ConstantStackPush(EOS, i11, i11) → f113_0_decrease_LE(EOS, i11, i11, 5)
f113_0_decrease_LE(EOS, i26, i26, matching1) → f117_0_decrease_LE(EOS, i26, i26, 5) | =(matching1, 5)
f117_0_decrease_LE(EOS, i26, i26, matching1) → f122_0_decrease_Inc(EOS, i26) | &&(>(i26, 5), =(matching1, 5))
f122_0_decrease_Inc(EOS, i26) → f126_0_decrease_JMP(EOS, +(i26, -1)) | >(i26, 0)
f126_0_decrease_JMP(EOS, i28) → f149_0_decrease_Load(EOS, i28)
f149_0_decrease_Load(EOS, i28) → f105_0_decrease_Load(EOS, i28)
f105_0_decrease_Load(EOS, i11) → f110_0_decrease_ConstantStackPush(EOS, i11, i11)
Combined rules. Obtained 1 IRules
P rules:
f110_0_decrease_ConstantStackPush(EOS, x0, x0) → f110_0_decrease_ConstantStackPush(EOS, -(x0, 1), -(x0, 1)) | >(x0, 5)
Filtered ground terms:
f110_0_decrease_ConstantStackPush(x1, x2, x3) → f110_0_decrease_ConstantStackPush(x2, x3)
Cond_f110_0_decrease_ConstantStackPush(x1, x2, x3, x4) → Cond_f110_0_decrease_ConstantStackPush(x1, x3, x4)
Filtered duplicate terms:
f110_0_decrease_ConstantStackPush(x1, x2) → f110_0_decrease_ConstantStackPush(x2)
Cond_f110_0_decrease_ConstantStackPush(x1, x2, x3) → Cond_f110_0_decrease_ConstantStackPush(x1, x3)
Prepared 1 rules for path length conversion:
P rules:
f110_0_decrease_ConstantStackPush(x0) → f110_0_decrease_ConstantStackPush(-(x0, 1)) | >(x0, 5)
Finished conversion. Obtained 1 rules.
P rules:
f110_0_decrease_ConstantStackPush(x0) → f110_0_decrease_ConstantStackPush(-(x0, 1)) | >(x0, 5)
Found the following polynomial interpretation:
Therefore the following rule(s) have been dropped: