(0) Obligation:

JBC Problem based on JBC Program:
package RetValRec;

public class Random {
static String[] args;
static int index = 0;

public static int random() {
final String string = args[index];
index++;
return string.length();
}
}


package RetValRec;

public class RetValRec {
public static void main(String[] args) {
Random.args = args;
int x = Random.random() % 2;
int y = ret(x);
test(x,y);
}

public static int ret(int x) {
if (x == 0) return 1;
else return 0;
}

public static boolean test(int x, int y) {
if (x != y) return true;
else return test(x-1, y-1);
}
}


(1) JBCToGraph (SOUND transformation)

Constructed TerminationGraph.

(2) Obligation:

Termination Graph based on JBC Program:
RetValRec.RetValRec.main([Ljava/lang/String;)V: Graph of 133 nodes with 0 SCCs.


(3) TerminationGraphToSCCProof (SOUND transformation)

Proven termination by absence of SCCs

(4) TRUE