(0) Obligation:

JBC Problem based on JBC Program:
public class DivMinus {
public static int div(int x, int y) {
int res = 0;
while (x >= y && y > 0) {
x = x-y;
res = res + 1;
}
return res;
}

public static void main(String[] args) {
Random.args = args;
int x = Random.random();
int y = Random.random();
div(x, y);
}
}


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:
DivMinus.main([Ljava/lang/String;)V: Graph of 200 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: DivMinus.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 17 IRules

P rules:
f852_0_div_Load(EOS, i102, i101, i102, i101) → f855_0_div_LT(EOS, i102, i101, i102, i101, i102)
f855_0_div_LT(EOS, i102, i101, i102, i101, i102) → f859_0_div_LT(EOS, i102, i101, i102, i101, i102)
f859_0_div_LT(EOS, i102, i101, i102, i101, i102) → f863_0_div_Load(EOS, i102, i101, i102) | >=(i101, i102)
f863_0_div_Load(EOS, i102, i101, i102) → f868_0_div_LE(EOS, i102, i101, i102, i102)
f868_0_div_LE(EOS, i112, i101, i112, i112) → f874_0_div_LE(EOS, i112, i101, i112, i112)
f874_0_div_LE(EOS, i112, i101, i112, i112) → f883_0_div_Load(EOS, i112, i101, i112) | >(i112, 0)
f883_0_div_Load(EOS, i112, i101, i112) → f891_0_div_Load(EOS, i112, i112, i101)
f891_0_div_Load(EOS, i112, i112, i101) → f902_0_div_IntArithmetic(EOS, i112, i112, i101, i112)
f902_0_div_IntArithmetic(EOS, i112, i112, i101, i112) → f906_0_div_Store(EOS, i112, i112, -(i101, i112)) | >(i112, 0)
f906_0_div_Store(EOS, i112, i112, i114) → f911_0_div_Load(EOS, i112, i114, i112)
f911_0_div_Load(EOS, i112, i114, i112) → f913_0_div_ConstantStackPush(EOS, i112, i114, i112)
f913_0_div_ConstantStackPush(EOS, i112, i114, i112) → f915_0_div_IntArithmetic(EOS, i112, i114, i112)
f915_0_div_IntArithmetic(EOS, i112, i114, i112) → f917_0_div_Store(EOS, i112, i114, i112)
f917_0_div_Store(EOS, i112, i114, i112) → f920_0_div_JMP(EOS, i112, i114, i112)
f920_0_div_JMP(EOS, i112, i114, i112) → f948_0_div_Load(EOS, i112, i114, i112)
f948_0_div_Load(EOS, i112, i114, i112) → f848_0_div_Load(EOS, i112, i114, i112)
f848_0_div_Load(EOS, i102, i101, i102) → f852_0_div_Load(EOS, i102, i101, i102, i101)

Combined rules. Obtained 1 IRules

P rules:
f852_0_div_Load(EOS, x0, x1, x0, x1) → f852_0_div_Load(EOS, x0, -(x1, x0), x0, -(x1, x0)) | &&(>=(x1, x0), >(x0, 0))

Filtered ground terms:


f852_0_div_Load(x1, x2, x3, x4, x5) → f852_0_div_Load(x2, x3, x4, x5)
Cond_f852_0_div_Load(x1, x2, x3, x4, x5, x6) → Cond_f852_0_div_Load(x1, x3, x4, x5, x6)

Filtered duplicate terms:


f852_0_div_Load(x1, x2, x3, x4) → f852_0_div_Load(x3, x4)
Cond_f852_0_div_Load(x1, x2, x3, x4, x5) → Cond_f852_0_div_Load(x1, x4, x5)

Prepared 1 rules for path length conversion:

P rules:
f852_0_div_Load(x0, x1) → f852_0_div_Load(x0, -(x1, x0)) | &&(>=(x1, x0), >(x0, 0))

Finished conversion. Obtained 1 rules.

P rules:
f852_0_div_Load(x0, x1) → f852_0_div_Load(x0, -(x1, x0)) | &&(>(x0, 0), >=(x1, x0))

(6) Obligation:

Rules:
f852_0_div_Load(x0, x1) → f852_0_div_Load(x0, -(x1, x0)) | &&(>(x0, 0), >=(x1, x0))

(7) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f852_0_div_Load(x3, x5)] = x5

Therefore the following rule(s) have been dropped:


f852_0_div_Load(x0, x1) → f852_0_div_Load(x0, -(x1, x0)) | &&(>(x0, 0), >=(x1, x0))

(8) YES