(0) Obligation:

JBC Problem based on JBC Program:
public class Random {
static String[] args;
static int index = 0;

public static int random() {
String string = args[index];
index++;
return string.length();
}
}


public class Round3{
public static void main(String[] args) {
Random.args = args;
int x = Random.random();

while (x % 3 != 0) {
x++;
}
}
}


(1) JBCToGraph (SOUND transformation)

Constructed TerminationGraph.

(2) Obligation:

Termination Graph based on JBC Program:
Round3.main([Ljava/lang/String;)V: Graph of 108 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: Round3.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 8 IRules

P rules:
f154_0_main_ConstantStackPush(EOS, i18, i18) → f158_0_main_IntArithmetic(EOS, i18, i18, 3)
f158_0_main_IntArithmetic(EOS, i18, i18, matching1) → f171_0_main_EQ(EOS, i18, %(i18, 3)) | =(matching1, 3)
f171_0_main_EQ(EOS, i18, i25) → f175_0_main_EQ(EOS, i18, i25)
f175_0_main_EQ(EOS, i18, i25) → f181_0_main_Inc(EOS, i18) | >(i25, 0)
f181_0_main_Inc(EOS, i18) → f191_0_main_JMP(EOS, +(i18, 1)) | >=(i18, 0)
f191_0_main_JMP(EOS, i28) → f239_0_main_Load(EOS, i28)
f239_0_main_Load(EOS, i28) → f148_0_main_Load(EOS, i28)
f148_0_main_Load(EOS, i18) → f154_0_main_ConstantStackPush(EOS, i18, i18)

Combined rules. Obtained 1 IRules

P rules:
f154_0_main_ConstantStackPush(EOS, x0, x0) → f154_0_main_ConstantStackPush(EOS, +(x0, 1), +(x0, 1)) | &&(>(%(x0, 3), 0), >(+(x0, 1), 0))

Filtered ground terms:


f154_0_main_ConstantStackPush(x1, x2, x3) → f154_0_main_ConstantStackPush(x2, x3)
Cond_f154_0_main_ConstantStackPush(x1, x2, x3, x4) → Cond_f154_0_main_ConstantStackPush(x1, x3, x4)

Filtered duplicate terms:


f154_0_main_ConstantStackPush(x1, x2) → f154_0_main_ConstantStackPush(x2)
Cond_f154_0_main_ConstantStackPush(x1, x2, x3) → Cond_f154_0_main_ConstantStackPush(x1, x3)

Prepared 1 rules for path length conversion:

P rules:
f154_0_main_ConstantStackPush(x0) → f154_0_main_ConstantStackPush(+(x0, 1)) | &&(>(%(x0, 3), 0), >(+(x0, 1), 0))

Finished conversion. Obtained 2 rules.

P rules:
f154_0_main_ConstantStackPush(x0) → f154_0_main_ConstantStackPush'(x0) | &&(>(-(x0, *(3, div)), 0), >(x0, -1))
f154_0_main_ConstantStackPush'(x0) → f154_0_main_ConstantStackPush(+(x0, 1)) | &&(&&(>(x0, -1), <(-(x0, *(3, div)), 3)), >(-(x0, *(3, div)), 0))

(6) Obligation:

Rules:
f154_0_main_ConstantStackPush(x0) → f154_0_main_ConstantStackPush'(x0) | &&(>(-(x0, *(3, div)), 0), >(x0, -1))
f154_0_main_ConstantStackPush'(x0) → f154_0_main_ConstantStackPush(+(x0, 1)) | &&(&&(>(x0, -1), <(-(x0, *(3, div)), 3)), >(-(x0, *(3, div)), 0))

(7) TerminationGraphProcessor (SOUND transformation)

Constructed the termination graph and obtained one non-trivial SCC.



f154_0_main_ConstantStackPush(x0) → f154_0_main_ConstantStackPush'(x0) | &&(>(-(x0, *(3, x1)), 0), >(x0, -1)) and
f154_0_main_ConstantStackPush'(x2) → f154_0_main_ConstantStackPush(+(x2, 1)) | &&(&&(>(x2, -1), <(-(x2, *(3, x3)), 3)), >(-(x2, *(3, x3)), 0))
have been merged into the new rule
f154_0_main_ConstantStackPush(x0) → f154_0_main_ConstantStackPush(+(x0, 1)) | &&(&&(>(-(x0, *(3, x1)), 0), >(x0, -1)), &&(&&(>(x0, -1), <(-(x0, *(3, x3)), 3)), >(-(x0, *(3, x3)), 0)))

(8) Obligation:

Rules:
f154_0_main_ConstantStackPush(x8) → f154_0_main_ConstantStackPush(+(x8, 1)) | &&(&&(>(-(x8, *(3, x9)), 0), >(x8, -1)), &&(&&(>(x8, -1), <(-(x8, *(3, x10)), 3)), >(-(x8, *(3, x10)), 0)))

(9) TerminationGraphProcessor (SOUND transformation)

Constructed the termination graph and obtained one non-trivial SCC.



f154_0_main_ConstantStackPush(x0) → f154_0_main_ConstantStackPush(+(x0, 1)) | &&(&&(>(-(x0, *(3, x1)), 0), >(x0, -1)), &&(&&(>(x0, -1), <(-(x0, *(3, x2)), 3)), >(-(x0, *(3, x2)), 0))) and
f154_0_main_ConstantStackPush(x0) → f154_0_main_ConstantStackPush(+(x0, 1)) | &&(&&(>(-(x0, *(3, x1)), 0), >(x0, -1)), &&(&&(>(x0, -1), <(-(x0, *(3, x2)), 3)), >(-(x0, *(3, x2)), 0)))
have been merged into the new rule
f154_0_main_ConstantStackPush(x0) → f154_0_main_ConstantStackPush(+(+(x0, 1), 1)) | &&(&&(&&(>(-(x0, *(3, x1)), 0), >(x0, -1)), &&(&&(>(x0, -1), <(-(x0, *(3, x2)), 3)), >(-(x0, *(3, x2)), 0))), &&(&&(>(-(+(x0, 1), *(3, x7)), 0), >(+(x0, 1), -1)), &&(&&(>(+(x0, 1), -1), <(-(+(x0, 1), *(3, x8)), 3)), >(-(+(x0, 1), *(3, x8)), 0))))

(10) Obligation:

Rules:
f154_0_main_ConstantStackPush(x9) → f154_0_main_ConstantStackPush(+(+(x9, 1), 1)) | &&(&&(&&(>(-(x9, *(3, x10)), 0), >(x9, -1)), &&(&&(>(x9, -1), <(-(x9, *(3, x11)), 3)), >(-(x9, *(3, x11)), 0))), &&(&&(>(-(+(x9, 1), *(3, x12)), 0), >(+(x9, 1), -1)), &&(&&(>(+(x9, 1), -1), <(-(+(x9, 1), *(3, x13)), 3)), >(-(+(x9, 1), *(3, x13)), 0))))

(11) TerminationGraphProcessor (EQUIVALENT transformation)

Constructed the termination graph and obtained no non-trivial SCC(s).


(12) YES