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