WORST_CASE(?,O(n^1)) proof of input_EIFPyDCKNA.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). (0) CpxTRS (1) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 0 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), 1377 ms] (18) CpxRNTS (19) IntTrsBoundProof [UPPER BOUND(ID), 529 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 118 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 42 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 148 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 42 ms] (32) CpxRNTS (33) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 139 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 42 ms] (38) CpxRNTS (39) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 138 ms] (42) CpxRNTS (43) IntTrsBoundProof [UPPER BOUND(ID), 53 ms] (44) CpxRNTS (45) FinalProof [FINISHED, 0 ms] (46) BOUNDS(1, n^1) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: nonZero(0) -> false nonZero(s(x)) -> true p(0) -> 0 p(s(x)) -> x id_inc(x) -> x id_inc(x) -> s(x) random(x) -> rand(x, 0) rand(x, y) -> if(nonZero(x), x, y) if(false, x, y) -> y if(true, x, y) -> rand(p(x), id_inc(y)) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (UPPER BOUND(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^1). The TRS R consists of the following rules: nonZero(0) -> false [1] nonZero(s(x)) -> true [1] p(0) -> 0 [1] p(s(x)) -> x [1] id_inc(x) -> x [1] id_inc(x) -> s(x) [1] random(x) -> rand(x, 0) [1] rand(x, y) -> if(nonZero(x), x, y) [1] if(false, x, y) -> y [1] if(true, x, y) -> rand(p(x), id_inc(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: nonZero(0) -> false [1] nonZero(s(x)) -> true [1] p(0) -> 0 [1] p(s(x)) -> x [1] id_inc(x) -> x [1] id_inc(x) -> s(x) [1] random(x) -> rand(x, 0) [1] rand(x, y) -> if(nonZero(x), x, y) [1] if(false, x, y) -> y [1] if(true, x, y) -> rand(p(x), id_inc(y)) [1] The TRS has the following type information: nonZero :: 0:s -> false:true 0 :: 0:s false :: false:true s :: 0:s -> 0:s true :: false:true p :: 0:s -> 0:s id_inc :: 0:s -> 0:s random :: 0:s -> 0:s rand :: 0:s -> 0:s -> 0:s if :: false:true -> 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: random_1 rand_2 if_3 (c) The following functions are completely defined: p_1 id_inc_1 nonZero_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: nonZero(0) -> false [1] nonZero(s(x)) -> true [1] p(0) -> 0 [1] p(s(x)) -> x [1] id_inc(x) -> x [1] id_inc(x) -> s(x) [1] random(x) -> rand(x, 0) [1] rand(x, y) -> if(nonZero(x), x, y) [1] if(false, x, y) -> y [1] if(true, x, y) -> rand(p(x), id_inc(y)) [1] The TRS has the following type information: nonZero :: 0:s -> false:true 0 :: 0:s false :: false:true s :: 0:s -> 0:s true :: false:true p :: 0:s -> 0:s id_inc :: 0:s -> 0:s random :: 0:s -> 0:s rand :: 0:s -> 0:s -> 0:s if :: false:true -> 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: nonZero(0) -> false [1] nonZero(s(x)) -> true [1] p(0) -> 0 [1] p(s(x)) -> x [1] id_inc(x) -> x [1] id_inc(x) -> s(x) [1] random(x) -> rand(x, 0) [1] rand(0, y) -> if(false, 0, y) [2] rand(s(x'), y) -> if(true, s(x'), y) [2] if(false, x, y) -> y [1] if(true, 0, y) -> rand(0, y) [3] if(true, 0, y) -> rand(0, s(y)) [3] if(true, s(x''), y) -> rand(x'', y) [3] if(true, s(x''), y) -> rand(x'', s(y)) [3] The TRS has the following type information: nonZero :: 0:s -> false:true 0 :: 0:s false :: false:true s :: 0:s -> 0:s true :: false:true p :: 0:s -> 0:s id_inc :: 0:s -> 0:s random :: 0:s -> 0:s rand :: 0:s -> 0:s -> 0:s if :: false:true -> 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 false => 0 true => 1 ---------------------------------------- (10) Obligation: Complexity RNTS consisting of the following rules: id_inc(z) -{ 1 }-> x :|: x >= 0, z = x id_inc(z) -{ 1 }-> 1 + x :|: x >= 0, z = x if(z, z', z'') -{ 1 }-> y :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 if(z, z', z'') -{ 3 }-> rand(x'', y) :|: z' = 1 + x'', z'' = y, z = 1, y >= 0, x'' >= 0 if(z, z', z'') -{ 3 }-> rand(x'', 1 + y) :|: z' = 1 + x'', z'' = y, z = 1, y >= 0, x'' >= 0 if(z, z', z'') -{ 3 }-> rand(0, y) :|: z'' = y, z = 1, y >= 0, z' = 0 if(z, z', z'') -{ 3 }-> rand(0, 1 + y) :|: z'' = y, z = 1, y >= 0, z' = 0 nonZero(z) -{ 1 }-> 1 :|: x >= 0, z = 1 + x nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x p(z) -{ 1 }-> 0 :|: z = 0 rand(z, z') -{ 2 }-> if(1, 1 + x', y) :|: z = 1 + x', x' >= 0, y >= 0, z' = y rand(z, z') -{ 2 }-> if(0, 0, y) :|: y >= 0, z = 0, z' = y random(z) -{ 1 }-> rand(x, 0) :|: x >= 0, z = x ---------------------------------------- (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: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 if(z, z', z'') -{ 3 }-> rand(0, z'') :|: z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 3 }-> rand(0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 3 }-> rand(z' - 1, z'') :|: z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 3 }-> rand(z' - 1, 1 + z'') :|: z = 1, z'' >= 0, z' - 1 >= 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 2 }-> if(1, 1 + (z - 1), z') :|: z - 1 >= 0, z' >= 0 rand(z, z') -{ 2 }-> if(0, 0, z') :|: z' >= 0, z = 0 random(z) -{ 1 }-> rand(z, 0) :|: z >= 0 ---------------------------------------- (13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { if, rand } { nonZero } { id_inc } { p } { random } ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 if(z, z', z'') -{ 3 }-> rand(0, z'') :|: z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 3 }-> rand(0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 3 }-> rand(z' - 1, z'') :|: z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 3 }-> rand(z' - 1, 1 + z'') :|: z = 1, z'' >= 0, z' - 1 >= 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 2 }-> if(1, 1 + (z - 1), z') :|: z - 1 >= 0, z' >= 0 rand(z, z') -{ 2 }-> if(0, 0, z') :|: z' >= 0, z = 0 random(z) -{ 1 }-> rand(z, 0) :|: z >= 0 Function symbols to be analyzed: {if,rand}, {nonZero}, {id_inc}, {p}, {random} ---------------------------------------- (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: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 if(z, z', z'') -{ 3 }-> rand(0, z'') :|: z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 3 }-> rand(0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 3 }-> rand(z' - 1, z'') :|: z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 3 }-> rand(z' - 1, 1 + z'') :|: z = 1, z'' >= 0, z' - 1 >= 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 2 }-> if(1, 1 + (z - 1), z') :|: z - 1 >= 0, z' >= 0 rand(z, z') -{ 2 }-> if(0, 0, z') :|: z' >= 0, z = 0 random(z) -{ 1 }-> rand(z, 0) :|: z >= 0 Function symbols to be analyzed: {if,rand}, {nonZero}, {id_inc}, {p}, {random} ---------------------------------------- (17) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z' + z'' Computed SIZE bound using CoFloCo for: rand after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z + z' ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 if(z, z', z'') -{ 3 }-> rand(0, z'') :|: z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 3 }-> rand(0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 3 }-> rand(z' - 1, z'') :|: z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 3 }-> rand(z' - 1, 1 + z'') :|: z = 1, z'' >= 0, z' - 1 >= 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 2 }-> if(1, 1 + (z - 1), z') :|: z - 1 >= 0, z' >= 0 rand(z, z') -{ 2 }-> if(0, 0, z') :|: z' >= 0, z = 0 random(z) -{ 1 }-> rand(z, 0) :|: z >= 0 Function symbols to be analyzed: {if,rand}, {nonZero}, {id_inc}, {p}, {random} Previous analysis results are: if: runtime: ?, size: O(n^1) [1 + z' + z''] rand: runtime: ?, size: O(n^1) [1 + z + z'] ---------------------------------------- (19) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 11 + 5*z' Computed RUNTIME bound using CoFloCo for: rand after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 13 + 5*z ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 if(z, z', z'') -{ 3 }-> rand(0, z'') :|: z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 3 }-> rand(0, 1 + z'') :|: z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 3 }-> rand(z' - 1, z'') :|: z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 3 }-> rand(z' - 1, 1 + z'') :|: z = 1, z'' >= 0, z' - 1 >= 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 2 }-> if(1, 1 + (z - 1), z') :|: z - 1 >= 0, z' >= 0 rand(z, z') -{ 2 }-> if(0, 0, z') :|: z' >= 0, z = 0 random(z) -{ 1 }-> rand(z, 0) :|: z >= 0 Function symbols to be analyzed: {nonZero}, {id_inc}, {p}, {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] ---------------------------------------- (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: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: {nonZero}, {id_inc}, {p}, {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: nonZero after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: {nonZero}, {id_inc}, {p}, {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] nonZero: runtime: ?, size: O(1) [1] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: nonZero after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: {id_inc}, {p}, {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] nonZero: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (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: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: {id_inc}, {p}, {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] nonZero: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: id_inc after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: {id_inc}, {p}, {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] nonZero: runtime: O(1) [1], size: O(1) [1] id_inc: runtime: ?, size: O(n^1) [1 + z] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: id_inc after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: {p}, {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] nonZero: runtime: O(1) [1], size: O(1) [1] id_inc: runtime: O(1) [1], size: O(n^1) [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: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: {p}, {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] nonZero: runtime: O(1) [1], size: O(1) [1] id_inc: runtime: O(1) [1], size: O(n^1) [1 + z] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: p 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: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: {p}, {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] nonZero: runtime: O(1) [1], size: O(1) [1] id_inc: runtime: O(1) [1], size: O(n^1) [1 + z] p: runtime: ?, size: O(n^1) [z] ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: p after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] nonZero: runtime: O(1) [1], size: O(1) [1] id_inc: runtime: O(1) [1], size: O(n^1) [1 + z] p: runtime: O(1) [1], 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: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] nonZero: runtime: O(1) [1], size: O(1) [1] id_inc: runtime: O(1) [1], size: O(n^1) [1 + z] p: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (41) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: random after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: {random} Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] nonZero: runtime: O(1) [1], size: O(1) [1] id_inc: runtime: O(1) [1], size: O(n^1) [1 + z] p: runtime: O(1) [1], size: O(n^1) [z] random: runtime: ?, size: O(n^1) [1 + z] ---------------------------------------- (43) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: random after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 14 + 5*z ---------------------------------------- (44) Obligation: Complexity RNTS consisting of the following rules: id_inc(z) -{ 1 }-> z :|: z >= 0 id_inc(z) -{ 1 }-> 1 + z :|: z >= 0 if(z, z', z'') -{ 16 }-> s1 :|: s1 >= 0, s1 <= 0 + z'' + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 16 }-> s2 :|: s2 >= 0, s2 <= 0 + (1 + z'') + 1, z = 1, z'' >= 0, z' = 0 if(z, z', z'') -{ 11 + 5*z' }-> s3 :|: s3 >= 0, s3 <= z' - 1 + z'' + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 11 + 5*z' }-> s4 :|: s4 >= 0, s4 <= z' - 1 + (1 + z'') + 1, z = 1, z'' >= 0, z' - 1 >= 0 if(z, z', z'') -{ 1 }-> z'' :|: z' >= 0, z'' >= 0, z = 0 nonZero(z) -{ 1 }-> 1 :|: z - 1 >= 0 nonZero(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> z - 1 :|: z - 1 >= 0 rand(z, z') -{ 13 }-> s' :|: s' >= 0, s' <= z' + 1 + 0, z' >= 0, z = 0 rand(z, z') -{ 13 + 5*z }-> s'' :|: s'' >= 0, s'' <= z' + 1 + (1 + (z - 1)), z - 1 >= 0, z' >= 0 random(z) -{ 14 + 5*z }-> s :|: s >= 0, s <= z + 0 + 1, z >= 0 Function symbols to be analyzed: Previous analysis results are: if: runtime: O(n^1) [11 + 5*z'], size: O(n^1) [1 + z' + z''] rand: runtime: O(n^1) [13 + 5*z], size: O(n^1) [1 + z + z'] nonZero: runtime: O(1) [1], size: O(1) [1] id_inc: runtime: O(1) [1], size: O(n^1) [1 + z] p: runtime: O(1) [1], size: O(n^1) [z] random: runtime: O(n^1) [14 + 5*z], size: O(n^1) [1 + z] ---------------------------------------- (45) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (46) BOUNDS(1, n^1)