11.62/4.27 NO 11.62/4.28 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 11.62/4.28 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 11.62/4.28 11.62/4.28 11.62/4.28 termination of the given Bare JBC problem could be disproven: 11.62/4.28 11.62/4.28 (0) Bare JBC problem 11.62/4.28 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 11.62/4.28 (2) JBC problem 11.62/4.28 (3) JBCToGraph [EQUIVALENT, 313 ms] 11.62/4.28 (4) JBCTerminationGraph 11.62/4.28 (5) JBCNonTerm [COMPLETE, 462 ms] 11.62/4.28 (6) NO 11.62/4.28 11.62/4.28 11.62/4.28 ---------------------------------------- 11.62/4.28 11.62/4.28 (0) 11.62/4.28 Obligation: 11.62/4.28 need to prove termination of the following program: 11.62/4.28 package simple.alternDivWide; 11.62/4.28 11.62/4.28 public class AlternDivWide { 11.62/4.28 11.62/4.28 public static void loop(int i) { 11.62/4.28 int w = 5; 11.62/4.28 while (i != 0) { 11.62/4.28 if (i < -w) { 11.62/4.28 i--; 11.62/4.28 i = i*(-1); 11.62/4.28 } else { 11.62/4.28 if (i > w) { 11.62/4.28 i++; 11.62/4.28 i = i*(-1); 11.62/4.28 } else { 11.62/4.28 i = 0; 11.62/4.28 } 11.62/4.28 } 11.62/4.28 } 11.62/4.28 } 11.62/4.28 } 11.62/4.28 11.62/4.28 11.62/4.28 package simple.alternDivWide; 11.62/4.28 11.62/4.28 public class Main { 11.62/4.28 11.62/4.28 /** 11.62/4.28 * @param args 11.62/4.28 */ 11.62/4.28 public static void main(String[] args) { 11.62/4.28 AlternDivWide.loop(args.length); 11.62/4.28 11.62/4.28 } 11.62/4.28 11.62/4.28 } 11.62/4.28 11.62/4.28 11.62/4.28 11.62/4.28 ---------------------------------------- 11.62/4.28 11.62/4.28 (1) BareJBCToJBCProof (EQUIVALENT) 11.62/4.28 initialized classpath 11.62/4.28 ---------------------------------------- 11.62/4.28 11.62/4.28 (2) 11.62/4.28 Obligation: 11.62/4.28 need to prove termination of the following program: 11.62/4.28 package simple.alternDivWide; 11.62/4.28 11.62/4.28 public class AlternDivWide { 11.62/4.28 11.62/4.28 public static void loop(int i) { 11.62/4.28 int w = 5; 11.62/4.28 while (i != 0) { 11.62/4.28 if (i < -w) { 11.62/4.28 i--; 11.62/4.28 i = i*(-1); 11.62/4.28 } else { 11.62/4.28 if (i > w) { 11.62/4.28 i++; 11.62/4.28 i = i*(-1); 11.62/4.28 } else { 11.62/4.28 i = 0; 11.62/4.28 } 11.62/4.28 } 11.62/4.28 } 11.62/4.28 } 11.62/4.28 } 11.62/4.28 11.62/4.28 11.62/4.28 package simple.alternDivWide; 11.62/4.28 11.62/4.28 public class Main { 11.62/4.28 11.62/4.28 /** 11.62/4.28 * @param args 11.62/4.28 */ 11.62/4.28 public static void main(String[] args) { 11.62/4.28 AlternDivWide.loop(args.length); 11.62/4.28 11.62/4.28 } 11.62/4.28 11.62/4.28 } 11.62/4.28 11.62/4.28 11.62/4.28 11.62/4.28 ---------------------------------------- 11.62/4.28 11.62/4.28 (3) JBCToGraph (EQUIVALENT) 11.62/4.28 Constructed TerminationGraph. 11.62/4.28 ---------------------------------------- 11.62/4.28 11.62/4.28 (4) 11.62/4.28 Obligation: 11.62/4.28 Termination Graph based on JBC Program: 11.62/4.28 simple.alternDivWide.Main.main([Ljava/lang/String;)V: Graph of 45 nodes with 1 SCC. 11.62/4.28 11.62/4.28 11.62/4.28 11.62/4.28 11.62/4.28 11.62/4.28 ---------------------------------------- 11.62/4.28 11.62/4.28 (5) JBCNonTerm (COMPLETE) 11.62/4.28 Reached a loop using the following run: 11.62/4.28 11.62/4.28 0: 11.62/4.28 a25([java.lang.String...]): length 6 -->{java.lang.Object...} 11.62/4.28 YES: (JL1) 11.62/4.28 1: 11.62/4.28 a25([java.lang.String...]): length 6 -->{java.lang.Object...} 11.62/4.28 YES: (JL1) 11.62/4.28 2: 11.62/4.28 YES: (JL1) 11.62/4.28 3: 11.62/4.28 11.62/4.28 YES: (JL1) 11.62/4.28 4: 11.62/4.28 11.62/4.28 YES: (JL1) 11.62/4.28 5: 11.62/4.28 11.62/4.28 YES: (JL1) 11.62/4.28 Start state of loop: 11.62/4.28 11.62/4.28 11.62/4.28 [a11(lv_0_0)] 11.62/4.28 11.62/4.28 i141: # 11.62/4.28 i108: [0,+inf)(l2) 11.62/4.28 a11([java.lang.String...]): length i108 -->{java.lang.Object...} 11.62/4.28 YES: (JL1) 11.62/4.28 11.62/4.28 11.62/4.28 In the loop head node, references [i141, iconst_5] were interesting. 11.62/4.28 11.62/4.28 All methods calls in the loop body are side-effect free, hence they can be ignored. 11.62/4.28 11.62/4.28 By SMT, we could prove 11.62/4.28 11.62/4.28 (0 <= initial_i108 and ((((path1_i141 = path1_i148 and -5 = (-1 * 5) and path1_i148 = path1_i151 and path1_i155 = (path1_i151 + -1) and path1_i160 = (path1_i155 * -1) and path1_i160 = res_i141 and path1_i141 = initial_i141) and (path1_i148 != 0 and T and -5 = -5 and path1_i151 < -5)) or ((path3_i141 = path3_i148 and -5 = (-1 * 5) and path3_i148 = path3_i152 and path3_i152 = path3_i159 and path3_i163 = (path3_i159 + 1) and path3_i172 = (path3_i163 * -1) and path3_i172 = res_i141 and path3_i141 = initial_i141) and (path3_i148 != 0 and T and -5 = -5 and path3_i152 >= -5 and T and 5 = 5 and path3_i159 > 5)) or ((path1_i141 = path1_i148 and -5 = (-1 * 5) and path1_i148 = path1_i151 and path1_i155 = (path1_i151 + -1) and path1_i160 = (path1_i155 * -1) and path1_i160 = res_i141 and path1_i141 = initial_i141) and (T and -5 = -5 and path1_i151 < -5 and path1_i148 < 0)) or ((path1_i141 = path1_i148 and -5 = (-1 * 5) and path1_i148 = path1_i151 and path1_i155 = (path1_i151 + -1) and path1_i160 = (path1_i155 * -1) and path1_i160 = res_i141 and path1_i141 = initial_i141) and (T and -5 = -5 and path1_i151 < -5 and path1_i148 > 0))) and (((res1_i141 = res1_i148 and -5 = (-1 * 5) and res1_i148 = res1_i151 and res1_i155 = (res1_i151 + -1) and res1_i160 = (res1_i155 * -1) and res_i141 = res1_i141) and !(res1_i148 != 0 and T and -5 = -5 and res1_i151 < -5)) and ((res3_i141 = res3_i148 and -5 = (-1 * 5) and res3_i148 = res3_i152 and res3_i152 = res3_i159 and res3_i163 = (res3_i159 + 1) and res3_i172 = (res3_i163 * -1) and res_i141 = res3_i141) and !(res3_i148 != 0 and T and -5 = -5 and res3_i152 >= -5 and T and 5 = 5 and res3_i159 > 5)) and ((res1_i141 = res1_i148 and -5 = (-1 * 5) and res1_i148 = res1_i151 and res1_i155 = (res1_i151 + -1) and res1_i160 = (res1_i155 * -1) and res_i141 = res1_i141) and !(T and -5 = -5 and res1_i151 < -5 and res1_i148 < 0)) and ((res1_i141 = res1_i148 and -5 = (-1 * 5) and res1_i148 = res1_i151 and res1_i155 = (res1_i151 + -1) and res1_i160 = (res1_i155 * -1) and res_i141 = res1_i141) and !(T and -5 = -5 and res1_i151 < -5 and res1_i148 > 0))))) 11.62/4.28 11.62/4.28 to be UNSAT. Consequently, the loop will not terminate. 11.62/4.28 ---------------------------------------- 11.62/4.28 11.62/4.28 (6) 11.62/4.28 NO 11.82/4.33 EOF