3.74/1.83 YES 3.74/1.83 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 3.74/1.83 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.74/1.83 3.74/1.83 3.74/1.83 termination of the given Bare JBC problem could be proven: 3.74/1.83 3.74/1.83 (0) Bare JBC problem 3.74/1.83 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 3.74/1.83 (2) JBC problem 3.74/1.83 (3) JBCToGraph [EQUIVALENT, 125 ms] 3.74/1.83 (4) JBCTerminationGraph 3.74/1.83 (5) TerminationGraphToSCCProof [SOUND, 0 ms] 3.74/1.83 (6) TRUE 3.74/1.83 3.74/1.83 3.74/1.83 ---------------------------------------- 3.74/1.83 3.74/1.83 (0) 3.74/1.83 Obligation: 3.74/1.83 need to prove termination of the following program: 3.74/1.83 package RetVal; 3.74/1.83 3.74/1.83 public class Random { 3.74/1.83 static String[] args; 3.74/1.83 static int index = 0; 3.74/1.83 3.74/1.83 public static int random() { 3.74/1.83 final String string = args[index]; 3.74/1.83 index++; 3.74/1.83 return string.length(); 3.74/1.83 } 3.74/1.83 } 3.74/1.83 3.74/1.83 3.74/1.83 package RetVal; 3.74/1.83 3.74/1.83 public class RetVal { 3.74/1.83 public static void main(String[] args) { 3.74/1.83 Random.args = args; 3.74/1.83 int x = Random.random() % 2; 3.74/1.83 int y = ret(x); 3.74/1.83 test(x,y); 3.74/1.83 } 3.74/1.83 3.74/1.83 public static int ret(int x) { 3.74/1.83 if (x == 0) return 1; 3.74/1.83 else return 0; 3.74/1.83 } 3.74/1.83 3.74/1.83 public static boolean test(int x, int y) { 3.74/1.83 while (x == y) { 3.74/1.83 x--; 3.74/1.83 y--; 3.74/1.83 } 3.74/1.83 return true; 3.74/1.83 } 3.74/1.83 } 3.74/1.83 3.74/1.83 3.74/1.83 3.74/1.83 ---------------------------------------- 3.74/1.83 3.74/1.83 (1) BareJBCToJBCProof (EQUIVALENT) 3.74/1.83 initialized classpath 3.74/1.83 ---------------------------------------- 3.74/1.83 3.74/1.83 (2) 3.74/1.83 Obligation: 3.74/1.83 need to prove termination of the following program: 3.74/1.83 package RetVal; 3.74/1.83 3.74/1.83 public class Random { 3.74/1.83 static String[] args; 3.74/1.83 static int index = 0; 3.74/1.83 3.74/1.83 public static int random() { 3.74/1.83 final String string = args[index]; 3.74/1.83 index++; 3.74/1.83 return string.length(); 3.74/1.83 } 3.74/1.83 } 3.74/1.83 3.74/1.83 3.74/1.83 package RetVal; 3.74/1.83 3.74/1.83 public class RetVal { 3.74/1.83 public static void main(String[] args) { 3.74/1.83 Random.args = args; 3.74/1.83 int x = Random.random() % 2; 3.74/1.83 int y = ret(x); 3.74/1.83 test(x,y); 3.74/1.83 } 3.74/1.83 3.74/1.83 public static int ret(int x) { 3.74/1.83 if (x == 0) return 1; 3.74/1.83 else return 0; 3.74/1.83 } 3.74/1.83 3.74/1.83 public static boolean test(int x, int y) { 3.74/1.83 while (x == y) { 3.74/1.83 x--; 3.74/1.83 y--; 3.74/1.83 } 3.74/1.83 return true; 3.74/1.83 } 3.74/1.83 } 3.74/1.83 3.74/1.83 3.74/1.83 3.74/1.83 ---------------------------------------- 3.74/1.83 3.74/1.83 (3) JBCToGraph (EQUIVALENT) 3.74/1.83 Constructed TerminationGraph. 3.74/1.83 ---------------------------------------- 3.74/1.83 3.74/1.83 (4) 3.74/1.83 Obligation: 3.74/1.83 Termination Graph based on JBC Program: 3.74/1.83 RetVal.RetVal.main([Ljava/lang/String;)V: Graph of 133 nodes with 0 SCCs. 3.74/1.83 3.74/1.83 3.74/1.83 3.74/1.83 3.74/1.83 3.74/1.83 ---------------------------------------- 3.74/1.83 3.74/1.83 (5) TerminationGraphToSCCProof (SOUND) 3.74/1.83 Proven termination by absence of SCCs 3.74/1.83 ---------------------------------------- 3.74/1.83 3.74/1.83 (6) 3.74/1.83 TRUE 3.74/1.86 EOF