(0) Obligation:

JBC Problem based on JBC Program:
public class LogMult{

public static int log(int x, int y) {

int res = 1;

if (x < 0 || y < 1) return 0;
else {
while (x > y) {
y = y*y;
res = 2*res;
}
}
return res;

}





public static void main(String[] args) {
Random.args = args;

int x = Random.random();
log(x,2);
}
}


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:
LogMult.main([Ljava/lang/String;)V: Graph of 131 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: LogMult.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:
f517_0_log_Load(EOS, i30, i30, i68, i30) → f518_0_log_LE(EOS, i30, i30, i68, i30, i68)
f518_0_log_LE(EOS, i30, i30, i68, i30, i68) → f520_0_log_LE(EOS, i30, i30, i68, i30, i68)
f520_0_log_LE(EOS, i30, i30, i68, i30, i68) → f522_0_log_Load(EOS, i30, i30, i68) | >(i30, i68)
f522_0_log_Load(EOS, i30, i30, i68) → f524_0_log_Load(EOS, i30, i30, i68, i68)
f524_0_log_Load(EOS, i30, i30, i68, i68) → f526_0_log_IntArithmetic(EOS, i30, i30, i68, i68)
f526_0_log_IntArithmetic(EOS, i30, i30, i68, i68) → f528_0_log_Store(EOS, i30, i30, *(i68, i68)) | &&(>(i68, 1), >(i68, 1))
f528_0_log_Store(EOS, i30, i30, i73) → f530_0_log_ConstantStackPush(EOS, i30, i30, i73)
f530_0_log_ConstantStackPush(EOS, i30, i30, i73) → f531_0_log_Load(EOS, i30, i30, i73)
f531_0_log_Load(EOS, i30, i30, i73) → f532_0_log_IntArithmetic(EOS, i30, i30, i73)
f532_0_log_IntArithmetic(EOS, i30, i30, i73) → f533_0_log_Store(EOS, i30, i30, i73)
f533_0_log_Store(EOS, i30, i30, i73) → f534_0_log_JMP(EOS, i30, i30, i73)
f534_0_log_JMP(EOS, i30, i30, i73) → f545_0_log_Load(EOS, i30, i30, i73)
f545_0_log_Load(EOS, i30, i30, i73) → f516_0_log_Load(EOS, i30, i30, i73)
f516_0_log_Load(EOS, i30, i30, i68) → f517_0_log_Load(EOS, i30, i30, i68, i30)

Combined rules. Obtained 1 IRules

P rules:
f517_0_log_Load(EOS, x0, x0, x1, x0) → f517_0_log_Load(EOS, x0, x0, *(x1, x1), x0) | &&(>(x1, 1), <(x1, x0))

Filtered ground terms:


f517_0_log_Load(x1, x2, x3, x4, x5) → f517_0_log_Load(x2, x3, x4, x5)
Cond_f517_0_log_Load(x1, x2, x3, x4, x5, x6) → Cond_f517_0_log_Load(x1, x3, x4, x5, x6)

Filtered duplicate terms:


f517_0_log_Load(x1, x2, x3, x4) → f517_0_log_Load(x3, x4)
Cond_f517_0_log_Load(x1, x2, x3, x4, x5) → Cond_f517_0_log_Load(x1, x4, x5)

Prepared 1 rules for path length conversion:

P rules:
f517_0_log_Load(x1, x0) → f517_0_log_Load(*(x1, x1), x0) | &&(>(x1, 1), <(x1, x0))

Finished conversion. Obtained 1 rules.

P rules:
f517_0_log_Load(x0, x1) → f517_0_log_Load(*(x0, x0), x1) | &&(>(x0, 1), >(x1, x0))

(6) Obligation:

Rules:
f517_0_log_Load(x0, x1) → f517_0_log_Load(*(x0, x0), x1) | &&(>(x0, 1), >(x1, x0))

(7) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f517_0_log_Load(x3, x5)] = -x3 + x5

Therefore the following rule(s) have been dropped:


f517_0_log_Load(x0, x1) → f517_0_log_Load(*(x0, x0), x1) | &&(>(x0, 1), >(x1, x0))

(8) YES