/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 (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) DependencyGraphProof [UPPER BOUND(ID), 0 ms] (2) CpxTRS (3) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTRS (5) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxWeightedTrs (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedTrs (9) CompletionProof [UPPER BOUND(ID), 0 ms] (10) CpxTypedWeightedCompleteTrs (11) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTypedWeightedCompleteTrs (13) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 2 ms] (14) CpxRNTS (15) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRNTS (17) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRNTS (19) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (20) CpxRNTS (21) IntTrsBoundProof [UPPER BOUND(ID), 149 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 60 ms] (24) CpxRNTS (25) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (26) CpxRNTS (27) IntTrsBoundProof [UPPER BOUND(ID), 453 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 116 ms] (30) CpxRNTS (31) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (32) CpxRNTS (33) IntTrsBoundProof [UPPER BOUND(ID), 298 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 105 ms] (36) CpxRNTS (37) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (38) CpxRNTS (39) IntTrsBoundProof [UPPER BOUND(ID), 241 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 145 ms] (42) CpxRNTS (43) FinalProof [FINISHED, 0 ms] (44) BOUNDS(1, n^2) (45) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (46) TRS for Loop Detection (47) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (48) BEST (49) proven lower bound (50) LowerBoundPropagationProof [FINISHED, 0 ms] (51) BOUNDS(n^1, INF) (52) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(0, y) -> y plus(s(x), y) -> s(plus(x, y)) sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l)))) pred(cons(s(x), nil)) -> cons(x, nil) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) DependencyGraphProof (UPPER BOUND(ID)) The following rules are not reachable from basic terms in the dependency graph and can be removed: sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l)))) ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) plus(0, y) -> y plus(s(x), y) -> s(plus(x, y)) pred(cons(s(x), nil)) -> cons(x, nil) S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. As the TRS is a non-duplicating overlay system, we have rc = irc. ---------------------------------------- (4) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) plus(0, y) -> y plus(s(x), y) -> s(plus(x, y)) pred(cons(s(x), nil)) -> cons(x, nil) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (5) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (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: app(nil, k) -> k [1] app(l, nil) -> l [1] app(cons(x, l), k) -> cons(x, app(l, k)) [1] sum(cons(x, nil)) -> cons(x, nil) [1] sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) [1] plus(0, y) -> y [1] plus(s(x), y) -> s(plus(x, y)) [1] pred(cons(s(x), nil)) -> cons(x, nil) [1] 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: app(nil, k) -> k [1] app(l, nil) -> l [1] app(cons(x, l), k) -> cons(x, app(l, k)) [1] sum(cons(x, nil)) -> cons(x, nil) [1] sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) [1] plus(0, y) -> y [1] plus(s(x), y) -> s(plus(x, y)) [1] pred(cons(s(x), nil)) -> cons(x, nil) [1] The TRS has the following type information: app :: nil:cons -> nil:cons -> nil:cons nil :: nil:cons cons :: 0:s -> nil:cons -> nil:cons sum :: nil:cons -> nil:cons plus :: 0:s -> 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s pred :: nil:cons -> nil:cons 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: app_2 sum_1 pred_1 (c) The following functions are completely defined: plus_2 Due to the following rules being added: none And the following fresh constants: none ---------------------------------------- (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: app(nil, k) -> k [1] app(l, nil) -> l [1] app(cons(x, l), k) -> cons(x, app(l, k)) [1] sum(cons(x, nil)) -> cons(x, nil) [1] sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) [1] plus(0, y) -> y [1] plus(s(x), y) -> s(plus(x, y)) [1] pred(cons(s(x), nil)) -> cons(x, nil) [1] The TRS has the following type information: app :: nil:cons -> nil:cons -> nil:cons nil :: nil:cons cons :: 0:s -> nil:cons -> nil:cons sum :: nil:cons -> nil:cons plus :: 0:s -> 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s pred :: nil:cons -> nil:cons 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: app(nil, k) -> k [1] app(l, nil) -> l [1] app(cons(x, l), k) -> cons(x, app(l, k)) [1] sum(cons(x, nil)) -> cons(x, nil) [1] sum(cons(0, cons(y, l))) -> sum(cons(y, l)) [2] sum(cons(s(x'), cons(y, l))) -> sum(cons(s(plus(x', y)), l)) [2] plus(0, y) -> y [1] plus(s(x), y) -> s(plus(x, y)) [1] pred(cons(s(x), nil)) -> cons(x, nil) [1] The TRS has the following type information: app :: nil:cons -> nil:cons -> nil:cons nil :: nil:cons cons :: 0:s -> nil:cons -> nil:cons sum :: nil:cons -> nil:cons plus :: 0:s -> 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s pred :: nil:cons -> nil:cons 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: nil => 0 0 => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> k :|: k >= 0, z' = k, z = 0 app(z, z') -{ 1 }-> l :|: z = l, l >= 0, z' = 0 app(z, z') -{ 1 }-> 1 + x + app(l, k) :|: x >= 0, l >= 0, z = 1 + x + l, k >= 0, z' = k plus(z, z') -{ 1 }-> y :|: y >= 0, z = 0, z' = y plus(z, z') -{ 1 }-> 1 + plus(x, y) :|: x >= 0, y >= 0, z = 1 + x, z' = y pred(z) -{ 1 }-> 1 + x + 0 :|: x >= 0, z = 1 + (1 + x) + 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + x + 0 :|: x >= 0, z = 1 + x + 0 ---------------------------------------- (15) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 1 }-> 1 + x + app(l, z') :|: x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 ---------------------------------------- (17) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { pred } { app } { plus } { sum } ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 1 }-> 1 + x + app(l, z') :|: x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {pred}, {app}, {plus}, {sum} ---------------------------------------- (19) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 1 }-> 1 + x + app(l, z') :|: x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {pred}, {app}, {plus}, {sum} ---------------------------------------- (21) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: pred after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 1 }-> 1 + x + app(l, z') :|: x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {pred}, {app}, {plus}, {sum} Previous analysis results are: pred: runtime: ?, size: O(n^1) [z] ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: pred 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: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 1 }-> 1 + x + app(l, z') :|: x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {app}, {plus}, {sum} Previous analysis results are: pred: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (25) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 1 }-> 1 + x + app(l, z') :|: x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {app}, {plus}, {sum} Previous analysis results are: pred: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (27) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: app after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z + z' ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 1 }-> 1 + x + app(l, z') :|: x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {app}, {plus}, {sum} Previous analysis results are: pred: runtime: O(1) [1], size: O(n^1) [z] app: runtime: ?, size: O(n^1) [z + z'] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: app 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: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 1 }-> 1 + x + app(l, z') :|: x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {plus}, {sum} Previous analysis results are: pred: runtime: O(1) [1], size: O(n^1) [z] app: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] ---------------------------------------- (31) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 2 + l }-> 1 + x + s :|: s >= 0, s <= l + z', x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {plus}, {sum} Previous analysis results are: pred: runtime: O(1) [1], size: O(n^1) [z] app: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] ---------------------------------------- (33) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: plus after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z + z' ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 2 + l }-> 1 + x + s :|: s >= 0, s <= l + z', x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {plus}, {sum} Previous analysis results are: pred: runtime: O(1) [1], size: O(n^1) [z] app: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] plus: runtime: ?, size: O(n^1) [z + z'] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: plus after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 2 + l }-> 1 + x + s :|: s >= 0, s <= l + z', x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 }-> 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 2 }-> sum(1 + (1 + plus(x', y)) + l) :|: x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {sum} Previous analysis results are: pred: runtime: O(1) [1], size: O(n^1) [z] app: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] plus: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] ---------------------------------------- (37) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 2 + l }-> 1 + x + s :|: s >= 0, s <= l + z', x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1 + z', z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 3 + x' }-> sum(1 + (1 + s') + l) :|: s' >= 0, s' <= x' + y, x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {sum} Previous analysis results are: pred: runtime: O(1) [1], size: O(n^1) [z] app: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] plus: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] ---------------------------------------- (39) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: sum after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 2 + l }-> 1 + x + s :|: s >= 0, s <= l + z', x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1 + z', z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 3 + x' }-> sum(1 + (1 + s') + l) :|: s' >= 0, s' <= x' + y, x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {sum} Previous analysis results are: pred: runtime: O(1) [1], size: O(n^1) [z] app: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] plus: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] sum: runtime: ?, size: O(n^1) [z] ---------------------------------------- (41) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: sum after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 3 + 2*z + z^2 ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 2 + l }-> 1 + x + s :|: s >= 0, s <= l + z', x >= 0, l >= 0, z = 1 + x + l, z' >= 0 plus(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 plus(z, z') -{ 1 + z }-> 1 + s'' :|: s'' >= 0, s'' <= z - 1 + z', z - 1 >= 0, z' >= 0 pred(z) -{ 1 }-> 1 + (z - 2) + 0 :|: z - 2 >= 0 sum(z) -{ 2 }-> sum(1 + y + l) :|: y >= 0, l >= 0, z = 1 + 0 + (1 + y + l) sum(z) -{ 3 + x' }-> sum(1 + (1 + s') + l) :|: s' >= 0, s' <= x' + y, x' >= 0, y >= 0, z = 1 + (1 + x') + (1 + y + l), l >= 0 sum(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: Previous analysis results are: pred: runtime: O(1) [1], size: O(n^1) [z] app: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] plus: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] sum: runtime: O(n^2) [3 + 2*z + z^2], size: O(n^1) [z] ---------------------------------------- (43) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (44) BOUNDS(1, n^2) ---------------------------------------- (45) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (46) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(0, y) -> y plus(s(x), y) -> s(plus(x, y)) sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l)))) pred(cons(s(x), nil)) -> cons(x, nil) S is empty. Rewrite Strategy: FULL ---------------------------------------- (47) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence app(cons(x, l), k) ->^+ cons(x, app(l, k)) gives rise to a decreasing loop by considering the right hand sides subterm at position [1]. The pumping substitution is [l / cons(x, l)]. The result substitution is [ ]. ---------------------------------------- (48) Complex Obligation (BEST) ---------------------------------------- (49) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(0, y) -> y plus(s(x), y) -> s(plus(x, y)) sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l)))) pred(cons(s(x), nil)) -> cons(x, nil) S is empty. Rewrite Strategy: FULL ---------------------------------------- (50) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (51) BOUNDS(n^1, INF) ---------------------------------------- (52) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: app(nil, k) -> k app(l, nil) -> l app(cons(x, l), k) -> cons(x, app(l, k)) sum(cons(x, nil)) -> cons(x, nil) sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l)) sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k))))) plus(0, y) -> y plus(s(x), y) -> s(plus(x, y)) sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l)))) pred(cons(s(x), nil)) -> cons(x, nil) S is empty. Rewrite Strategy: FULL