/export/starexec/sandbox2/solver/bin/starexec_run_c /export/starexec/sandbox2/benchmark/theBenchmark.c /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.c # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Termination of the given C Problem could be proven: (0) C Problem (1) CToLLVMProof [EQUIVALENT, 174 ms] (2) LLVM problem (3) LLVMToTerminationGraphProof [EQUIVALENT, 2520 ms] (4) LLVM Symbolic Execution Graph (5) SymbolicExecutionGraphToSCCProof [SOUND, 0 ms] (6) LLVM Symbolic Execution SCC (7) SCC2IRS [SOUND, 18 ms] (8) IntTRS (9) IRS2T2 [EQUIVALENT, 0 ms] (10) T2IntSys (11) T2 [EQUIVALENT, 792 ms] (12) YES ---------------------------------------- (0) Obligation: c file /export/starexec/sandbox2/benchmark/theBenchmark.c ---------------------------------------- (1) CToLLVMProof (EQUIVALENT) Compiled c-file /export/starexec/sandbox2/benchmark/theBenchmark.c to LLVM. ---------------------------------------- (2) Obligation: LLVM Problem Aliases: Data layout: "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" Machine: "x86_64-pc-linux-gnu" Type definitions: Global variables: Function declarations and definitions: *BasicFunctionTypename: "__VERIFIER_nondet_int" returnParam: i32 parameters: () variableLength: false visibilityType: DEFAULT callingConvention: ccc *BasicFunctionTypename: "__VERIFIER_error" returnParam: BasicVoidType parameters: () variableLength: true visibilityType: DEFAULT callingConvention: ccc *BasicFunctionTypename: "mult" linkageType: EXTERNALLY_VISIBLE returnParam: i32 parameters: (n i32, m i32) variableLength: false visibilityType: DEFAULT callingConvention: ccc 0: %1 = alloca i32, align 4 %2 = alloca i32, align 4 %3 = alloca i32, align 4 store %n, %2 store %m, %3 %4 = load %3 %5 = icmp slt %4 0 br %5, %6, %11 6: %7 = load %2 %8 = load %3 %9 = sub 0 %8 %10 = call i32 @mult(i32 %7, i32 %9) store %10, %1 br %22 11: %12 = load %3 %13 = icmp eq %12 0 br %13, %14, %15 14: store 0, %1 br %22 15: %16 = load %2 %17 = load %2 %18 = load %3 %19 = sub %18 1 %20 = call i32 @mult(i32 %17, i32 %19) %21 = add %16 %20 store %21, %1 br %22 22: %23 = load %1 ret %23 *BasicFunctionTypename: "main" linkageType: EXTERNALLY_VISIBLE returnParam: i32 parameters: () variableLength: false visibilityType: DEFAULT callingConvention: ccc 0: %1 = alloca i32, align 4 %m = alloca i32, align 4 %n = alloca i32, align 4 %res1 = alloca i32, align 4 %res2 = alloca i32, align 4 store 0, %1 %2 = call i32 @__VERIFIER_nondet_int() store %2, %m %3 = load %m %4 = icmp slt %3 0 br %4, %5, %6 5: store 0, %1 br %29 6: %7 = call i32 @__VERIFIER_nondet_int() store %7, %n %8 = load %n %9 = icmp slt %8 0 br %9, %10, %11 10: store 0, %1 br %29 11: %12 = load %m %13 = load %n %14 = call i32 @mult(i32 %12, i32 %13) store %14, %res1 %15 = load %n %16 = load %m %17 = call i32 @mult(i32 %15, i32 %16) store %17, %res2 %18 = load %res1 %19 = icmp eq %18 0 br %19, %26, %20 20: %21 = load %m %22 = icmp sgt %21 0 br %22, %26, %23 23: %24 = load %n %25 = icmp sgt %24 0 br %25, %26, %27 26: store 0, %1 br %29 27: br %28 28: Unnamed Call-Instruction = call BasicVoidType (...)* @__VERIFIER_error() noreturn unreachable 29: %30 = load %1 ret %30 Analyze Termination of all function calls matching the pattern: main() ---------------------------------------- (3) LLVMToTerminationGraphProof (EQUIVALENT) Constructed symbolic execution graph for LLVM program and proved memory safety. ---------------------------------------- (4) Obligation: SE Graph ---------------------------------------- (5) SymbolicExecutionGraphToSCCProof (SOUND) Splitted symbolic execution graph to 1 SCC. ---------------------------------------- (6) Obligation: SCC ---------------------------------------- (7) SCC2IRS (SOUND) Transformed LLVM symbolic execution graph SCC into a rewrite problem. Log: Generated rules. Obtained 19 rulesP rules: f_357(v155, v156, v158, v159, 3, 0, 1, 4) -> f_358(v155, v156, v158, v160, v159, v161, 3, 0, 1, 4) :|: 1 <= v160 && v161 = 3 + v160 && 4 <= v161 f_358(v155, v156, v158, v160, v159, v161, 3, 0, 1, 4) -> f_359(v155, v156, v158, v160, v162, v159, v161, v163, 3, 0, 1, 4) :|: 1 <= v162 && v163 = 3 + v162 && 4 <= v163 f_359(v155, v156, v158, v160, v162, v159, v161, v163, 3, 0, 1, 4) -> f_360(v155, v156, v158, v160, v162, v159, v161, v163, 3, 0, 1, 4) :|: TRUE f_360(v155, v156, v158, v160, v162, v159, v161, v163, 3, 0, 1, 4) -> f_361(v155, v156, v158, v160, v162, v159, v161, v163, 3, 0, 1, 4) :|: TRUE f_361(v155, v156, v158, v160, v162, v159, v161, v163, 3, 0, 1, 4) -> f_362(v155, v156, v158, v160, v162, v159, v161, v163, 3, 0, 1, 4) :|: 0 = 0 f_362(v155, v156, v158, v160, v162, v159, v161, v163, 3, 0, 1, 4) -> f_363(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) :|: 0 = 0 f_363(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) -> f_364(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) :|: TRUE f_364(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) -> f_365(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) :|: 0 = 0 f_365(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) -> f_367(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) :|: v156 != 0 f_367(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) -> f_369(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) :|: 0 = 0 f_369(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) -> f_371(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) :|: TRUE f_371(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) -> f_373(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) :|: 0 = 0 f_373(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) -> f_375(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) :|: 0 = 0 f_375(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) -> f_377(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) :|: 0 = 0 f_377(v155, v156, v158, v160, v162, 0, v159, v161, v163, 3, 1, 4) -> f_379(v155, v156, v158, v160, v162, 0, v173, v159, v161, v163, 3, 1, 4) :|: 1 + v173 = v156 && 0 <= v173 f_379(v155, v156, v158, v160, v162, 0, v173, v159, v161, v163, 3, 1, 4) -> f_381(v155, v173, v158, v159, v160, v161, v162, v163, v156, 0, 3, 1, 4) :|: 0 = 0 f_381(v155, v173, v158, v159, v160, v161, v162, v163, v156, 0, 3, 1, 4) -> f_383(v155, v173, v158, v159, v160, v161, v162, v163, v156, 3, 1, 0, 4) :|: TRUE f_383(v155, v173, v158, v159, v160, v161, v162, v163, v156, 3, 1, 0, 4) -> f_355(v155, v173, 0) :|: TRUE f_355(v155, v156, 0) -> f_357(v155, v156, v158, v159, 3, 0, 1, 4) :|: 1 <= v158 && v159 = 3 + v158 && 4 <= v159 Combined rules. Obtained 1 rulesP rules: f_357(v155:0, 1 + v173:0, v158:0, v159:0, 3, 0, 1, 4) -> f_357(v155:0, v173:0, v158:1, 3 + v158:1, 3, 0, 1, 4) :|: v162:0 > 0 && v160:0 > 0 && v173:0 > -1 && v158:1 > 0 Filtered unneeded arguments: f_357(x1, x2, x3, x4, x5, x6, x7, x8) -> f_357(x2) Removed division, modulo operations, cleaned up constraints. Obtained 1 rules.P rules: f_357(sum~cons_1~v173:0) -> f_357(v173:0) :|: v173:0 > -1 && sum~cons_1~v173:0 = 1 + v173:0 ---------------------------------------- (8) Obligation: Rules: f_357(sum~cons_1~v173:0) -> f_357(v173:0) :|: v173:0 > -1 && sum~cons_1~v173:0 = 1 + v173:0 ---------------------------------------- (9) IRS2T2 (EQUIVALENT) Transformed input IRS into an integer transition system.Used the following mapping from defined symbols to location IDs: (f_357_1,1) ---------------------------------------- (10) Obligation: START: 0; FROM: 0; TO: 1; FROM: 1; oldX0 := x0; oldX1 := oldX0 - 1; assume(oldX1 > -1 && oldX0 = 1 + oldX1); x0 := oldX0 - 1; TO: 1; ---------------------------------------- (11) T2 (EQUIVALENT) Initially, performed program simplifications using lexicographic rank functions: * Removed transitions 1, 3, 4 using the following rank functions: - Rank function 1: RF for loc. 5: 1+2*x0 RF for loc. 6: 2*x0 Bound for (chained) transitions 3: 2 Bound for (chained) transitions 4: 2 - Rank function 2: RF for loc. 5: 1 RF for loc. 6: 0 Bound for (chained) transitions 1: 1 ---------------------------------------- (12) YES