7.62/2.99 NO 7.93/3.00 proof of /export/starexec/sandbox2/benchmark/theBenchmark.jar 7.93/3.00 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 7.93/3.00 7.93/3.00 7.93/3.00 termination of the given Bare JBC problem could be disproven: 7.93/3.00 7.93/3.00 (0) Bare JBC problem 7.93/3.00 (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] 7.93/3.00 (2) JBC problem 7.93/3.00 (3) JBCNonTerm [COMPLETE, 360 ms] 7.93/3.00 (4) NO 7.93/3.00 7.93/3.00 7.93/3.00 ---------------------------------------- 7.93/3.00 7.93/3.00 (0) 7.93/3.00 Obligation: 7.93/3.00 need to prove termination of the following program: 7.93/3.00 package simple.factorial; 7.93/3.00 7.93/3.00 public class Factorial { 7.93/3.00 public static int factorial(int j) { 7.93/3.00 int i = 1; 7.93/3.00 int fac = 1; 7.93/3.00 while (fac != j) { 7.93/3.00 fac = fac * i; 7.93/3.00 i++; 7.93/3.00 } 7.93/3.00 return (i-1); 7.93/3.00 } 7.93/3.00 } 7.93/3.00 7.93/3.00 7.93/3.00 package simple.factorial; 7.93/3.00 7.93/3.00 public class Main { 7.93/3.00 7.93/3.00 /** 7.93/3.00 * @param args 7.93/3.00 */ 7.93/3.00 public static void main(String[] args) { 7.93/3.00 Factorial.factorial(args.length); 7.93/3.00 } 7.93/3.00 7.93/3.00 } 7.93/3.00 7.93/3.00 7.93/3.00 7.93/3.00 ---------------------------------------- 7.93/3.00 7.93/3.00 (1) BareJBCToJBCProof (EQUIVALENT) 7.93/3.00 initialized classpath 7.93/3.00 ---------------------------------------- 7.93/3.00 7.93/3.00 (2) 7.93/3.00 Obligation: 7.93/3.00 need to prove termination of the following program: 7.93/3.00 package simple.factorial; 7.93/3.00 7.93/3.00 public class Factorial { 7.93/3.00 public static int factorial(int j) { 7.93/3.00 int i = 1; 7.93/3.00 int fac = 1; 7.93/3.00 while (fac != j) { 7.93/3.00 fac = fac * i; 7.93/3.00 i++; 7.93/3.00 } 7.93/3.00 return (i-1); 7.93/3.00 } 7.93/3.00 } 7.93/3.00 7.93/3.00 7.93/3.00 package simple.factorial; 7.93/3.00 7.93/3.00 public class Main { 7.93/3.00 7.93/3.00 /** 7.93/3.00 * @param args 7.93/3.00 */ 7.93/3.00 public static void main(String[] args) { 7.93/3.00 Factorial.factorial(args.length); 7.93/3.00 } 7.93/3.00 7.93/3.00 } 7.93/3.00 7.93/3.00 7.93/3.00 7.93/3.00 ---------------------------------------- 7.93/3.00 7.93/3.00 (3) JBCNonTerm (COMPLETE) 7.93/3.00 Reached a loop using the following run: 7.93/3.00 7.93/3.00 0: 7.93/3.00 a18([java.lang.String...]): length 0 -->{java.lang.Object...} 7.93/3.00 YES: (JL1) 7.93/3.00 1: 7.93/3.00 a18([java.lang.String...]): length 0 -->{java.lang.Object...} 7.93/3.00 YES: (JL1) 7.93/3.00 2: 7.93/3.00 YES: (JL1) 7.93/3.00 3: 7.93/3.00 7.93/3.00 YES: (JL1) 7.93/3.00 4: 7.93/3.00 7.93/3.00 YES: (JL1) 7.93/3.00 5: 7.93/3.00 7.93/3.00 YES: (JL1) 7.93/3.00 6: 7.93/3.00 7.93/3.00 YES: (JL1) 7.93/3.00 7: 7.93/3.00 7.93/3.00 YES: (JL1) 7.93/3.00 Start state of loop: 7.93/3.00 7.93/3.00 7.93/3.00 [a7(lv_0_0)] 7.93/3.00 7.93/3.00 i23: [0,+inf) 7.93/3.00 i35: [1,+inf)(l3) 7.93/3.00 i36: [1,+inf)(l2) 7.93/3.00 a7([java.lang.String...]): length i23 -->{java.lang.Object...} 7.93/3.00 YES: (JL1) 7.93/3.00 7.93/3.00 7.93/3.00 In the loop head node, references [i36, i23, i35] were interesting. 7.93/3.00 7.93/3.00 All methods calls in the loop body are side-effect free, hence they can be ignored. 7.93/3.00 7.93/3.00 By SMT, we could prove 7.93/3.00 7.93/3.00 ((0 <= initial_i23 and 1 <= initial_i35 and 1 <= initial_i36) and ((((path1_i42 = (path1_i36 * path1_i35) and path1_i43 = (path1_i35 + 1) and path1_i23 = res_i23 and path1_i43 = res_i35 and path1_i42 = res_i36 and path1_i23 = initial_i23 and path1_i35 = initial_i35 and path1_i36 = initial_i36) and (path1_i36 != path1_i23 and path1_i36 > path1_i23)) or ((path1_i42 = (path1_i36 * path1_i35) and path1_i43 = (path1_i35 + 1) and path1_i23 = res_i23 and path1_i43 = res_i35 and path1_i42 = res_i36 and path1_i23 = initial_i23 and path1_i35 = initial_i35 and path1_i36 = initial_i36) and (path1_i36 != path1_i23 and path1_i36 > path1_i23))) and (((res1_i42 = (res1_i36 * res1_i35) and res1_i43 = (res1_i35 + 1) and res_i23 = res1_i23 and res_i35 = res1_i35 and res_i36 = res1_i36) and !(res1_i36 != res1_i23 and res1_i36 > res1_i23)) and ((res1_i42 = (res1_i36 * res1_i35) and res1_i43 = (res1_i35 + 1) and res_i23 = res1_i23 and res_i35 = res1_i35 and res_i36 = res1_i36) and !(res1_i36 != res1_i23 and res1_i36 > res1_i23))))) 7.93/3.00 7.93/3.00 to be UNSAT. Consequently, the loop will not terminate. 7.93/3.00 ---------------------------------------- 7.93/3.00 7.93/3.00 (4) 7.93/3.00 NO 7.93/3.05 EOF