WORST_CASE(?,O(1)) * Step 1: Desugar WORST_CASE(?,O(1)) + Considered Problem: type nat = 0 | S of nat ;; let pred x = match x with | 0 -> 0 | S(x') -> x' ;; + Applied Processor: Desugar {analysedFunction = Nothing} + Details: none * Step 2: Defunctionalization WORST_CASE(?,O(1)) + Considered Problem: λx : nat. (λpred : nat -> nat. pred x) (λx : nat. case x of | 0 -> 0 | S -> λx' : nat. x') : nat -> nat where 0 :: nat S :: nat -> nat + Applied Processor: Defunctionalization + Details: none * Step 3: Inline WORST_CASE(?,O(1)) + Considered Problem: 1: main_1(x0) x1 -> x1 x0 2: cond_pred_x(0()) -> 0() 3: cond_pred_x(S(x2)) -> x2 4: pred() x1 -> cond_pred_x(x1) 5: main(x0) -> main_1(x0) pred() where 0 :: nat S :: nat -> nat pred :: nat -> nat main_1 :: nat -> (nat -> nat) -> nat cond_pred_x :: nat -> nat main :: nat -> nat + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 4: Inline WORST_CASE(?,O(1)) + Considered Problem: 1: main_1(x0) x1 -> x1 x0 2: cond_pred_x(0()) -> 0() 3: cond_pred_x(S(x2)) -> x2 4: pred() x1 -> cond_pred_x(x1) 5: main(x0) -> pred() x0 where 0 :: nat S :: nat -> nat pred :: nat -> nat main_1 :: nat -> (nat -> nat) -> nat cond_pred_x :: nat -> nat main :: nat -> nat + Applied Processor: Inline {inlineType = InlineRewrite, inlineSelect = } + Details: none * Step 5: Inline WORST_CASE(?,O(1)) + Considered Problem: 1: main_1(x0) x1 -> x1 x0 2: cond_pred_x(0()) -> 0() 3: cond_pred_x(S(x2)) -> x2 4: pred() x1 -> cond_pred_x(x1) 5: main(x2) -> cond_pred_x(x2) where 0 :: nat S :: nat -> nat pred :: nat -> nat main_1 :: nat -> (nat -> nat) -> nat cond_pred_x :: nat -> nat main :: nat -> nat + Applied Processor: Inline {inlineType = InlineFull, inlineSelect = } + Details: none * Step 6: UsableRules WORST_CASE(?,O(1)) + Considered Problem: 1: main_1(x0) x1 -> x1 x0 2: cond_pred_x(0()) -> 0() 3: cond_pred_x(S(x2)) -> x2 4: pred() 0() -> 0() 5: pred() S(x4) -> x4 6: main(0()) -> 0() 7: main(S(x4)) -> x4 where 0 :: nat S :: nat -> nat pred :: nat -> nat main_1 :: nat -> (nat -> nat) -> nat cond_pred_x :: nat -> nat main :: nat -> nat + Applied Processor: UsableRules {urType = Syntactic} + Details: none * Step 7: UncurryATRS WORST_CASE(?,O(1)) + Considered Problem: 6: main(0()) -> 0() 7: main(S(x4)) -> x4 where 0 :: nat S :: nat -> nat main :: nat -> nat + Applied Processor: UncurryATRS + Details: none * Step 8: UsableRules WORST_CASE(?,O(1)) + Considered Problem: 1: main(0()) -> 0() 2: main(S(x4)) -> x4 where 0 :: nat S :: nat -> nat main :: nat -> nat + Applied Processor: UsableRules {urType = DFA} + Details: none * Step 9: Compression WORST_CASE(?,O(1)) + Considered Problem: 1: main(0()) -> 0() 2: main(S(x4)) -> x4 where 0 :: nat S :: nat -> nat main :: nat -> nat + Applied Processor: Compression + Details: none * Step 10: ToTctProblem WORST_CASE(?,O(1)) + Considered Problem: 1: main(0()) -> 0() 2: main(S(x4)) -> x4 where 0 :: nat S :: nat -> nat main :: nat -> nat + Applied Processor: ToTctProblem + Details: none * Step 11: DependencyPairs WORST_CASE(?,O(1)) + Considered Problem: - Strict TRS: main(0()) -> 0() main(S(x4)) -> x4 - Signature: {main/1} / {0/0,S/1} - Obligation: innermost runtime complexity wrt. defined symbols {main} and constructors {0,S} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs main#(0()) -> c_1() main#(S(x4)) -> c_2() Weak DPs and mark the set of starting terms. * Step 12: PredecessorEstimation WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: main#(0()) -> c_1() main#(S(x4)) -> c_2() - Weak TRS: main(0()) -> 0() main(S(x4)) -> x4 - Signature: {main/1,main#/1} / {0/0,S/1,c_1/0,c_2/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,S} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1,2} by application of Pre({1,2}) = {}. Here rules are labelled as follows: 1: main#(0()) -> c_1() 2: main#(S(x4)) -> c_2() * Step 13: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: main#(0()) -> c_1() main#(S(x4)) -> c_2() - Weak TRS: main(0()) -> 0() main(S(x4)) -> x4 - Signature: {main/1,main#/1} / {0/0,S/1,c_1/0,c_2/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,S} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:main#(0()) -> c_1() 2:W:main#(S(x4)) -> c_2() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: main#(S(x4)) -> c_2() 1: main#(0()) -> c_1() * Step 14: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: main(0()) -> 0() main(S(x4)) -> x4 - Signature: {main/1,main#/1} / {0/0,S/1,c_1/0,c_2/0} - Obligation: innermost runtime complexity wrt. defined symbols {main#} and constructors {0,S} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(1))