* Step 1: Sum WORST_CASE(Omega(n^1),?)
+ Considered Problem:
- Strict TRS:
bitIter(x,y) -> if(zero(x),x,inc(y))
bits(x) -> bitIter(x,0())
half(0()) -> 0()
half(s(0())) -> 0()
half(s(s(x))) -> s(half(x))
if(false(),x,y) -> bitIter(half(x),y)
if(true(),x,y) -> p(y)
inc(0()) -> 0()
inc(s(x)) -> s(inc(x))
p(0()) -> 0()
p(s(x)) -> x
zero(0()) -> true()
zero(s(x)) -> false()
- Signature:
{bitIter/2,bits/1,half/1,if/3,inc/1,p/1,zero/1} / {0/0,false/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {bitIter,bits,half,if,inc,p,zero} and constructors {0
,false,s,true}
+ Applied Processor:
Sum {left = someStrategy, right = someStrategy}
+ Details:
()
* Step 2: DecreasingLoops WORST_CASE(Omega(n^1),?)
+ Considered Problem:
- Strict TRS:
bitIter(x,y) -> if(zero(x),x,inc(y))
bits(x) -> bitIter(x,0())
half(0()) -> 0()
half(s(0())) -> 0()
half(s(s(x))) -> s(half(x))
if(false(),x,y) -> bitIter(half(x),y)
if(true(),x,y) -> p(y)
inc(0()) -> 0()
inc(s(x)) -> s(inc(x))
p(0()) -> 0()
p(s(x)) -> x
zero(0()) -> true()
zero(s(x)) -> false()
- Signature:
{bitIter/2,bits/1,half/1,if/3,inc/1,p/1,zero/1} / {0/0,false/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {bitIter,bits,half,if,inc,p,zero} and constructors {0
,false,s,true}
+ Applied Processor:
DecreasingLoops {bound = AnyLoop, narrow = 10}
+ Details:
The system has following decreasing Loops:
half(x){x -> s(s(x))} =
half(s(s(x))) ->^+ s(half(x))
= C[half(x) = half(x){}]
WORST_CASE(Omega(n^1),?)