(0) Obligation:

JBC Problem based on JBC Program:
public class PlusSwap{
public static void main(String[] args) {
Random.args = args;
int x = Random.random();
int y = Random.random();
int z;
int res = 0;

while (y > 0) {

z = x;
x = y-1;
y = z;
res++;

}

res = res + x;
}
}


public class Random {
static String[] args;
static int index = 0;

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


(1) JBCToGraph (SOUND transformation)

Constructed TerminationGraph.

(2) Obligation:

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

P rules:
f729_0_main_LE(EOS, i130, i143, i143) → f733_0_main_LE(EOS, i130, i143, i143)
f733_0_main_LE(EOS, i130, i143, i143) → f738_0_main_Load(EOS, i130, i143) | >(i143, 0)
f738_0_main_Load(EOS, i130, i143) → f742_0_main_Store(EOS, i143, i130)
f742_0_main_Store(EOS, i143, i130) → f746_0_main_Load(EOS, i143, i130)
f746_0_main_Load(EOS, i143, i130) → f750_0_main_ConstantStackPush(EOS, i130, i143)
f750_0_main_ConstantStackPush(EOS, i130, i143) → f755_0_main_IntArithmetic(EOS, i130, i143, 1)
f755_0_main_IntArithmetic(EOS, i130, i143, matching1) → f759_0_main_Store(EOS, i130, -(i143, 1)) | &&(>(i143, 0), =(matching1, 1))
f759_0_main_Store(EOS, i130, i147) → f761_0_main_Load(EOS, i147, i130)
f761_0_main_Load(EOS, i147, i130) → f764_0_main_Store(EOS, i147, i130)
f764_0_main_Store(EOS, i147, i130) → f766_0_main_Inc(EOS, i147, i130)
f766_0_main_Inc(EOS, i147, i130) → f768_0_main_JMP(EOS, i147, i130)
f768_0_main_JMP(EOS, i147, i130) → f795_0_main_Load(EOS, i147, i130)
f795_0_main_Load(EOS, i147, i130) → f725_0_main_Load(EOS, i147, i130)
f725_0_main_Load(EOS, i130, i131) → f729_0_main_LE(EOS, i130, i131, i131)

Combined rules. Obtained 1 IRules

P rules:
f729_0_main_LE(EOS, x0, x1, x1) → f729_0_main_LE(EOS, -(x1, 1), x0, x0) | >(x1, 0)

Filtered ground terms:


f729_0_main_LE(x1, x2, x3, x4) → f729_0_main_LE(x2, x3, x4)
Cond_f729_0_main_LE(x1, x2, x3, x4, x5) → Cond_f729_0_main_LE(x1, x3, x4, x5)

Filtered duplicate terms:


f729_0_main_LE(x1, x2, x3) → f729_0_main_LE(x1, x3)
Cond_f729_0_main_LE(x1, x2, x3, x4) → Cond_f729_0_main_LE(x1, x2, x4)

Prepared 1 rules for path length conversion:

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

Finished conversion. Obtained 1 rules.

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

(6) Obligation:

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

(7) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f729_0_main_LE(x3, x6)] = x32 + x62

Therefore the following rule(s) have been dropped:


f729_0_main_LE(x0, x1) → f729_0_main_LE(-(x1, 1), x0) | >(x1, 0)

(8) YES