/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.jar /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- NO proof of /export/starexec/sandbox/benchmark/theBenchmark.jar # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty termination of the given Bare JBC problem could be disproven: (0) Bare JBC problem (1) BareJBCToJBCProof [EQUIVALENT, 96 ms] (2) JBC problem (3) JBCToGraph [EQUIVALENT, 332 ms] (4) JBCTerminationGraph (5) JBCNonTerm [COMPLETE, 288 ms] (6) NO ---------------------------------------- (0) Obligation: need to prove termination of the following program: package simple.ex08; public class Ex08 { public static void loop(int i) { boolean up = false; while (i > 0) { if (i == 1) { up = true; } if (i == 10) { up = false; } if (up) { i++; } else { i--; } } } } package simple.ex08; public class Main { /** * @param args */ public static void main(String[] args) { Ex08.loop(args.length); } } ---------------------------------------- (1) BareJBCToJBCProof (EQUIVALENT) initialized classpath ---------------------------------------- (2) Obligation: need to prove termination of the following program: package simple.ex08; public class Ex08 { public static void loop(int i) { boolean up = false; while (i > 0) { if (i == 1) { up = true; } if (i == 10) { up = false; } if (up) { i++; } else { i--; } } } } package simple.ex08; public class Main { /** * @param args */ public static void main(String[] args) { Ex08.loop(args.length); } } ---------------------------------------- (3) JBCToGraph (EQUIVALENT) Constructed TerminationGraph. ---------------------------------------- (4) Obligation: Termination Graph based on JBC Program: simple.ex08.Main.main([Ljava/lang/String;)V: Graph of 57 nodes with 1 SCC. ---------------------------------------- (5) JBCNonTerm (COMPLETE) Reached a loop using the following run: 0: a32([java.lang.String...]): length 1 -->{java.lang.Object...} YES: (JL1) 1: a32([java.lang.String...]): length 1 -->{java.lang.Object...} YES: (JL1) 2: YES: (JL1) 3: YES: (JL1) 4: YES: (JL1) 5: YES: (JL1) Start state of loop: [a12(lv_0_0)] i80: # i81: [0,1](2,1) i52: [0,+inf)(l2) a12([java.lang.String...]): length i52 -->{java.lang.Object...} YES: (JL1) In the loop head node, references [i80, i81] were interesting. All methods calls in the loop body are side-effect free, hence they can be ignored. By SMT, we could prove ((0 <= initial_i81 and initial_i81 <= 1 and 0 <= initial_i52) and ((((path1_i80 = path1_i86 and 2 = res_i80 and 1 = res_i81 and path1_i80 = initial_i80 and path1_i81 = initial_i81) and (path1_i86 > 0 and path1_i86 = 1 and path1_i86 = 1 and 1 = 1 and 1 > 0)) or ((path2_i80 = path2_i86 and path2_i86 = path2_i87 and path2_i87 = path2_i88 and path2_i88 = path2_i91 and path2_i93 = (path2_i91 + 1) and path2_i93 = res_i80 and 1 = res_i81 and path2_i80 = initial_i80 and path2_i81 = initial_i81) and (path2_i86 > 0 and T and 1 = 1 and path2_i87 > 1 and T and 10 = 10 and path2_i88 < 10 and path2_i81 = 1 and 1 > 0)) or ((path3_i80 = path3_i86 and path3_i86 = path3_i87 and path3_i87 = path3_i88 and path3_i88 = path3_i91 and path3_i94 = (path3_i91 + -1) and path3_i94 = res_i80 and 0 = res_i81 and path3_i80 = initial_i80 and path3_i81 = initial_i81) and (path3_i86 > 0 and T and 1 = 1 and path3_i87 > 1 and T and 10 = 10 and path3_i88 < 10 and path3_i81 = 0 and T)) or ((path4_i80 = path4_i86 and path4_i86 = path4_i87 and 9 = res_i80 and 0 = res_i81 and path4_i80 = initial_i80 and path4_i81 = initial_i81) and (path4_i86 > 0 and T and 1 = 1 and path4_i87 > 1 and path4_i87 = 10 and path4_i87 = 10 and 10 = 10 and T)) or ((path5_i80 = path5_i86 and path5_i86 = path5_i87 and path5_i87 = path5_i89 and path5_i89 = path5_i91 and path5_i93 = (path5_i91 + 1) and path5_i93 = res_i80 and 1 = res_i81 and path5_i80 = initial_i80 and path5_i81 = initial_i81) and (path5_i86 > 0 and T and 1 = 1 and path5_i87 > 1 and T and 10 = 10 and path5_i89 > 10 and path5_i81 = 1 and 1 > 0)) or ((path6_i80 = path6_i86 and path6_i86 = path6_i87 and path6_i87 = path6_i89 and path6_i89 = path6_i91 and path6_i94 = (path6_i91 + -1) and path6_i94 = res_i80 and 0 = res_i81 and path6_i80 = initial_i80 and path6_i81 = initial_i81) and (path6_i86 > 0 and T and 1 = 1 and path6_i87 > 1 and T and 10 = 10 and path6_i89 > 10 and path6_i81 = 0 and T))) and (((res1_i80 = res1_i86 and res_i80 = res1_i80 and res_i81 = res1_i81) and !(res1_i86 > 0 and res1_i86 = 1 and res1_i86 = 1 and 1 = 1 and 1 > 0)) and ((res2_i80 = res2_i86 and res2_i86 = res2_i87 and res2_i87 = res2_i88 and res2_i88 = res2_i91 and res2_i93 = (res2_i91 + 1) and res_i80 = res2_i80 and res_i81 = res2_i81) and !(res2_i86 > 0 and T and 1 = 1 and res2_i87 > 1 and T and 10 = 10 and res2_i88 < 10 and res2_i81 = 1 and 1 > 0)) and ((res3_i80 = res3_i86 and res3_i86 = res3_i87 and res3_i87 = res3_i88 and res3_i88 = res3_i91 and res3_i94 = (res3_i91 + -1) and res_i80 = res3_i80 and res_i81 = res3_i81) and !(res3_i86 > 0 and T and 1 = 1 and res3_i87 > 1 and T and 10 = 10 and res3_i88 < 10 and res3_i81 = 0 and T)) and ((res4_i80 = res4_i86 and res4_i86 = res4_i87 and res_i80 = res4_i80 and res_i81 = res4_i81) and !(res4_i86 > 0 and T and 1 = 1 and res4_i87 > 1 and res4_i87 = 10 and res4_i87 = 10 and 10 = 10 and T)) and ((res5_i80 = res5_i86 and res5_i86 = res5_i87 and res5_i87 = res5_i89 and res5_i89 = res5_i91 and res5_i93 = (res5_i91 + 1) and res_i80 = res5_i80 and res_i81 = res5_i81) and !(res5_i86 > 0 and T and 1 = 1 and res5_i87 > 1 and T and 10 = 10 and res5_i89 > 10 and res5_i81 = 1 and 1 > 0)) and ((res6_i80 = res6_i86 and res6_i86 = res6_i87 and res6_i87 = res6_i89 and res6_i89 = res6_i91 and res6_i94 = (res6_i91 + -1) and res_i80 = res6_i80 and res_i81 = res6_i81) and !(res6_i86 > 0 and T and 1 = 1 and res6_i87 > 1 and T and 10 = 10 and res6_i89 > 10 and res6_i81 = 0 and T))))) to be UNSAT. Consequently, the loop will not terminate. ---------------------------------------- (6) NO