4.73/2.11 NO 4.91/2.12 proof of /export/starexec/sandbox/benchmark/theBenchmark.jar 4.91/2.12 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 4.91/2.12 4.91/2.12 4.91/2.12 termination of the given Bare JBC problem could be disproven: 4.91/2.12 4.91/2.12 (0) Bare JBC problem 4.91/2.12 (1) BareJBCToJBCProof [EQUIVALENT, 95 ms] 4.91/2.12 (2) JBC problem 4.91/2.12 (3) JBCToGraph [EQUIVALENT, 230 ms] 4.91/2.12 (4) JBCTerminationGraph 4.91/2.12 (5) JBCNonTerm [COMPLETE, 80 ms] 4.91/2.12 (6) NO 4.91/2.12 4.91/2.12 4.91/2.12 ---------------------------------------- 4.91/2.12 4.91/2.12 (0) 4.91/2.12 Obligation: 4.91/2.12 need to prove termination of the following program: 4.91/2.12 /** 4.91/2.12 * A loop continously throwing and catching an exception. 4.91/2.12 * The exception is thrown before the statement that makes the loop 4.91/2.12 * progress, but another statement inside the exception catcher make the 4.91/2.12 * loop progress. However, this is not enough to prove progression since 4.91/2.12 * i is decreased at the beginning of the loop. 4.91/2.12 * 4.91/2.12 * The call to main() diverges. 4.91/2.12 * 4.91/2.12 * Julia + BinTerm cannot prove that the call to main() terminates. 4.91/2.12 * 4.91/2.12 * @author Fausto Spoto 4.91/2.12 */ 4.91/2.12 4.91/2.12 public class Exc4 { 4.91/2.12 public static void main(String[] args) { 4.91/2.12 int i = 0; 4.91/2.12 4.91/2.12 while (i < 20) { 4.91/2.12 i--; 4.91/2.12 4.91/2.12 try { 4.91/2.12 if (i > 10) throw null; 4.91/2.12 i += 2; 4.91/2.12 } 4.91/2.12 catch (NullPointerException e) { 4.91/2.12 i++; 4.91/2.12 } 4.91/2.12 } 4.91/2.12 } 4.91/2.12 } 4.91/2.12 4.91/2.12 4.91/2.12 ---------------------------------------- 4.91/2.12 4.91/2.12 (1) BareJBCToJBCProof (EQUIVALENT) 4.91/2.12 initialized classpath 4.91/2.12 ---------------------------------------- 4.91/2.12 4.91/2.12 (2) 4.91/2.12 Obligation: 4.91/2.12 need to prove termination of the following program: 4.91/2.12 /** 4.91/2.12 * A loop continously throwing and catching an exception. 4.91/2.12 * The exception is thrown before the statement that makes the loop 4.91/2.12 * progress, but another statement inside the exception catcher make the 4.91/2.12 * loop progress. However, this is not enough to prove progression since 4.91/2.12 * i is decreased at the beginning of the loop. 4.91/2.12 * 4.91/2.12 * The call to main() diverges. 4.91/2.12 * 4.91/2.12 * Julia + BinTerm cannot prove that the call to main() terminates. 4.91/2.12 * 4.91/2.12 * @author Fausto Spoto 4.91/2.12 */ 4.91/2.12 4.91/2.12 public class Exc4 { 4.91/2.12 public static void main(String[] args) { 4.91/2.12 int i = 0; 4.91/2.12 4.91/2.12 while (i < 20) { 4.91/2.12 i--; 4.91/2.12 4.91/2.12 try { 4.91/2.12 if (i > 10) throw null; 4.91/2.12 i += 2; 4.91/2.12 } 4.91/2.12 catch (NullPointerException e) { 4.91/2.12 i++; 4.91/2.12 } 4.91/2.12 } 4.91/2.12 } 4.91/2.12 } 4.91/2.12 4.91/2.12 4.91/2.12 ---------------------------------------- 4.91/2.12 4.91/2.12 (3) JBCToGraph (EQUIVALENT) 4.91/2.12 Constructed TerminationGraph. 4.91/2.12 ---------------------------------------- 4.91/2.12 4.91/2.12 (4) 4.91/2.12 Obligation: 4.91/2.12 Termination Graph based on JBC Program: 4.91/2.12 Exc4.main([Ljava/lang/String;)V: Graph of 47 nodes with 1 SCC. 4.91/2.12 4.91/2.12 4.91/2.12 4.91/2.12 4.91/2.12 4.91/2.12 ---------------------------------------- 4.91/2.12 4.91/2.12 (5) JBCNonTerm (COMPLETE) 4.91/2.12 Reached a loop using the following run: 4.91/2.12 4.91/2.12 0: 4.91/2.12 YES: (JL1) 4.91/2.12 1: 4.91/2.12 YES: (JL1) 4.91/2.12 2: 4.91/2.12 YES: (JL1) 4.91/2.12 Start state of loop: 4.91/2.12 4.91/2.12 [o12(lv_0_0)] 4.91/2.12 4.91/2.12 o12([java.lang.String...]): Object() -->{java.lang.Object...} 4.91/2.12 i9: # 4.91/2.12 YES: (JL1) 4.91/2.12 4.91/2.12 4.91/2.12 In the loop head node, references [i9] were interesting. 4.91/2.12 4.91/2.12 All methods calls in the loop body are side-effect free, hence they can be ignored. 4.91/2.12 4.91/2.12 By SMT, we could prove 4.91/2.12 4.91/2.12 (T and ((((path1_i9 = path1_i11 and path1_i13 = (path1_i11 + -1) and path1_i13 = path1_i14 and path1_i16 = (path1_i14 + 2) and path1_i16 = res_i9 and path1_i9 = initial_i9) and (T and 20 = 20 and path1_i11 < 20 and T and 10 = 10 and path1_i14 <= 10)) or ((path2_i9 = path2_i11 and path2_i13 = (path2_i11 + -1) and path2_i13 = path2_i15 and path2_i18 = (path2_i15 + 1) and path2_i18 = res_i9 and path2_i9 = initial_i9) and (T and 20 = 20 and path2_i11 < 20 and T and 10 = 10 and path2_i15 > 10))) and (((res1_i9 = res1_i11 and res1_i13 = (res1_i11 + -1) and res1_i13 = res1_i14 and res1_i16 = (res1_i14 + 2) and res_i9 = res1_i9) and !(T and 20 = 20 and res1_i11 < 20 and T and 10 = 10 and res1_i14 <= 10)) and ((res2_i9 = res2_i11 and res2_i13 = (res2_i11 + -1) and res2_i13 = res2_i15 and res2_i18 = (res2_i15 + 1) and res_i9 = res2_i9) and !(T and 20 = 20 and res2_i11 < 20 and T and 10 = 10 and res2_i15 > 10))))) 4.91/2.12 4.91/2.12 to be UNSAT. Consequently, the loop will not terminate. 4.91/2.12 ---------------------------------------- 4.91/2.12 4.91/2.12 (6) 4.91/2.12 NO 4.94/2.14 EOF