(0) Obligation:

JBC Problem based on JBC Program:
/**
* 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 Double2 {
private static void test(int n) {
for (int i = n - 1; i >= 0; i--)
test(i);
}

public static void main(String[] args) {
test(10);
}
}

(1) JBCToGraph (SOUND transformation)

Constructed TerminationGraph.

(2) Obligation:

Termination Graph based on JBC Program:
Double2.main([Ljava/lang/String;)V: Graph of 31 nodes with 0 SCCs.

Double2.test(I)V: Graph of 18 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: Double2.test(I)V
SCC calls the following helper methods: Double2.test(I)V
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 17 IRules

P rules:
f220_0_test_ConstantStackPush(EOS, i15, i15) → f222_0_test_IntArithmetic(EOS, i15, i15, 1)
f222_0_test_IntArithmetic(EOS, i15, i15, matching1) → f223_0_test_Store(EOS, i15, -(i15, 1)) | =(matching1, 1)
f223_0_test_Store(EOS, i15, i16) → f225_0_test_Load(EOS, i15, i16)
f225_0_test_Load(EOS, i15, i16) → f227_0_test_LT(EOS, i15, i16, i16)
f227_0_test_LT(EOS, i15, i20, i20) → f231_0_test_LT(EOS, i15, i20, i20)
f231_0_test_LT(EOS, i15, i20, i20) → f234_0_test_Load(EOS, i15, i20) | >=(i20, 0)
f234_0_test_Load(EOS, i15, i20) → f237_0_test_InvokeMethod(EOS, i15, i20, i20)
f237_0_test_InvokeMethod(EOS, i15, i20, i20) → f247_0_test_Load(EOS, i20, i20)
f237_0_test_InvokeMethod(EOS, i15, i20, i20) → f247_1_test_Load(EOS, i15, i20, i20, i20)
f247_0_test_Load(EOS, i20, i20) → f254_0_test_Load(EOS, i20, i20)
f254_0_test_Load(EOS, i20, i20) → f218_0_test_Load(EOS, i20, i20)
f218_0_test_Load(EOS, i15, i15) → f220_0_test_ConstantStackPush(EOS, i15, i15)
f266_0_test_Return(EOS, i15, i25, i25) → f268_0_test_Inc(EOS, i15, i25)
f268_0_test_Inc(EOS, i15, i25) → f270_0_test_JMP(EOS, i15, +(i25, -1)) | >=(i25, 0)
f270_0_test_JMP(EOS, i15, i26) → f274_0_test_Load(EOS, i15, i26)
f274_0_test_Load(EOS, i15, i26) → f225_0_test_Load(EOS, i15, i26)
f247_1_test_Load(EOS, i15, i25, i25, i25) → f266_0_test_Return(EOS, i15, i25, i25)

Combined rules. Obtained 2 IRules

P rules:
f237_0_test_InvokeMethod(EOS, x0, x1, x1) → f237_0_test_InvokeMethod(EOS, x1, -(x1, 1), -(x1, 1)) | >(+(x1, 1), 1)
f237_0_test_InvokeMethod(EOS, x0, x1, x1) → f237_0_test_InvokeMethod(EOS, x0, -(x1, 1), -(x1, 1)) | >(+(x1, 1), 1)

Filtered ground terms:


f237_0_test_InvokeMethod(x1, x2, x3, x4) → f237_0_test_InvokeMethod(x2, x3, x4)
Cond_f237_0_test_InvokeMethod(x1, x2, x3, x4, x5) → Cond_f237_0_test_InvokeMethod(x1, x3, x4, x5)
Cond_f237_0_test_InvokeMethod1(x1, x2, x3, x4, x5) → Cond_f237_0_test_InvokeMethod1(x1, x3, x4, x5)

Filtered duplicate terms:


f237_0_test_InvokeMethod(x1, x2, x3) → f237_0_test_InvokeMethod(x1, x3)
Cond_f237_0_test_InvokeMethod(x1, x2, x3, x4) → Cond_f237_0_test_InvokeMethod(x1, x2, x4)
Cond_f237_0_test_InvokeMethod1(x1, x2, x3, x4) → Cond_f237_0_test_InvokeMethod1(x1, x2, x4)

Filtered unneeded terms:


Cond_f237_0_test_InvokeMethod(x1, x2, x3) → Cond_f237_0_test_InvokeMethod(x1, x3)
Cond_f237_0_test_InvokeMethod1(x1, x2, x3) → Cond_f237_0_test_InvokeMethod1(x1, x3)
f237_0_test_InvokeMethod(x1, x2) → f237_0_test_InvokeMethod(x2)

Prepared 1 rules for path length conversion:

P rules:
f237_0_test_InvokeMethod(x1) → f237_0_test_InvokeMethod(-(x1, 1)) | >(+(x1, 1), 1)

Finished conversion. Obtained 1 rules.

P rules:
f237_0_test_InvokeMethod(x0) → f237_0_test_InvokeMethod(-(x0, 1)) | >(x0, 0)

(6) Obligation:

Rules:
f237_0_test_InvokeMethod(x0) → f237_0_test_InvokeMethod(-(x0, 1)) | >(x0, 0)

(7) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f237_0_test_InvokeMethod(x2)] = x2

Therefore the following rule(s) have been dropped:


f237_0_test_InvokeMethod(x0) → f237_0_test_InvokeMethod(-(x0, 1)) | >(x0, 0)

(8) YES