(0) Obligation:

JBC Problem based on JBC Program:
/**
* Example taken from "A Term Rewriting Approach to the Automated Termination
* Analysis of Imperative Programs" (http://www.cs.unm.edu/~spf/papers/2009-02.pdf)
* and converted to Java.
*/

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

while (x > 0 && y > 0) {
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:
PastaB6.main([Ljava/lang/String;)V: Graph of 179 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: PastaB6.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 10 IRules

P rules:
f312_0_main_LE(EOS, i52, i45, i52) → f323_0_main_LE(EOS, i52, i45, i52)
f323_0_main_LE(EOS, i52, i45, i52) → f345_0_main_Load(EOS, i52, i45) | >(i52, 0)
f345_0_main_Load(EOS, i52, i45) → f357_0_main_LE(EOS, i52, i45, i45)
f357_0_main_LE(EOS, i52, i62, i62) → f367_0_main_LE(EOS, i52, i62, i62)
f367_0_main_LE(EOS, i52, i62, i62) → f393_0_main_Inc(EOS, i52, i62) | >(i62, 0)
f393_0_main_Inc(EOS, i52, i62) → f409_0_main_Inc(EOS, +(i52, -1), i62) | >(i52, 0)
f409_0_main_Inc(EOS, i72, i62) → f422_0_main_JMP(EOS, i72, +(i62, -1)) | >(i62, 0)
f422_0_main_JMP(EOS, i72, i76) → f460_0_main_Load(EOS, i72, i76)
f460_0_main_Load(EOS, i72, i76) → f301_0_main_Load(EOS, i72, i76)
f301_0_main_Load(EOS, i18, i45) → f312_0_main_LE(EOS, i18, i45, i18)

Combined rules. Obtained 1 IRules

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

Filtered ground terms:


f312_0_main_LE(x1, x2, x3, x4) → f312_0_main_LE(x2, x3, x4)
Cond_f312_0_main_LE(x1, x2, x3, x4, x5) → Cond_f312_0_main_LE(x1, x3, x4, x5)

Filtered duplicate terms:


f312_0_main_LE(x1, x2, x3) → f312_0_main_LE(x2, x3)
Cond_f312_0_main_LE(x1, x2, x3, x4) → Cond_f312_0_main_LE(x1, x3, x4)

Prepared 1 rules for path length conversion:

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

Finished conversion. Obtained 1 rules.

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

(6) Obligation:

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

(7) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f312_0_main_LE(x3, x5)] = x3

Therefore the following rule(s) have been dropped:


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

(8) YES