6.48/2.57 NO 6.48/2.59 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 6.48/2.59 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 6.48/2.59 6.48/2.59 6.48/2.59 termination of the given Bare JBC problem could be disproven: 6.48/2.59 6.48/2.59 (0) Bare JBC problem 6.48/2.59 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 6.48/2.59 (2) JBC problem 6.48/2.59 (3) JBCToGraph [EQUIVALENT, 281 ms] 6.48/2.59 (4) JBCTerminationGraph 6.48/2.59 (5) JBCNonTerm [COMPLETE, 98 ms] 6.48/2.59 (6) NO 6.48/2.59 6.48/2.59 6.48/2.59 ---------------------------------------- 6.48/2.59 6.48/2.59 (0) 6.48/2.59 Obligation: 6.48/2.59 need to prove termination of the following program: 6.48/2.59 package simple.whileBreak; 6.48/2.59 6.48/2.59 public class Main { 6.48/2.59 6.48/2.59 /** 6.48/2.59 * @param args 6.48/2.59 */ 6.48/2.59 public static void main(String[] args) { 6.48/2.59 WhileBreak.loop(args.length); 6.48/2.59 6.48/2.59 } 6.48/2.59 6.48/2.59 } 6.48/2.59 6.48/2.59 6.48/2.59 package simple.whileBreak; 6.48/2.59 6.48/2.59 public class WhileBreak { 6.48/2.59 6.48/2.59 public static void loop(int i) { 6.48/2.59 while (i > 10) { 6.48/2.59 if (i > 20) { 6.48/2.59 i++; 6.48/2.59 } else { 6.48/2.59 i--; 6.48/2.59 } 6.48/2.59 if (i == 30) { 6.48/2.59 break; 6.48/2.59 } 6.48/2.59 } 6.48/2.59 } 6.48/2.59 } 6.48/2.59 6.48/2.59 6.48/2.59 6.48/2.59 ---------------------------------------- 6.48/2.59 6.48/2.59 (1) BareJBCToJBCProof (EQUIVALENT) 6.48/2.59 initialized classpath 6.48/2.59 ---------------------------------------- 6.48/2.59 6.48/2.59 (2) 6.48/2.59 Obligation: 6.48/2.59 need to prove termination of the following program: 6.48/2.59 package simple.whileBreak; 6.48/2.59 6.48/2.59 public class Main { 6.48/2.59 6.48/2.59 /** 6.48/2.59 * @param args 6.48/2.59 */ 6.48/2.59 public static void main(String[] args) { 6.48/2.59 WhileBreak.loop(args.length); 6.48/2.59 6.48/2.59 } 6.48/2.59 6.48/2.59 } 6.48/2.59 6.48/2.59 6.48/2.59 package simple.whileBreak; 6.48/2.59 6.48/2.59 public class WhileBreak { 6.48/2.59 6.48/2.59 public static void loop(int i) { 6.48/2.59 while (i > 10) { 6.48/2.59 if (i > 20) { 6.48/2.59 i++; 6.48/2.59 } else { 6.48/2.59 i--; 6.48/2.59 } 6.48/2.59 if (i == 30) { 6.48/2.59 break; 6.48/2.59 } 6.48/2.59 } 6.48/2.59 } 6.48/2.59 } 6.48/2.59 6.48/2.59 6.48/2.59 6.48/2.59 ---------------------------------------- 6.48/2.59 6.48/2.59 (3) JBCToGraph (EQUIVALENT) 6.48/2.59 Constructed TerminationGraph. 6.48/2.59 ---------------------------------------- 6.48/2.59 6.48/2.59 (4) 6.48/2.59 Obligation: 6.48/2.59 Termination Graph based on JBC Program: 6.48/2.59 simple.whileBreak.Main.main([Ljava/lang/String;)V: Graph of 36 nodes with 1 SCC. 6.48/2.59 6.48/2.59 6.48/2.59 6.48/2.59 6.48/2.59 6.48/2.59 ---------------------------------------- 6.48/2.59 6.48/2.59 (5) JBCNonTerm (COMPLETE) 6.48/2.59 Reached a loop using the following run: 6.48/2.59 6.48/2.59 0: 6.48/2.59 a22([java.lang.String...]): length 30 -->{java.lang.Object...} 6.48/2.59 YES: (JL1) 6.48/2.59 1: 6.48/2.59 a22([java.lang.String...]): length 30 -->{java.lang.Object...} 6.48/2.59 YES: (JL1) 6.48/2.59 2: 6.48/2.59 YES: (JL1) 6.48/2.59 3: 6.48/2.59 6.48/2.59 YES: (JL1) 6.48/2.59 Start state of loop: 6.48/2.59 6.48/2.59 6.48/2.59 [a10(lv_0_0)] 6.48/2.59 6.48/2.59 i79: [0,+inf)(l2) 6.48/2.59 i80: [0,+inf)(l2) 6.48/2.59 a10([java.lang.String...]): length i80 -->{java.lang.Object...} 6.48/2.59 YES: (JL1) 6.48/2.59 6.48/2.59 6.48/2.59 In the loop head node, references [i79] were interesting. 6.48/2.59 6.48/2.59 All methods calls in the loop body are side-effect free, hence they can be ignored. 6.48/2.59 6.48/2.59 By SMT, we could prove 6.48/2.59 6.48/2.59 ((0 <= initial_i79 and 0 <= initial_i80) and (((path3_i79 = path3_i87 and path3_i87 = path3_i90 and path3_i92 = (path3_i90 + 1) and path3_i92 = path3_i106 and path3_i106 = res_i79 and path3_i79 = initial_i79) and (T and 10 = 10 and path3_i87 > 10 and T and 20 = 20 and path3_i90 > 20 and T and 30 = 30 and path3_i106 > 30)) and ((res3_i79 = res3_i87 and res3_i87 = res3_i90 and res3_i92 = (res3_i90 + 1) and res3_i92 = res3_i106 and res_i79 = res3_i79) and !(T and 10 = 10 and res3_i87 > 10 and T and 20 = 20 and res3_i90 > 20 and T and 30 = 30 and res3_i106 > 30)))) 6.48/2.59 6.48/2.59 to be UNSAT. Consequently, the loop will not terminate. 6.48/2.59 ---------------------------------------- 6.48/2.59 6.48/2.59 (6) 6.48/2.59 NO 6.80/2.63 EOF