/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 CpxRelTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxRelTRS (1) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 186 ms] (2) CpxRelTRS (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxWeightedTrs (5) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxWeightedTrs (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedTrs (9) CompletionProof [UPPER BOUND(ID), 5 ms] (10) CpxTypedWeightedCompleteTrs (11) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTypedWeightedCompleteTrs (13) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (14) CpxRNTS (15) InliningProof [UPPER BOUND(ID), 121 ms] (16) CpxRNTS (17) SimplificationProof [BOTH BOUNDS(ID, ID), 1 ms] (18) CpxRNTS (19) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 427 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 97 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 242 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 13 ms] (32) CpxRNTS (33) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 2791 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 955 ms] (38) CpxRNTS (39) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 189 ms] (42) CpxRNTS (43) IntTrsBoundProof [UPPER BOUND(ID), 105 ms] (44) CpxRNTS (45) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (46) CpxRNTS (47) IntTrsBoundProof [UPPER BOUND(ID), 400 ms] (48) CpxRNTS (49) IntTrsBoundProof [UPPER BOUND(ID), 125 ms] (50) CpxRNTS (51) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (52) CpxRNTS (53) IntTrsBoundProof [UPPER BOUND(ID), 169 ms] (54) CpxRNTS (55) IntTrsBoundProof [UPPER BOUND(ID), 23 ms] (56) CpxRNTS (57) FinalProof [FINISHED, 0 ms] (58) BOUNDS(1, n^2) (59) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (60) TRS for Loop Detection (61) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (62) BEST (63) proven lower bound (64) LowerBoundPropagationProof [FINISHED, 0 ms] (65) BOUNDS(n^1, INF) (66) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: bsort(S(x'), Cons(x, xs)) -> bsort(x', bubble(x, xs)) len(Cons(x, xs)) -> +(S(0), len(xs)) bubble(x', Cons(x, xs)) -> bubble[Ite][False][Ite](<(x', x), x', Cons(x, xs)) len(Nil) -> 0 bubble(x, Nil) -> Cons(x, Nil) bsort(0, xs) -> xs bubblesort(xs) -> bsort(len(xs), xs) The (relative) TRS S consists of the following rules: +(x, S(0)) -> S(x) +(S(0), y) -> S(y) <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False bubble[Ite][False][Ite](False, x', Cons(x, xs)) -> Cons(x, bubble(x', xs)) bubble[Ite][False][Ite](True, x', Cons(x, xs)) -> Cons(x', bubble(x, xs)) Rewrite Strategy: INNERMOST ---------------------------------------- (1) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: bsort(S(x'), Cons(x, xs)) -> bsort(x', bubble(x, xs)) len(Cons(x, xs)) -> +(S(0), len(xs)) bubble(x', Cons(x, xs)) -> bubble[Ite][False][Ite](<(x', x), x', Cons(x, xs)) len(Nil) -> 0 bubble(x, Nil) -> Cons(x, Nil) bsort(0, xs) -> xs bubblesort(xs) -> bsort(len(xs), xs) The (relative) TRS S consists of the following rules: +(x, S(0)) -> S(x) +(S(0), y) -> S(y) <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False bubble[Ite][False][Ite](False, x', Cons(x, xs)) -> Cons(x, bubble(x', xs)) bubble[Ite][False][Ite](True, x', Cons(x, xs)) -> Cons(x', bubble(x, xs)) Rewrite Strategy: INNERMOST ---------------------------------------- (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (4) 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: bsort(S(x'), Cons(x, xs)) -> bsort(x', bubble(x, xs)) [1] len(Cons(x, xs)) -> +(S(0), len(xs)) [1] bubble(x', Cons(x, xs)) -> bubble[Ite][False][Ite](<(x', x), x', Cons(x, xs)) [1] len(Nil) -> 0 [1] bubble(x, Nil) -> Cons(x, Nil) [1] bsort(0, xs) -> xs [1] bubblesort(xs) -> bsort(len(xs), xs) [1] +(x, S(0)) -> S(x) [0] +(S(0), y) -> S(y) [0] <(S(x), S(y)) -> <(x, y) [0] <(0, S(y)) -> True [0] <(x, 0) -> False [0] bubble[Ite][False][Ite](False, x', Cons(x, xs)) -> Cons(x, bubble(x', xs)) [0] bubble[Ite][False][Ite](True, x', Cons(x, xs)) -> Cons(x', bubble(x, xs)) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (5) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) Renamed defined symbols to avoid conflicts with arithmetic symbols: + => plus < => lt ---------------------------------------- (6) 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: bsort(S(x'), Cons(x, xs)) -> bsort(x', bubble(x, xs)) [1] len(Cons(x, xs)) -> plus(S(0), len(xs)) [1] bubble(x', Cons(x, xs)) -> bubble[Ite][False][Ite](lt(x', x), x', Cons(x, xs)) [1] len(Nil) -> 0 [1] bubble(x, Nil) -> Cons(x, Nil) [1] bsort(0, xs) -> xs [1] bubblesort(xs) -> bsort(len(xs), xs) [1] plus(x, S(0)) -> S(x) [0] plus(S(0), y) -> S(y) [0] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] bubble[Ite][False][Ite](False, x', Cons(x, xs)) -> Cons(x, bubble(x', xs)) [0] bubble[Ite][False][Ite](True, x', Cons(x, xs)) -> Cons(x', bubble(x, xs)) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: bsort(S(x'), Cons(x, xs)) -> bsort(x', bubble(x, xs)) [1] len(Cons(x, xs)) -> plus(S(0), len(xs)) [1] bubble(x', Cons(x, xs)) -> bubble[Ite][False][Ite](lt(x', x), x', Cons(x, xs)) [1] len(Nil) -> 0 [1] bubble(x, Nil) -> Cons(x, Nil) [1] bsort(0, xs) -> xs [1] bubblesort(xs) -> bsort(len(xs), xs) [1] plus(x, S(0)) -> S(x) [0] plus(S(0), y) -> S(y) [0] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] bubble[Ite][False][Ite](False, x', Cons(x, xs)) -> Cons(x, bubble(x', xs)) [0] bubble[Ite][False][Ite](True, x', Cons(x, xs)) -> Cons(x', bubble(x, xs)) [0] The TRS has the following type information: bsort :: S:0 -> Cons:Nil -> Cons:Nil S :: S:0 -> S:0 Cons :: S:0 -> Cons:Nil -> Cons:Nil bubble :: S:0 -> Cons:Nil -> Cons:Nil len :: Cons:Nil -> S:0 plus :: S:0 -> S:0 -> S:0 0 :: S:0 bubble[Ite][False][Ite] :: True:False -> S:0 -> Cons:Nil -> Cons:Nil lt :: S:0 -> S:0 -> True:False Nil :: Cons:Nil bubblesort :: Cons:Nil -> Cons:Nil True :: True:False False :: True:False Rewrite Strategy: INNERMOST ---------------------------------------- (9) 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: bsort_2 bubblesort_1 (c) The following functions are completely defined: len_1 bubble_2 plus_2 lt_2 bubble[Ite][False][Ite]_3 Due to the following rules being added: plus(v0, v1) -> 0 [0] lt(v0, v1) -> null_lt [0] bubble[Ite][False][Ite](v0, v1, v2) -> Nil [0] And the following fresh constants: null_lt ---------------------------------------- (10) 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: bsort(S(x'), Cons(x, xs)) -> bsort(x', bubble(x, xs)) [1] len(Cons(x, xs)) -> plus(S(0), len(xs)) [1] bubble(x', Cons(x, xs)) -> bubble[Ite][False][Ite](lt(x', x), x', Cons(x, xs)) [1] len(Nil) -> 0 [1] bubble(x, Nil) -> Cons(x, Nil) [1] bsort(0, xs) -> xs [1] bubblesort(xs) -> bsort(len(xs), xs) [1] plus(x, S(0)) -> S(x) [0] plus(S(0), y) -> S(y) [0] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] bubble[Ite][False][Ite](False, x', Cons(x, xs)) -> Cons(x, bubble(x', xs)) [0] bubble[Ite][False][Ite](True, x', Cons(x, xs)) -> Cons(x', bubble(x, xs)) [0] plus(v0, v1) -> 0 [0] lt(v0, v1) -> null_lt [0] bubble[Ite][False][Ite](v0, v1, v2) -> Nil [0] The TRS has the following type information: bsort :: S:0 -> Cons:Nil -> Cons:Nil S :: S:0 -> S:0 Cons :: S:0 -> Cons:Nil -> Cons:Nil bubble :: S:0 -> Cons:Nil -> Cons:Nil len :: Cons:Nil -> S:0 plus :: S:0 -> S:0 -> S:0 0 :: S:0 bubble[Ite][False][Ite] :: True:False:null_lt -> S:0 -> Cons:Nil -> Cons:Nil lt :: S:0 -> S:0 -> True:False:null_lt Nil :: Cons:Nil bubblesort :: Cons:Nil -> Cons:Nil True :: True:False:null_lt False :: True:False:null_lt null_lt :: True:False:null_lt Rewrite Strategy: INNERMOST ---------------------------------------- (11) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (12) 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: bsort(S(x'), Cons(x, Cons(x1, xs'))) -> bsort(x', bubble[Ite][False][Ite](lt(x, x1), x, Cons(x1, xs'))) [2] bsort(S(x'), Cons(x, Nil)) -> bsort(x', Cons(x, Nil)) [2] len(Cons(x, Cons(x'', xs''))) -> plus(S(0), plus(S(0), len(xs''))) [2] len(Cons(x, Nil)) -> plus(S(0), 0) [2] bubble(S(x2), Cons(S(y'), xs)) -> bubble[Ite][False][Ite](lt(x2, y'), S(x2), Cons(S(y'), xs)) [1] bubble(0, Cons(S(y''), xs)) -> bubble[Ite][False][Ite](True, 0, Cons(S(y''), xs)) [1] bubble(x', Cons(0, xs)) -> bubble[Ite][False][Ite](False, x', Cons(0, xs)) [1] bubble(x', Cons(x, xs)) -> bubble[Ite][False][Ite](null_lt, x', Cons(x, xs)) [1] len(Nil) -> 0 [1] bubble(x, Nil) -> Cons(x, Nil) [1] bsort(0, xs) -> xs [1] bubblesort(Cons(x3, xs1)) -> bsort(plus(S(0), len(xs1)), Cons(x3, xs1)) [2] bubblesort(Nil) -> bsort(0, Nil) [2] plus(x, S(0)) -> S(x) [0] plus(S(0), y) -> S(y) [0] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] bubble[Ite][False][Ite](False, x', Cons(x, xs)) -> Cons(x, bubble(x', xs)) [0] bubble[Ite][False][Ite](True, x', Cons(x, xs)) -> Cons(x', bubble(x, xs)) [0] plus(v0, v1) -> 0 [0] lt(v0, v1) -> null_lt [0] bubble[Ite][False][Ite](v0, v1, v2) -> Nil [0] The TRS has the following type information: bsort :: S:0 -> Cons:Nil -> Cons:Nil S :: S:0 -> S:0 Cons :: S:0 -> Cons:Nil -> Cons:Nil bubble :: S:0 -> Cons:Nil -> Cons:Nil len :: Cons:Nil -> S:0 plus :: S:0 -> S:0 -> S:0 0 :: S:0 bubble[Ite][False][Ite] :: True:False:null_lt -> S:0 -> Cons:Nil -> Cons:Nil lt :: S:0 -> S:0 -> True:False:null_lt Nil :: Cons:Nil bubblesort :: Cons:Nil -> Cons:Nil True :: True:False:null_lt False :: True:False:null_lt null_lt :: True:False:null_lt Rewrite Strategy: INNERMOST ---------------------------------------- (13) 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 Nil => 0 True => 2 False => 1 null_lt => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> xs :|: xs >= 0, z' = xs, z = 0 bsort(z, z') -{ 2 }-> bsort(x', bubble[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: z = 1 + x', x1 >= 0, x' >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(x', 1 + x + 0) :|: z = 1 + x', x' >= 0, x >= 0, z' = 1 + x + 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](lt(x2, y'), 1 + x2, 1 + (1 + y') + xs) :|: xs >= 0, z' = 1 + (1 + y') + xs, z = 1 + x2, y' >= 0, x2 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, x', 1 + 0 + xs) :|: xs >= 0, z' = 1 + 0 + xs, x' >= 0, z = x' bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, x', 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, x >= 0, z = x' bubble(z, z') -{ 1 }-> 1 + x + 0 :|: x >= 0, z = x, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(x', xs) :|: z' = x', xs >= 0, z = 1, x' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x' + bubble(x, xs) :|: z = 2, z' = x', xs >= 0, x' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 2 }-> plus(1 + 0, 0) :|: x >= 0, z = 1 + x + 0 len(z) -{ 1 }-> 0 :|: z = 0 lt(z, z') -{ 0 }-> lt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x lt(z, z') -{ 0 }-> 2 :|: z' = 1 + y, y >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: x >= 0, z = x, z' = 0 lt(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 plus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 plus(z, z') -{ 0 }-> 1 + x :|: x >= 0, z' = 1 + 0, z = x plus(z, z') -{ 0 }-> 1 + y :|: z = 1 + 0, y >= 0, z' = y ---------------------------------------- (15) InliningProof (UPPER BOUND(ID)) Inlined the following terminating rules on right-hand sides where appropriate: plus(z, z') -{ 0 }-> 1 + x :|: x >= 0, z' = 1 + 0, z = x plus(z, z') -{ 0 }-> 1 + y :|: z = 1 + 0, y >= 0, z' = y plus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> xs :|: xs >= 0, z' = xs, z = 0 bsort(z, z') -{ 2 }-> bsort(x', bubble[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: z = 1 + x', x1 >= 0, x' >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(x', 1 + x + 0) :|: z = 1 + x', x' >= 0, x >= 0, z' = 1 + x + 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](lt(x2, y'), 1 + x2, 1 + (1 + y') + xs) :|: xs >= 0, z' = 1 + (1 + y') + xs, z = 1 + x2, y' >= 0, x2 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, x', 1 + 0 + xs) :|: xs >= 0, z' = 1 + 0 + xs, x' >= 0, z = x' bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, x', 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, x >= 0, z = x' bubble(z, z') -{ 1 }-> 1 + x + 0 :|: x >= 0, z = x, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(x', xs) :|: z' = x', xs >= 0, z = 1, x' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x' + bubble(x, xs) :|: z = 2, z' = x', xs >= 0, x' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: x >= 0, z = 1 + x + 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: x >= 0, z = 1 + x + 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> lt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x lt(z, z') -{ 0 }-> 2 :|: z' = 1 + y, y >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: x >= 0, z = x, z' = 0 lt(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 plus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 plus(z, z') -{ 0 }-> 1 + x :|: x >= 0, z' = 1 + 0, z = x plus(z, z') -{ 0 }-> 1 + y :|: z = 1 + 0, y >= 0, z' = y ---------------------------------------- (17) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 2 }-> bsort(z - 1, bubble[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](lt(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs) :|: xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + z' + bubble(x, xs) :|: z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 ---------------------------------------- (19) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { lt } { plus } { bubble[Ite][False][Ite], bubble } { len } { bsort } { bubblesort } ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 2 }-> bsort(z - 1, bubble[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](lt(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs) :|: xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + z' + bubble(x, xs) :|: z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {lt}, {plus}, {bubble[Ite][False][Ite],bubble}, {len}, {bsort}, {bubblesort} ---------------------------------------- (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: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 2 }-> bsort(z - 1, bubble[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](lt(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs) :|: xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + z' + bubble(x, xs) :|: z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {lt}, {plus}, {bubble[Ite][False][Ite],bubble}, {len}, {bsort}, {bubblesort} ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: lt after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 2 ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 2 }-> bsort(z - 1, bubble[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](lt(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs) :|: xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + z' + bubble(x, xs) :|: z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {lt}, {plus}, {bubble[Ite][False][Ite],bubble}, {len}, {bsort}, {bubblesort} Previous analysis results are: lt: runtime: ?, size: O(1) [2] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: lt after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 2 }-> bsort(z - 1, bubble[Ite][False][Ite](lt(x, x1), x, 1 + x1 + xs')) :|: x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](lt(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs) :|: xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + z' + bubble(x, xs) :|: z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {plus}, {bubble[Ite][False][Ite],bubble}, {len}, {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (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: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 2 }-> bsort(z - 1, bubble[Ite][False][Ite](s, x, 1 + x1 + xs')) :|: s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](s', 1 + (z - 1), 1 + (1 + y') + xs) :|: s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + z' + bubble(x, xs) :|: z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {plus}, {bubble[Ite][False][Ite],bubble}, {len}, {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: plus after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z + z' ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 2 }-> bsort(z - 1, bubble[Ite][False][Ite](s, x, 1 + x1 + xs')) :|: s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](s', 1 + (z - 1), 1 + (1 + y') + xs) :|: s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + z' + bubble(x, xs) :|: z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {plus}, {bubble[Ite][False][Ite],bubble}, {len}, {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: ?, size: O(n^1) [z + z'] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: plus after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 2 }-> bsort(z - 1, bubble[Ite][False][Ite](s, x, 1 + x1 + xs')) :|: s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](s', 1 + (z - 1), 1 + (1 + y') + xs) :|: s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + z' + bubble(x, xs) :|: z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {bubble[Ite][False][Ite],bubble}, {len}, {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + 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: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 2 }-> bsort(z - 1, bubble[Ite][False][Ite](s, x, 1 + x1 + xs')) :|: s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](s', 1 + (z - 1), 1 + (1 + y') + xs) :|: s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + z' + bubble(x, xs) :|: z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {bubble[Ite][False][Ite],bubble}, {len}, {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: bubble[Ite][False][Ite] 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: bubble after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z + z' ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 2 }-> bsort(z - 1, bubble[Ite][False][Ite](s, x, 1 + x1 + xs')) :|: s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](s', 1 + (z - 1), 1 + (1 + y') + xs) :|: s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + z' + bubble(x, xs) :|: z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {bubble[Ite][False][Ite],bubble}, {len}, {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] bubble[Ite][False][Ite]: runtime: ?, size: O(n^1) [1 + z' + z''] bubble: runtime: ?, size: O(n^1) [1 + z + z'] ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: bubble[Ite][False][Ite] after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z'' Computed RUNTIME bound using CoFloCo for: bubble after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 3 + z' ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 2 }-> bsort(z - 1, bubble[Ite][False][Ite](s, x, 1 + x1 + xs')) :|: s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](s', 1 + (z - 1), 1 + (1 + y') + xs) :|: s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](2, 0, 1 + (1 + y'') + xs) :|: xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](1, z, 1 + 0 + (z' - 1)) :|: z' - 1 >= 0, z >= 0 bubble(z, z') -{ 1 }-> bubble[Ite][False][Ite](0, z, 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + x + bubble(z', xs) :|: xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 1 + z' + bubble(x, xs) :|: z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {len}, {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] bubble[Ite][False][Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] bubble: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + 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: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 5 + x1 + xs' }-> bsort(z - 1, s1) :|: s1 >= 0, s1 <= x + (1 + x1 + xs') + 1, s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 5 + xs + y' }-> s2 :|: s2 >= 0, s2 <= 1 + (z - 1) + (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 5 + xs + y'' }-> s3 :|: s3 >= 0, s3 <= 0 + (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= z + (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0 bubble(z, z') -{ 4 + x + xs }-> s5 :|: s5 >= 0, s5 <= z + (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s6 :|: s6 >= 0, s6 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + z' + s7 :|: s7 >= 0, s7 <= x + xs + 1, z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {len}, {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] bubble[Ite][False][Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] bubble: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] ---------------------------------------- (41) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: len after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 5 + x1 + xs' }-> bsort(z - 1, s1) :|: s1 >= 0, s1 <= x + (1 + x1 + xs') + 1, s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 5 + xs + y' }-> s2 :|: s2 >= 0, s2 <= 1 + (z - 1) + (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 5 + xs + y'' }-> s3 :|: s3 >= 0, s3 <= 0 + (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= z + (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0 bubble(z, z') -{ 4 + x + xs }-> s5 :|: s5 >= 0, s5 <= z + (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s6 :|: s6 >= 0, s6 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + z' + s7 :|: s7 >= 0, s7 <= x + xs + 1, z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {len}, {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] bubble[Ite][False][Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] bubble: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] len: runtime: ?, size: O(n^1) [z] ---------------------------------------- (43) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: len after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 4 + 2*z ---------------------------------------- (44) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 5 + x1 + xs' }-> bsort(z - 1, s1) :|: s1 >= 0, s1 <= x + (1 + x1 + xs') + 1, s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 5 + xs + y' }-> s2 :|: s2 >= 0, s2 <= 1 + (z - 1) + (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 5 + xs + y'' }-> s3 :|: s3 >= 0, s3 <= 0 + (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= z + (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0 bubble(z, z') -{ 4 + x + xs }-> s5 :|: s5 >= 0, s5 <= z + (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s6 :|: s6 >= 0, s6 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + z' + s7 :|: s7 >= 0, s7 <= x + xs + 1, z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 2 }-> bsort(plus(1 + 0, len(xs1)), 1 + x3 + xs1) :|: z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 2 }-> plus(1 + 0, plus(1 + 0, len(xs''))) :|: z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] bubble[Ite][False][Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] bubble: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] len: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z] ---------------------------------------- (45) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (46) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 5 + x1 + xs' }-> bsort(z - 1, s1) :|: s1 >= 0, s1 <= x + (1 + x1 + xs') + 1, s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 5 + xs + y' }-> s2 :|: s2 >= 0, s2 <= 1 + (z - 1) + (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 5 + xs + y'' }-> s3 :|: s3 >= 0, s3 <= 0 + (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= z + (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0 bubble(z, z') -{ 4 + x + xs }-> s5 :|: s5 >= 0, s5 <= z + (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s6 :|: s6 >= 0, s6 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + z' + s7 :|: s7 >= 0, s7 <= x + xs + 1, z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 6 + 2*xs1 }-> bsort(s12, 1 + x3 + xs1) :|: s11 >= 0, s11 <= xs1, s12 >= 0, s12 <= 1 + 0 + s11, z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 6 + 2*xs'' }-> s10 :|: s8 >= 0, s8 <= xs'', s9 >= 0, s9 <= 1 + 0 + s8, s10 >= 0, s10 <= 1 + 0 + s9, z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] bubble[Ite][False][Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] bubble: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] len: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z] ---------------------------------------- (47) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: bsort after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' ---------------------------------------- (48) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 5 + x1 + xs' }-> bsort(z - 1, s1) :|: s1 >= 0, s1 <= x + (1 + x1 + xs') + 1, s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 5 + xs + y' }-> s2 :|: s2 >= 0, s2 <= 1 + (z - 1) + (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 5 + xs + y'' }-> s3 :|: s3 >= 0, s3 <= 0 + (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= z + (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0 bubble(z, z') -{ 4 + x + xs }-> s5 :|: s5 >= 0, s5 <= z + (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s6 :|: s6 >= 0, s6 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + z' + s7 :|: s7 >= 0, s7 <= x + xs + 1, z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 6 + 2*xs1 }-> bsort(s12, 1 + x3 + xs1) :|: s11 >= 0, s11 <= xs1, s12 >= 0, s12 <= 1 + 0 + s11, z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 6 + 2*xs'' }-> s10 :|: s8 >= 0, s8 <= xs'', s9 >= 0, s9 <= 1 + 0 + s8, s10 >= 0, s10 <= 1 + 0 + s9, z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {bsort}, {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] bubble[Ite][False][Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] bubble: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] len: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z] bsort: runtime: ?, size: O(n^1) [z'] ---------------------------------------- (49) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: bsort after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 1 + 3*z + z*z' ---------------------------------------- (50) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bsort(z, z') -{ 5 + x1 + xs' }-> bsort(z - 1, s1) :|: s1 >= 0, s1 <= x + (1 + x1 + xs') + 1, s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 2 }-> bsort(z - 1, 1 + (z' - 1) + 0) :|: z - 1 >= 0, z' - 1 >= 0 bubble(z, z') -{ 5 + xs + y' }-> s2 :|: s2 >= 0, s2 <= 1 + (z - 1) + (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 5 + xs + y'' }-> s3 :|: s3 >= 0, s3 <= 0 + (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= z + (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0 bubble(z, z') -{ 4 + x + xs }-> s5 :|: s5 >= 0, s5 <= z + (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s6 :|: s6 >= 0, s6 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + z' + s7 :|: s7 >= 0, s7 <= x + xs + 1, z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 6 + 2*xs1 }-> bsort(s12, 1 + x3 + xs1) :|: s11 >= 0, s11 <= xs1, s12 >= 0, s12 <= 1 + 0 + s11, z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 bubblesort(z) -{ 2 }-> bsort(0, 0) :|: z = 0 len(z) -{ 6 + 2*xs'' }-> s10 :|: s8 >= 0, s8 <= xs'', s9 >= 0, s9 <= 1 + 0 + s8, s10 >= 0, s10 <= 1 + 0 + s9, z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] bubble[Ite][False][Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] bubble: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] len: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z] bsort: runtime: O(n^2) [1 + 3*z + z*z'], size: O(n^1) [z'] ---------------------------------------- (51) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (52) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 3 + -1*s1 + s1*z + x1 + xs' + 3*z }-> s13 :|: s13 >= 0, s13 <= s1, s1 >= 0, s1 <= x + (1 + x1 + xs') + 1, s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 3*z + z*z' + -1*z' }-> s14 :|: s14 >= 0, s14 <= 1 + (z' - 1) + 0, z - 1 >= 0, z' - 1 >= 0 bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bubble(z, z') -{ 5 + xs + y' }-> s2 :|: s2 >= 0, s2 <= 1 + (z - 1) + (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 5 + xs + y'' }-> s3 :|: s3 >= 0, s3 <= 0 + (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= z + (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0 bubble(z, z') -{ 4 + x + xs }-> s5 :|: s5 >= 0, s5 <= z + (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s6 :|: s6 >= 0, s6 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + z' + s7 :|: s7 >= 0, s7 <= x + xs + 1, z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 3 }-> s15 :|: s15 >= 0, s15 <= 0, z = 0 bubblesort(z) -{ 7 + 4*s12 + s12*x3 + s12*xs1 + 2*xs1 }-> s16 :|: s16 >= 0, s16 <= 1 + x3 + xs1, s11 >= 0, s11 <= xs1, s12 >= 0, s12 <= 1 + 0 + s11, z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 len(z) -{ 6 + 2*xs'' }-> s10 :|: s8 >= 0, s8 <= xs'', s9 >= 0, s9 <= 1 + 0 + s8, s10 >= 0, s10 <= 1 + 0 + s9, z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] bubble[Ite][False][Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] bubble: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] len: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z] bsort: runtime: O(n^2) [1 + 3*z + z*z'], size: O(n^1) [z'] ---------------------------------------- (53) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: bubblesort after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (54) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 3 + -1*s1 + s1*z + x1 + xs' + 3*z }-> s13 :|: s13 >= 0, s13 <= s1, s1 >= 0, s1 <= x + (1 + x1 + xs') + 1, s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 3*z + z*z' + -1*z' }-> s14 :|: s14 >= 0, s14 <= 1 + (z' - 1) + 0, z - 1 >= 0, z' - 1 >= 0 bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bubble(z, z') -{ 5 + xs + y' }-> s2 :|: s2 >= 0, s2 <= 1 + (z - 1) + (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 5 + xs + y'' }-> s3 :|: s3 >= 0, s3 <= 0 + (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= z + (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0 bubble(z, z') -{ 4 + x + xs }-> s5 :|: s5 >= 0, s5 <= z + (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s6 :|: s6 >= 0, s6 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + z' + s7 :|: s7 >= 0, s7 <= x + xs + 1, z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 3 }-> s15 :|: s15 >= 0, s15 <= 0, z = 0 bubblesort(z) -{ 7 + 4*s12 + s12*x3 + s12*xs1 + 2*xs1 }-> s16 :|: s16 >= 0, s16 <= 1 + x3 + xs1, s11 >= 0, s11 <= xs1, s12 >= 0, s12 <= 1 + 0 + s11, z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 len(z) -{ 6 + 2*xs'' }-> s10 :|: s8 >= 0, s8 <= xs'', s9 >= 0, s9 <= 1 + 0 + s8, s10 >= 0, s10 <= 1 + 0 + s9, z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: {bubblesort} Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] bubble[Ite][False][Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] bubble: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] len: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z] bsort: runtime: O(n^2) [1 + 3*z + z*z'], size: O(n^1) [z'] bubblesort: runtime: ?, size: O(n^1) [z] ---------------------------------------- (55) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: bubblesort after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 14 + 8*z + 2*z^2 ---------------------------------------- (56) Obligation: Complexity RNTS consisting of the following rules: bsort(z, z') -{ 3 + -1*s1 + s1*z + x1 + xs' + 3*z }-> s13 :|: s13 >= 0, s13 <= s1, s1 >= 0, s1 <= x + (1 + x1 + xs') + 1, s >= 0, s <= 2, x1 >= 0, z - 1 >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') bsort(z, z') -{ 3*z + z*z' + -1*z' }-> s14 :|: s14 >= 0, s14 <= 1 + (z' - 1) + 0, z - 1 >= 0, z' - 1 >= 0 bsort(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 bubble(z, z') -{ 5 + xs + y' }-> s2 :|: s2 >= 0, s2 <= 1 + (z - 1) + (1 + (1 + y') + xs) + 1, s' >= 0, s' <= 2, xs >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z - 1 >= 0 bubble(z, z') -{ 5 + xs + y'' }-> s3 :|: s3 >= 0, s3 <= 0 + (1 + (1 + y'') + xs) + 1, xs >= 0, z' = 1 + (1 + y'') + xs, y'' >= 0, z = 0 bubble(z, z') -{ 3 + z' }-> s4 :|: s4 >= 0, s4 <= z + (1 + 0 + (z' - 1)) + 1, z' - 1 >= 0, z >= 0 bubble(z, z') -{ 4 + x + xs }-> s5 :|: s5 >= 0, s5 <= z + (1 + x + xs) + 1, xs >= 0, z' = 1 + x + xs, z >= 0, x >= 0 bubble(z, z') -{ 1 }-> 1 + z + 0 :|: z >= 0, z' = 0 bubble[Ite][False][Ite](z, z', z'') -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0 bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + x + s6 :|: s6 >= 0, s6 <= z' + xs + 1, xs >= 0, z = 1, z' >= 0, x >= 0, z'' = 1 + x + xs bubble[Ite][False][Ite](z, z', z'') -{ 3 + xs }-> 1 + z' + s7 :|: s7 >= 0, s7 <= x + xs + 1, z = 2, xs >= 0, z' >= 0, x >= 0, z'' = 1 + x + xs bubblesort(z) -{ 3 }-> s15 :|: s15 >= 0, s15 <= 0, z = 0 bubblesort(z) -{ 7 + 4*s12 + s12*x3 + s12*xs1 + 2*xs1 }-> s16 :|: s16 >= 0, s16 <= 1 + x3 + xs1, s11 >= 0, s11 <= xs1, s12 >= 0, s12 <= 1 + 0 + s11, z = 1 + x3 + xs1, xs1 >= 0, x3 >= 0 len(z) -{ 6 + 2*xs'' }-> s10 :|: s8 >= 0, s8 <= xs'', s9 >= 0, s9 <= 1 + 0 + s8, s10 >= 0, s10 <= 1 + 0 + s9, z = 1 + x + (1 + x'' + xs''), x >= 0, xs'' >= 0, x'' >= 0 len(z) -{ 1 }-> 0 :|: z = 0 len(z) -{ 2 }-> 0 :|: z - 1 >= 0, v0 >= 0, v1 >= 0, 1 + 0 = v0, 0 = v1 len(z) -{ 2 }-> 1 + y :|: z - 1 >= 0, 1 + 0 = 1 + 0, y >= 0, 0 = y lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 plus(z, z') -{ 0 }-> 1 + z :|: z >= 0, z' = 1 + 0 plus(z, z') -{ 0 }-> 1 + z' :|: z = 1 + 0, z' >= 0 Function symbols to be analyzed: Previous analysis results are: lt: runtime: O(1) [0], size: O(1) [2] plus: runtime: O(1) [0], size: O(n^1) [z + z'] bubble[Ite][False][Ite]: runtime: O(n^1) [2 + z''], size: O(n^1) [1 + z' + z''] bubble: runtime: O(n^1) [3 + z'], size: O(n^1) [1 + z + z'] len: runtime: O(n^1) [4 + 2*z], size: O(n^1) [z] bsort: runtime: O(n^2) [1 + 3*z + z*z'], size: O(n^1) [z'] bubblesort: runtime: O(n^2) [14 + 8*z + 2*z^2], size: O(n^1) [z] ---------------------------------------- (57) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (58) BOUNDS(1, n^2) ---------------------------------------- (59) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (60) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: bsort(S(x'), Cons(x, xs)) -> bsort(x', bubble(x, xs)) len(Cons(x, xs)) -> +(S(0), len(xs)) bubble(x', Cons(x, xs)) -> bubble[Ite][False][Ite](<(x', x), x', Cons(x, xs)) len(Nil) -> 0 bubble(x, Nil) -> Cons(x, Nil) bsort(0, xs) -> xs bubblesort(xs) -> bsort(len(xs), xs) The (relative) TRS S consists of the following rules: +(x, S(0)) -> S(x) +(S(0), y) -> S(y) <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False bubble[Ite][False][Ite](False, x', Cons(x, xs)) -> Cons(x, bubble(x', xs)) bubble[Ite][False][Ite](True, x', Cons(x, xs)) -> Cons(x', bubble(x, xs)) Rewrite Strategy: INNERMOST ---------------------------------------- (61) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence len(Cons(x, xs)) ->^+ +(S(0), len(xs)) gives rise to a decreasing loop by considering the right hand sides subterm at position [1]. The pumping substitution is [xs / Cons(x, xs)]. The result substitution is [ ]. ---------------------------------------- (62) Complex Obligation (BEST) ---------------------------------------- (63) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: bsort(S(x'), Cons(x, xs)) -> bsort(x', bubble(x, xs)) len(Cons(x, xs)) -> +(S(0), len(xs)) bubble(x', Cons(x, xs)) -> bubble[Ite][False][Ite](<(x', x), x', Cons(x, xs)) len(Nil) -> 0 bubble(x, Nil) -> Cons(x, Nil) bsort(0, xs) -> xs bubblesort(xs) -> bsort(len(xs), xs) The (relative) TRS S consists of the following rules: +(x, S(0)) -> S(x) +(S(0), y) -> S(y) <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False bubble[Ite][False][Ite](False, x', Cons(x, xs)) -> Cons(x, bubble(x', xs)) bubble[Ite][False][Ite](True, x', Cons(x, xs)) -> Cons(x', bubble(x, xs)) Rewrite Strategy: INNERMOST ---------------------------------------- (64) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (65) BOUNDS(n^1, INF) ---------------------------------------- (66) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: bsort(S(x'), Cons(x, xs)) -> bsort(x', bubble(x, xs)) len(Cons(x, xs)) -> +(S(0), len(xs)) bubble(x', Cons(x, xs)) -> bubble[Ite][False][Ite](<(x', x), x', Cons(x, xs)) len(Nil) -> 0 bubble(x, Nil) -> Cons(x, Nil) bsort(0, xs) -> xs bubblesort(xs) -> bsort(len(xs), xs) The (relative) TRS S consists of the following rules: +(x, S(0)) -> S(x) +(S(0), y) -> S(y) <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False bubble[Ite][False][Ite](False, x', Cons(x, xs)) -> Cons(x, bubble(x', xs)) bubble[Ite][False][Ite](True, x', Cons(x, xs)) -> Cons(x', bubble(x, xs)) Rewrite Strategy: INNERMOST