/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, 180 ms] (2) LLVM problem (3) LLVMToTerminationGraphProof [EQUIVALENT, 2199 ms] (4) LLVM Symbolic Execution Graph (5) SymbolicExecutionGraphToSCCProof [SOUND, 0 ms] (6) LLVM Symbolic Execution SCC (7) SCC2IRS [SOUND, 59 ms] (8) IntTRS (9) IntTRSCompressionProof [EQUIVALENT, 0 ms] (10) IntTRS (11) RankingReductionPairProof [EQUIVALENT, 23 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: i64 parameters: (str *i8) variableLength: false visibilityType: DEFAULT callingConvention: ccc 0: %1 = alloca *i8, align 8 %s = alloca *i8, align 8 store %str, %1 %2 = load %1 store %2, %s br %3 3: %4 = load %s %5 = load %4 %6 = icmp ne %5 0 br %6, %7, %11 7: br %8 8: %9 = load %s %10 = getelementptr %9, 1 store %10, %s br %3 11: %12 = load %s %13 = load %1 %14 = ptrtoint *i8 %12 to i64 %15 = ptrtoint *i8 %13 to i64 %16 = sub %14 %15 ret %16 *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 i64 @cstrlen(*i8 %16) %18 = trunc i64 %17 to i32 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 11 rulesP rules: f_287(v172, v173, v174, v178, v176, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) -> f_288(v172, v173, v174, v178, v194, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) :|: TRUE f_288(v172, v173, v174, v178, v194, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) -> f_289(v172, v173, v174, v178, v194, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) :|: v194 != 0 && v178 < v185 && 4 <= v185 f_289(v172, v173, v174, v178, v194, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) -> f_291(v172, v173, v174, v178, v194, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) :|: 0 = 0 f_291(v172, v173, v174, v178, v194, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) -> f_293(v172, v173, v174, v178, v194, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) :|: TRUE f_293(v172, v173, v174, v178, v194, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) -> f_295(v172, v173, v174, v178, v194, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) :|: TRUE f_295(v172, v173, v174, v178, v194, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) -> f_297(v172, v173, v174, v178, v194, 1, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v175, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) :|: 0 = 0 f_297(v172, v173, v174, v178, v194, 1, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v175, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) -> f_299(v172, v173, v174, v178, v194, 1, v220, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v175, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) :|: v220 = 1 + v178 && 4 <= v220 f_299(v172, v173, v174, v178, v194, 1, v220, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v175, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) -> f_301(v172, v173, v174, v178, v194, 1, v220, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v175, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) :|: TRUE f_301(v172, v173, v174, v178, v194, 1, v220, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v175, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) -> f_303(v172, v173, v174, v178, v194, 1, v220, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v175, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) :|: TRUE f_303(v172, v173, v174, v178, v194, 1, v220, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, v175, v176, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) -> f_286(v172, v173, v174, v178, v194, 1, v220, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) :|: TRUE f_286(v172, v173, v174, v175, v176, 1, v178, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) -> f_287(v172, v173, v174, v178, v176, 1, v175, v179, v186, v180, v187, v181, v188, v185, v189, v190, v192, 0, v182, v191, v193, v184, 3, 7, 2, 4, 8) :|: 0 = 0 Combined rules. Obtained 2 rulesP rules: f_287(v172:0, v173:0, v174:0, v178:0, v176:0, 1, v175:0, v179:0, v186:0, v180:0, v187:0, v181:0, v188:0, v185:0, v189:0, v190:0, v192:0, 0, v182:0, v191:0, v193:0, v184:0, 3, 7, 2, 4, 8) -> f_287(v172:0, v173:0, v174:0, 1 + v178:0, v194:0, 1, v178:0, v179:0, v186:0, v180:0, v187:0, v181:0, v188:0, v185:0, v189:0, v190:0, v192:0, 0, v182:0, v191:0, v193:0, v184:0, 3, 7, 2, 4, 8) :|: v185:0 > v178:0 && v194:0 < 0 && v178:0 > 2 && v185:0 > 3 f_287(v172:0, v173:0, v174:0, v178:0, v176:0, 1, v175:0, v179:0, v186:0, v180:0, v187:0, v181:0, v188:0, v185:0, v189:0, v190:0, v192:0, 0, v182:0, v191:0, v193:0, v184:0, 3, 7, 2, 4, 8) -> f_287(v172:0, v173:0, v174:0, 1 + v178:0, v194:0, 1, v178:0, v179:0, v186:0, v180:0, v187:0, v181:0, v188:0, v185:0, v189:0, v190:0, v192:0, 0, v182:0, v191:0, v193:0, v184:0, 3, 7, 2, 4, 8) :|: v185:0 > v178:0 && v194:0 > 0 && v178:0 > 2 && v185:0 > 3 Filtered unneeded arguments: f_287(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_287(x4, x14) Removed division, modulo operations, cleaned up constraints. Obtained 1 rules.P rules: f_287(v178:0, v185:0) -> f_287(1 + v178:0, v185:0) :|: v178:0 > 2 && v185:0 > 3 && v185:0 > v178:0 ---------------------------------------- (8) Obligation: Rules: f_287(v178:0, v185:0) -> f_287(1 + v178:0, v185:0) :|: v178:0 > 2 && v185:0 > 3 && v185:0 > v178:0 ---------------------------------------- (9) IntTRSCompressionProof (EQUIVALENT) Compressed rules. ---------------------------------------- (10) Obligation: Rules: f_287(v178:0:0, v185:0:0) -> f_287(1 + v178:0:0, v185:0:0) :|: v178:0:0 > 2 && v185:0:0 > 3 && v185:0:0 > v178:0:0 ---------------------------------------- (11) RankingReductionPairProof (EQUIVALENT) Interpretation: [ f_287 ] = -1*f_287_1 + f_287_2 The following rules are decreasing: f_287(v178:0:0, v185:0:0) -> f_287(1 + v178:0:0, v185:0:0) :|: v178:0:0 > 2 && v185:0:0 > 3 && v185:0:0 > v178:0:0 The following rules are bounded: f_287(v178:0:0, v185:0:0) -> f_287(1 + v178:0:0, v185:0:0) :|: v178:0:0 > 2 && v185:0:0 > 3 && v185:0:0 > v178:0:0 ---------------------------------------- (12) YES