5.17/2.29 NO 5.17/2.29 proof of /export/starexec/sandbox2/benchmark/theBenchmark.jar 5.17/2.29 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 5.17/2.29 5.17/2.29 5.17/2.29 termination of the given Bare JBC problem could be disproven: 5.17/2.29 5.17/2.29 (0) Bare JBC problem 5.17/2.29 (1) BareJBCToJBCProof [EQUIVALENT, 94 ms] 5.17/2.29 (2) JBC problem 5.17/2.29 (3) JBCToGraph [EQUIVALENT, 234 ms] 5.17/2.29 (4) JBCTerminationGraph 5.17/2.29 (5) JBCNonTerm [COMPLETE, 81 ms] 5.17/2.29 (6) NO 5.17/2.29 5.17/2.29 5.17/2.29 ---------------------------------------- 5.17/2.29 5.17/2.29 (0) 5.17/2.29 Obligation: 5.17/2.29 need to prove termination of the following program: 5.17/2.29 package simple.whileNested; 5.17/2.29 5.17/2.29 public class Main { 5.17/2.29 5.17/2.29 /** 5.17/2.29 * @param args 5.17/2.29 */ 5.17/2.29 public static void main(String[] args) { 5.17/2.29 WhileNested.increase(args.length); 5.17/2.29 5.17/2.29 } 5.17/2.29 5.17/2.29 } 5.17/2.29 5.17/2.29 5.17/2.29 package simple.whileNested; 5.17/2.29 5.17/2.29 public class WhileNested { 5.17/2.29 5.17/2.29 public static void increase(int i) { 5.17/2.29 int j; 5.17/2.29 while (i < 10) { 5.17/2.29 j = i; 5.17/2.29 while (j > 0) { 5.17/2.29 j++; 5.17/2.29 } 5.17/2.29 i++; 5.17/2.29 } 5.17/2.29 } 5.17/2.29 } 5.17/2.29 5.17/2.29 5.17/2.29 5.17/2.29 ---------------------------------------- 5.17/2.29 5.17/2.29 (1) BareJBCToJBCProof (EQUIVALENT) 5.17/2.29 initialized classpath 5.17/2.29 ---------------------------------------- 5.17/2.29 5.17/2.29 (2) 5.17/2.29 Obligation: 5.17/2.29 need to prove termination of the following program: 5.17/2.29 package simple.whileNested; 5.17/2.29 5.17/2.29 public class Main { 5.17/2.29 5.17/2.29 /** 5.17/2.29 * @param args 5.17/2.29 */ 5.17/2.29 public static void main(String[] args) { 5.17/2.29 WhileNested.increase(args.length); 5.17/2.29 5.17/2.29 } 5.17/2.29 5.17/2.29 } 5.17/2.29 5.17/2.29 5.17/2.29 package simple.whileNested; 5.17/2.29 5.17/2.29 public class WhileNested { 5.17/2.29 5.17/2.29 public static void increase(int i) { 5.17/2.29 int j; 5.17/2.29 while (i < 10) { 5.17/2.29 j = i; 5.17/2.29 while (j > 0) { 5.17/2.29 j++; 5.17/2.29 } 5.17/2.29 i++; 5.17/2.29 } 5.17/2.29 } 5.17/2.29 } 5.17/2.29 5.17/2.29 5.17/2.29 5.17/2.29 ---------------------------------------- 5.17/2.29 5.17/2.29 (3) JBCToGraph (EQUIVALENT) 5.17/2.29 Constructed TerminationGraph. 5.17/2.29 ---------------------------------------- 5.17/2.29 5.17/2.29 (4) 5.17/2.29 Obligation: 5.17/2.29 Termination Graph based on JBC Program: 5.17/2.29 simple.whileNested.Main.main([Ljava/lang/String;)V: Graph of 27 nodes with 1 SCC. 5.17/2.29 5.17/2.29 5.17/2.29 5.17/2.29 5.17/2.29 5.17/2.29 ---------------------------------------- 5.17/2.29 5.17/2.29 (5) JBCNonTerm (COMPLETE) 5.17/2.29 Reached a loop using the following run: 5.17/2.29 5.17/2.29 0: 5.17/2.29 a32([java.lang.String...]): length 1 -->{java.lang.Object...} 5.17/2.29 YES: (JL1) 5.17/2.29 1: 5.17/2.29 a32([java.lang.String...]): length 1 -->{java.lang.Object...} 5.17/2.30 YES: (JL1) 5.17/2.30 2: 5.17/2.30 YES: (JL1) 5.17/2.30 3: 5.17/2.30 5.17/2.30 YES: (JL1) 5.17/2.30 4: 5.17/2.30 5.17/2.30 YES: (JL1) 5.17/2.30 5: 5.17/2.30 5.17/2.30 YES: (JL1) 5.17/2.30 6: 5.17/2.30 5.17/2.30 YES: (JL1) 5.17/2.30 7: 5.17/2.30 5.17/2.30 YES: (JL1) 5.17/2.30 8: 5.17/2.30 5.17/2.30 YES: (JL1) 5.17/2.30 Start state of loop: 5.17/2.30 5.17/2.30 5.17/2.30 [a12(lv_0_0)] 5.17/2.30 5.17/2.30 i65: [0,9](3,2){0,+inf} 5.17/2.30 i66: [0,+inf)(l3) 5.17/2.30 i40: [0,+inf) 5.17/2.30 a12([java.lang.String...]): length i40 -->{java.lang.Object...} 5.17/2.30 YES: (JL1) 5.17/2.30 5.17/2.30 5.17/2.30 In the loop head node, references [i66, i65] were interesting. 5.17/2.30 5.17/2.30 All methods calls in the loop body are side-effect free, hence they can be ignored. 5.17/2.30 5.17/2.30 By SMT, we could prove 5.17/2.30 5.17/2.30 ((0 <= initial_i65 and initial_i65 <= 9 and 0 <= initial_i66 and 0 <= initial_i40) and (((path1_i66 = path1_i132 and path1_i135 = (path1_i132 + 1) and path1_i65 = res_i65 and path1_i135 = res_i66 and path1_i65 = initial_i65 and path1_i66 = initial_i66) and path1_i132 > 0) and ((res1_i66 = res1_i132 and res1_i135 = (res1_i132 + 1) and res_i65 = res1_i65 and res_i66 = res1_i66) and !res1_i132 > 0))) 5.17/2.30 5.17/2.30 to be UNSAT. Consequently, the loop will not terminate. 5.17/2.30 ---------------------------------------- 5.17/2.30 5.17/2.30 (6) 5.17/2.30 NO 5.29/2.34 EOF