* Step 1: Sum WORST_CASE(Omega(n^1),?)
+ Considered Problem:
- Strict TRS:
a() -> c()
a() -> d()
ge(x,0()) -> true()
ge(0(),s(y)) -> false()
ge(s(x),s(y)) -> ge(x,y)
gen(x,y,z) -> if(ge(z,x),x,y,z)
generate(x,y) -> gen(x,y,0())
head(cons(x,xs)) -> x
head(nil()) -> error()
if(false(),x,y,z) -> cons(y,gen(x,y,s(z)))
if(true(),x,y,z) -> nil()
ifsum(false(),b,xs,y) -> ifsum2(b,xs,y)
ifsum(true(),b,xs,y) -> y
ifsum2(false(),xs,y) -> sum2(cons(p(head(xs)),tail(xs)),s(y))
ifsum2(true(),xs,y) -> sum2(tail(xs),y)
isNil(cons(x,xs)) -> false()
isNil(nil()) -> true()
isZero(0()) -> true()
isZero(s(0())) -> false()
isZero(s(s(x))) -> isZero(s(x))
p(0()) -> s(s(0()))
p(s(0())) -> 0()
p(s(s(x))) -> s(p(s(x)))
sum(xs) -> sum2(xs,0())
sum2(xs,y) -> ifsum(isNil(xs),isZero(head(xs)),xs,y)
tail(cons(x,xs)) -> xs
tail(nil()) -> nil()
times(x,y) -> sum(generate(x,y))
- Signature:
{a/0,ge/2,gen/3,generate/2,head/1,if/4,ifsum/4,ifsum2/3,isNil/1,isZero/1,p/1,sum/1,sum2/2,tail/1
,times/2} / {0/0,c/0,cons/2,d/0,error/0,false/0,nil/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {a,ge,gen,generate,head,if,ifsum,ifsum2,isNil,isZero,p,sum
,sum2,tail,times} and constructors {0,c,cons,d,error,false,nil,s,true}
+ Applied Processor:
Sum {left = someStrategy, right = someStrategy}
+ Details:
()
* Step 2: DecreasingLoops WORST_CASE(Omega(n^1),?)
+ Considered Problem:
- Strict TRS:
a() -> c()
a() -> d()
ge(x,0()) -> true()
ge(0(),s(y)) -> false()
ge(s(x),s(y)) -> ge(x,y)
gen(x,y,z) -> if(ge(z,x),x,y,z)
generate(x,y) -> gen(x,y,0())
head(cons(x,xs)) -> x
head(nil()) -> error()
if(false(),x,y,z) -> cons(y,gen(x,y,s(z)))
if(true(),x,y,z) -> nil()
ifsum(false(),b,xs,y) -> ifsum2(b,xs,y)
ifsum(true(),b,xs,y) -> y
ifsum2(false(),xs,y) -> sum2(cons(p(head(xs)),tail(xs)),s(y))
ifsum2(true(),xs,y) -> sum2(tail(xs),y)
isNil(cons(x,xs)) -> false()
isNil(nil()) -> true()
isZero(0()) -> true()
isZero(s(0())) -> false()
isZero(s(s(x))) -> isZero(s(x))
p(0()) -> s(s(0()))
p(s(0())) -> 0()
p(s(s(x))) -> s(p(s(x)))
sum(xs) -> sum2(xs,0())
sum2(xs,y) -> ifsum(isNil(xs),isZero(head(xs)),xs,y)
tail(cons(x,xs)) -> xs
tail(nil()) -> nil()
times(x,y) -> sum(generate(x,y))
- Signature:
{a/0,ge/2,gen/3,generate/2,head/1,if/4,ifsum/4,ifsum2/3,isNil/1,isZero/1,p/1,sum/1,sum2/2,tail/1
,times/2} / {0/0,c/0,cons/2,d/0,error/0,false/0,nil/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {a,ge,gen,generate,head,if,ifsum,ifsum2,isNil,isZero,p,sum
,sum2,tail,times} and constructors {0,c,cons,d,error,false,nil,s,true}
+ Applied Processor:
DecreasingLoops {bound = AnyLoop, narrow = 10}
+ Details:
The system has following decreasing Loops:
ge(x,y){x -> s(x),y -> s(y)} =
ge(s(x),s(y)) ->^+ ge(x,y)
= C[ge(x,y) = ge(x,y){}]
WORST_CASE(Omega(n^1),?)