0 JBC
↳1 JBCToGraph (⇒, 336 ms)
↳2 JBCTerminationGraph
↳3 TerminationGraphToSCCProof (⇒, 0 ms)
↳4 JBCTerminationSCC
↳5 SCCToIntTRSProof (⇒, 34 ms)
↳6 intTRS
↳7 PolynomialOrderProcessor (⇔, 0 ms)
↳8 YES
public class AG313 {
public static void main(String[] args) {
int x, y;
x = args[0].length();
y = args[1].length() + 1;
quot(x,y);
}
public static int quot(int x, int y) {
int i = 0;
if(x==0) return 0;
while (x > 0 && y > 0) {
i += 1;
x = (x - 1)- (y - 1);
}
return i;
}
}
Generated rules. Obtained 16 IRules
P rules:
f664_0_quot_LE(EOS, i40, i161, i40, i161) → f668_0_quot_LE(EOS, i40, i161, i40, i161)
f668_0_quot_LE(EOS, i40, i161, i40, i161) → f672_0_quot_Load(EOS, i40, i161, i40) | >(i161, 0)
f672_0_quot_Load(EOS, i40, i161, i40) → f677_0_quot_LE(EOS, i40, i161, i40, i40)
f677_0_quot_LE(EOS, i40, i161, i40, i40) → f685_0_quot_Inc(EOS, i40, i161, i40) | >(i40, 0)
f685_0_quot_Inc(EOS, i40, i161, i40) → f688_0_quot_Load(EOS, i40, i161, i40)
f688_0_quot_Load(EOS, i40, i161, i40) → f693_0_quot_ConstantStackPush(EOS, i40, i40, i161)
f693_0_quot_ConstantStackPush(EOS, i40, i40, i161) → f695_0_quot_IntArithmetic(EOS, i40, i40, i161, 1)
f695_0_quot_IntArithmetic(EOS, i40, i40, i161, matching1) → f698_0_quot_Load(EOS, i40, i40, -(i161, 1)) | &&(>(i161, 0), =(matching1, 1))
f698_0_quot_Load(EOS, i40, i40, i169) → f700_0_quot_ConstantStackPush(EOS, i40, i40, i169, i40)
f700_0_quot_ConstantStackPush(EOS, i40, i40, i169, i40) → f702_0_quot_IntArithmetic(EOS, i40, i40, i169, i40, 1)
f702_0_quot_IntArithmetic(EOS, i40, i40, i169, i40, matching1) → f704_0_quot_IntArithmetic(EOS, i40, i40, i169, -(i40, 1)) | &&(>(i40, 0), =(matching1, 1))
f704_0_quot_IntArithmetic(EOS, i40, i40, i169, i170) → f707_0_quot_Store(EOS, i40, i40, -(i169, i170)) | &&(>=(i169, 0), >=(i170, 0))
f707_0_quot_Store(EOS, i40, i40, i171) → f709_0_quot_JMP(EOS, i40, i171, i40)
f709_0_quot_JMP(EOS, i40, i171, i40) → f734_0_quot_Load(EOS, i40, i171, i40)
f734_0_quot_Load(EOS, i40, i171, i40) → f659_0_quot_Load(EOS, i40, i171, i40)
f659_0_quot_Load(EOS, i40, i148, i40) → f664_0_quot_LE(EOS, i40, i148, i40, i148)
Combined rules. Obtained 1 IRules
P rules:
f664_0_quot_LE(EOS, x0, x1, x0, x1) → f664_0_quot_LE(EOS, x0, -(-(x1, 1), -(x0, 1)), x0, -(-(x1, 1), -(x0, 1))) | &&(>(+(x1, 1), 1), >(+(x0, 1), 1))
Filtered ground terms:
f664_0_quot_LE(x1, x2, x3, x4, x5) → f664_0_quot_LE(x2, x3, x4, x5)
Cond_f664_0_quot_LE(x1, x2, x3, x4, x5, x6) → Cond_f664_0_quot_LE(x1, x3, x4, x5, x6)
Filtered duplicate terms:
f664_0_quot_LE(x1, x2, x3, x4) → f664_0_quot_LE(x3, x4)
Cond_f664_0_quot_LE(x1, x2, x3, x4, x5) → Cond_f664_0_quot_LE(x1, x4, x5)
Prepared 1 rules for path length conversion:
P rules:
f664_0_quot_LE(x0, x1) → f664_0_quot_LE(x0, -(-(x1, 1), -(x0, 1))) | &&(>(+(x1, 1), 1), >(+(x0, 1), 1))
Finished conversion. Obtained 1 rules.
P rules:
f664_0_quot_LE(x0, x1) → f664_0_quot_LE(x0, -(-(x1, 1), -(x0, 1))) | &&(>(x0, 0), >(x1, 0))
Found the following polynomial interpretation:
Therefore the following rule(s) have been dropped: