(0) Obligation:

JBC Problem based on JBC Program:
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;
}
}


(1) JBCToGraph (SOUND transformation)

Constructed TerminationGraph.

(2) Obligation:

Termination Graph based on JBC Program:
AG313.main([Ljava/lang/String;)V: Graph of 180 nodes with 1 SCC.


(3) TerminationGraphToSCCProof (SOUND transformation)

Splitted TerminationGraph to 1 SCCs.

(4) Obligation:

SCC of termination graph based on JBC Program.
SCC contains nodes from the following methods: AG313.main([Ljava/lang/String;)V
SCC calls the following helper methods:
Performed SCC analyses:
  • Used field analysis yielded the following read fields:
  • Marker field analysis yielded the following relations that could be markers:

(5) SCCToIntTRSProof (SOUND transformation)

Transformed FIGraph SCCs to intTRSs. Log:

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))

(6) Obligation:

Rules:
f664_0_quot_LE(x0, x1) → f664_0_quot_LE(x0, -(-(x1, 1), -(x0, 1))) | &&(>(x0, 0), >(x1, 0))

(7) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f664_0_quot_LE(x3, x5)] = x5

Therefore the following rule(s) have been dropped:


f664_0_quot_LE(x0, x1) → f664_0_quot_LE(x0, -(-(x1, 1), -(x0, 1))) | &&(>(x0, 0), >(x1, 0))

(8) YES