15.79/5.02 WORST_CASE(Omega(n^1), O(n^1)) 16.19/5.04 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 16.19/5.04 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 16.19/5.04 16.19/5.04 16.19/5.04 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 16.19/5.04 16.19/5.04 (0) CpxTRS 16.19/5.04 (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] 16.19/5.04 (2) CpxTRS 16.19/5.04 (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] 16.19/5.04 (4) CpxWeightedTrs 16.19/5.04 (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] 16.19/5.04 (6) CpxTypedWeightedTrs 16.19/5.04 (7) CompletionProof [UPPER BOUND(ID), 0 ms] 16.19/5.04 (8) CpxTypedWeightedCompleteTrs 16.19/5.04 (9) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] 16.19/5.04 (10) CpxTypedWeightedCompleteTrs 16.19/5.04 (11) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] 16.19/5.04 (12) CpxRNTS 16.19/5.04 (13) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] 16.19/5.04 (14) CpxRNTS 16.19/5.04 (15) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] 16.19/5.04 (16) CpxRNTS 16.19/5.04 (17) ResultPropagationProof [UPPER BOUND(ID), 0 ms] 16.19/5.04 (18) CpxRNTS 16.19/5.04 (19) IntTrsBoundProof [UPPER BOUND(ID), 595 ms] 16.19/5.04 (20) CpxRNTS 16.19/5.04 (21) IntTrsBoundProof [UPPER BOUND(ID), 250 ms] 16.19/5.04 (22) CpxRNTS 16.19/5.04 (23) FinalProof [FINISHED, 0 ms] 16.19/5.04 (24) BOUNDS(1, n^1) 16.19/5.04 (25) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 16.19/5.04 (26) TRS for Loop Detection 16.19/5.04 (27) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 16.19/5.04 (28) BEST 16.19/5.04 (29) proven lower bound 16.19/5.04 (30) LowerBoundPropagationProof [FINISHED, 0 ms] 16.19/5.04 (31) BOUNDS(n^1, INF) 16.19/5.04 (32) TRS for Loop Detection 16.19/5.04 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (0) 16.19/5.04 Obligation: 16.19/5.04 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 16.19/5.04 16.19/5.04 16.19/5.04 The TRS R consists of the following rules: 16.19/5.04 16.19/5.04 average(s(x), y) -> average(x, s(y)) 16.19/5.04 average(x, s(s(s(y)))) -> s(average(s(x), y)) 16.19/5.04 average(0, 0) -> 0 16.19/5.04 average(0, s(0)) -> 0 16.19/5.04 average(0, s(s(0))) -> s(0) 16.19/5.04 16.19/5.04 S is empty. 16.19/5.04 Rewrite Strategy: FULL 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) 16.19/5.04 Converted rc-obligation to irc-obligation. 16.19/5.04 16.19/5.04 As the TRS does not nest defined symbols, we have rc = irc. 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (2) 16.19/5.04 Obligation: 16.19/5.04 The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). 16.19/5.04 16.19/5.04 16.19/5.04 The TRS R consists of the following rules: 16.19/5.04 16.19/5.04 average(s(x), y) -> average(x, s(y)) 16.19/5.04 average(x, s(s(s(y)))) -> s(average(s(x), y)) 16.19/5.04 average(0, 0) -> 0 16.19/5.04 average(0, s(0)) -> 0 16.19/5.04 average(0, s(s(0))) -> s(0) 16.19/5.04 16.19/5.04 S is empty. 16.19/5.04 Rewrite Strategy: INNERMOST 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) 16.19/5.04 Transformed relative TRS to weighted TRS 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (4) 16.19/5.04 Obligation: 16.19/5.04 The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). 16.19/5.04 16.19/5.04 16.19/5.04 The TRS R consists of the following rules: 16.19/5.04 16.19/5.04 average(s(x), y) -> average(x, s(y)) [1] 16.19/5.04 average(x, s(s(s(y)))) -> s(average(s(x), y)) [1] 16.19/5.04 average(0, 0) -> 0 [1] 16.19/5.04 average(0, s(0)) -> 0 [1] 16.19/5.04 average(0, s(s(0))) -> s(0) [1] 16.19/5.04 16.19/5.04 Rewrite Strategy: INNERMOST 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) 16.19/5.04 Infered types. 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (6) 16.19/5.04 Obligation: 16.19/5.04 Runtime Complexity Weighted TRS with Types. 16.19/5.04 The TRS R consists of the following rules: 16.19/5.04 16.19/5.04 average(s(x), y) -> average(x, s(y)) [1] 16.19/5.04 average(x, s(s(s(y)))) -> s(average(s(x), y)) [1] 16.19/5.04 average(0, 0) -> 0 [1] 16.19/5.04 average(0, s(0)) -> 0 [1] 16.19/5.04 average(0, s(s(0))) -> s(0) [1] 16.19/5.04 16.19/5.04 The TRS has the following type information: 16.19/5.04 average :: s:0 -> s:0 -> s:0 16.19/5.04 s :: s:0 -> s:0 16.19/5.04 0 :: s:0 16.19/5.04 16.19/5.04 Rewrite Strategy: INNERMOST 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (7) CompletionProof (UPPER BOUND(ID)) 16.19/5.04 The transformation into a RNTS is sound, since: 16.19/5.04 16.19/5.04 (a) The obligation is a constructor system where every type has a constant constructor, 16.19/5.04 16.19/5.04 (b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols: 16.19/5.04 16.19/5.04 average_2 16.19/5.04 16.19/5.04 (c) The following functions are completely defined: 16.19/5.04 none 16.19/5.04 16.19/5.04 Due to the following rules being added: 16.19/5.04 none 16.19/5.04 16.19/5.04 And the following fresh constants: none 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (8) 16.19/5.04 Obligation: 16.19/5.04 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 16.19/5.04 16.19/5.04 Runtime Complexity Weighted TRS with Types. 16.19/5.04 The TRS R consists of the following rules: 16.19/5.04 16.19/5.04 average(s(x), y) -> average(x, s(y)) [1] 16.19/5.04 average(x, s(s(s(y)))) -> s(average(s(x), y)) [1] 16.19/5.04 average(0, 0) -> 0 [1] 16.19/5.04 average(0, s(0)) -> 0 [1] 16.19/5.04 average(0, s(s(0))) -> s(0) [1] 16.19/5.04 16.19/5.04 The TRS has the following type information: 16.19/5.04 average :: s:0 -> s:0 -> s:0 16.19/5.04 s :: s:0 -> s:0 16.19/5.04 0 :: s:0 16.19/5.04 16.19/5.04 Rewrite Strategy: INNERMOST 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (9) NarrowingProof (BOTH BOUNDS(ID, ID)) 16.19/5.04 Narrowed the inner basic terms of all right-hand sides by a single narrowing step. 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (10) 16.19/5.04 Obligation: 16.19/5.04 Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: 16.19/5.04 16.19/5.04 Runtime Complexity Weighted TRS with Types. 16.19/5.04 The TRS R consists of the following rules: 16.19/5.04 16.19/5.04 average(s(x), y) -> average(x, s(y)) [1] 16.19/5.04 average(x, s(s(s(y)))) -> s(average(s(x), y)) [1] 16.19/5.04 average(0, 0) -> 0 [1] 16.19/5.04 average(0, s(0)) -> 0 [1] 16.19/5.04 average(0, s(s(0))) -> s(0) [1] 16.19/5.04 16.19/5.04 The TRS has the following type information: 16.19/5.04 average :: s:0 -> s:0 -> s:0 16.19/5.04 s :: s:0 -> s:0 16.19/5.04 0 :: s:0 16.19/5.04 16.19/5.04 Rewrite Strategy: INNERMOST 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) 16.19/5.04 Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. 16.19/5.04 The constant constructors are abstracted as follows: 16.19/5.04 16.19/5.04 0 => 0 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (12) 16.19/5.04 Obligation: 16.19/5.04 Complexity RNTS consisting of the following rules: 16.19/5.04 16.19/5.04 average(z, z') -{ 1 }-> average(x, 1 + y) :|: x >= 0, y >= 0, z = 1 + x, z' = y 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z = 0, z' = 0 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z' = 1 + 0, z = 0 16.19/5.04 average(z, z') -{ 1 }-> 1 + average(1 + x, y) :|: x >= 0, y >= 0, z' = 1 + (1 + (1 + y)), z = x 16.19/5.04 average(z, z') -{ 1 }-> 1 + 0 :|: z' = 1 + (1 + 0), z = 0 16.19/5.04 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (13) SimplificationProof (BOTH BOUNDS(ID, ID)) 16.19/5.04 Simplified the RNTS by moving equalities from the constraints into the right-hand sides. 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (14) 16.19/5.04 Obligation: 16.19/5.04 Complexity RNTS consisting of the following rules: 16.19/5.04 16.19/5.04 average(z, z') -{ 1 }-> average(z - 1, 1 + z') :|: z - 1 >= 0, z' >= 0 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z = 0, z' = 0 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z' = 1 + 0, z = 0 16.19/5.04 average(z, z') -{ 1 }-> 1 + average(1 + z, z' - 3) :|: z >= 0, z' - 3 >= 0 16.19/5.04 average(z, z') -{ 1 }-> 1 + 0 :|: z' = 1 + (1 + 0), z = 0 16.19/5.04 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) 16.19/5.04 Found the following analysis order by SCC decomposition: 16.19/5.04 16.19/5.04 { average } 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (16) 16.19/5.04 Obligation: 16.19/5.04 Complexity RNTS consisting of the following rules: 16.19/5.04 16.19/5.04 average(z, z') -{ 1 }-> average(z - 1, 1 + z') :|: z - 1 >= 0, z' >= 0 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z = 0, z' = 0 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z' = 1 + 0, z = 0 16.19/5.04 average(z, z') -{ 1 }-> 1 + average(1 + z, z' - 3) :|: z >= 0, z' - 3 >= 0 16.19/5.04 average(z, z') -{ 1 }-> 1 + 0 :|: z' = 1 + (1 + 0), z = 0 16.19/5.04 16.19/5.04 Function symbols to be analyzed: {average} 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (17) ResultPropagationProof (UPPER BOUND(ID)) 16.19/5.04 Applied inner abstraction using the recently inferred runtime/size bounds where possible. 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (18) 16.19/5.04 Obligation: 16.19/5.04 Complexity RNTS consisting of the following rules: 16.19/5.04 16.19/5.04 average(z, z') -{ 1 }-> average(z - 1, 1 + z') :|: z - 1 >= 0, z' >= 0 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z = 0, z' = 0 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z' = 1 + 0, z = 0 16.19/5.04 average(z, z') -{ 1 }-> 1 + average(1 + z, z' - 3) :|: z >= 0, z' - 3 >= 0 16.19/5.04 average(z, z') -{ 1 }-> 1 + 0 :|: z' = 1 + (1 + 0), z = 0 16.19/5.04 16.19/5.04 Function symbols to be analyzed: {average} 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (19) IntTrsBoundProof (UPPER BOUND(ID)) 16.19/5.04 16.19/5.04 Computed SIZE bound using KoAT for: average 16.19/5.04 after applying outer abstraction to obtain an ITS, 16.19/5.04 resulting in: O(n^1) with polynomial bound: z + z' 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (20) 16.19/5.04 Obligation: 16.19/5.04 Complexity RNTS consisting of the following rules: 16.19/5.04 16.19/5.04 average(z, z') -{ 1 }-> average(z - 1, 1 + z') :|: z - 1 >= 0, z' >= 0 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z = 0, z' = 0 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z' = 1 + 0, z = 0 16.19/5.04 average(z, z') -{ 1 }-> 1 + average(1 + z, z' - 3) :|: z >= 0, z' - 3 >= 0 16.19/5.04 average(z, z') -{ 1 }-> 1 + 0 :|: z' = 1 + (1 + 0), z = 0 16.19/5.04 16.19/5.04 Function symbols to be analyzed: {average} 16.19/5.04 Previous analysis results are: 16.19/5.04 average: runtime: ?, size: O(n^1) [z + z'] 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (21) IntTrsBoundProof (UPPER BOUND(ID)) 16.19/5.04 16.19/5.04 Computed RUNTIME bound using CoFloCo for: average 16.19/5.04 after applying outer abstraction to obtain an ITS, 16.19/5.04 resulting in: O(n^1) with polynomial bound: 3 + 2*z + z' 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (22) 16.19/5.04 Obligation: 16.19/5.04 Complexity RNTS consisting of the following rules: 16.19/5.04 16.19/5.04 average(z, z') -{ 1 }-> average(z - 1, 1 + z') :|: z - 1 >= 0, z' >= 0 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z = 0, z' = 0 16.19/5.04 average(z, z') -{ 1 }-> 0 :|: z' = 1 + 0, z = 0 16.19/5.04 average(z, z') -{ 1 }-> 1 + average(1 + z, z' - 3) :|: z >= 0, z' - 3 >= 0 16.19/5.04 average(z, z') -{ 1 }-> 1 + 0 :|: z' = 1 + (1 + 0), z = 0 16.19/5.04 16.19/5.04 Function symbols to be analyzed: 16.19/5.04 Previous analysis results are: 16.19/5.04 average: runtime: O(n^1) [3 + 2*z + z'], size: O(n^1) [z + z'] 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (23) FinalProof (FINISHED) 16.19/5.04 Computed overall runtime complexity 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (24) 16.19/5.04 BOUNDS(1, n^1) 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (25) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 16.19/5.04 Transformed a relative TRS into a decreasing-loop problem. 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (26) 16.19/5.04 Obligation: 16.19/5.04 Analyzing the following TRS for decreasing loops: 16.19/5.04 16.19/5.04 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 16.19/5.04 16.19/5.04 16.19/5.04 The TRS R consists of the following rules: 16.19/5.04 16.19/5.04 average(s(x), y) -> average(x, s(y)) 16.19/5.04 average(x, s(s(s(y)))) -> s(average(s(x), y)) 16.19/5.04 average(0, 0) -> 0 16.19/5.04 average(0, s(0)) -> 0 16.19/5.04 average(0, s(s(0))) -> s(0) 16.19/5.04 16.19/5.04 S is empty. 16.19/5.04 Rewrite Strategy: FULL 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (27) DecreasingLoopProof (LOWER BOUND(ID)) 16.19/5.04 The following loop(s) give(s) rise to the lower bound Omega(n^1): 16.19/5.04 16.19/5.04 The rewrite sequence 16.19/5.04 16.19/5.04 average(s(x), y) ->^+ average(x, s(y)) 16.19/5.04 16.19/5.04 gives rise to a decreasing loop by considering the right hand sides subterm at position []. 16.19/5.04 16.19/5.04 The pumping substitution is [x / s(x)]. 16.19/5.04 16.19/5.04 The result substitution is [y / s(y)]. 16.19/5.04 16.19/5.04 16.19/5.04 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (28) 16.19/5.04 Complex Obligation (BEST) 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (29) 16.19/5.04 Obligation: 16.19/5.04 Proved the lower bound n^1 for the following obligation: 16.19/5.04 16.19/5.04 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 16.19/5.04 16.19/5.04 16.19/5.04 The TRS R consists of the following rules: 16.19/5.04 16.19/5.04 average(s(x), y) -> average(x, s(y)) 16.19/5.04 average(x, s(s(s(y)))) -> s(average(s(x), y)) 16.19/5.04 average(0, 0) -> 0 16.19/5.04 average(0, s(0)) -> 0 16.19/5.04 average(0, s(s(0))) -> s(0) 16.19/5.04 16.19/5.04 S is empty. 16.19/5.04 Rewrite Strategy: FULL 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (30) LowerBoundPropagationProof (FINISHED) 16.19/5.04 Propagated lower bound. 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (31) 16.19/5.04 BOUNDS(n^1, INF) 16.19/5.04 16.19/5.04 ---------------------------------------- 16.19/5.04 16.19/5.04 (32) 16.19/5.04 Obligation: 16.19/5.04 Analyzing the following TRS for decreasing loops: 16.19/5.04 16.19/5.04 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 16.19/5.04 16.19/5.04 16.19/5.04 The TRS R consists of the following rules: 16.19/5.04 16.19/5.04 average(s(x), y) -> average(x, s(y)) 16.19/5.04 average(x, s(s(s(y)))) -> s(average(s(x), y)) 16.19/5.04 average(0, 0) -> 0 16.19/5.04 average(0, s(0)) -> 0 16.19/5.04 average(0, s(s(0))) -> s(0) 16.19/5.04 16.19/5.04 S is empty. 16.19/5.04 Rewrite Strategy: FULL 16.19/5.08 EOF