/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: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty Termination of the given C Problem could be proven: (0) C Problem (1) CToLLVMProof [EQUIVALENT, 176 ms] (2) LLVM problem (3) LLVMToTerminationGraphProof [EQUIVALENT, 586 ms] (4) LLVM Symbolic Execution Graph (5) SymbolicExecutionGraphToSCCProof [SOUND, 0 ms] (6) LLVM Symbolic Execution SCC (7) SCC2IRS [SOUND, 30 ms] (8) IntTRS (9) IntTRSCompressionProof [EQUIVALENT, 0 ms] (10) IntTRS (11) PolynomialOrderProcessor [EQUIVALENT, 0 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: "malloc" returnParam: *i8 parameters: (i64) variableLength: false visibilityType: DEFAULT callingConvention: ccc *BasicFunctionTypename: "__VERIFIER_nondet_String" linkageType: EXTERNALLY_VISIBLE returnParam: *i8 parameters: () variableLength: false visibilityType: DEFAULT callingConvention: ccc 0: %length = alloca i32, align 4 %nondetString = alloca *i8, align 8 %1 = call i32 @__VERIFIER_nondet_int() store %1, %length %2 = load %length %3 = icmp slt %2 1 br %3, %4, %5 4: store 1, %length br %5 5: %6 = load %length %7 = sext i32 %6 to i64 %8 = mul %7 1 %9 = call *i8 @malloc(i64 %8) store %9, %nondetString %10 = load %length %11 = sub %10 1 %12 = sext i32 %11 to i64 %13 = load %nondetString %14 = getelementptr %13, %12 store 0, %14 %15 = load %nondetString ret %15 *BasicFunctionTypename: "cstrlen" linkageType: EXTERNALLY_VISIBLE returnParam: i32 parameters: (s *i8) variableLength: false visibilityType: DEFAULT callingConvention: ccc 0: %1 = alloca *i8, align 8 %p = alloca *i8, align 8 store %s, %1 %2 = load %1 store %2, %p br %3 3: %4 = load %p %5 = load %4 %6 = sext i8 %5 to i32 %7 = icmp ne %6 0 br %7, %8, %11 8: %9 = load %p %10 = getelementptr %9, 1 store %10, %p br %3 11: %12 = load %p %13 = load %1 %14 = ptrtoint *i8 %12 to i64 %15 = ptrtoint *i8 %13 to i64 %16 = sub %14 %15 %17 = trunc i64 %16 to i32 ret %17 *BasicFunctionTypename: "main" linkageType: EXTERNALLY_VISIBLE returnParam: i32 parameters: () variableLength: false visibilityType: DEFAULT callingConvention: ccc 0: %1 = alloca i32, align 4 store 0, %1 %2 = call *i8 @__VERIFIER_nondet_String() %3 = call i32 @cstrlen(*i8 %2) ret %3 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 11 rulesP rules: f_218(v38, v39, v40, v44, v42, 1, v41, v45, v46, v47, v48, v49, v50, 0, 3, 7, 2, 4, 8) -> f_219(v38, v39, v40, v44, v52, v42, 1, v41, v45, v46, v47, v48, v49, v50, 0, 3, 7, 2, 4, 8) :|: TRUE f_219(v38, v39, v40, v44, v52, v42, 1, v41, v45, v46, v47, v48, v49, v50, 0, 3, 7, 2, 4, 8) -> f_220(v38, v39, v40, v44, v52, 1, v41, v45, v46, v47, v48, v49, v50, v42, 0, 3, 7, 2, 4, 8) :|: 0 = 0 f_220(v38, v39, v40, v44, v52, 1, v41, v45, v46, v47, v48, v49, v50, v42, 0, 3, 7, 2, 4, 8) -> f_221(v38, v39, v40, v44, v52, 1, v41, v45, v46, v47, v48, v49, v50, v42, 0, 3, 7, 2, 4, 8) :|: v52 != 0 && v44 < v47 && 3 <= v47 f_221(v38, v39, v40, v44, v52, 1, v41, v45, v46, v47, v48, v49, v50, v42, 0, 3, 7, 2, 4, 8) -> f_223(v38, v39, v40, v44, v52, 1, v41, v45, v46, v47, v48, v49, v50, v42, 0, 3, 7, 2, 4, 8) :|: 0 = 0 f_223(v38, v39, v40, v44, v52, 1, v41, v45, v46, v47, v48, v49, v50, v42, 0, 3, 7, 2, 4, 8) -> f_225(v38, v39, v40, v44, v52, 1, v41, v45, v46, v47, v48, v49, v50, v42, 0, 3, 7, 2, 4, 8) :|: TRUE f_225(v38, v39, v40, v44, v52, 1, v41, v45, v46, v47, v48, v49, v50, v42, 0, 3, 7, 2, 4, 8) -> f_227(v38, v39, v40, v44, v52, 1, v45, v46, v47, v48, v49, v50, v41, v42, 0, 3, 7, 2, 4, 8) :|: 0 = 0 f_227(v38, v39, v40, v44, v52, 1, v45, v46, v47, v48, v49, v50, v41, v42, 0, 3, 7, 2, 4, 8) -> f_229(v38, v39, v40, v44, v52, 1, v54, v45, v46, v47, v48, v49, v50, v41, v42, 0, 3, 7, 2, 4, 8) :|: v54 = 1 + v44 && 3 <= v54 f_229(v38, v39, v40, v44, v52, 1, v54, v45, v46, v47, v48, v49, v50, v41, v42, 0, 3, 7, 2, 4, 8) -> f_231(v38, v39, v40, v44, v52, 1, v54, v45, v46, v47, v48, v49, v50, v41, v42, 0, 3, 7, 2, 4, 8) :|: TRUE f_231(v38, v39, v40, v44, v52, 1, v54, v45, v46, v47, v48, v49, v50, v41, v42, 0, 3, 7, 2, 4, 8) -> f_233(v38, v39, v40, v44, v52, 1, v54, v45, v46, v47, v48, v49, v50, v41, v42, 0, 3, 7, 2, 4, 8) :|: TRUE f_233(v38, v39, v40, v44, v52, 1, v54, v45, v46, v47, v48, v49, v50, v41, v42, 0, 3, 7, 2, 4, 8) -> f_217(v38, v39, v40, v44, v52, 1, v54, v45, v46, v47, v48, v49, v50, 0, 3, 7, 2, 4, 8) :|: TRUE f_217(v38, v39, v40, v41, v42, 1, v44, v45, v46, v47, v48, v49, v50, 0, 3, 7, 2, 4, 8) -> f_218(v38, v39, v40, v44, v42, 1, v41, v45, v46, v47, v48, v49, v50, 0, 3, 7, 2, 4, 8) :|: 0 = 0 Combined rules. Obtained 2 rulesP rules: f_218(v38:0, v39:0, v40:0, v44:0, v42:0, 1, v41:0, v45:0, v46:0, v47:0, v48:0, v49:0, v50:0, 0, 3, 7, 2, 4, 8) -> f_218(v38:0, v39:0, v40:0, 1 + v44:0, v52:0, 1, v44:0, v45:0, v46:0, v47:0, v48:0, v49:0, v50:0, 0, 3, 7, 2, 4, 8) :|: v47:0 > v44:0 && v52:0 < 0 && v44:0 > 1 && v47:0 > 2 f_218(v38:0, v39:0, v40:0, v44:0, v42:0, 1, v41:0, v45:0, v46:0, v47:0, v48:0, v49:0, v50:0, 0, 3, 7, 2, 4, 8) -> f_218(v38:0, v39:0, v40:0, 1 + v44:0, v52:0, 1, v44:0, v45:0, v46:0, v47:0, v48:0, v49:0, v50:0, 0, 3, 7, 2, 4, 8) :|: v47:0 > v44:0 && v52:0 > 0 && v44:0 > 1 && v47:0 > 2 Filtered unneeded arguments: f_218(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) -> f_218(x4, x10) Removed division, modulo operations, cleaned up constraints. Obtained 1 rules.P rules: f_218(v44:0, v47:0) -> f_218(1 + v44:0, v47:0) :|: v44:0 > 1 && v47:0 > 2 && v47:0 > v44:0 ---------------------------------------- (8) Obligation: Rules: f_218(v44:0, v47:0) -> f_218(1 + v44:0, v47:0) :|: v44:0 > 1 && v47:0 > 2 && v47:0 > v44:0 ---------------------------------------- (9) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (10) Obligation: Rules: f_218(v44:0:0, v47:0:0) -> f_218(1 + v44:0:0, v47:0:0) :|: v44:0:0 > 1 && v47:0:0 > 2 && v47:0:0 > v44:0:0 ---------------------------------------- (11) PolynomialOrderProcessor (EQUIVALENT) Found the following polynomial interpretation: [f_218(x, x1)] = -1 - x + x1 The following rules are decreasing: f_218(v44:0:0, v47:0:0) -> f_218(1 + v44:0:0, v47:0:0) :|: v44:0:0 > 1 && v47:0:0 > 2 && v47:0:0 > v44:0:0 The following rules are bounded: f_218(v44:0:0, v47:0:0) -> f_218(1 + v44:0:0, v47:0:0) :|: v44:0:0 > 1 && v47:0:0 > 2 && v47:0:0 > v44:0:0 ---------------------------------------- (12) YES