(0) Obligation:

JBC Problem based on JBC Program:
public class Random {
static String[] args;
static int index = 0;

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


public class SharingPair {
SharingPair next;

public static void main(String[] args) {
Random.args = args;
SharingPair one = new SharingPair();
SharingPair two = new SharingPair();
SharingPair cur;
int i = Random.random();
if (i == 0) {
one.next = two;
cur = one;
} else {
two.next = one;
cur = two;
}

while (true) {
if (i == 0) {
one.next = new SharingPair();
cur = cur.next;
} else {
two.next = new SharingPair();
cur = cur.next;
}
}
}
}


(1) JBCToGraph (SOUND transformation)

Constructed TerminationGraph.

(2) Obligation:

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


(3) TerminationGraphToSCCProof (SOUND transformation)

Proven termination by absence of SCCs

(4) TRUE