5.64/2.50 NO 5.97/2.54 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 5.97/2.54 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 5.97/2.54 5.97/2.54 5.97/2.54 termination of the given Bare JBC problem could be disproven: 5.97/2.54 5.97/2.54 (0) Bare JBC problem 5.97/2.54 (1) BareJBCToJBCProof [EQUIVALENT, 97 ms] 5.97/2.54 (2) JBC problem 5.97/2.54 (3) JBCToGraph [EQUIVALENT, 358 ms] 5.97/2.54 (4) JBCTerminationGraph 5.97/2.54 (5) JBCNonTerm [COMPLETE, 211 ms] 5.97/2.54 (6) NO 5.97/2.54 5.97/2.54 5.97/2.54 ---------------------------------------- 5.97/2.54 5.97/2.54 (0) 5.97/2.54 Obligation: 5.97/2.54 need to prove termination of the following program: 5.97/2.54 package simple.upAndDownIneq; 5.97/2.54 5.97/2.54 public class Main { 5.97/2.54 5.97/2.54 /** 5.97/2.54 * @param args 5.97/2.54 */ 5.97/2.54 public static void main(String[] args) { 5.97/2.54 UpAndDownIneq.upAndDown(args.length); 5.97/2.54 5.97/2.54 } 5.97/2.54 5.97/2.54 } 5.97/2.54 5.97/2.54 5.97/2.54 package simple.upAndDownIneq; 5.97/2.54 5.97/2.54 public class UpAndDownIneq { 5.97/2.54 5.97/2.54 public static void upAndDown(int i) { 5.97/2.54 int up = 0; 5.97/2.54 while (0 <= i && i <= 10) { 5.97/2.54 if (i >= 10) { 5.97/2.54 up = 0; 5.97/2.54 } 5.97/2.54 if (i <= 0) { 5.97/2.54 up = 1; 5.97/2.54 } 5.97/2.54 if (up >= 1) { 5.97/2.54 i++; 5.97/2.54 } else { 5.97/2.54 i--; 5.97/2.54 } 5.97/2.54 } 5.97/2.54 } 5.97/2.54 5.97/2.54 } 5.97/2.54 5.97/2.54 5.97/2.54 5.97/2.54 ---------------------------------------- 5.97/2.54 5.97/2.54 (1) BareJBCToJBCProof (EQUIVALENT) 5.97/2.54 initialized classpath 5.97/2.54 ---------------------------------------- 5.97/2.54 5.97/2.54 (2) 5.97/2.54 Obligation: 5.97/2.54 need to prove termination of the following program: 5.97/2.54 package simple.upAndDownIneq; 5.97/2.54 5.97/2.54 public class Main { 5.97/2.54 5.97/2.54 /** 5.97/2.54 * @param args 5.97/2.54 */ 5.97/2.54 public static void main(String[] args) { 5.97/2.54 UpAndDownIneq.upAndDown(args.length); 5.97/2.54 5.97/2.54 } 5.97/2.54 5.97/2.54 } 5.97/2.54 5.97/2.54 5.97/2.54 package simple.upAndDownIneq; 5.97/2.54 5.97/2.54 public class UpAndDownIneq { 5.97/2.54 5.97/2.54 public static void upAndDown(int i) { 5.97/2.54 int up = 0; 5.97/2.54 while (0 <= i && i <= 10) { 5.97/2.54 if (i >= 10) { 5.97/2.54 up = 0; 5.97/2.54 } 5.97/2.54 if (i <= 0) { 5.97/2.54 up = 1; 5.97/2.54 } 5.97/2.54 if (up >= 1) { 5.97/2.54 i++; 5.97/2.54 } else { 5.97/2.54 i--; 5.97/2.54 } 5.97/2.54 } 5.97/2.54 } 5.97/2.54 5.97/2.54 } 5.97/2.54 5.97/2.54 5.97/2.54 5.97/2.54 ---------------------------------------- 5.97/2.54 5.97/2.54 (3) JBCToGraph (EQUIVALENT) 5.97/2.54 Constructed TerminationGraph. 5.97/2.54 ---------------------------------------- 5.97/2.54 5.97/2.54 (4) 5.97/2.54 Obligation: 5.97/2.54 Termination Graph based on JBC Program: 5.97/2.54 simple.upAndDownIneq.Main.main([Ljava/lang/String;)V: Graph of 58 nodes with 1 SCC. 5.97/2.54 5.97/2.54 5.97/2.54 5.97/2.54 5.97/2.54 5.97/2.54 ---------------------------------------- 5.97/2.54 5.97/2.54 (5) JBCNonTerm (COMPLETE) 5.97/2.54 Reached a loop using the following run: 5.97/2.54 5.97/2.54 0: 5.97/2.54 a28([java.lang.String...]): length 1 -->{java.lang.Object...} 5.97/2.54 YES: (JL1) 5.97/2.54 1: 5.97/2.54 a28([java.lang.String...]): length 1 -->{java.lang.Object...} 5.97/2.54 YES: (JL1) 5.97/2.54 2: 5.97/2.54 YES: (JL1) 5.97/2.54 3: 5.97/2.54 5.97/2.54 YES: (JL1) 5.97/2.54 4: 5.97/2.54 5.97/2.54 YES: (JL1) 5.97/2.54 5: 5.97/2.54 5.97/2.54 YES: (JL1) 5.97/2.54 Start state of loop: 5.97/2.54 5.97/2.54 5.97/2.54 [a14(lv_0_0)] 5.97/2.54 5.97/2.54 i53: [0,+inf)(l2) 5.97/2.54 i54: [0,1](1,1) 5.97/2.54 i16: [0,+inf)(l1) 5.97/2.54 a14([java.lang.String...]): length i16 -->{java.lang.Object...} 5.97/2.54 YES: (JL1) 5.97/2.54 5.97/2.54 5.97/2.54 In the loop head node, references [i53, i54] were interesting. 5.97/2.54 5.97/2.54 All methods calls in the loop body are side-effect free, hence they can be ignored. 5.97/2.54 5.97/2.54 By SMT, we could prove 5.97/2.54 5.97/2.54 ((0 <= initial_i53 and 0 <= initial_i54 and initial_i54 <= 1 and 0 <= initial_i16) and ((((path1_i53 = path1_i58 and path1_i58 = path1_i60 and path1_i60 = path1_i61 and path1_i62 = (path1_i61 + -1) and path1_i62 = res_i53 and 0 = res_i54 and path1_i53 = initial_i53 and path1_i54 = initial_i54) and (0 <= path1_i53 and T and 10 = 10 and path1_i58 <= 10 and T and 10 = 10 and path1_i60 < 10 and path1_i61 > 0 and path1_i54 = 0 and path1_i54 = 0 and 1 = 1)) or ((path2_i53 = path2_i58 and path2_i58 = path2_i60 and path2_i60 = path2_i61 and path2_i63 = (path2_i61 + 1) and path2_i63 = res_i53 and 1 = res_i54 and path2_i53 = initial_i53 and path2_i54 = initial_i54) and (0 <= path2_i53 and T and 10 = 10 and path2_i58 <= 10 and T and 10 = 10 and path2_i60 < 10 and path2_i61 > 0 and path2_i54 = 1 and path2_i54 = 1 and 1 = 1)) or ((path3_i53 = path3_i58 and 9 = res_i53 and 0 = res_i54 and path3_i53 = initial_i53 and path3_i54 = initial_i54) and (0 <= path3_i53 and T and 10 = 10 and path3_i58 <= 10 and path3_i58 = 10 and path3_i58 = 10 and 10 = 10 and 10 > 0)) or ((path4_i53 = path4_i58 and path4_i58 = path4_i60 and 1 = res_i53 and 1 = res_i54 and path4_i53 = initial_i53 and path4_i54 = initial_i54) and (0 <= path4_i53 and T and 10 = 10 and path4_i58 <= 10 and T and 10 = 10 and path4_i60 < 10 and path4_i60 = 0 and 0 <= 0))) and (((res1_i53 = res1_i58 and res1_i58 = res1_i60 and res1_i60 = res1_i61 and res1_i62 = (res1_i61 + -1) and res_i53 = res1_i53 and res_i54 = res1_i54) and !(0 <= res1_i53 and T and 10 = 10 and res1_i58 <= 10 and T and 10 = 10 and res1_i60 < 10 and res1_i61 > 0 and res1_i54 = 0 and res1_i54 = 0 and 1 = 1)) and ((res2_i53 = res2_i58 and res2_i58 = res2_i60 and res2_i60 = res2_i61 and res2_i63 = (res2_i61 + 1) and res_i53 = res2_i53 and res_i54 = res2_i54) and !(0 <= res2_i53 and T and 10 = 10 and res2_i58 <= 10 and T and 10 = 10 and res2_i60 < 10 and res2_i61 > 0 and res2_i54 = 1 and res2_i54 = 1 and 1 = 1)) and ((res3_i53 = res3_i58 and res_i53 = res3_i53 and res_i54 = res3_i54) and !(0 <= res3_i53 and T and 10 = 10 and res3_i58 <= 10 and res3_i58 = 10 and res3_i58 = 10 and 10 = 10 and 10 > 0)) and ((res4_i53 = res4_i58 and res4_i58 = res4_i60 and res_i53 = res4_i53 and res_i54 = res4_i54) and !(0 <= res4_i53 and T and 10 = 10 and res4_i58 <= 10 and T and 10 = 10 and res4_i60 < 10 and res4_i60 = 0 and 0 <= 0))))) 5.97/2.54 5.97/2.54 to be UNSAT. Consequently, the loop will not terminate. 5.97/2.54 ---------------------------------------- 5.97/2.54 5.97/2.54 (6) 5.97/2.54 NO 6.13/2.60 EOF