MAYBE proof of input_KflHDtd6fD.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). (0) CpxTRS (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (4) CpxTRS (5) RelTrsToWeightedTrsProof [UPPER BOUND(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), 0 ms] (14) CpxRNTS (15) InliningProof [UPPER BOUND(ID), 183 ms] (16) CpxRNTS (17) SimplificationProof [BOTH BOUNDS(ID, ID), 0 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), 227 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 8 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 110 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 0 ms] (32) CpxRNTS (33) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 718 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 188 ms] (38) CpxRNTS (39) CompletionProof [UPPER BOUND(ID), 0 ms] (40) CpxTypedWeightedCompleteTrs (41) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (42) CpxRNTS (43) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (44) CdtProblem (45) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (46) CdtProblem (47) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (48) CdtProblem (49) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (50) CdtProblem (51) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (52) CdtProblem (53) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (54) CdtProblem (55) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 19 ms] (56) CdtProblem (57) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (58) CdtProblem (59) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (60) CdtProblem (61) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (62) CdtProblem (63) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (64) CdtProblem (65) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (66) CdtProblem ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: zeros -> cons(0, n__zeros) and(tt, X) -> activate(X) length(nil) -> 0 length(cons(N, L)) -> s(length(activate(L))) zeros -> n__zeros activate(n__zeros) -> zeros activate(X) -> X S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (2) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: zeros -> cons(0', n__zeros) and(tt, X) -> activate(X) length(nil) -> 0' length(cons(N, L)) -> s(length(activate(L))) zeros -> n__zeros activate(n__zeros) -> zeros activate(X) -> X S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (3) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (4) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: zeros -> cons(0, n__zeros) and(tt, X) -> activate(X) length(nil) -> 0 length(cons(N, L)) -> s(length(activate(L))) zeros -> n__zeros activate(n__zeros) -> zeros activate(X) -> X S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (5) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (6) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: zeros -> cons(0, n__zeros) [1] and(tt, X) -> activate(X) [1] length(nil) -> 0 [1] length(cons(N, L)) -> s(length(activate(L))) [1] zeros -> n__zeros [1] activate(n__zeros) -> zeros [1] activate(X) -> X [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: zeros -> cons(0, n__zeros) [1] and(tt, X) -> activate(X) [1] length(nil) -> 0 [1] length(cons(N, L)) -> s(length(activate(L))) [1] zeros -> n__zeros [1] activate(n__zeros) -> zeros [1] activate(X) -> X [1] The TRS has the following type information: zeros :: n__zeros:cons:nil cons :: 0:s -> n__zeros:cons:nil -> n__zeros:cons:nil 0 :: 0:s n__zeros :: n__zeros:cons:nil and :: tt -> n__zeros:cons:nil -> n__zeros:cons:nil tt :: tt activate :: n__zeros:cons:nil -> n__zeros:cons:nil length :: n__zeros:cons:nil -> 0:s nil :: n__zeros:cons:nil s :: 0:s -> 0:s 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: and_2 length_1 (c) The following functions are completely defined: activate_1 zeros 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: zeros -> cons(0, n__zeros) [1] and(tt, X) -> activate(X) [1] length(nil) -> 0 [1] length(cons(N, L)) -> s(length(activate(L))) [1] zeros -> n__zeros [1] activate(n__zeros) -> zeros [1] activate(X) -> X [1] The TRS has the following type information: zeros :: n__zeros:cons:nil cons :: 0:s -> n__zeros:cons:nil -> n__zeros:cons:nil 0 :: 0:s n__zeros :: n__zeros:cons:nil and :: tt -> n__zeros:cons:nil -> n__zeros:cons:nil tt :: tt activate :: n__zeros:cons:nil -> n__zeros:cons:nil length :: n__zeros:cons:nil -> 0:s nil :: n__zeros:cons:nil s :: 0:s -> 0:s 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: zeros -> cons(0, n__zeros) [1] and(tt, X) -> activate(X) [1] length(nil) -> 0 [1] length(cons(N, n__zeros)) -> s(length(zeros)) [2] length(cons(N, L)) -> s(length(L)) [2] zeros -> n__zeros [1] activate(n__zeros) -> zeros [1] activate(X) -> X [1] The TRS has the following type information: zeros :: n__zeros:cons:nil cons :: 0:s -> n__zeros:cons:nil -> n__zeros:cons:nil 0 :: 0:s n__zeros :: n__zeros:cons:nil and :: tt -> n__zeros:cons:nil -> n__zeros:cons:nil tt :: tt activate :: n__zeros:cons:nil -> n__zeros:cons:nil length :: n__zeros:cons:nil -> 0:s nil :: n__zeros:cons:nil s :: 0:s -> 0:s 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 n__zeros => 0 tt => 0 nil => 1 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> X :|: X >= 0, z = X activate(z) -{ 1 }-> zeros :|: z = 0 and(z, z') -{ 1 }-> activate(X) :|: z' = X, X >= 0, z = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 2 }-> 1 + length(zeros) :|: z = 1 + N + 0, N >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: ---------------------------------------- (15) InliningProof (UPPER BOUND(ID)) Inlined the following terminating rules on right-hand sides where appropriate: zeros -{ 1 }-> 1 + 0 + 0 :|: zeros -{ 1 }-> 0 :|: activate(z) -{ 1 }-> X :|: X >= 0, z = X activate(z) -{ 1 }-> zeros :|: z = 0 ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> X :|: X >= 0, z = X activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 2 }-> X' :|: z' = X, X >= 0, z = 0, X' >= 0, X = X' and(z, z') -{ 2 }-> zeros :|: z' = X, X >= 0, z = 0, X = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z = 1 + N + 0, N >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z = 1 + N + 0, N >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: ---------------------------------------- (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: activate(z) -{ 1 }-> z :|: z >= 0 activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 2 }-> z' :|: z' >= 0, z = 0 and(z, z') -{ 2 }-> zeros :|: z' >= 0, z = 0, z' = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z - 1 >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z - 1 >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: ---------------------------------------- (19) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { activate } { zeros } { length } { and } ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> z :|: z >= 0 activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 2 }-> z' :|: z' >= 0, z = 0 and(z, z') -{ 2 }-> zeros :|: z' >= 0, z = 0, z' = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z - 1 >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z - 1 >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: Function symbols to be analyzed: {activate}, {zeros}, {length}, {and} ---------------------------------------- (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: activate(z) -{ 1 }-> z :|: z >= 0 activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 2 }-> z' :|: z' >= 0, z = 0 and(z, z') -{ 2 }-> zeros :|: z' >= 0, z = 0, z' = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z - 1 >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z - 1 >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: Function symbols to be analyzed: {activate}, {zeros}, {length}, {and} ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: activate after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> z :|: z >= 0 activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 2 }-> z' :|: z' >= 0, z = 0 and(z, z') -{ 2 }-> zeros :|: z' >= 0, z = 0, z' = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z - 1 >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z - 1 >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: Function symbols to be analyzed: {activate}, {zeros}, {length}, {and} Previous analysis results are: activate: runtime: ?, size: O(n^1) [1 + z] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: activate after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 2 ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> z :|: z >= 0 activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 2 }-> z' :|: z' >= 0, z = 0 and(z, z') -{ 2 }-> zeros :|: z' >= 0, z = 0, z' = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z - 1 >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z - 1 >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: Function symbols to be analyzed: {zeros}, {length}, {and} Previous analysis results are: activate: runtime: O(1) [2], size: O(n^1) [1 + z] ---------------------------------------- (27) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> z :|: z >= 0 activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 2 }-> z' :|: z' >= 0, z = 0 and(z, z') -{ 2 }-> zeros :|: z' >= 0, z = 0, z' = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z - 1 >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z - 1 >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: Function symbols to be analyzed: {zeros}, {length}, {and} Previous analysis results are: activate: runtime: O(1) [2], size: O(n^1) [1 + z] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: zeros after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> z :|: z >= 0 activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 2 }-> z' :|: z' >= 0, z = 0 and(z, z') -{ 2 }-> zeros :|: z' >= 0, z = 0, z' = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z - 1 >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z - 1 >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: Function symbols to be analyzed: {zeros}, {length}, {and} Previous analysis results are: activate: runtime: O(1) [2], size: O(n^1) [1 + z] zeros: runtime: ?, size: O(1) [1] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: zeros after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> z :|: z >= 0 activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 2 }-> z' :|: z' >= 0, z = 0 and(z, z') -{ 2 }-> zeros :|: z' >= 0, z = 0, z' = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z - 1 >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z - 1 >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: Function symbols to be analyzed: {length}, {and} Previous analysis results are: activate: runtime: O(1) [2], size: O(n^1) [1 + z] zeros: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (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: activate(z) -{ 1 }-> z :|: z >= 0 activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 3 }-> s :|: s >= 0, s <= 1, z' >= 0, z = 0, z' = 0 and(z, z') -{ 2 }-> z' :|: z' >= 0, z = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z - 1 >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z - 1 >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: Function symbols to be analyzed: {length}, {and} Previous analysis results are: activate: runtime: O(1) [2], size: O(n^1) [1 + z] zeros: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: length after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> z :|: z >= 0 activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 3 }-> s :|: s >= 0, s <= 1, z' >= 0, z = 0, z' = 0 and(z, z') -{ 2 }-> z' :|: z' >= 0, z = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z - 1 >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z - 1 >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: Function symbols to be analyzed: {length}, {and} Previous analysis results are: activate: runtime: O(1) [2], size: O(n^1) [1 + z] zeros: runtime: O(1) [1], size: O(1) [1] length: runtime: ?, size: INF ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: length after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> z :|: z >= 0 activate(z) -{ 2 }-> 0 :|: z = 0 activate(z) -{ 2 }-> 1 + 0 + 0 :|: z = 0 and(z, z') -{ 3 }-> s :|: s >= 0, s <= 1, z' >= 0, z = 0, z' = 0 and(z, z') -{ 2 }-> z' :|: z' >= 0, z = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 2 }-> 1 + length(L) :|: z = 1 + N + L, L >= 0, N >= 0 length(z) -{ 3 }-> 1 + length(0) :|: z - 1 >= 0 length(z) -{ 3 }-> 1 + length(1 + 0 + 0) :|: z - 1 >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: Function symbols to be analyzed: {length}, {and} Previous analysis results are: activate: runtime: O(1) [2], size: O(n^1) [1 + z] zeros: runtime: O(1) [1], size: O(1) [1] length: runtime: INF, size: INF ---------------------------------------- (39) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: length(v0) -> null_length [0] And the following fresh constants: null_length ---------------------------------------- (40) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: zeros -> cons(0, n__zeros) [1] and(tt, X) -> activate(X) [1] length(nil) -> 0 [1] length(cons(N, L)) -> s(length(activate(L))) [1] zeros -> n__zeros [1] activate(n__zeros) -> zeros [1] activate(X) -> X [1] length(v0) -> null_length [0] The TRS has the following type information: zeros :: n__zeros:cons:nil cons :: 0:s:null_length -> n__zeros:cons:nil -> n__zeros:cons:nil 0 :: 0:s:null_length n__zeros :: n__zeros:cons:nil and :: tt -> n__zeros:cons:nil -> n__zeros:cons:nil tt :: tt activate :: n__zeros:cons:nil -> n__zeros:cons:nil length :: n__zeros:cons:nil -> 0:s:null_length nil :: n__zeros:cons:nil s :: 0:s:null_length -> 0:s:null_length null_length :: 0:s:null_length Rewrite Strategy: INNERMOST ---------------------------------------- (41) 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 n__zeros => 0 tt => 0 nil => 1 null_length => 0 ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: activate(z) -{ 1 }-> X :|: X >= 0, z = X activate(z) -{ 1 }-> zeros :|: z = 0 and(z, z') -{ 1 }-> activate(X) :|: z' = X, X >= 0, z = 0 length(z) -{ 1 }-> 0 :|: z = 1 length(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 length(z) -{ 1 }-> 1 + length(activate(L)) :|: z = 1 + N + L, L >= 0, N >= 0 zeros -{ 1 }-> 0 :|: zeros -{ 1 }-> 1 + 0 + 0 :|: Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (43) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (44) Obligation: Complexity Dependency Tuples Problem Rules: zeros -> cons(0, n__zeros) zeros -> n__zeros and(tt, z0) -> activate(z0) length(nil) -> 0 length(cons(z0, z1)) -> s(length(activate(z1))) activate(n__zeros) -> zeros activate(z0) -> z0 Tuples: ZEROS -> c ZEROS -> c1 AND(tt, z0) -> c2(ACTIVATE(z0)) LENGTH(nil) -> c3 LENGTH(cons(z0, z1)) -> c4(LENGTH(activate(z1)), ACTIVATE(z1)) ACTIVATE(n__zeros) -> c5(ZEROS) ACTIVATE(z0) -> c6 S tuples: ZEROS -> c ZEROS -> c1 AND(tt, z0) -> c2(ACTIVATE(z0)) LENGTH(nil) -> c3 LENGTH(cons(z0, z1)) -> c4(LENGTH(activate(z1)), ACTIVATE(z1)) ACTIVATE(n__zeros) -> c5(ZEROS) ACTIVATE(z0) -> c6 K tuples:none Defined Rule Symbols: zeros, and_2, length_1, activate_1 Defined Pair Symbols: ZEROS, AND_2, LENGTH_1, ACTIVATE_1 Compound Symbols: c, c1, c2_1, c3, c4_2, c5_1, c6 ---------------------------------------- (45) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 6 trailing nodes: ACTIVATE(n__zeros) -> c5(ZEROS) LENGTH(nil) -> c3 ZEROS -> c1 ZEROS -> c ACTIVATE(z0) -> c6 AND(tt, z0) -> c2(ACTIVATE(z0)) ---------------------------------------- (46) Obligation: Complexity Dependency Tuples Problem Rules: zeros -> cons(0, n__zeros) zeros -> n__zeros and(tt, z0) -> activate(z0) length(nil) -> 0 length(cons(z0, z1)) -> s(length(activate(z1))) activate(n__zeros) -> zeros activate(z0) -> z0 Tuples: LENGTH(cons(z0, z1)) -> c4(LENGTH(activate(z1)), ACTIVATE(z1)) S tuples: LENGTH(cons(z0, z1)) -> c4(LENGTH(activate(z1)), ACTIVATE(z1)) K tuples:none Defined Rule Symbols: zeros, and_2, length_1, activate_1 Defined Pair Symbols: LENGTH_1 Compound Symbols: c4_2 ---------------------------------------- (47) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (48) Obligation: Complexity Dependency Tuples Problem Rules: zeros -> cons(0, n__zeros) zeros -> n__zeros and(tt, z0) -> activate(z0) length(nil) -> 0 length(cons(z0, z1)) -> s(length(activate(z1))) activate(n__zeros) -> zeros activate(z0) -> z0 Tuples: LENGTH(cons(z0, z1)) -> c4(LENGTH(activate(z1))) S tuples: LENGTH(cons(z0, z1)) -> c4(LENGTH(activate(z1))) K tuples:none Defined Rule Symbols: zeros, and_2, length_1, activate_1 Defined Pair Symbols: LENGTH_1 Compound Symbols: c4_1 ---------------------------------------- (49) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: and(tt, z0) -> activate(z0) length(nil) -> 0 length(cons(z0, z1)) -> s(length(activate(z1))) ---------------------------------------- (50) Obligation: Complexity Dependency Tuples Problem Rules: activate(n__zeros) -> zeros activate(z0) -> z0 zeros -> cons(0, n__zeros) zeros -> n__zeros Tuples: LENGTH(cons(z0, z1)) -> c4(LENGTH(activate(z1))) S tuples: LENGTH(cons(z0, z1)) -> c4(LENGTH(activate(z1))) K tuples:none Defined Rule Symbols: activate_1, zeros Defined Pair Symbols: LENGTH_1 Compound Symbols: c4_1 ---------------------------------------- (51) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace LENGTH(cons(z0, z1)) -> c4(LENGTH(activate(z1))) by LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(zeros)) LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) ---------------------------------------- (52) Obligation: Complexity Dependency Tuples Problem Rules: activate(n__zeros) -> zeros activate(z0) -> z0 zeros -> cons(0, n__zeros) zeros -> n__zeros Tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(zeros)) LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) S tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(zeros)) LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) K tuples:none Defined Rule Symbols: activate_1, zeros Defined Pair Symbols: LENGTH_1 Compound Symbols: c4_1 ---------------------------------------- (53) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: activate(n__zeros) -> zeros activate(z0) -> z0 ---------------------------------------- (54) Obligation: Complexity Dependency Tuples Problem Rules: zeros -> cons(0, n__zeros) zeros -> n__zeros Tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(zeros)) LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) S tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(zeros)) LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) K tuples:none Defined Rule Symbols: zeros Defined Pair Symbols: LENGTH_1 Compound Symbols: c4_1 ---------------------------------------- (55) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) We considered the (Usable) Rules: zeros -> n__zeros zeros -> cons(0, n__zeros) And the Tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(zeros)) LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(LENGTH(x_1)) = x_1 POL(c4(x_1)) = x_1 POL(cons(x_1, x_2)) = [1] + x_1 + x_2 POL(n__zeros) = [1] POL(zeros) = [2] ---------------------------------------- (56) Obligation: Complexity Dependency Tuples Problem Rules: zeros -> cons(0, n__zeros) zeros -> n__zeros Tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(zeros)) LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) S tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(zeros)) K tuples: LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) Defined Rule Symbols: zeros Defined Pair Symbols: LENGTH_1 Compound Symbols: c4_1 ---------------------------------------- (57) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(zeros)) by LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(cons(0, n__zeros))) LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(n__zeros)) ---------------------------------------- (58) Obligation: Complexity Dependency Tuples Problem Rules: zeros -> cons(0, n__zeros) zeros -> n__zeros Tuples: LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(cons(0, n__zeros))) LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(n__zeros)) S tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(cons(0, n__zeros))) LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(n__zeros)) K tuples: LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) Defined Rule Symbols: zeros Defined Pair Symbols: LENGTH_1 Compound Symbols: c4_1 ---------------------------------------- (59) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(n__zeros)) ---------------------------------------- (60) Obligation: Complexity Dependency Tuples Problem Rules: zeros -> cons(0, n__zeros) zeros -> n__zeros Tuples: LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(cons(0, n__zeros))) S tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(cons(0, n__zeros))) K tuples: LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) Defined Rule Symbols: zeros Defined Pair Symbols: LENGTH_1 Compound Symbols: c4_1 ---------------------------------------- (61) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: zeros -> cons(0, n__zeros) zeros -> n__zeros ---------------------------------------- (62) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(cons(0, n__zeros))) S tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(cons(0, n__zeros))) K tuples: LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) Defined Rule Symbols:none Defined Pair Symbols: LENGTH_1 Compound Symbols: c4_1 ---------------------------------------- (63) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace LENGTH(cons(x0, z0)) -> c4(LENGTH(z0)) by LENGTH(cons(z0, cons(y0, y1))) -> c4(LENGTH(cons(y0, y1))) LENGTH(cons(z0, cons(y0, n__zeros))) -> c4(LENGTH(cons(y0, n__zeros))) ---------------------------------------- (64) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(cons(0, n__zeros))) LENGTH(cons(z0, cons(y0, y1))) -> c4(LENGTH(cons(y0, y1))) LENGTH(cons(z0, cons(y0, n__zeros))) -> c4(LENGTH(cons(y0, n__zeros))) S tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(cons(0, n__zeros))) K tuples: LENGTH(cons(z0, cons(y0, y1))) -> c4(LENGTH(cons(y0, y1))) LENGTH(cons(z0, cons(y0, n__zeros))) -> c4(LENGTH(cons(y0, n__zeros))) Defined Rule Symbols:none Defined Pair Symbols: LENGTH_1 Compound Symbols: c4_1 ---------------------------------------- (65) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace LENGTH(cons(z0, cons(y0, y1))) -> c4(LENGTH(cons(y0, y1))) by LENGTH(cons(z0, cons(z1, n__zeros))) -> c4(LENGTH(cons(z1, n__zeros))) LENGTH(cons(z0, cons(z1, cons(y1, y2)))) -> c4(LENGTH(cons(z1, cons(y1, y2)))) LENGTH(cons(z0, cons(z1, cons(y1, n__zeros)))) -> c4(LENGTH(cons(z1, cons(y1, n__zeros)))) ---------------------------------------- (66) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(cons(0, n__zeros))) LENGTH(cons(z0, cons(y0, n__zeros))) -> c4(LENGTH(cons(y0, n__zeros))) LENGTH(cons(z0, cons(z1, cons(y1, y2)))) -> c4(LENGTH(cons(z1, cons(y1, y2)))) LENGTH(cons(z0, cons(z1, cons(y1, n__zeros)))) -> c4(LENGTH(cons(z1, cons(y1, n__zeros)))) S tuples: LENGTH(cons(x0, n__zeros)) -> c4(LENGTH(cons(0, n__zeros))) K tuples: LENGTH(cons(z0, cons(y0, n__zeros))) -> c4(LENGTH(cons(y0, n__zeros))) LENGTH(cons(z0, cons(z1, cons(y1, y2)))) -> c4(LENGTH(cons(z1, cons(y1, y2)))) LENGTH(cons(z0, cons(z1, cons(y1, n__zeros)))) -> c4(LENGTH(cons(z1, cons(y1, n__zeros)))) Defined Rule Symbols:none Defined Pair Symbols: LENGTH_1 Compound Symbols: c4_1