/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, 2194 ms] (4) LLVM Symbolic Execution Graph (5) SymbolicExecutionGraphToSCCProof [SOUND, 0 ms] (6) LLVM Symbolic Execution SCC (7) SCC2IRS [SOUND, 70 ms] (8) IntTRS (9) IntTRSCompressionProof [EQUIVALENT, 0 ms] (10) IntTRS (11) RankingReductionPairProof [EQUIVALENT, 15 ms] (12) 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: false visibilityType: DEFAULT callingConvention: ccc *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 %length1 = alloca i32, align 4 %nondetString1 = alloca *i8, align 8 store 0, %1 %2 = call i32 @__VERIFIER_nondet_int() store %2, %length1 %3 = load %length1 %4 = icmp slt %3 1 br %4, %5, %6 5: store 1, %length1 br %6 6: %7 = load %length1 %8 = sext i32 %7 to i64 %9 = mul %8 1 %10 = alloca i8, numElementsLit: %9 store %10, %nondetString1 %11 = load %length1 %12 = sub %11 1 %13 = sext i32 %12 to i64 %14 = load %nondetString1 %15 = getelementptr %14, %13 store 0, %15 %16 = load %nondetString1 %17 = call i32 @cstrlen(*i8 %16) ret %17 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_286(v158, v159, v160, v164, v162, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) -> f_287(v158, v159, v160, v164, v180, v162, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) :|: TRUE f_287(v158, v159, v160, v164, v180, v162, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) -> f_288(v158, v159, v160, v164, v180, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) :|: 0 = 0 f_288(v158, v159, v160, v164, v180, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) -> f_289(v158, v159, v160, v164, v180, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) :|: v180 != 0 && v164 < v171 && 4 <= v171 f_289(v158, v159, v160, v164, v180, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) -> f_291(v158, v159, v160, v164, v180, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) :|: 0 = 0 f_291(v158, v159, v160, v164, v180, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) -> f_293(v158, v159, v160, v164, v180, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) :|: TRUE f_293(v158, v159, v160, v164, v180, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) -> f_295(v158, v159, v160, v164, v180, 1, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v161, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) :|: 0 = 0 f_295(v158, v159, v160, v164, v180, 1, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v161, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) -> f_297(v158, v159, v160, v164, v180, 1, v199, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v161, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) :|: v199 = 1 + v164 && 4 <= v199 f_297(v158, v159, v160, v164, v180, 1, v199, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v161, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) -> f_299(v158, v159, v160, v164, v180, 1, v199, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v161, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) :|: TRUE f_299(v158, v159, v160, v164, v180, 1, v199, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v161, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) -> f_301(v158, v159, v160, v164, v180, 1, v199, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v161, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) :|: TRUE f_301(v158, v159, v160, v164, v180, 1, v199, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, v161, v162, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) -> f_285(v158, v159, v160, v164, v180, 1, v199, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) :|: TRUE f_285(v158, v159, v160, v161, v162, 1, v164, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) -> f_286(v158, v159, v160, v164, v162, 1, v161, v165, v172, v166, v173, v167, v174, v171, v175, v176, v178, 0, v168, v177, v179, v170, 3, 7, 2, 4, 8) :|: 0 = 0 Combined rules. Obtained 2 rulesP rules: f_286(v158:0, v159:0, v160:0, v164:0, v162:0, 1, v161:0, v165:0, v172:0, v166:0, v173:0, v167:0, v174:0, v171:0, v175:0, v176:0, v178:0, 0, v168:0, v177:0, v179:0, v170:0, 3, 7, 2, 4, 8) -> f_286(v158:0, v159:0, v160:0, 1 + v164:0, v180:0, 1, v164:0, v165:0, v172:0, v166:0, v173:0, v167:0, v174:0, v171:0, v175:0, v176:0, v178:0, 0, v168:0, v177:0, v179:0, v170:0, 3, 7, 2, 4, 8) :|: v171:0 > v164:0 && v180:0 < 0 && v164:0 > 2 && v171:0 > 3 f_286(v158:0, v159:0, v160:0, v164:0, v162:0, 1, v161:0, v165:0, v172:0, v166:0, v173:0, v167:0, v174:0, v171:0, v175:0, v176:0, v178:0, 0, v168:0, v177:0, v179:0, v170:0, 3, 7, 2, 4, 8) -> f_286(v158:0, v159:0, v160:0, 1 + v164:0, v180:0, 1, v164:0, v165:0, v172:0, v166:0, v173:0, v167:0, v174:0, v171:0, v175:0, v176:0, v178:0, 0, v168:0, v177:0, v179:0, v170:0, 3, 7, 2, 4, 8) :|: v171:0 > v164:0 && v180:0 > 0 && v164:0 > 2 && v171:0 > 3 Filtered unneeded arguments: f_286(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27) -> f_286(x4, x14) Removed division, modulo operations, cleaned up constraints. Obtained 1 rules.P rules: f_286(v164:0, v171:0) -> f_286(1 + v164:0, v171:0) :|: v164:0 > 2 && v171:0 > 3 && v171:0 > v164:0 ---------------------------------------- (8) Obligation: Rules: f_286(v164:0, v171:0) -> f_286(1 + v164:0, v171:0) :|: v164:0 > 2 && v171:0 > 3 && v171:0 > v164:0 ---------------------------------------- (9) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (10) Obligation: Rules: f_286(v164:0:0, v171:0:0) -> f_286(1 + v164:0:0, v171:0:0) :|: v164:0:0 > 2 && v171:0:0 > 3 && v171:0:0 > v164:0:0 ---------------------------------------- (11) RankingReductionPairProof (EQUIVALENT) Interpretation: [ f_286 ] = -1*f_286_1 + f_286_2 The following rules are decreasing: f_286(v164:0:0, v171:0:0) -> f_286(1 + v164:0:0, v171:0:0) :|: v164:0:0 > 2 && v171:0:0 > 3 && v171:0:0 > v164:0:0 The following rules are bounded: f_286(v164:0:0, v171:0:0) -> f_286(1 + v164:0:0, v171:0:0) :|: v164:0:0 > 2 && v171:0:0 > 3 && v171:0:0 > v164:0:0 ---------------------------------------- (12) YES