/export/starexec/sandbox/solver/bin/starexec_run_c /export/starexec/sandbox/benchmark/theBenchmark.c /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox/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, 179 ms] (2) LLVM problem (3) LLVMToTerminationGraphProof [EQUIVALENT, 2095 ms] (4) LLVM Symbolic Execution Graph (5) SymbolicExecutionGraphToSCCProof [SOUND, 0 ms] (6) LLVM Symbolic Execution SCC (7) SCC2IRS [SOUND, 141 ms] (8) IntTRS (9) TerminationGraphProcessor [EQUIVALENT, 28 ms] (10) IntTRS (11) IntTRSCompressionProof [EQUIVALENT, 0 ms] (12) IntTRS (13) PolynomialOrderProcessor [EQUIVALENT, 9 ms] (14) YES ---------------------------------------- (0) Obligation: c file /export/starexec/sandbox/benchmark/theBenchmark.c ---------------------------------------- (1) CToLLVMProof (EQUIVALENT) Compiled c-file /export/starexec/sandbox/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: true visibilityType: DEFAULT callingConvention: ccc *BasicFunctionTypename: "g" linkageType: EXTERNALLY_VISIBLE returnParam: i32 parameters: (x i32) variableLength: false visibilityType: DEFAULT callingConvention: ccc 0: %1 = alloca i32, align 4 %2 = alloca i32, align 4 store %x, %2 %3 = load %2 %4 = icmp eq %3 0 br %4, %5, %6 5: store 1, %1 br %12 6: %7 = load %2 %8 = sub %7 1 %9 = call i32 @g(i32 %8) %10 = sub %9 1 %11 = call i32 @g(i32 %10) store %11, %1 br %12 12: %13 = load %1 ret %13 *BasicFunctionTypename: "main" linkageType: EXTERNALLY_VISIBLE returnParam: i32 parameters: () variableLength: false visibilityType: DEFAULT callingConvention: ccc 0: %1 = alloca i32, align 4 %x = alloca i32, align 4 store 0, %1 %2 = call i32 (...)* @__VERIFIER_nondet_int() store %2, %x %3 = load %x %4 = icmp slt %3 0 br %4, %5, %6 5: store 0, %1 br %9 6: %7 = load %x %8 = call i32 @g(i32 %7) br %9 9: %10 = load %1 ret %10 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 42 rulesP rules: f_162(v43, v50, v44, v45, v46, v47, v51, 0, v49, 3, 1, 4) -> f_164(v43, v50, v52, v44, v45, v46, v47, v51, v53, 0, v49, 3, 1, 4) :|: 1 <= v52 && v53 = 3 + v52 && 4 <= v53 f_164(v43, v50, v52, v44, v45, v46, v47, v51, v53, 0, v49, 3, 1, 4) -> f_165(v43, v50, v52, v44, v45, v46, v47, v51, v53, 0, v49, 3, 1, 4) :|: TRUE f_165(v43, v50, v52, v44, v45, v46, v47, v51, v53, 0, v49, 3, 1, 4) -> f_166(v43, v50, v52, v44, v45, v46, v47, v51, v53, 0, v49, 3, 1, 4) :|: 0 = 0 f_166(v43, v50, v52, v44, v45, v46, v47, v51, v53, 0, v49, 3, 1, 4) -> f_168(v43, v50, v52, v44, v45, v46, v47, v51, v53, 0, v49, 3, 1, 4) :|: v43 != 0 && 1 <= v49 f_168(v43, v50, v52, v44, v45, v46, v47, v51, v53, 0, v49, 3, 1, 4) -> f_170(v43, v50, v52, 0, v44, v45, v46, v47, v51, v53, v49, 3, 1, 4) :|: 0 = 0 f_170(v43, v50, v52, 0, v44, v45, v46, v47, v51, v53, v49, 3, 1, 4) -> f_172(v43, v50, v52, 0, v44, v45, v46, v47, v51, v53, v49, 3, 1, 4) :|: TRUE f_172(v43, v50, v52, 0, v44, v45, v46, v47, v51, v53, v49, 3, 1, 4) -> f_174(v43, v50, v52, 0, v44, v45, v46, v47, v51, v53, v49, 3, 1, 4) :|: 0 = 0 f_174(v43, v50, v52, 0, v44, v45, v46, v47, v51, v53, v49, 3, 1, 4) -> f_176(v43, v50, v52, 0, v55, v44, v45, v46, v47, v51, v53, v49, 3, 1, 4) :|: 1 + v55 = v43 && 0 <= v55 f_176(v43, v50, v52, 0, v55, v44, v45, v46, v47, v51, v53, v49, 3, 1, 4) -> f_178(v55, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 1, 4) :|: 0 = 0 f_178(v55, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 1, 4) -> f_180(v55, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 1, 4) :|: TRUE f_178(v55, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 1, 4) -> f_183(0, 1, v44, v45, v46, v47, v50, v51, v52, v53, v49, 3, 4) :|: TRUE f_178(v55, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 1, 4) -> f_247(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) :|: TRUE f_178(v55, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 1, 4) -> f_272(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) :|: TRUE f_178(v55, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 1, 4) -> f_288(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) :|: TRUE f_178(v55, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 1, 4) -> f_310(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) :|: TRUE f_178(v55, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 1, 4) -> f_317(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) :|: TRUE f_178(v55, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 1, 4) -> f_330(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) :|: TRUE f_180(v55, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 1, 4) -> f_160(v55, v44, v45, v46, v47, 0, v49, 3, 1, 4) :|: TRUE f_160(v43, v44, v45, v46, v47, 0, v49, 3, 1, 4) -> f_162(v43, v50, v44, v45, v46, v47, v51, 0, v49, 3, 1, 4) :|: 1 <= v50 && v51 = 3 + v50 && 4 <= v51 f_183(0, 1, v44, v45, v46, v47, v50, v51, v52, v53, v49, 3, 4) -> f_185(1, v50, v52, 0, v44, v45, v46, v47, v51, v53, v49, 3, 4) :|: 0 = 0 f_185(1, v50, v52, 0, v44, v45, v46, v47, v51, v53, v49, 3, 4) -> f_186(1, v50, v52, 0, v44, v45, v46, v47, v51, v53, v49, 3, 4) :|: 0 = 0 f_186(1, v50, v52, 0, v44, v45, v46, v47, v51, v53, v49, 3, 4) -> f_187(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, 1, 3, 4) :|: 0 = 0 f_187(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, 1, 3, 4) -> f_188(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, 1, 3, 4) :|: TRUE f_188(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, 1, 3, 4) -> f_160(0, v44, v45, v46, v47, 0, v49, 3, 1, 4) :|: TRUE f_247(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) -> f_250(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) :|: 0 = 0 f_250(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) -> f_253(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) :|: 0 = 0 f_253(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) -> f_256(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, v55, 1, 3, 4) :|: 0 = 0 f_256(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, v55, 1, 3, 4) -> f_258(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, 3, 1, 4) :|: TRUE f_258(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, 3, 1, 4) -> f_160(0, v44, v45, v46, v47, 0, v49, 3, 1, 4) :|: TRUE f_272(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) -> f_276(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) :|: 0 = 0 f_276(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) -> f_280(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) :|: 0 = 0 f_280(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) -> f_283(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, v55, 1, 3, 4) :|: 0 = 0 f_283(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, v55, 1, 3, 4) -> f_286(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, 3, 1, 4) :|: TRUE f_286(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, 3, 1, 4) -> f_160(0, v44, v45, v46, v47, 0, v49, 3, 1, 4) :|: TRUE f_288(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) -> f_292(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) :|: 0 = 0 f_292(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) -> f_298(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) :|: 0 = 0 f_298(v43, v50, v52, 0, v55, 1, v44, v45, v46, v47, v51, v53, v49, 3, 4) -> f_303(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, v55, 1, 3, 4) :|: 0 = 0 f_303(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, v55, 1, 3, 4) -> f_308(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, 3, 1, 4) :|: TRUE f_308(0, v44, v45, v46, v47, v50, v51, v52, v53, v49, v43, 3, 1, 4) -> f_160(0, v44, v45, v46, v47, 0, v49, 3, 1, 4) :|: TRUE f_310(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) -> f_288(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) :|: TRUE f_317(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) -> f_310(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) :|: TRUE f_330(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) -> f_317(v55, 1, v44, v45, v46, v47, v50, v51, v52, v53, 0, v49, v43, 3, 4) :|: TRUE Combined rules. Obtained 2 rulesP rules: f_162(1 + v55:0, v50:0, v44:0, v45:0, v46:0, v47:0, v51:0, 0, v49:0, 3, 1, 4) -> f_162(0, v50:1, v44:0, v45:0, v46:0, v47:0, 3 + v50:1, 0, v49:0, 3, 1, 4) :|: v52:0 > 0 && v49:0 > 0 && v55:0 > -1 && v50:1 > 0 f_162(1 + v55:0, v50:0, v44:0, v45:0, v46:0, v47:0, v51:0, 0, v49:0, 3, 1, 4) -> f_162(v55:0, v50:1, v44:0, v45:0, v46:0, v47:0, 3 + v50:1, 0, v49:0, 3, 1, 4) :|: v52:0 > 0 && v49:0 > 0 && v55:0 > -1 && v50:1 > 0 Filtered unneeded arguments: f_162(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) -> f_162(x1, x9) Removed division, modulo operations, cleaned up constraints. Obtained 2 rules.P rules: f_162(sum~cons_1~v55:0, v49:0) -> f_162(0, v49:0) :|: v49:0 > 0 && v55:0 > -1 && sum~cons_1~v55:0 = 1 + v55:0 f_162(sum~cons_1~v55:0, v49:0) -> f_162(v55:0, v49:0) :|: v49:0 > 0 && v55:0 > -1 && sum~cons_1~v55:0 = 1 + v55:0 ---------------------------------------- (8) Obligation: Rules: f_162(sum~cons_1~v55:0, v49:0) -> f_162(0, v49:0) :|: v49:0 > 0 && v55:0 > -1 && sum~cons_1~v55:0 = 1 + v55:0 f_162(x, x1) -> f_162(x2, x1) :|: x1 > 0 && x2 > -1 && x = 1 + x2 ---------------------------------------- (9) TerminationGraphProcessor (EQUIVALENT) Constructed the termination graph and obtained one non-trivial SCC. ---------------------------------------- (10) Obligation: Rules: f_162(x, x1) -> f_162(x2, x1) :|: x1 > 0 && x2 > -1 && x = 1 + x2 ---------------------------------------- (11) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (12) Obligation: Rules: f_162(sum~cons_1~x2:0, x1:0) -> f_162(x2:0, x1:0) :|: x1:0 > 0 && x2:0 > -1 && sum~cons_1~x2:0 = 1 + x2:0 ---------------------------------------- (13) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f_162(x, x1)] = x The following rules are decreasing: f_162(sum~cons_1~x2:0, x1:0) -> f_162(x2:0, x1:0) :|: x1:0 > 0 && x2:0 > -1 && sum~cons_1~x2:0 = 1 + x2:0 The following rules are bounded: f_162(sum~cons_1~x2:0, x1:0) -> f_162(x2:0, x1:0) :|: x1:0 > 0 && x2:0 > -1 && sum~cons_1~x2:0 = 1 + x2:0 ---------------------------------------- (14) YES