* Step 1: Sum WORST_CASE(Omega(n^1),?)
+ Considered Problem:
- Strict TRS:
head(cons(x,l)) -> x
head(nil()) -> undefined()
if(false(),x,l,accu,orig) -> accu
if(true(),x,l,accu,orig) -> rev(s(x),tail(l),cons(head(l),accu),orig)
length(cons(x,l)) -> s(length(l))
length(nil()) -> 0()
lt(x,0()) -> false()
lt(0(),s(y)) -> true()
lt(s(x),s(y)) -> lt(x,y)
rev(x,l,accu,orig) -> if(lt(x,length(orig)),x,l,accu,orig)
reverse(l) -> rev(0(),l,nil(),l)
tail(cons(x,l)) -> l
tail(nil()) -> nil()
- Signature:
{head/1,if/5,length/1,lt/2,rev/4,reverse/1,tail/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,undefined/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {head,if,length,lt,rev,reverse,tail} and constructors {0
,cons,false,nil,s,true,undefined}
+ Applied Processor:
Sum {left = someStrategy, right = someStrategy}
+ Details:
()
* Step 2: DecreasingLoops WORST_CASE(Omega(n^1),?)
+ Considered Problem:
- Strict TRS:
head(cons(x,l)) -> x
head(nil()) -> undefined()
if(false(),x,l,accu,orig) -> accu
if(true(),x,l,accu,orig) -> rev(s(x),tail(l),cons(head(l),accu),orig)
length(cons(x,l)) -> s(length(l))
length(nil()) -> 0()
lt(x,0()) -> false()
lt(0(),s(y)) -> true()
lt(s(x),s(y)) -> lt(x,y)
rev(x,l,accu,orig) -> if(lt(x,length(orig)),x,l,accu,orig)
reverse(l) -> rev(0(),l,nil(),l)
tail(cons(x,l)) -> l
tail(nil()) -> nil()
- Signature:
{head/1,if/5,length/1,lt/2,rev/4,reverse/1,tail/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,undefined/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {head,if,length,lt,rev,reverse,tail} and constructors {0
,cons,false,nil,s,true,undefined}
+ Applied Processor:
DecreasingLoops {bound = AnyLoop, narrow = 10}
+ Details:
The system has following decreasing Loops:
length(y){y -> cons(x,y)} =
length(cons(x,y)) ->^+ s(length(y))
= C[length(y) = length(y){}]
WORST_CASE(Omega(n^1),?)