/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.jar /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- NO proof of /export/starexec/sandbox2/benchmark/theBenchmark.jar # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 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) JBCNonTerm [COMPLETE, 355 ms] (4) NO ---------------------------------------- (0) Obligation: need to prove termination of the following program: package simple.factorial; public class Factorial { public static int factorial(int j) { int i = 1; int fac = 1; while (fac != j) { fac = fac * i; i++; } return (i-1); } } package simple.factorial; public class Main { /** * @param args */ public static void main(String[] args) { Factorial.factorial(args.length); } } ---------------------------------------- (1) BareJBCToJBCProof (EQUIVALENT) initialized classpath ---------------------------------------- (2) Obligation: need to prove termination of the following program: package simple.factorial; public class Factorial { public static int factorial(int j) { int i = 1; int fac = 1; while (fac != j) { fac = fac * i; i++; } return (i-1); } } package simple.factorial; public class Main { /** * @param args */ public static void main(String[] args) { Factorial.factorial(args.length); } } ---------------------------------------- (3) JBCNonTerm (COMPLETE) Reached a loop using the following run: 0: a18([java.lang.String...]): length 0 -->{java.lang.Object...} YES: (JL1) 1: a18([java.lang.String...]): length 0 -->{java.lang.Object...} YES: (JL1) 2: YES: (JL1) 3: YES: (JL1) 4: YES: (JL1) 5: YES: (JL1) 6: YES: (JL1) 7: YES: (JL1) Start state of loop: [a7(lv_0_0)] i22: [0,+inf) i35: [1,+inf)(l3) i36: [1,+inf)(l2) a7([java.lang.String...]): length i22 -->{java.lang.Object...} YES: (JL1) In the loop head node, references [i36, i22, i35] 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_i22 and 1 <= initial_i35 and 1 <= initial_i36) and ((((path1_i40 = (path1_i36 * path1_i35) and path1_i41 = (path1_i35 + 1) and path1_i22 = res_i22 and path1_i41 = res_i35 and path1_i40 = res_i36 and path1_i22 = initial_i22 and path1_i35 = initial_i35 and path1_i36 = initial_i36) and (path1_i36 != path1_i22 and path1_i36 > path1_i22)) or ((path1_i40 = (path1_i36 * path1_i35) and path1_i41 = (path1_i35 + 1) and path1_i22 = res_i22 and path1_i41 = res_i35 and path1_i40 = res_i36 and path1_i22 = initial_i22 and path1_i35 = initial_i35 and path1_i36 = initial_i36) and (path1_i36 != path1_i22 and path1_i36 > path1_i22))) and (((res1_i40 = (res1_i36 * res1_i35) and res1_i41 = (res1_i35 + 1) and res_i22 = res1_i22 and res_i35 = res1_i35 and res_i36 = res1_i36) and !(res1_i36 != res1_i22 and res1_i36 > res1_i22)) and ((res1_i40 = (res1_i36 * res1_i35) and res1_i41 = (res1_i35 + 1) and res_i22 = res1_i22 and res_i35 = res1_i35 and res_i36 = res1_i36) and !(res1_i36 != res1_i22 and res1_i36 > res1_i22))))) to be UNSAT. Consequently, the loop will not terminate. ---------------------------------------- (4) NO