/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, 179 ms] (2) LLVM problem (3) LLVMToTerminationGraphProof [EQUIVALENT, 1727 ms] (4) LLVM Symbolic Execution Graph (5) SymbolicExecutionGraphToSCCProof [SOUND, 0 ms] (6) LLVM Symbolic Execution SCC (7) SCC2IRS [SOUND, 36 ms] (8) IntTRS (9) IntTRSCompressionProof [EQUIVALENT, 0 ms] (10) IntTRS (11) RankingReductionPairProof [EQUIVALENT, 19 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: "hanoi" linkageType: EXTERNALLY_VISIBLE returnParam: i32 parameters: (n i32) variableLength: false visibilityType: DEFAULT callingConvention: ccc 0: %1 = alloca i32, align 4 %2 = alloca i32, align 4 store %n, %2 %3 = load %2 %4 = icmp eq %3 1 br %4, %5, %6 5: store 1, %1 br %12 6: %7 = load %2 %8 = sub %7 1 %9 = call i32 @hanoi(i32 %8) %10 = mul 2 %9 %11 = add %10 1 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 %n = alloca i32, align 4 %result = alloca i32, align 4 store 0, %1 %2 = call i32 @__VERIFIER_nondet_int() store %2, %n %3 = load %n %4 = icmp slt %3 1 br %4, %8, %5 5: %6 = load %n %7 = icmp sgt %6 31 br %7, %8, %9 8: store 0, %1 br %17 9: %10 = load %n %11 = call i32 @hanoi(i32 %10) store %11, %result %12 = load %result %13 = icmp sge %12 0 br %13, %14, %15 14: store 0, %1 br %17 15: br %16 16: Unnamed Call-Instruction = call BasicVoidType (...)* @__VERIFIER_error() noreturn unreachable 17: %18 = load %1 ret %18 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 12 rulesP rules: f_210(v51, v60, v52, v53, v54, v55, v56, v57, v61, 0, v59, 3, 1, 31, 4) -> f_212(v51, v60, v62, v52, v53, v54, v55, v56, v57, v61, v63, 0, v59, 3, 1, 31, 4) :|: 1 <= v62 && v63 = 3 + v62 && 4 <= v63 f_212(v51, v60, v62, v52, v53, v54, v55, v56, v57, v61, v63, 0, v59, 3, 1, 31, 4) -> f_213(v51, v60, v62, v52, v53, v54, v55, v56, v57, v61, v63, 0, v59, 3, 1, 31, 4) :|: TRUE f_213(v51, v60, v62, v52, v53, v54, v55, v56, v57, v61, v63, 0, v59, 3, 1, 31, 4) -> f_214(v51, v60, v62, v52, v53, v54, v55, v56, v57, v61, v63, 0, v59, 3, 1, 31, 4) :|: 0 = 0 f_214(v51, v60, v62, v52, v53, v54, v55, v56, v57, v61, v63, 0, v59, 3, 1, 31, 4) -> f_216(v51, v60, v62, v52, v53, v54, v55, v56, v57, v61, v63, 0, v59, 3, 2, 31, 1, 4) :|: v51 != 1 && 2 <= v51 && v51 <= 31 && 2 <= v59 f_216(v51, v60, v62, v52, v53, v54, v55, v56, v57, v61, v63, 0, v59, 3, 2, 31, 1, 4) -> f_218(v51, v60, v62, 0, v52, v53, v54, v55, v56, v57, v61, v63, v59, 3, 2, 31, 1, 4) :|: 0 = 0 f_218(v51, v60, v62, 0, v52, v53, v54, v55, v56, v57, v61, v63, v59, 3, 2, 31, 1, 4) -> f_220(v51, v60, v62, 0, v52, v53, v54, v55, v56, v57, v61, v63, v59, 3, 2, 31, 1, 4) :|: TRUE f_220(v51, v60, v62, 0, v52, v53, v54, v55, v56, v57, v61, v63, v59, 3, 2, 31, 1, 4) -> f_222(v51, v60, v62, 0, v52, v53, v54, v55, v56, v57, v61, v63, v59, 3, 2, 31, 1, 4) :|: 0 = 0 f_222(v51, v60, v62, 0, v52, v53, v54, v55, v56, v57, v61, v63, v59, 3, 2, 31, 1, 4) -> f_224(v51, v60, v62, 0, v65, v52, v53, v54, v55, v56, v57, v61, v63, v59, 3, 1, 2, 31, 4, 30) :|: 1 + v65 = v51 && 1 <= v65 && v65 <= 30 f_224(v51, v60, v62, 0, v65, v52, v53, v54, v55, v56, v57, v61, v63, v59, 3, 1, 2, 31, 4, 30) -> f_226(v65, v52, v53, v54, v55, v56, v57, v60, v61, v62, v63, 0, v59, v51, 3, 1, 2, 31, 4, 30) :|: 0 = 0 f_226(v65, v52, v53, v54, v55, v56, v57, v60, v61, v62, v63, 0, v59, v51, 3, 1, 2, 31, 4, 30) -> f_228(v65, v52, v53, v54, v55, v56, v57, v60, v61, v62, v63, 0, v59, v51, 3, 1, 2, 31, 4, 30) :|: TRUE f_228(v65, v52, v53, v54, v55, v56, v57, v60, v61, v62, v63, 0, v59, v51, 3, 1, 2, 31, 4, 30) -> f_208(v65, v52, v53, v54, v55, v56, v57, 0, v59, 3, 1, 31, 4) :|: TRUE f_208(v51, v52, v53, v54, v55, v56, v57, 0, v59, 3, 1, 31, 4) -> f_210(v51, v60, v52, v53, v54, v55, v56, v57, v61, 0, v59, 3, 1, 31, 4) :|: 1 <= v60 && v61 = 3 + v60 && 4 <= v61 Combined rules. Obtained 1 rulesP rules: f_210(1 + v65:0, v60:0, v52:0, v53:0, v54:0, v55:0, v56:0, v57:0, v61:0, 0, v59:0, 3, 1, 31, 4) -> f_210(v65:0, v60:1, v52:0, v53:0, v54:0, v55:0, v56:0, v57:0, 3 + v60:1, 0, v59:0, 3, 1, 31, 4) :|: v62:0 > 0 && v65:0 > 0 && v65:0 < 31 && v59:0 > 1 && v60:1 > 0 Filtered unneeded arguments: f_210(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15) -> f_210(x1, x11) Removed division, modulo operations, cleaned up constraints. Obtained 1 rules.P rules: f_210(sum~cons_1~v65:0, v59:0) -> f_210(v65:0, v59:0) :|: v65:0 < 31 && v59:0 > 1 && v65:0 > 0 && sum~cons_1~v65:0 = 1 + v65:0 ---------------------------------------- (8) Obligation: Rules: f_210(sum~cons_1~v65:0, v59:0) -> f_210(v65:0, v59:0) :|: v65:0 < 31 && v59:0 > 1 && v65:0 > 0 && sum~cons_1~v65:0 = 1 + v65:0 ---------------------------------------- (9) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (10) Obligation: Rules: f_210(sum~cons_1~v65:0:0, v59:0:0) -> f_210(v65:0:0, v59:0:0) :|: v65:0:0 < 31 && v59:0:0 > 1 && v65:0:0 > 0 && sum~cons_1~v65:0:0 = 1 + v65:0:0 ---------------------------------------- (11) RankingReductionPairProof (EQUIVALENT) Interpretation: [ f_210 ] = f_210_1 The following rules are decreasing: f_210(sum~cons_1~v65:0:0, v59:0:0) -> f_210(v65:0:0, v59:0:0) :|: v65:0:0 < 31 && v59:0:0 > 1 && v65:0:0 > 0 && sum~cons_1~v65:0:0 = 1 + v65:0:0 The following rules are bounded: f_210(sum~cons_1~v65:0:0, v59:0:0) -> f_210(v65:0:0, v59:0:0) :|: v65:0:0 < 31 && v59:0:0 > 1 && v65:0:0 > 0 && sum~cons_1~v65:0:0 = 1 + v65:0:0 ---------------------------------------- (12) YES