/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^2)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 4 ms] (6) CpxTypedWeightedCompleteTrs (7) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedCompleteTrs (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (10) CpxRNTS (11) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxRNTS (13) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxRNTS (15) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (16) CpxRNTS (17) IntTrsBoundProof [UPPER BOUND(ID), 291 ms] (18) CpxRNTS (19) IntTrsBoundProof [UPPER BOUND(ID), 148 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 259 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 83 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 162 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 64 ms] (32) CpxRNTS (33) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 1326 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 576 ms] (38) CpxRNTS (39) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 136 ms] (42) CpxRNTS (43) IntTrsBoundProof [UPPER BOUND(ID), 1 ms] (44) CpxRNTS (45) FinalProof [FINISHED, 0 ms] (46) BOUNDS(1, n^2) (47) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (48) CpxTRS (49) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (50) typed CpxTrs (51) OrderProof [LOWER BOUND(ID), 0 ms] (52) typed CpxTrs (53) RewriteLemmaProof [LOWER BOUND(ID), 251 ms] (54) BEST (55) proven lower bound (56) LowerBoundPropagationProof [FINISHED, 0 ms] (57) BOUNDS(n^1, INF) (58) typed CpxTrs (59) RewriteLemmaProof [LOWER BOUND(ID), 60 ms] (60) typed CpxTrs (61) RewriteLemmaProof [LOWER BOUND(ID), 43 ms] (62) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: half(0) -> 0 half(s(0)) -> 0 half(s(s(x))) -> s(half(x)) le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) inc(0) -> 0 inc(s(x)) -> s(inc(x)) log(x) -> log2(x, 0) log2(x, y) -> if(le(x, s(0)), x, inc(y)) if(true, x, s(y)) -> y if(false, x, y) -> log2(half(x), y) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] inc(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] log(x) -> log2(x, 0) [1] log2(x, y) -> if(le(x, s(0)), x, inc(y)) [1] if(true, x, s(y)) -> y [1] if(false, x, y) -> log2(half(x), y) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] inc(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] log(x) -> log2(x, 0) [1] log2(x, y) -> if(le(x, s(0)), x, inc(y)) [1] if(true, x, s(y)) -> y [1] if(false, x, y) -> log2(half(x), y) [1] The TRS has the following type information: half :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s le :: 0:s -> 0:s -> true:false true :: true:false false :: true:false inc :: 0:s -> 0:s log :: 0:s -> 0:s log2 :: 0:s -> 0:s -> 0:s if :: true:false -> 0:s -> 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (5) CompletionProof (UPPER BOUND(ID)) The transformation into a RNTS is sound, since: (a) The obligation is a constructor system where every type has a constant constructor, (b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols: log_1 log2_2 if_3 (c) The following functions are completely defined: half_1 le_2 inc_1 Due to the following rules being added: none And the following fresh constants: none ---------------------------------------- (6) Obligation: Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] inc(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] log(x) -> log2(x, 0) [1] log2(x, y) -> if(le(x, s(0)), x, inc(y)) [1] if(true, x, s(y)) -> y [1] if(false, x, y) -> log2(half(x), y) [1] The TRS has the following type information: half :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s le :: 0:s -> 0:s -> true:false true :: true:false false :: true:false inc :: 0:s -> 0:s log :: 0:s -> 0:s log2 :: 0:s -> 0:s -> 0:s if :: true:false -> 0:s -> 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (7) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (8) Obligation: Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: half(0) -> 0 [1] half(s(0)) -> 0 [1] half(s(s(x))) -> s(half(x)) [1] le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] inc(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] log(x) -> log2(x, 0) [1] log2(0, 0) -> if(true, 0, 0) [3] log2(0, s(x'')) -> if(true, 0, s(inc(x''))) [3] log2(s(x'), 0) -> if(le(x', 0), s(x'), 0) [3] log2(s(x'), s(x1)) -> if(le(x', 0), s(x'), s(inc(x1))) [3] if(true, x, s(y)) -> y [1] if(false, 0, y) -> log2(0, y) [2] if(false, s(0), y) -> log2(0, y) [2] if(false, s(s(x2)), y) -> log2(s(half(x2)), y) [2] The TRS has the following type information: half :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s le :: 0:s -> 0:s -> true:false true :: true:false false :: true:false inc :: 0:s -> 0:s log :: 0:s -> 0:s log2 :: 0:s -> 0:s -> 0:s if :: true:false -> 0:s -> 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: 0 => 0 true => 1 false => 0 ---------------------------------------- (10) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(x) :|: x >= 0, z = 1 + (1 + x) if(z, z', z'') -{ 1 }-> y :|: z' = x, z = 1, x >= 0, y >= 0, z'' = 1 + y if(z, z', z'') -{ 2 }-> log2(0, y) :|: z'' = y, y >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, y) :|: z'' = y, y >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> log2(1 + half(x2), y) :|: z'' = y, z' = 1 + (1 + x2), y >= 0, z = 0, x2 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(x) :|: x >= 0, z = 1 + x le(z, z') -{ 1 }-> le(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x le(z, z') -{ 1 }-> 1 :|: y >= 0, z = 0, z' = y le(z, z') -{ 1 }-> 0 :|: x >= 0, z = 1 + x, z' = 0 log(z) -{ 1 }-> log2(x, 0) :|: x >= 0, z = x log2(z, z') -{ 3 }-> if(le(x', 0), 1 + x', 0) :|: z = 1 + x', x' >= 0, z' = 0 log2(z, z') -{ 3 }-> if(le(x', 0), 1 + x', 1 + inc(x1)) :|: z = 1 + x', x1 >= 0, x' >= 0, z' = 1 + x1 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(x'')) :|: z' = 1 + x'', x'' >= 0, z = 0 ---------------------------------------- (11) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> log2(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 3 }-> if(le(z - 1, 0), 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 log2(z, z') -{ 3 }-> if(le(z - 1, 0), 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 ---------------------------------------- (13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { le } { half } { inc } { log2, if } { log } ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> log2(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 3 }-> if(le(z - 1, 0), 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 log2(z, z') -{ 3 }-> if(le(z - 1, 0), 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 Function symbols to be analyzed: {le}, {half}, {inc}, {log2,if}, {log} ---------------------------------------- (15) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> log2(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 3 }-> if(le(z - 1, 0), 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 log2(z, z') -{ 3 }-> if(le(z - 1, 0), 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 Function symbols to be analyzed: {le}, {half}, {inc}, {log2,if}, {log} ---------------------------------------- (17) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: le after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> log2(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 3 }-> if(le(z - 1, 0), 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 log2(z, z') -{ 3 }-> if(le(z - 1, 0), 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 Function symbols to be analyzed: {le}, {half}, {inc}, {log2,if}, {log} Previous analysis results are: le: runtime: ?, size: O(1) [1] ---------------------------------------- (19) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: le after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z' ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> log2(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 le(z, z') -{ 1 }-> le(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 3 }-> if(le(z - 1, 0), 1 + (z - 1), 0) :|: z - 1 >= 0, z' = 0 log2(z, z') -{ 3 }-> if(le(z - 1, 0), 1 + (z - 1), 1 + inc(z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 Function symbols to be analyzed: {half}, {inc}, {log2,if}, {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] ---------------------------------------- (21) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> log2(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 5 }-> if(s', 1 + (z - 1), 0) :|: s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 log2(z, z') -{ 5 }-> if(s'', 1 + (z - 1), 1 + inc(z' - 1)) :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 Function symbols to be analyzed: {half}, {inc}, {log2,if}, {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: half after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> log2(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 5 }-> if(s', 1 + (z - 1), 0) :|: s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 log2(z, z') -{ 5 }-> if(s'', 1 + (z - 1), 1 + inc(z' - 1)) :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 Function symbols to be analyzed: {half}, {inc}, {log2,if}, {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] half: runtime: ?, size: O(n^1) [z] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: half after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 }-> 1 + half(z - 2) :|: z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 }-> log2(1 + half(z' - 2), z'') :|: z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 5 }-> if(s', 1 + (z - 1), 0) :|: s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 log2(z, z') -{ 5 }-> if(s'', 1 + (z - 1), 1 + inc(z' - 1)) :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 Function symbols to be analyzed: {inc}, {log2,if}, {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] ---------------------------------------- (27) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s1 :|: s1 >= 0, s1 <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> log2(1 + s2, z'') :|: s2 >= 0, s2 <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 5 }-> if(s', 1 + (z - 1), 0) :|: s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 log2(z, z') -{ 5 }-> if(s'', 1 + (z - 1), 1 + inc(z' - 1)) :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 Function symbols to be analyzed: {inc}, {log2,if}, {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: inc after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s1 :|: s1 >= 0, s1 <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> log2(1 + s2, z'') :|: s2 >= 0, s2 <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 5 }-> if(s', 1 + (z - 1), 0) :|: s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 log2(z, z') -{ 5 }-> if(s'', 1 + (z - 1), 1 + inc(z' - 1)) :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 Function symbols to be analyzed: {inc}, {log2,if}, {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: ?, size: O(n^1) [z] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: inc after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s1 :|: s1 >= 0, s1 <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> log2(1 + s2, z'') :|: s2 >= 0, s2 <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 5 }-> if(s', 1 + (z - 1), 0) :|: s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 log2(z, z') -{ 5 }-> if(s'', 1 + (z - 1), 1 + inc(z' - 1)) :|: s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 }-> if(1, 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0 Function symbols to be analyzed: {log2,if}, {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] ---------------------------------------- (33) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s1 :|: s1 >= 0, s1 <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> log2(1 + s2, z'') :|: s2 >= 0, s2 <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 1, z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 5 }-> if(s', 1 + (z - 1), 0) :|: s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 log2(z, z') -{ 5 + z' }-> if(s'', 1 + (z - 1), 1 + s5) :|: s5 >= 0, s5 <= z' - 1, s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 + z' }-> if(1, 0, 1 + s4) :|: s4 >= 0, s4 <= z' - 1, z' - 1 >= 0, z = 0 Function symbols to be analyzed: {log2,if}, {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: log2 after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' Computed SIZE bound using KoAT for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z'' ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s1 :|: s1 >= 0, s1 <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> log2(1 + s2, z'') :|: s2 >= 0, s2 <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 1, z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 5 }-> if(s', 1 + (z - 1), 0) :|: s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 log2(z, z') -{ 5 + z' }-> if(s'', 1 + (z - 1), 1 + s5) :|: s5 >= 0, s5 <= z' - 1, s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 + z' }-> if(1, 0, 1 + s4) :|: s4 >= 0, s4 <= z' - 1, z' - 1 >= 0, z = 0 Function symbols to be analyzed: {log2,if}, {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] log2: runtime: ?, size: O(n^1) [z'] if: runtime: ?, size: O(n^1) [z''] ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: log2 after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 18 + 8*z + z*z' + z^2 + 3*z' Computed RUNTIME bound using KoAT for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 54 + 7*z' + z'*z'' + z'^2 + 8*z'' ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s1 :|: s1 >= 0, s1 <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 2 }-> log2(0, z'') :|: z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 2 + z' }-> log2(1 + s2, z'') :|: s2 >= 0, s2 <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 1, z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 1 }-> log2(z, 0) :|: z >= 0 log2(z, z') -{ 5 }-> if(s', 1 + (z - 1), 0) :|: s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 log2(z, z') -{ 5 + z' }-> if(s'', 1 + (z - 1), 1 + s5) :|: s5 >= 0, s5 <= z' - 1, s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 3 }-> if(1, 0, 0) :|: z = 0, z' = 0 log2(z, z') -{ 3 + z' }-> if(1, 0, 1 + s4) :|: s4 >= 0, s4 <= z' - 1, z' - 1 >= 0, z = 0 Function symbols to be analyzed: {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] log2: runtime: O(n^2) [18 + 8*z + z*z' + z^2 + 3*z'], size: O(n^1) [z'] if: runtime: O(n^2) [54 + 7*z' + z'*z'' + z'^2 + 8*z''], size: O(n^1) [z''] ---------------------------------------- (39) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s1 :|: s1 >= 0, s1 <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 20 + 3*z'' }-> s11 :|: s11 >= 0, s11 <= z'', z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 20 + 3*z'' }-> s12 :|: s12 >= 0, s12 <= z'', z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 29 + 10*s2 + s2*z'' + s2^2 + z' + 4*z'' }-> s13 :|: s13 >= 0, s13 <= z'', s2 >= 0, s2 <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 1, z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 19 + 8*z + z^2 }-> s6 :|: s6 >= 0, s6 <= 0, z >= 0 log2(z, z') -{ 67 + 8*s5 + s5*z + 8*z + z^2 + z' }-> s10 :|: s10 >= 0, s10 <= 1 + s5, s5 >= 0, s5 <= z' - 1, s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 57 }-> s7 :|: s7 >= 0, s7 <= 0, z = 0, z' = 0 log2(z, z') -{ 65 + 8*s4 + z' }-> s8 :|: s8 >= 0, s8 <= 1 + s4, s4 >= 0, s4 <= z' - 1, z' - 1 >= 0, z = 0 log2(z, z') -{ 59 + 7*z + z^2 }-> s9 :|: s9 >= 0, s9 <= 0, s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 Function symbols to be analyzed: {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] log2: runtime: O(n^2) [18 + 8*z + z*z' + z^2 + 3*z'], size: O(n^1) [z'] if: runtime: O(n^2) [54 + 7*z' + z'*z'' + z'^2 + 8*z''], size: O(n^1) [z''] ---------------------------------------- (41) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: log after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s1 :|: s1 >= 0, s1 <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 20 + 3*z'' }-> s11 :|: s11 >= 0, s11 <= z'', z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 20 + 3*z'' }-> s12 :|: s12 >= 0, s12 <= z'', z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 29 + 10*s2 + s2*z'' + s2^2 + z' + 4*z'' }-> s13 :|: s13 >= 0, s13 <= z'', s2 >= 0, s2 <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 1, z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 19 + 8*z + z^2 }-> s6 :|: s6 >= 0, s6 <= 0, z >= 0 log2(z, z') -{ 67 + 8*s5 + s5*z + 8*z + z^2 + z' }-> s10 :|: s10 >= 0, s10 <= 1 + s5, s5 >= 0, s5 <= z' - 1, s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 57 }-> s7 :|: s7 >= 0, s7 <= 0, z = 0, z' = 0 log2(z, z') -{ 65 + 8*s4 + z' }-> s8 :|: s8 >= 0, s8 <= 1 + s4, s4 >= 0, s4 <= z' - 1, z' - 1 >= 0, z = 0 log2(z, z') -{ 59 + 7*z + z^2 }-> s9 :|: s9 >= 0, s9 <= 0, s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 Function symbols to be analyzed: {log} Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] log2: runtime: O(n^2) [18 + 8*z + z*z' + z^2 + 3*z'], size: O(n^1) [z'] if: runtime: O(n^2) [54 + 7*z' + z'*z'' + z'^2 + 8*z''], size: O(n^1) [z''] log: runtime: ?, size: O(1) [0] ---------------------------------------- (43) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: log after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 19 + 8*z + z^2 ---------------------------------------- (44) Obligation: Complexity RNTS consisting of the following rules: half(z) -{ 1 }-> 0 :|: z = 0 half(z) -{ 1 }-> 0 :|: z = 1 + 0 half(z) -{ 1 + z }-> 1 + s1 :|: s1 >= 0, s1 <= z - 2, z - 2 >= 0 if(z, z', z'') -{ 20 + 3*z'' }-> s11 :|: s11 >= 0, s11 <= z'', z'' >= 0, z = 0, z' = 0 if(z, z', z'') -{ 20 + 3*z'' }-> s12 :|: s12 >= 0, s12 <= z'', z'' >= 0, z' = 1 + 0, z = 0 if(z, z', z'') -{ 29 + 10*s2 + s2*z'' + s2^2 + z' + 4*z'' }-> s13 :|: s13 >= 0, s13 <= z'', s2 >= 0, s2 <= z' - 2, z'' >= 0, z = 0, z' - 2 >= 0 if(z, z', z'') -{ 1 }-> z'' - 1 :|: z = 1, z' >= 0, z'' - 1 >= 0 inc(z) -{ 1 }-> 0 :|: z = 0 inc(z) -{ 1 + z }-> 1 + s3 :|: s3 >= 0, s3 <= z - 1, z - 1 >= 0 le(z, z') -{ 2 + z' }-> s :|: s >= 0, s <= 1, z - 1 >= 0, z' - 1 >= 0 le(z, z') -{ 1 }-> 1 :|: z' >= 0, z = 0 le(z, z') -{ 1 }-> 0 :|: z - 1 >= 0, z' = 0 log(z) -{ 19 + 8*z + z^2 }-> s6 :|: s6 >= 0, s6 <= 0, z >= 0 log2(z, z') -{ 67 + 8*s5 + s5*z + 8*z + z^2 + z' }-> s10 :|: s10 >= 0, s10 <= 1 + s5, s5 >= 0, s5 <= z' - 1, s'' >= 0, s'' <= 1, z' - 1 >= 0, z - 1 >= 0 log2(z, z') -{ 57 }-> s7 :|: s7 >= 0, s7 <= 0, z = 0, z' = 0 log2(z, z') -{ 65 + 8*s4 + z' }-> s8 :|: s8 >= 0, s8 <= 1 + s4, s4 >= 0, s4 <= z' - 1, z' - 1 >= 0, z = 0 log2(z, z') -{ 59 + 7*z + z^2 }-> s9 :|: s9 >= 0, s9 <= 0, s' >= 0, s' <= 1, z - 1 >= 0, z' = 0 Function symbols to be analyzed: Previous analysis results are: le: runtime: O(n^1) [2 + z'], size: O(1) [1] half: runtime: O(n^1) [2 + z], size: O(n^1) [z] inc: runtime: O(n^1) [1 + z], size: O(n^1) [z] log2: runtime: O(n^2) [18 + 8*z + z*z' + z^2 + 3*z'], size: O(n^1) [z'] if: runtime: O(n^2) [54 + 7*z' + z'*z'' + z'^2 + 8*z''], size: O(n^1) [z''] log: runtime: O(n^2) [19 + 8*z + z^2], size: O(1) [0] ---------------------------------------- (45) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (46) BOUNDS(1, n^2) ---------------------------------------- (47) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (48) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) inc(0') -> 0' inc(s(x)) -> s(inc(x)) log(x) -> log2(x, 0') log2(x, y) -> if(le(x, s(0')), x, inc(y)) if(true, x, s(y)) -> y if(false, x, y) -> log2(half(x), y) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (49) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (50) Obligation: Innermost TRS: Rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) inc(0') -> 0' inc(s(x)) -> s(inc(x)) log(x) -> log2(x, 0') log2(x, y) -> if(le(x, s(0')), x, inc(y)) if(true, x, s(y)) -> y if(false, x, y) -> log2(half(x), y) Types: half :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inc :: 0':s -> 0':s log :: 0':s -> 0':s log2 :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s ---------------------------------------- (51) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: half, le, inc, log2 They will be analysed ascendingly in the following order: half < log2 le < log2 inc < log2 ---------------------------------------- (52) Obligation: Innermost TRS: Rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) inc(0') -> 0' inc(s(x)) -> s(inc(x)) log(x) -> log2(x, 0') log2(x, y) -> if(le(x, s(0')), x, inc(y)) if(true, x, s(y)) -> y if(false, x, y) -> log2(half(x), y) Types: half :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inc :: 0':s -> 0':s log :: 0':s -> 0':s log2 :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: half, le, inc, log2 They will be analysed ascendingly in the following order: half < log2 le < log2 inc < log2 ---------------------------------------- (53) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: half(gen_0':s3_0(*(2, n5_0))) -> gen_0':s3_0(n5_0), rt in Omega(1 + n5_0) Induction Base: half(gen_0':s3_0(*(2, 0))) ->_R^Omega(1) 0' Induction Step: half(gen_0':s3_0(*(2, +(n5_0, 1)))) ->_R^Omega(1) s(half(gen_0':s3_0(*(2, n5_0)))) ->_IH s(gen_0':s3_0(c6_0)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (54) Complex Obligation (BEST) ---------------------------------------- (55) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) inc(0') -> 0' inc(s(x)) -> s(inc(x)) log(x) -> log2(x, 0') log2(x, y) -> if(le(x, s(0')), x, inc(y)) if(true, x, s(y)) -> y if(false, x, y) -> log2(half(x), y) Types: half :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inc :: 0':s -> 0':s log :: 0':s -> 0':s log2 :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: half, le, inc, log2 They will be analysed ascendingly in the following order: half < log2 le < log2 inc < log2 ---------------------------------------- (56) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (57) BOUNDS(n^1, INF) ---------------------------------------- (58) Obligation: Innermost TRS: Rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) inc(0') -> 0' inc(s(x)) -> s(inc(x)) log(x) -> log2(x, 0') log2(x, y) -> if(le(x, s(0')), x, inc(y)) if(true, x, s(y)) -> y if(false, x, y) -> log2(half(x), y) Types: half :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inc :: 0':s -> 0':s log :: 0':s -> 0':s log2 :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Lemmas: half(gen_0':s3_0(*(2, n5_0))) -> gen_0':s3_0(n5_0), rt in Omega(1 + n5_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: le, inc, log2 They will be analysed ascendingly in the following order: le < log2 inc < log2 ---------------------------------------- (59) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: le(gen_0':s3_0(n343_0), gen_0':s3_0(n343_0)) -> true, rt in Omega(1 + n343_0) Induction Base: le(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) true Induction Step: le(gen_0':s3_0(+(n343_0, 1)), gen_0':s3_0(+(n343_0, 1))) ->_R^Omega(1) le(gen_0':s3_0(n343_0), gen_0':s3_0(n343_0)) ->_IH true We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (60) Obligation: Innermost TRS: Rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) inc(0') -> 0' inc(s(x)) -> s(inc(x)) log(x) -> log2(x, 0') log2(x, y) -> if(le(x, s(0')), x, inc(y)) if(true, x, s(y)) -> y if(false, x, y) -> log2(half(x), y) Types: half :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inc :: 0':s -> 0':s log :: 0':s -> 0':s log2 :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Lemmas: half(gen_0':s3_0(*(2, n5_0))) -> gen_0':s3_0(n5_0), rt in Omega(1 + n5_0) le(gen_0':s3_0(n343_0), gen_0':s3_0(n343_0)) -> true, rt in Omega(1 + n343_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: inc, log2 They will be analysed ascendingly in the following order: inc < log2 ---------------------------------------- (61) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: inc(gen_0':s3_0(n662_0)) -> gen_0':s3_0(n662_0), rt in Omega(1 + n662_0) Induction Base: inc(gen_0':s3_0(0)) ->_R^Omega(1) 0' Induction Step: inc(gen_0':s3_0(+(n662_0, 1))) ->_R^Omega(1) s(inc(gen_0':s3_0(n662_0))) ->_IH s(gen_0':s3_0(c663_0)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (62) Obligation: Innermost TRS: Rules: half(0') -> 0' half(s(0')) -> 0' half(s(s(x))) -> s(half(x)) le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) inc(0') -> 0' inc(s(x)) -> s(inc(x)) log(x) -> log2(x, 0') log2(x, y) -> if(le(x, s(0')), x, inc(y)) if(true, x, s(y)) -> y if(false, x, y) -> log2(half(x), y) Types: half :: 0':s -> 0':s 0' :: 0':s s :: 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inc :: 0':s -> 0':s log :: 0':s -> 0':s log2 :: 0':s -> 0':s -> 0':s if :: true:false -> 0':s -> 0':s -> 0':s hole_0':s1_0 :: 0':s hole_true:false2_0 :: true:false gen_0':s3_0 :: Nat -> 0':s Lemmas: half(gen_0':s3_0(*(2, n5_0))) -> gen_0':s3_0(n5_0), rt in Omega(1 + n5_0) le(gen_0':s3_0(n343_0), gen_0':s3_0(n343_0)) -> true, rt in Omega(1 + n343_0) inc(gen_0':s3_0(n662_0)) -> gen_0':s3_0(n662_0), rt in Omega(1 + n662_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: log2