(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 PastaA7 {
public static void main(String[] args) {
Random.args = args;
int x = Random.random();
int y = Random.random();
int z = Random.random();

while (x > y && x > z) {
y++;
z++;
}
}
}


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:
PastaA7.main([Ljava/lang/String;)V: Graph of 248 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: PastaA7.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 12 IRules

P rules:
f629_0_main_Load(EOS, i18, i50, i94, i18) → f639_0_main_LE(EOS, i18, i50, i94, i18, i50)
f639_0_main_LE(EOS, i18, i50, i94, i18, i50) → f661_0_main_LE(EOS, i18, i50, i94, i18, i50)
f661_0_main_LE(EOS, i18, i50, i94, i18, i50) → f674_0_main_Load(EOS, i18, i50, i94) | >(i18, i50)
f674_0_main_Load(EOS, i18, i50, i94) → f685_0_main_Load(EOS, i18, i50, i94, i18)
f685_0_main_Load(EOS, i18, i50, i94, i18) → f700_0_main_LE(EOS, i18, i50, i94, i18, i94)
f700_0_main_LE(EOS, i18, i50, i94, i18, i94) → f718_0_main_LE(EOS, i18, i50, i94, i18, i94)
f718_0_main_LE(EOS, i18, i50, i94, i18, i94) → f747_0_main_Inc(EOS, i18, i50, i94) | >(i18, i94)
f747_0_main_Inc(EOS, i18, i50, i94) → f763_0_main_Inc(EOS, i18, +(i50, 1), i94) | >=(i50, 0)
f763_0_main_Inc(EOS, i18, i114, i94) → f782_0_main_JMP(EOS, i18, i114, +(i94, 1)) | >=(i94, 0)
f782_0_main_JMP(EOS, i18, i114, i117) → f823_0_main_Load(EOS, i18, i114, i117)
f823_0_main_Load(EOS, i18, i114, i117) → f619_0_main_Load(EOS, i18, i114, i117)
f619_0_main_Load(EOS, i18, i50, i94) → f629_0_main_Load(EOS, i18, i50, i94, i18)

Combined rules. Obtained 1 IRules

P rules:
f629_0_main_Load(EOS, x0, x1, x2, x0) → f629_0_main_Load(EOS, x0, +(x1, 1), +(x2, 1), x0) | &&(&&(&&(>(+(x2, 1), 0), <(x2, x0)), <(x1, x0)), >(+(x1, 1), 0))

Filtered ground terms:


f629_0_main_Load(x1, x2, x3, x4, x5) → f629_0_main_Load(x2, x3, x4, x5)
Cond_f629_0_main_Load(x1, x2, x3, x4, x5, x6) → Cond_f629_0_main_Load(x1, x3, x4, x5, x6)

Filtered duplicate terms:


f629_0_main_Load(x1, x2, x3, x4) → f629_0_main_Load(x2, x3, x4)
Cond_f629_0_main_Load(x1, x2, x3, x4, x5) → Cond_f629_0_main_Load(x1, x3, x4, x5)

Prepared 1 rules for path length conversion:

P rules:
f629_0_main_Load(x1, x2, x0) → f629_0_main_Load(+(x1, 1), +(x2, 1), x0) | &&(&&(&&(>(+(x2, 1), 0), <(x2, x0)), <(x1, x0)), >(+(x1, 1), 0))

Finished conversion. Obtained 1 rules.

P rules:
f629_0_main_Load(x0, x1, x2) → f629_0_main_Load(+(x0, 1), +(x1, 1), x2) | &&(&&(&&(>(x2, x1), >(x2, x0)), >(x0, -1)), >(x1, -1))

(6) Obligation:

Rules:
f629_0_main_Load(x0, x1, x2) → f629_0_main_Load(+(x0, 1), +(x1, 1), x2) | &&(&&(&&(>(x2, x1), >(x2, x0)), >(x0, -1)), >(x1, -1))

(7) PolynomialOrderProcessor (EQUIVALENT transformation)

Found the following polynomial interpretation:


[f629_0_main_Load(x4, x6, x8)] = -x4 + x8

Therefore the following rule(s) have been dropped:


f629_0_main_Load(x0, x1, x2) → f629_0_main_Load(+(x0, 1), +(x1, 1), x2) | &&(&&(&&(>(x2, x1), >(x2, x0)), >(x0, -1)), >(x1, -1))

(8) YES