(0) Obligation:

JBC Problem based on JBC Program:
public class DivWithoutMinus{
// adaption of the algorithm from [Kolbe 95]
public static void main(String[] args) {
Random.args = args;

int x = Random.random();
int y = Random.random();
int z = y;
int res = 0;

while (z > 0 && (y == 0 || y > 0 && x > 0)) {

if (y == 0) {
res++;
y = z;
}
else {
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:
DivWithoutMinus.main([Ljava/lang/String;)V: Graph of 206 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: DivWithoutMinus.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 27 IRules

P rules:
f919_0_main_LE(EOS, i76, i176, i189, i189) → f923_0_main_LE(EOS, i76, i176, i189, i189)
f923_0_main_LE(EOS, i76, i176, i189, i189) → f927_0_main_Load(EOS, i76, i176, i189) | >(i189, 0)
f927_0_main_Load(EOS, i76, i176, i189) → f932_0_main_EQ(EOS, i76, i176, i189, i176)
f932_0_main_EQ(EOS, i76, i192, i189, i192) → f935_0_main_EQ(EOS, i76, i192, i189, i192)
f932_0_main_EQ(EOS, i76, matching1, i189, matching2) → f936_0_main_EQ(EOS, i76, 0, i189, 0) | &&(=(matching1, 0), =(matching2, 0))
f935_0_main_EQ(EOS, i76, i192, i189, i192) → f938_0_main_Load(EOS, i76, i192, i189) | !(=(i192, 0))
f938_0_main_Load(EOS, i76, i192, i189) → f943_0_main_LE(EOS, i76, i192, i189, i192)
f943_0_main_LE(EOS, i76, i201, i189, i201) → f949_0_main_LE(EOS, i76, i201, i189, i201)
f949_0_main_LE(EOS, i76, i201, i189, i201) → f961_0_main_Load(EOS, i76, i201, i189) | >(i201, 0)
f961_0_main_Load(EOS, i76, i201, i189) → f969_0_main_LE(EOS, i76, i201, i189, i76)
f969_0_main_LE(EOS, i207, i201, i189, i207) → f974_0_main_LE(EOS, i207, i201, i189, i207)
f974_0_main_LE(EOS, i207, i201, i189, i207) → f986_0_main_Load(EOS, i207, i201, i189) | >(i207, 0)
f986_0_main_Load(EOS, i207, i201, i189) → f1011_0_main_NE(EOS, i207, i201, i189, i201)
f1011_0_main_NE(EOS, i207, i201, i189, i201) → f1418_0_main_Inc(EOS, i207, i201, i189) | >(i201, 0)
f1418_0_main_Inc(EOS, i207, i201, i189) → f1420_0_main_Inc(EOS, +(i207, -1), i201, i189) | >(i207, 0)
f1420_0_main_Inc(EOS, i356, i201, i189) → f1421_0_main_JMP(EOS, i356, +(i201, -1), i189) | >(i201, 0)
f1421_0_main_JMP(EOS, i356, i357, i189) → f1427_0_main_Load(EOS, i356, i357, i189)
f1427_0_main_Load(EOS, i356, i357, i189) → f914_0_main_Load(EOS, i356, i357, i189)
f914_0_main_Load(EOS, i76, i176, i177) → f919_0_main_LE(EOS, i76, i176, i177, i177)
f936_0_main_EQ(EOS, i76, matching1, i189, matching2) → f940_0_main_Load(EOS, i76, 0, i189) | &&(=(matching1, 0), =(matching2, 0))
f940_0_main_Load(EOS, i76, matching1, i189) → f945_0_main_NE(EOS, i76, 0, i189, 0) | =(matching1, 0)
f945_0_main_NE(EOS, i76, matching1, i189, matching2) → f951_0_main_Inc(EOS, i76, i189) | &&(=(matching1, 0), =(matching2, 0))
f951_0_main_Inc(EOS, i76, i189) → f964_0_main_Load(EOS, i76, i189)
f964_0_main_Load(EOS, i76, i189) → f971_0_main_Store(EOS, i76, i189, i189)
f971_0_main_Store(EOS, i76, i189, i189) → f976_0_main_JMP(EOS, i76, i189, i189)
f976_0_main_JMP(EOS, i76, i189, i189) → f1006_0_main_Load(EOS, i76, i189, i189)
f1006_0_main_Load(EOS, i76, i189, i189) → f914_0_main_Load(EOS, i76, i189, i189)

Combined rules. Obtained 2 IRules

P rules:
f919_0_main_LE(EOS, x0, x1, x2, x2) → f919_0_main_LE(EOS, -(x0, 1), -(x1, 1), x2, x2) | &&(&&(>(x2, 0), >(x1, 0)), >(x0, 0))
f919_0_main_LE(EOS, x0, 0, x2, x2) → f919_0_main_LE(EOS, x0, x2, x2, x2) | >(x2, 0)

Filtered ground terms:


f919_0_main_LE(x1, x2, x3, x4, x5) → f919_0_main_LE(x2, x3, x4, x5)
Cond_f919_0_main_LE(x1, x2, x3, x4, x5, x6) → Cond_f919_0_main_LE(x1, x3, x4, x5, x6)
Cond_f919_0_main_LE1(x1, x2, x3, x4, x5, x6) → Cond_f919_0_main_LE1(x1, x3, x5, x6)

Filtered duplicate terms:


f919_0_main_LE(x1, x2, x3, x4) → f919_0_main_LE(x1, x2, x4)
Cond_f919_0_main_LE(x1, x2, x3, x4, x5) → Cond_f919_0_main_LE(x1, x2, x3, x5)
Cond_f919_0_main_LE1(x1, x2, x3, x4) → Cond_f919_0_main_LE1(x1, x2, x4)

Prepared 2 rules for path length conversion:

P rules:
f919_0_main_LE(x0, x1, x2) → f919_0_main_LE(-(x0, 1), -(x1, 1), x2) | &&(&&(>(x2, 0), >(x1, 0)), >(x0, 0))
f919_0_main_LE(x0, 0, x2) → f919_0_main_LE(x0, x2, x2) | >(x2, 0)

Finished conversion. Obtained 2 rules.

P rules:
f919_0_main_LE(x0, x1, x2) → f919_0_main_LE(-(x0, 1), -(x1, 1), x2) | &&(&&(>(x2, 0), >(x0, 0)), >(x1, 0))
f919_0_main_LE(x3, c0, x4) → f919_0_main_LE(x3, x4, x4) | &&(>(x4, 0), =(0, c0))

(6) Obligation:

Rules:
f919_0_main_LE(x0, x1, x2) → f919_0_main_LE(-(x0, 1), -(x1, 1), x2) | &&(&&(>(x2, 0), >(x0, 0)), >(x1, 0))
f919_0_main_LE(x3, c0, x4) → f919_0_main_LE(x3, x4, x4) | &&(>(x4, 0), =(0, c0))

(7) PolynomialOrderProcessor (SOUND transformation)

Found the following polynomial interpretation:


[f919_0_main_LE(x7, x9, x11)] = -1 + x7

Therefore the following rule(s) have been dropped:


f919_0_main_LE(x0, x1, x2) → f919_0_main_LE(-(x0, 1), -(x1, 1), x2) | &&(&&(>(x2, 0), >(x0, 0)), >(x1, 0))

(8) Obligation:

Rules:
f919_0_main_LE(x3, x4, x5) → f919_0_main_LE(x3, x5, x5) | &&(>(x5, 0), =(0, x4))

(9) TerminationGraphProcessor (EQUIVALENT transformation)

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


(10) YES