3.86/1.88 YES 3.86/1.89 proof of /export/starexec/sandbox2/benchmark/theBenchmark.jar 3.86/1.89 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.86/1.89 3.86/1.89 3.86/1.89 termination of the given Bare JBC problem could be proven: 3.86/1.89 3.86/1.89 (0) Bare JBC problem 3.86/1.89 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 3.86/1.89 (2) JBC problem 3.86/1.89 (3) JBCToGraph [EQUIVALENT, 171 ms] 3.86/1.89 (4) JBCTerminationGraph 3.86/1.89 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 3.86/1.89 (6) TRUE 3.86/1.89 3.86/1.89 3.86/1.89 ---------------------------------------- 3.86/1.89 3.86/1.89 (0) 3.86/1.89 Obligation: 3.86/1.89 need to prove termination of the following program: 3.86/1.89 public class Random { 3.86/1.89 static String[] args; 3.86/1.89 static int index = 0; 3.86/1.89 3.86/1.89 public static int random() { 3.86/1.89 String string = args[index]; 3.86/1.89 index++; 3.86/1.89 return string.length(); 3.86/1.89 } 3.86/1.89 } 3.86/1.89 3.86/1.89 3.86/1.89 public class SharingPair { 3.86/1.89 SharingPair next; 3.86/1.89 3.86/1.89 public static void main(String[] args) { 3.86/1.89 Random.args = args; 3.86/1.89 SharingPair one = new SharingPair(); 3.86/1.89 SharingPair two = new SharingPair(); 3.86/1.89 SharingPair cur; 3.86/1.89 int i = Random.random(); 3.86/1.89 if (i == 0) { 3.86/1.89 one.next = two; 3.86/1.89 cur = one; 3.86/1.89 } else { 3.86/1.89 two.next = one; 3.86/1.89 cur = two; 3.86/1.89 } 3.86/1.89 3.86/1.89 while (true) { 3.86/1.89 if (i == 0) { 3.86/1.89 one.next = new SharingPair(); 3.86/1.89 cur = cur.next; 3.86/1.89 } else { 3.86/1.89 two.next = new SharingPair(); 3.86/1.89 cur = cur.next; 3.86/1.89 } 3.86/1.89 } 3.86/1.89 } 3.86/1.89 } 3.86/1.89 3.86/1.89 3.86/1.89 3.86/1.89 ---------------------------------------- 3.86/1.89 3.86/1.89 (1) BareJBCToJBCProof (EQUIVALENT) 3.86/1.89 initialized classpath 3.86/1.89 ---------------------------------------- 3.86/1.89 3.86/1.89 (2) 3.86/1.89 Obligation: 3.86/1.89 need to prove termination of the following program: 3.86/1.89 public class Random { 3.86/1.89 static String[] args; 3.86/1.89 static int index = 0; 3.86/1.89 3.86/1.89 public static int random() { 3.86/1.89 String string = args[index]; 3.86/1.89 index++; 3.86/1.89 return string.length(); 3.86/1.89 } 3.86/1.89 } 3.86/1.89 3.86/1.89 3.86/1.89 public class SharingPair { 3.86/1.89 SharingPair next; 3.86/1.89 3.86/1.89 public static void main(String[] args) { 3.86/1.89 Random.args = args; 3.86/1.89 SharingPair one = new SharingPair(); 3.86/1.89 SharingPair two = new SharingPair(); 3.86/1.89 SharingPair cur; 3.86/1.89 int i = Random.random(); 3.86/1.89 if (i == 0) { 3.86/1.89 one.next = two; 3.86/1.89 cur = one; 3.86/1.89 } else { 3.86/1.89 two.next = one; 3.86/1.89 cur = two; 3.86/1.89 } 3.86/1.89 3.86/1.89 while (true) { 3.86/1.89 if (i == 0) { 3.86/1.89 one.next = new SharingPair(); 3.86/1.89 cur = cur.next; 3.86/1.89 } else { 3.86/1.89 two.next = new SharingPair(); 3.86/1.89 cur = cur.next; 3.86/1.89 } 3.86/1.89 } 3.86/1.89 } 3.86/1.89 } 3.86/1.89 3.86/1.89 3.86/1.89 3.86/1.89 ---------------------------------------- 3.86/1.89 3.86/1.89 (3) JBCToGraph (EQUIVALENT) 3.86/1.89 Constructed TerminationGraph. 3.86/1.89 ---------------------------------------- 3.86/1.89 3.86/1.89 (4) 3.86/1.89 Obligation: 3.86/1.89 Termination Graph based on JBC Program: 3.86/1.89 SharingPair.main([Ljava/lang/String;)V: Graph of 246 nodes with 0 SCCs. 3.86/1.89 3.86/1.89 3.86/1.89 3.86/1.89 3.86/1.89 3.86/1.89 ---------------------------------------- 3.86/1.89 3.86/1.89 (5) TerminationGraphToSCCProof (SOUND) 3.86/1.89 Proven termination by absence of SCCs 3.86/1.89 ---------------------------------------- 3.86/1.89 3.86/1.89 (6) 3.86/1.89 TRUE 3.86/1.91 EOF