6.05/2.49 NO 6.45/2.52 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 6.45/2.52 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 6.45/2.52 6.45/2.52 6.45/2.52 termination of the given Bare JBC problem could be disproven: 6.45/2.52 6.45/2.52 (0) Bare JBC problem 6.45/2.52 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 6.45/2.52 (2) JBC problem 6.45/2.52 (3) JBCToGraph [EQUIVALENT, 314 ms] 6.45/2.52 (4) JBCTerminationGraph 6.45/2.52 (5) JBCNonTerm [COMPLETE, 209 ms] 6.45/2.52 (6) NO 6.45/2.52 6.45/2.52 6.45/2.52 ---------------------------------------- 6.45/2.52 6.45/2.52 (0) 6.45/2.52 Obligation: 6.45/2.52 need to prove termination of the following program: 6.45/2.52 package simple.upAndDown; 6.45/2.52 6.45/2.52 public class Main { 6.45/2.52 6.45/2.52 /** 6.45/2.52 * @param args 6.45/2.52 */ 6.45/2.52 public static void main(String[] args) { 6.45/2.52 UpAndDown.upAndDown(args.length); 6.45/2.52 6.45/2.52 } 6.45/2.52 6.45/2.52 } 6.45/2.52 6.45/2.52 6.45/2.52 package simple.upAndDown; 6.45/2.52 6.45/2.52 public class UpAndDown { 6.45/2.52 6.45/2.52 public static void upAndDown(int i) { 6.45/2.52 boolean up = false; 6.45/2.52 while (0 <= i && i <= 10) { 6.45/2.52 if (i == 10) { 6.45/2.52 up = false; 6.45/2.52 } 6.45/2.52 if (i == 0) { 6.45/2.52 up = true; 6.45/2.52 } 6.45/2.52 if (up) { 6.45/2.52 i++; 6.45/2.52 } else { 6.45/2.52 i--; 6.45/2.52 } 6.45/2.52 } 6.45/2.52 } 6.45/2.52 } 6.45/2.52 6.45/2.52 6.45/2.52 6.45/2.52 ---------------------------------------- 6.45/2.52 6.45/2.52 (1) BareJBCToJBCProof (EQUIVALENT) 6.45/2.52 initialized classpath 6.45/2.52 ---------------------------------------- 6.45/2.52 6.45/2.52 (2) 6.45/2.52 Obligation: 6.45/2.52 need to prove termination of the following program: 6.45/2.52 package simple.upAndDown; 6.45/2.52 6.45/2.52 public class Main { 6.45/2.52 6.45/2.52 /** 6.45/2.52 * @param args 6.45/2.52 */ 6.45/2.52 public static void main(String[] args) { 6.45/2.52 UpAndDown.upAndDown(args.length); 6.45/2.52 6.45/2.52 } 6.45/2.52 6.45/2.52 } 6.45/2.52 6.45/2.52 6.45/2.52 package simple.upAndDown; 6.45/2.52 6.45/2.52 public class UpAndDown { 6.45/2.52 6.45/2.52 public static void upAndDown(int i) { 6.45/2.52 boolean up = false; 6.45/2.52 while (0 <= i && i <= 10) { 6.45/2.52 if (i == 10) { 6.45/2.52 up = false; 6.45/2.52 } 6.45/2.52 if (i == 0) { 6.45/2.52 up = true; 6.45/2.52 } 6.45/2.52 if (up) { 6.45/2.52 i++; 6.45/2.52 } else { 6.45/2.52 i--; 6.45/2.52 } 6.45/2.52 } 6.45/2.52 } 6.45/2.52 } 6.45/2.52 6.45/2.52 6.45/2.52 6.45/2.52 ---------------------------------------- 6.45/2.52 6.45/2.52 (3) JBCToGraph (EQUIVALENT) 6.45/2.52 Constructed TerminationGraph. 6.45/2.52 ---------------------------------------- 6.45/2.52 6.45/2.52 (4) 6.45/2.52 Obligation: 6.45/2.52 Termination Graph based on JBC Program: 6.45/2.52 simple.upAndDown.Main.main([Ljava/lang/String;)V: Graph of 55 nodes with 1 SCC. 6.45/2.52 6.45/2.52 6.45/2.52 6.45/2.52 6.45/2.52 6.45/2.52 ---------------------------------------- 6.45/2.52 6.45/2.52 (5) JBCNonTerm (COMPLETE) 6.45/2.52 Reached a loop using the following run: 6.45/2.52 6.45/2.52 0: 6.45/2.52 a28([java.lang.String...]): length 1 -->{java.lang.Object...} 6.45/2.52 YES: (JL1) 6.45/2.52 1: 6.45/2.52 a28([java.lang.String...]): length 1 -->{java.lang.Object...} 6.45/2.52 YES: (JL1) 6.45/2.52 2: 6.45/2.52 YES: (JL1) 6.45/2.52 3: 6.45/2.52 6.45/2.52 YES: (JL1) 6.45/2.52 4: 6.45/2.52 6.45/2.52 YES: (JL1) 6.45/2.52 5: 6.45/2.52 6.45/2.52 YES: (JL1) 6.45/2.52 Start state of loop: 6.45/2.52 6.45/2.52 6.45/2.52 [a14(lv_0_0)] 6.45/2.52 6.45/2.52 i55: [0,+inf)(l2) 6.45/2.52 i56: [0,1](1,1) 6.45/2.52 i16: [0,+inf)(l1) 6.45/2.52 a14([java.lang.String...]): length i16 -->{java.lang.Object...} 6.45/2.52 YES: (JL1) 6.45/2.52 6.45/2.52 6.45/2.52 In the loop head node, references [i55, i56] were interesting. 6.45/2.52 6.45/2.52 All methods calls in the loop body are side-effect free, hence they can be ignored. 6.45/2.52 6.45/2.52 By SMT, we could prove 6.45/2.52 6.45/2.52 ((0 <= initial_i55 and 0 <= initial_i56 and initial_i56 <= 1 and 0 <= initial_i16) and ((((path1_i55 = path1_i61 and path1_i61 = path1_i63 and path1_i63 = path1_i64 and path1_i66 = (path1_i64 + 1) and path1_i66 = res_i55 and 1 = res_i56 and path1_i55 = initial_i55 and path1_i56 = initial_i56) and (0 <= path1_i55 and T and 10 = 10 and path1_i61 <= 10 and T and 10 = 10 and path1_i63 < 10 and path1_i64 > 0 and path1_i56 = 1 and 1 > 0)) or ((path2_i55 = path2_i61 and path2_i61 = path2_i63 and path2_i63 = path2_i64 and path2_i67 = (path2_i64 + -1) and path2_i67 = res_i55 and 0 = res_i56 and path2_i55 = initial_i55 and path2_i56 = initial_i56) and (0 <= path2_i55 and T and 10 = 10 and path2_i61 <= 10 and T and 10 = 10 and path2_i63 < 10 and path2_i64 > 0 and path2_i56 = 0 and T)) or ((path3_i55 = path3_i61 and 9 = res_i55 and 0 = res_i56 and path3_i55 = initial_i55 and path3_i56 = initial_i56) and (0 <= path3_i55 and T and 10 = 10 and path3_i61 <= 10 and path3_i61 = 10 and path3_i61 = 10 and 10 = 10 and 10 > 0 and T)) or ((path4_i55 = path4_i61 and path4_i61 = path4_i63 and 1 = res_i55 and 1 = res_i56 and path4_i55 = initial_i55 and path4_i56 = initial_i56) and (0 <= path4_i55 and T and 10 = 10 and path4_i61 <= 10 and T and 10 = 10 and path4_i63 < 10 and path4_i63 = 0 and T and 1 > 0))) and (((res1_i55 = res1_i61 and res1_i61 = res1_i63 and res1_i63 = res1_i64 and res1_i66 = (res1_i64 + 1) and res_i55 = res1_i55 and res_i56 = res1_i56) and !(0 <= res1_i55 and T and 10 = 10 and res1_i61 <= 10 and T and 10 = 10 and res1_i63 < 10 and res1_i64 > 0 and res1_i56 = 1 and 1 > 0)) and ((res2_i55 = res2_i61 and res2_i61 = res2_i63 and res2_i63 = res2_i64 and res2_i67 = (res2_i64 + -1) and res_i55 = res2_i55 and res_i56 = res2_i56) and !(0 <= res2_i55 and T and 10 = 10 and res2_i61 <= 10 and T and 10 = 10 and res2_i63 < 10 and res2_i64 > 0 and res2_i56 = 0 and T)) and ((res3_i55 = res3_i61 and res_i55 = res3_i55 and res_i56 = res3_i56) and !(0 <= res3_i55 and T and 10 = 10 and res3_i61 <= 10 and res3_i61 = 10 and res3_i61 = 10 and 10 = 10 and 10 > 0 and T)) and ((res4_i55 = res4_i61 and res4_i61 = res4_i63 and res_i55 = res4_i55 and res_i56 = res4_i56) and !(0 <= res4_i55 and T and 10 = 10 and res4_i61 <= 10 and T and 10 = 10 and res4_i63 < 10 and res4_i63 = 0 and T and 1 > 0))))) 6.45/2.52 6.45/2.52 to be UNSAT. Consequently, the loop will not terminate. 6.45/2.52 ---------------------------------------- 6.45/2.52 6.45/2.52 (6) 6.45/2.52 NO 6.45/2.56 EOF