/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, 1365 ms] (4) LLVM Symbolic Execution Graph (5) SymbolicExecutionGraphToSCCProof [SOUND, 0 ms] (6) LLVM Symbolic Execution SCC (7) SCC2IRS [SOUND, 83 ms] (8) IntTRS (9) IntTRSCompressionProof [EQUIVALENT, 0 ms] (10) IntTRS (11) PolynomialOrderProcessor [EQUIVALENT, 13 ms] (12) AND (13) IntTRS (14) IntTRSCompressionProof [EQUIVALENT, 0 ms] (15) IntTRS (16) RankingReductionPairProof [EQUIVALENT, 7 ms] (17) IntTRS (18) IntTRSCompressionProof [EQUIVALENT, 0 ms] (19) IntTRS (20) PolynomialOrderProcessor [EQUIVALENT, 3 ms] (21) YES (22) IntTRS (23) IntTRSCompressionProof [EQUIVALENT, 0 ms] (24) IntTRS (25) PolynomialOrderProcessor [EQUIVALENT, 0 ms] (26) IntTRS (27) IntTRSCompressionProof [EQUIVALENT, 0 ms] (28) IntTRS (29) PolynomialOrderProcessor [EQUIVALENT, 0 ms] (30) 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: "f" linkageType: EXTERNALLY_VISIBLE returnParam: i32 parameters: (x i32, y i32) variableLength: false visibilityType: DEFAULT callingConvention: ccc 0: %1 = alloca i32, align 4 %2 = alloca i32, align 4 %3 = alloca i32, align 4 store %x, %2 store %y, %3 %4 = load %3 %5 = icmp eq %4 0 br %5, %6, %8 6: %7 = load %2 store %7, %1 br %21 8: %9 = load %2 %10 = icmp eq %9 0 br %10, %11, %16 11: %12 = load %3 %13 = load %3 %14 = sub %13 1 %15 = call i32 @f(i32 %12, i32 %14) store %15, %1 br %21 16: %17 = load %3 %18 = load %2 %19 = sub %18 1 %20 = call i32 @f(i32 %17, i32 %19) store %20, %1 br %21 21: %22 = load %1 ret %22 *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 %y = alloca i32, align 4 store 0, %1 %2 = call i32 @__VERIFIER_nondet_int() store %2, %x %3 = call i32 @__VERIFIER_nondet_int() store %3, %y %4 = load %x %5 = icmp sge %4 0 br %5, %6, %13 6: %7 = load %y %8 = icmp sge %7 0 br %8, %9, %13 9: %10 = load %x %11 = load %y %12 = call i32 @f(i32 %10, i32 %11) br %13 13: ret 0 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 28 rulesP rules: f_210(v50, v51, v52, v53, 3, 0, 1, 4) -> f_211(v50, v51, v52, v54, v53, v55, 3, 0, 1, 4) :|: 1 <= v54 && v55 = 3 + v54 && 4 <= v55 f_211(v50, v51, v52, v54, v53, v55, 3, 0, 1, 4) -> f_212(v50, v51, v52, v54, v56, v53, v55, v57, 3, 0, 1, 4) :|: 1 <= v56 && v57 = 3 + v56 && 4 <= v57 f_212(v50, v51, v52, v54, v56, v53, v55, v57, 3, 0, 1, 4) -> f_213(v50, v51, v52, v54, v56, v53, v55, v57, 3, 0, 1, 4) :|: TRUE f_213(v50, v51, v52, v54, v56, v53, v55, v57, 3, 0, 1, 4) -> f_214(v50, v51, v52, v54, v56, v53, v55, v57, 3, 0, 1, 4) :|: TRUE f_214(v50, v51, v52, v54, v56, v53, v55, v57, 3, 0, 1, 4) -> f_215(v50, v51, v52, v54, v56, v53, v55, v57, 3, 0, 1, 4) :|: 0 = 0 f_215(v50, v51, v52, v54, v56, v53, v55, v57, 3, 0, 1, 4) -> f_217(v50, v51, v52, v54, v56, v53, v55, v57, 3, 0, 1, 4) :|: v51 != 0 f_217(v50, v51, v52, v54, v56, v53, v55, v57, 3, 0, 1, 4) -> f_219(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) :|: 0 = 0 f_219(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) -> f_221(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) :|: TRUE f_221(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) -> f_223(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) :|: 0 = 0 f_223(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) -> f_225(0, v51, v52, v54, v56, v53, v55, v57, 3, 1, 4) :|: v50 = 0 f_223(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) -> f_226(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) :|: v50 != 0 f_225(0, v51, v52, v54, v56, v53, v55, v57, 3, 1, 4) -> f_228(0, v51, v52, v54, v56, 1, v53, v55, v57, 3, 4) :|: 0 = 0 f_228(0, v51, v52, v54, v56, 1, v53, v55, v57, 3, 4) -> f_231(0, v51, v52, v54, v56, 1, v53, v55, v57, 3, 4) :|: TRUE f_231(0, v51, v52, v54, v56, 1, v53, v55, v57, 3, 4) -> f_234(0, v51, v52, v54, v56, 1, v53, v55, v57, 3, 4) :|: 0 = 0 f_234(0, v51, v52, v54, v56, 1, v53, v55, v57, 3, 4) -> f_237(0, v51, v52, v54, v56, 1, v53, v55, v57, 3, 4) :|: 0 = 0 f_237(0, v51, v52, v54, v56, 1, v53, v55, v57, 3, 4) -> f_240(0, v51, v52, v54, v56, 1, v72, v53, v55, v57, 3, 4) :|: 1 + v72 = v51 && 0 <= v72 f_240(0, v51, v52, v54, v56, 1, v72, v53, v55, v57, 3, 4) -> f_242(v51, v72, v52, v53, v54, v55, v56, v57, 0, 1, 3, 4) :|: 0 = 0 f_242(v51, v72, v52, v53, v54, v55, v56, v57, 0, 1, 3, 4) -> f_244(v51, v72, v52, v53, v54, v55, v56, v57, 0, 3, 1, 4) :|: TRUE f_244(v51, v72, v52, v53, v54, v55, v56, v57, 0, 3, 1, 4) -> f_209(v51, v72, 0) :|: TRUE f_209(v50, v51, 0) -> f_210(v50, v51, v52, v53, 3, 0, 1, 4) :|: 1 <= v52 && v53 = 3 + v52 && 4 <= v53 f_226(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) -> f_229(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) :|: 0 = 0 f_229(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) -> f_232(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) :|: TRUE f_232(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) -> f_235(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) :|: 0 = 0 f_235(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) -> f_238(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) :|: 0 = 0 f_238(v50, v51, v52, v54, v56, 0, v53, v55, v57, 3, 1, 4) -> f_241(v50, v51, v52, v54, v56, 0, v73, v53, v55, v57, 3, 1, 4) :|: 1 + v73 = v50 && 0 <= v73 f_241(v50, v51, v52, v54, v56, 0, v73, v53, v55, v57, 3, 1, 4) -> f_243(v51, v73, v52, v53, v54, v55, v56, v57, v50, 0, 3, 1, 4) :|: 0 = 0 f_243(v51, v73, v52, v53, v54, v55, v56, v57, v50, 0, 3, 1, 4) -> f_245(v51, v73, v52, v53, v54, v55, v56, v57, v50, 3, 1, 4, 0) :|: TRUE f_245(v51, v73, v52, v53, v54, v55, v56, v57, v50, 3, 1, 4, 0) -> f_209(v51, v73, 0) :|: TRUE Combined rules. Obtained 3 rulesP rules: f_210(0, 1 + v72:0, v52:0, v53:0, 3, 0, 1, 4) -> f_210(1 + v72:0, v72:0, v52:1, 3 + v52:1, 3, 0, 1, 4) :|: v56:0 > 0 && v54:0 > 0 && v72:0 > -1 && v52:1 > 0 f_210(1 + v73:0, v51:0, v52:0, v53:0, 3, 0, 1, 4) -> f_210(v51:0, v73:0, v52:1, 3 + v52:1, 3, 0, 1, 4) :|: v56:0 > 0 && v54:0 > 0 && v51:0 < 0 && v73:0 > -1 && v52:1 > 0 f_210(1 + v73:0, v51:0, v52:0, v53:0, 3, 0, 1, 4) -> f_210(v51:0, v73:0, v52:1, 3 + v52:1, 3, 0, 1, 4) :|: v56:0 > 0 && v54:0 > 0 && v51:0 > 0 && v73:0 > -1 && v52:1 > 0 Filtered unneeded arguments: f_210(x1, x2, x3, x4, x5, x6, x7, x8) -> f_210(x1, x2) Removed division, modulo operations, cleaned up constraints. Obtained 3 rules.P rules: f_210(cons_0, sum~cons_1~v72:0) -> f_210(1 + v72:0, v72:0) :|: v72:0 > -1 && cons_0 = 0 && sum~cons_1~v72:0 = 1 + v72:0 f_210(sum~cons_1~v73:0, v51:0) -> f_210(v51:0, v73:0) :|: v51:0 < 0 && v73:0 > -1 && sum~cons_1~v73:0 = 1 + v73:0 f_210(sum~cons_1~v73:0, v51:0) -> f_210(v51:0, v73:0) :|: v51:0 > 0 && v73:0 > -1 && sum~cons_1~v73:0 = 1 + v73:0 ---------------------------------------- (8) Obligation: Rules: f_210(cons_0, sum~cons_1~v72:0) -> f_210(1 + v72:0, v72:0) :|: v72:0 > -1 && cons_0 = 0 && sum~cons_1~v72:0 = 1 + v72:0 f_210(sum~cons_1~v73:0, v51:0) -> f_210(v51:0, v73:0) :|: v51:0 < 0 && v73:0 > -1 && sum~cons_1~v73:0 = 1 + v73:0 f_210(x, x1) -> f_210(x1, x2) :|: x1 > 0 && x2 > -1 && x = 1 + x2 ---------------------------------------- (9) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (10) Obligation: Rules: f_210(cons_0, sum~cons_1~v72:0:0) -> f_210(1 + v72:0:0, v72:0:0) :|: v72:0:0 > -1 && cons_0 = 0 && sum~cons_1~v72:0:0 = 1 + v72:0:0 f_210(sum~cons_1~x2:0, x1:0) -> f_210(x1:0, x2:0) :|: x1:0 > 0 && x2:0 > -1 && sum~cons_1~x2:0 = 1 + x2:0 f_210(sum~cons_1~v73:0:0, v51:0:0) -> f_210(v51:0:0, v73:0:0) :|: v51:0:0 < 0 && v73:0:0 > -1 && sum~cons_1~v73:0:0 = 1 + v73:0:0 ---------------------------------------- (11) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f_210(x, x1)] = -4 - 2*x - 3*x*x1 + 2*x^2 + x1 + 2*x1^2 The following rules are decreasing: f_210(cons_0, sum~cons_1~v72:0:0) -> f_210(1 + v72:0:0, v72:0:0) :|: v72:0:0 > -1 && cons_0 = 0 && sum~cons_1~v72:0:0 = 1 + v72:0:0 The following rules are bounded: f_210(sum~cons_1~v73:0:0, v51:0:0) -> f_210(v51:0:0, v73:0:0) :|: v51:0:0 < 0 && v73:0:0 > -1 && sum~cons_1~v73:0:0 = 1 + v73:0:0 ---------------------------------------- (12) Complex Obligation (AND) ---------------------------------------- (13) Obligation: Rules: f_210(sum~cons_1~x2:0, x1:0) -> f_210(x1:0, x2:0) :|: x1:0 > 0 && x2:0 > -1 && sum~cons_1~x2:0 = 1 + x2:0 f_210(sum~cons_1~v73:0:0, v51:0:0) -> f_210(v51:0:0, v73:0:0) :|: v51:0:0 < 0 && v73:0:0 > -1 && sum~cons_1~v73:0:0 = 1 + v73:0:0 ---------------------------------------- (14) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (15) Obligation: Rules: f_210(sum~cons_1~x2:0:0, x1:0:0) -> f_210(x1:0:0, x2:0:0) :|: x1:0:0 > 0 && x2:0:0 > -1 && sum~cons_1~x2:0:0 = 1 + x2:0:0 f_210(sum~cons_1~v73:0:0:0, v51:0:0:0) -> f_210(v51:0:0:0, v73:0:0:0) :|: v51:0:0:0 < 0 && v73:0:0:0 > -1 && sum~cons_1~v73:0:0:0 = 1 + v73:0:0:0 ---------------------------------------- (16) RankingReductionPairProof (EQUIVALENT) Interpretation: [ f_210 ] = 3*f_210_2 + 3*f_210_1 The following rules are decreasing: f_210(sum~cons_1~x2:0:0, x1:0:0) -> f_210(x1:0:0, x2:0:0) :|: x1:0:0 > 0 && x2:0:0 > -1 && sum~cons_1~x2:0:0 = 1 + x2:0:0 f_210(sum~cons_1~v73:0:0:0, v51:0:0:0) -> f_210(v51:0:0:0, v73:0:0:0) :|: v51:0:0:0 < 0 && v73:0:0:0 > -1 && sum~cons_1~v73:0:0:0 = 1 + v73:0:0:0 The following rules are bounded: f_210(sum~cons_1~x2:0:0, x1:0:0) -> f_210(x1:0:0, x2:0:0) :|: x1:0:0 > 0 && x2:0:0 > -1 && sum~cons_1~x2:0:0 = 1 + x2:0:0 ---------------------------------------- (17) Obligation: Rules: f_210(sum~cons_1~v73:0:0:0, v51:0:0:0) -> f_210(v51:0:0:0, v73:0:0:0) :|: v51:0:0:0 < 0 && v73:0:0:0 > -1 && sum~cons_1~v73:0:0:0 = 1 + v73:0:0:0 ---------------------------------------- (18) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (19) Obligation: Rules: f_210(sum~cons_1~v73:0:0:0:0, v51:0:0:0:0) -> f_210(v51:0:0:0:0, v73:0:0:0:0) :|: v51:0:0:0:0 < 0 && v73:0:0:0:0 > -1 && sum~cons_1~v73:0:0:0:0 = 1 + v73:0:0:0:0 ---------------------------------------- (20) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f_210(x, x1)] = -x1 The following rules are decreasing: f_210(sum~cons_1~v73:0:0:0:0, v51:0:0:0:0) -> f_210(v51:0:0:0:0, v73:0:0:0:0) :|: v51:0:0:0:0 < 0 && v73:0:0:0:0 > -1 && sum~cons_1~v73:0:0:0:0 = 1 + v73:0:0:0:0 The following rules are bounded: f_210(sum~cons_1~v73:0:0:0:0, v51:0:0:0:0) -> f_210(v51:0:0:0:0, v73:0:0:0:0) :|: v51:0:0:0:0 < 0 && v73:0:0:0:0 > -1 && sum~cons_1~v73:0:0:0:0 = 1 + v73:0:0:0:0 ---------------------------------------- (21) YES ---------------------------------------- (22) Obligation: Rules: f_210(cons_0, sum~cons_1~v72:0:0) -> f_210(1 + v72:0:0, v72:0:0) :|: v72:0:0 > -1 && cons_0 = 0 && sum~cons_1~v72:0:0 = 1 + v72:0:0 f_210(sum~cons_1~x2:0, x1:0) -> f_210(x1:0, x2:0) :|: x1:0 > 0 && x2:0 > -1 && sum~cons_1~x2:0 = 1 + x2:0 ---------------------------------------- (23) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (24) Obligation: Rules: f_210(cons_0, sum~cons_1~v72:0:0:0) -> f_210(1 + v72:0:0:0, v72:0:0:0) :|: v72:0:0:0 > -1 && cons_0 = 0 && sum~cons_1~v72:0:0:0 = 1 + v72:0:0:0 f_210(sum~cons_1~x2:0:0, x1:0:0) -> f_210(x1:0:0, x2:0:0) :|: x1:0:0 > 0 && x2:0:0 > -1 && sum~cons_1~x2:0:0 = 1 + x2:0:0 ---------------------------------------- (25) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f_210(x, x1)] = -2*x - x*x1 + x^2 + x1^2 The following rules are decreasing: f_210(cons_0, sum~cons_1~v72:0:0:0) -> f_210(1 + v72:0:0:0, v72:0:0:0) :|: v72:0:0:0 > -1 && cons_0 = 0 && sum~cons_1~v72:0:0:0 = 1 + v72:0:0:0 The following rules are bounded: f_210(cons_0, sum~cons_1~v72:0:0:0) -> f_210(1 + v72:0:0:0, v72:0:0:0) :|: v72:0:0:0 > -1 && cons_0 = 0 && sum~cons_1~v72:0:0:0 = 1 + v72:0:0:0 ---------------------------------------- (26) Obligation: Rules: f_210(sum~cons_1~x2:0:0, x1:0:0) -> f_210(x1:0:0, x2:0:0) :|: x1:0:0 > 0 && x2:0:0 > -1 && sum~cons_1~x2:0:0 = 1 + x2:0:0 ---------------------------------------- (27) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (28) Obligation: Rules: f_210(sum~cons_1~x2:0:0:0, x1:0:0:0) -> f_210(x1:0:0:0, x2:0:0:0) :|: x1:0:0:0 > 0 && x2:0:0:0 > -1 && sum~cons_1~x2:0:0:0 = 1 + x2:0:0:0 ---------------------------------------- (29) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f_210(x, x1)] = x + x1 The following rules are decreasing: f_210(sum~cons_1~x2:0:0:0, x1:0:0:0) -> f_210(x1:0:0:0, x2:0:0:0) :|: x1:0:0:0 > 0 && x2:0:0:0 > -1 && sum~cons_1~x2:0:0:0 = 1 + x2:0:0:0 The following rules are bounded: f_210(sum~cons_1~x2:0:0:0, x1:0:0:0) -> f_210(x1:0:0:0, x2:0:0:0) :|: x1:0:0:0 > 0 && x2:0:0:0 > -1 && sum~cons_1~x2:0:0:0 = 1 + x2:0:0:0 ---------------------------------------- (30) YES