* Step 1: Sum WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
#abs(#0()) -> #0()
#abs(#neg(@x)) -> #pos(@x)
#abs(#pos(@x)) -> #pos(@x)
#abs(#s(@x)) -> #pos(#s(@x))
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcs(@l1,@l2) -> lcs#1(lcstable(@l1,@l2))
lcs#1(@m) -> lcs#2(@m)
lcs#2(::(@l1,@_@2)) -> lcs#3(@l1)
lcs#2(nil()) -> #abs(#0())
lcs#3(::(@len,@_@1)) -> @len
lcs#3(nil()) -> #abs(#0())
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Weak TRS:
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1,#true/0,::/2,nil/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs,#add,#and,#ckgt,#compare,#eq,#equal,#greater,#pred
,#succ,+,firstline,firstline#1,lcs,lcs#1,lcs#2,lcs#3,lcstable,lcstable#1,lcstable#2,lcstable#3,max,max#1
,newline,newline#1,newline#2,newline#3,newline#4,newline#5,newline#6,newline#7,right
,right#1} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
Sum {left = someStrategy, right = someStrategy}
+ Details:
()
* Step 2: DependencyPairs WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
#abs(#0()) -> #0()
#abs(#neg(@x)) -> #pos(@x)
#abs(#pos(@x)) -> #pos(@x)
#abs(#s(@x)) -> #pos(#s(@x))
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcs(@l1,@l2) -> lcs#1(lcstable(@l1,@l2))
lcs#1(@m) -> lcs#2(@m)
lcs#2(::(@l1,@_@2)) -> lcs#3(@l1)
lcs#2(nil()) -> #abs(#0())
lcs#3(::(@len,@_@1)) -> @len
lcs#3(nil()) -> #abs(#0())
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Weak TRS:
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1,#true/0,::/2,nil/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs,#add,#and,#ckgt,#compare,#eq,#equal,#greater,#pred
,#succ,+,firstline,firstline#1,lcs,lcs#1,lcs#2,lcs#3,lcstable,lcstable#1,lcstable#2,lcstable#3,max,max#1
,newline,newline#1,newline#2,newline#3,newline#4,newline#5,newline#6,newline#7,right
,right#1} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
DependencyPairs {dpKind_ = DT}
+ Details:
We add the following dependency tuples:
Strict DPs
#abs#(#0()) -> c_1()
#abs#(#neg(@x)) -> c_2()
#abs#(#pos(@x)) -> c_3()
#abs#(#s(@x)) -> c_4()
#equal#(@x,@y) -> c_5(#eq#(@x,@y))
#greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
+#(@x,@y) -> c_7(#add#(@x,@y))
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
firstline#1#(nil()) -> c_10()
lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
lcs#1#(@m) -> c_12(lcs#2#(@m))
lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
lcs#2#(nil()) -> c_14(#abs#(#0()))
lcs#3#(::(@len,@_@1)) -> c_15()
lcs#3#(nil()) -> c_16(#abs#(#0()))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
lcstable#3#(nil(),@l2,@x) -> c_22()
max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
max#1#(#false(),@a,@b) -> c_24()
max#1#(#true(),@a,@b) -> c_25()
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#1#(nil(),@lastline,@y) -> c_28()
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
newline#2#(nil(),@x,@xs,@y) -> c_30()
newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
newline#6#(@elem,@nl) -> c_34()
newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
right#(@l) -> c_37(right#1#(@l))
right#1#(::(@x,@xs)) -> c_38()
right#1#(nil()) -> c_39(#abs#(#0()))
Weak DPs
#add#(#0(),@y) -> c_40()
#add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
#add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
#add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#and#(#false(),#false()) -> c_45()
#and#(#false(),#true()) -> c_46()
#and#(#true(),#false()) -> c_47()
#and#(#true(),#true()) -> c_48()
#ckgt#(#EQ()) -> c_49()
#ckgt#(#GT()) -> c_50()
#ckgt#(#LT()) -> c_51()
#compare#(#0(),#0()) -> c_52()
#compare#(#0(),#neg(@y)) -> c_53()
#compare#(#0(),#pos(@y)) -> c_54()
#compare#(#0(),#s(@y)) -> c_55()
#compare#(#neg(@x),#0()) -> c_56()
#compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
#compare#(#neg(@x),#pos(@y)) -> c_58()
#compare#(#pos(@x),#0()) -> c_59()
#compare#(#pos(@x),#neg(@y)) -> c_60()
#compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
#compare#(#s(@x),#0()) -> c_62()
#compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
#eq#(#0(),#0()) -> c_64()
#eq#(#0(),#neg(@y)) -> c_65()
#eq#(#0(),#pos(@y)) -> c_66()
#eq#(#0(),#s(@y)) -> c_67()
#eq#(#neg(@x),#0()) -> c_68()
#eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
#eq#(#neg(@x),#pos(@y)) -> c_70()
#eq#(#pos(@x),#0()) -> c_71()
#eq#(#pos(@x),#neg(@y)) -> c_72()
#eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
#eq#(#s(@x),#0()) -> c_74()
#eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
#eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
#eq#(::(@x_1,@x_2),nil()) -> c_77()
#eq#(nil(),::(@y_1,@y_2)) -> c_78()
#eq#(nil(),nil()) -> c_79()
#pred#(#0()) -> c_80()
#pred#(#neg(#s(@x))) -> c_81()
#pred#(#pos(#s(#0()))) -> c_82()
#pred#(#pos(#s(#s(@x)))) -> c_83()
#succ#(#0()) -> c_84()
#succ#(#neg(#s(#0()))) -> c_85()
#succ#(#neg(#s(#s(@x)))) -> c_86()
#succ#(#pos(#s(@x))) -> c_87()
and mark the set of starting terms.
* Step 3: UsableRules WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
#abs#(#0()) -> c_1()
#abs#(#neg(@x)) -> c_2()
#abs#(#pos(@x)) -> c_3()
#abs#(#s(@x)) -> c_4()
#equal#(@x,@y) -> c_5(#eq#(@x,@y))
#greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
+#(@x,@y) -> c_7(#add#(@x,@y))
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
firstline#1#(nil()) -> c_10()
lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
lcs#1#(@m) -> c_12(lcs#2#(@m))
lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
lcs#2#(nil()) -> c_14(#abs#(#0()))
lcs#3#(::(@len,@_@1)) -> c_15()
lcs#3#(nil()) -> c_16(#abs#(#0()))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
lcstable#3#(nil(),@l2,@x) -> c_22()
max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
max#1#(#false(),@a,@b) -> c_24()
max#1#(#true(),@a,@b) -> c_25()
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#1#(nil(),@lastline,@y) -> c_28()
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
newline#2#(nil(),@x,@xs,@y) -> c_30()
newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
newline#6#(@elem,@nl) -> c_34()
newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
right#(@l) -> c_37(right#1#(@l))
right#1#(::(@x,@xs)) -> c_38()
right#1#(nil()) -> c_39(#abs#(#0()))
- Weak DPs:
#add#(#0(),@y) -> c_40()
#add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
#add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
#add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#and#(#false(),#false()) -> c_45()
#and#(#false(),#true()) -> c_46()
#and#(#true(),#false()) -> c_47()
#and#(#true(),#true()) -> c_48()
#ckgt#(#EQ()) -> c_49()
#ckgt#(#GT()) -> c_50()
#ckgt#(#LT()) -> c_51()
#compare#(#0(),#0()) -> c_52()
#compare#(#0(),#neg(@y)) -> c_53()
#compare#(#0(),#pos(@y)) -> c_54()
#compare#(#0(),#s(@y)) -> c_55()
#compare#(#neg(@x),#0()) -> c_56()
#compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
#compare#(#neg(@x),#pos(@y)) -> c_58()
#compare#(#pos(@x),#0()) -> c_59()
#compare#(#pos(@x),#neg(@y)) -> c_60()
#compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
#compare#(#s(@x),#0()) -> c_62()
#compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
#eq#(#0(),#0()) -> c_64()
#eq#(#0(),#neg(@y)) -> c_65()
#eq#(#0(),#pos(@y)) -> c_66()
#eq#(#0(),#s(@y)) -> c_67()
#eq#(#neg(@x),#0()) -> c_68()
#eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
#eq#(#neg(@x),#pos(@y)) -> c_70()
#eq#(#pos(@x),#0()) -> c_71()
#eq#(#pos(@x),#neg(@y)) -> c_72()
#eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
#eq#(#s(@x),#0()) -> c_74()
#eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
#eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
#eq#(::(@x_1,@x_2),nil()) -> c_77()
#eq#(nil(),::(@y_1,@y_2)) -> c_78()
#eq#(nil(),nil()) -> c_79()
#pred#(#0()) -> c_80()
#pred#(#neg(#s(@x))) -> c_81()
#pred#(#pos(#s(#0()))) -> c_82()
#pred#(#pos(#s(#s(@x)))) -> c_83()
#succ#(#0()) -> c_84()
#succ#(#neg(#s(#0()))) -> c_85()
#succ#(#neg(#s(#s(@x)))) -> c_86()
#succ#(#pos(#s(@x))) -> c_87()
- Weak TRS:
#abs(#0()) -> #0()
#abs(#neg(@x)) -> #pos(@x)
#abs(#pos(@x)) -> #pos(@x)
#abs(#s(@x)) -> #pos(#s(@x))
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcs(@l1,@l2) -> lcs#1(lcstable(@l1,@l2))
lcs#1(@m) -> lcs#2(@m)
lcs#2(::(@l1,@_@2)) -> lcs#3(@l1)
lcs#2(nil()) -> #abs(#0())
lcs#3(::(@len,@_@1)) -> @len
lcs#3(nil()) -> #abs(#0())
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/2,c_10/0,c_11/2,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/2
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
#abs#(#0()) -> c_1()
#abs#(#neg(@x)) -> c_2()
#abs#(#pos(@x)) -> c_3()
#abs#(#s(@x)) -> c_4()
#add#(#0(),@y) -> c_40()
#add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
#add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
#add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#and#(#false(),#false()) -> c_45()
#and#(#false(),#true()) -> c_46()
#and#(#true(),#false()) -> c_47()
#and#(#true(),#true()) -> c_48()
#ckgt#(#EQ()) -> c_49()
#ckgt#(#GT()) -> c_50()
#ckgt#(#LT()) -> c_51()
#compare#(#0(),#0()) -> c_52()
#compare#(#0(),#neg(@y)) -> c_53()
#compare#(#0(),#pos(@y)) -> c_54()
#compare#(#0(),#s(@y)) -> c_55()
#compare#(#neg(@x),#0()) -> c_56()
#compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
#compare#(#neg(@x),#pos(@y)) -> c_58()
#compare#(#pos(@x),#0()) -> c_59()
#compare#(#pos(@x),#neg(@y)) -> c_60()
#compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
#compare#(#s(@x),#0()) -> c_62()
#compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
#eq#(#0(),#0()) -> c_64()
#eq#(#0(),#neg(@y)) -> c_65()
#eq#(#0(),#pos(@y)) -> c_66()
#eq#(#0(),#s(@y)) -> c_67()
#eq#(#neg(@x),#0()) -> c_68()
#eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
#eq#(#neg(@x),#pos(@y)) -> c_70()
#eq#(#pos(@x),#0()) -> c_71()
#eq#(#pos(@x),#neg(@y)) -> c_72()
#eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
#eq#(#s(@x),#0()) -> c_74()
#eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
#eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
#eq#(::(@x_1,@x_2),nil()) -> c_77()
#eq#(nil(),::(@y_1,@y_2)) -> c_78()
#eq#(nil(),nil()) -> c_79()
#equal#(@x,@y) -> c_5(#eq#(@x,@y))
#greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
#pred#(#0()) -> c_80()
#pred#(#neg(#s(@x))) -> c_81()
#pred#(#pos(#s(#0()))) -> c_82()
#pred#(#pos(#s(#s(@x)))) -> c_83()
#succ#(#0()) -> c_84()
#succ#(#neg(#s(#0()))) -> c_85()
#succ#(#neg(#s(#s(@x)))) -> c_86()
#succ#(#pos(#s(@x))) -> c_87()
+#(@x,@y) -> c_7(#add#(@x,@y))
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
firstline#1#(nil()) -> c_10()
lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
lcs#1#(@m) -> c_12(lcs#2#(@m))
lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
lcs#2#(nil()) -> c_14(#abs#(#0()))
lcs#3#(::(@len,@_@1)) -> c_15()
lcs#3#(nil()) -> c_16(#abs#(#0()))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
lcstable#3#(nil(),@l2,@x) -> c_22()
max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
max#1#(#false(),@a,@b) -> c_24()
max#1#(#true(),@a,@b) -> c_25()
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#1#(nil(),@lastline,@y) -> c_28()
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
newline#2#(nil(),@x,@xs,@y) -> c_30()
newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
newline#6#(@elem,@nl) -> c_34()
newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
right#(@l) -> c_37(right#1#(@l))
right#1#(::(@x,@xs)) -> c_38()
right#1#(nil()) -> c_39(#abs#(#0()))
* Step 4: PredecessorEstimation WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
#abs#(#0()) -> c_1()
#abs#(#neg(@x)) -> c_2()
#abs#(#pos(@x)) -> c_3()
#abs#(#s(@x)) -> c_4()
#equal#(@x,@y) -> c_5(#eq#(@x,@y))
#greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
+#(@x,@y) -> c_7(#add#(@x,@y))
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
firstline#1#(nil()) -> c_10()
lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
lcs#1#(@m) -> c_12(lcs#2#(@m))
lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
lcs#2#(nil()) -> c_14(#abs#(#0()))
lcs#3#(::(@len,@_@1)) -> c_15()
lcs#3#(nil()) -> c_16(#abs#(#0()))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
lcstable#3#(nil(),@l2,@x) -> c_22()
max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
max#1#(#false(),@a,@b) -> c_24()
max#1#(#true(),@a,@b) -> c_25()
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#1#(nil(),@lastline,@y) -> c_28()
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
newline#2#(nil(),@x,@xs,@y) -> c_30()
newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
newline#6#(@elem,@nl) -> c_34()
newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
right#(@l) -> c_37(right#1#(@l))
right#1#(::(@x,@xs)) -> c_38()
right#1#(nil()) -> c_39(#abs#(#0()))
- Weak DPs:
#add#(#0(),@y) -> c_40()
#add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
#add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
#add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#and#(#false(),#false()) -> c_45()
#and#(#false(),#true()) -> c_46()
#and#(#true(),#false()) -> c_47()
#and#(#true(),#true()) -> c_48()
#ckgt#(#EQ()) -> c_49()
#ckgt#(#GT()) -> c_50()
#ckgt#(#LT()) -> c_51()
#compare#(#0(),#0()) -> c_52()
#compare#(#0(),#neg(@y)) -> c_53()
#compare#(#0(),#pos(@y)) -> c_54()
#compare#(#0(),#s(@y)) -> c_55()
#compare#(#neg(@x),#0()) -> c_56()
#compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
#compare#(#neg(@x),#pos(@y)) -> c_58()
#compare#(#pos(@x),#0()) -> c_59()
#compare#(#pos(@x),#neg(@y)) -> c_60()
#compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
#compare#(#s(@x),#0()) -> c_62()
#compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
#eq#(#0(),#0()) -> c_64()
#eq#(#0(),#neg(@y)) -> c_65()
#eq#(#0(),#pos(@y)) -> c_66()
#eq#(#0(),#s(@y)) -> c_67()
#eq#(#neg(@x),#0()) -> c_68()
#eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
#eq#(#neg(@x),#pos(@y)) -> c_70()
#eq#(#pos(@x),#0()) -> c_71()
#eq#(#pos(@x),#neg(@y)) -> c_72()
#eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
#eq#(#s(@x),#0()) -> c_74()
#eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
#eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
#eq#(::(@x_1,@x_2),nil()) -> c_77()
#eq#(nil(),::(@y_1,@y_2)) -> c_78()
#eq#(nil(),nil()) -> c_79()
#pred#(#0()) -> c_80()
#pred#(#neg(#s(@x))) -> c_81()
#pred#(#pos(#s(#0()))) -> c_82()
#pred#(#pos(#s(#s(@x)))) -> c_83()
#succ#(#0()) -> c_84()
#succ#(#neg(#s(#0()))) -> c_85()
#succ#(#neg(#s(#s(@x)))) -> c_86()
#succ#(#pos(#s(@x))) -> c_87()
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/2,c_10/0,c_11/2,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/2
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{1,2,3,4,5,6,7,10,15,22,24,25,28,30,34,38}
by application of
Pre({1,2,3,4,5,6,7,10,15,22,24,25,28,30,34,38}) = {8,9,13,14,16,20,23,26,27,33,36,37,39}.
Here rules are labelled as follows:
1: #abs#(#0()) -> c_1()
2: #abs#(#neg(@x)) -> c_2()
3: #abs#(#pos(@x)) -> c_3()
4: #abs#(#s(@x)) -> c_4()
5: #equal#(@x,@y) -> c_5(#eq#(@x,@y))
6: #greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
7: +#(@x,@y) -> c_7(#add#(@x,@y))
8: firstline#(@l) -> c_8(firstline#1#(@l))
9: firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
10: firstline#1#(nil()) -> c_10()
11: lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
12: lcs#1#(@m) -> c_12(lcs#2#(@m))
13: lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
14: lcs#2#(nil()) -> c_14(#abs#(#0()))
15: lcs#3#(::(@len,@_@1)) -> c_15()
16: lcs#3#(nil()) -> c_16(#abs#(#0()))
17: lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
18: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
19: lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
20: lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
21: lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
22: lcstable#3#(nil(),@l2,@x) -> c_22()
23: max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
24: max#1#(#false(),@a,@b) -> c_24()
25: max#1#(#true(),@a,@b) -> c_25()
26: newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
27: newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
28: newline#1#(nil(),@lastline,@y) -> c_28()
29: newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
30: newline#2#(nil(),@x,@xs,@y) -> c_30()
31: newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
32: newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
33: newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
34: newline#6#(@elem,@nl) -> c_34()
35: newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
36: newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
37: right#(@l) -> c_37(right#1#(@l))
38: right#1#(::(@x,@xs)) -> c_38()
39: right#1#(nil()) -> c_39(#abs#(#0()))
40: #add#(#0(),@y) -> c_40()
41: #add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
42: #add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
43: #add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
44: #add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
45: #and#(#false(),#false()) -> c_45()
46: #and#(#false(),#true()) -> c_46()
47: #and#(#true(),#false()) -> c_47()
48: #and#(#true(),#true()) -> c_48()
49: #ckgt#(#EQ()) -> c_49()
50: #ckgt#(#GT()) -> c_50()
51: #ckgt#(#LT()) -> c_51()
52: #compare#(#0(),#0()) -> c_52()
53: #compare#(#0(),#neg(@y)) -> c_53()
54: #compare#(#0(),#pos(@y)) -> c_54()
55: #compare#(#0(),#s(@y)) -> c_55()
56: #compare#(#neg(@x),#0()) -> c_56()
57: #compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
58: #compare#(#neg(@x),#pos(@y)) -> c_58()
59: #compare#(#pos(@x),#0()) -> c_59()
60: #compare#(#pos(@x),#neg(@y)) -> c_60()
61: #compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
62: #compare#(#s(@x),#0()) -> c_62()
63: #compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
64: #eq#(#0(),#0()) -> c_64()
65: #eq#(#0(),#neg(@y)) -> c_65()
66: #eq#(#0(),#pos(@y)) -> c_66()
67: #eq#(#0(),#s(@y)) -> c_67()
68: #eq#(#neg(@x),#0()) -> c_68()
69: #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
70: #eq#(#neg(@x),#pos(@y)) -> c_70()
71: #eq#(#pos(@x),#0()) -> c_71()
72: #eq#(#pos(@x),#neg(@y)) -> c_72()
73: #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
74: #eq#(#s(@x),#0()) -> c_74()
75: #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
76: #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
77: #eq#(::(@x_1,@x_2),nil()) -> c_77()
78: #eq#(nil(),::(@y_1,@y_2)) -> c_78()
79: #eq#(nil(),nil()) -> c_79()
80: #pred#(#0()) -> c_80()
81: #pred#(#neg(#s(@x))) -> c_81()
82: #pred#(#pos(#s(#0()))) -> c_82()
83: #pred#(#pos(#s(#s(@x)))) -> c_83()
84: #succ#(#0()) -> c_84()
85: #succ#(#neg(#s(#0()))) -> c_85()
86: #succ#(#neg(#s(#s(@x)))) -> c_86()
87: #succ#(#pos(#s(@x))) -> c_87()
* Step 5: PredecessorEstimation WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
lcs#1#(@m) -> c_12(lcs#2#(@m))
lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
lcs#2#(nil()) -> c_14(#abs#(#0()))
lcs#3#(nil()) -> c_16(#abs#(#0()))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
right#(@l) -> c_37(right#1#(@l))
right#1#(nil()) -> c_39(#abs#(#0()))
- Weak DPs:
#abs#(#0()) -> c_1()
#abs#(#neg(@x)) -> c_2()
#abs#(#pos(@x)) -> c_3()
#abs#(#s(@x)) -> c_4()
#add#(#0(),@y) -> c_40()
#add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
#add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
#add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#and#(#false(),#false()) -> c_45()
#and#(#false(),#true()) -> c_46()
#and#(#true(),#false()) -> c_47()
#and#(#true(),#true()) -> c_48()
#ckgt#(#EQ()) -> c_49()
#ckgt#(#GT()) -> c_50()
#ckgt#(#LT()) -> c_51()
#compare#(#0(),#0()) -> c_52()
#compare#(#0(),#neg(@y)) -> c_53()
#compare#(#0(),#pos(@y)) -> c_54()
#compare#(#0(),#s(@y)) -> c_55()
#compare#(#neg(@x),#0()) -> c_56()
#compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
#compare#(#neg(@x),#pos(@y)) -> c_58()
#compare#(#pos(@x),#0()) -> c_59()
#compare#(#pos(@x),#neg(@y)) -> c_60()
#compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
#compare#(#s(@x),#0()) -> c_62()
#compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
#eq#(#0(),#0()) -> c_64()
#eq#(#0(),#neg(@y)) -> c_65()
#eq#(#0(),#pos(@y)) -> c_66()
#eq#(#0(),#s(@y)) -> c_67()
#eq#(#neg(@x),#0()) -> c_68()
#eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
#eq#(#neg(@x),#pos(@y)) -> c_70()
#eq#(#pos(@x),#0()) -> c_71()
#eq#(#pos(@x),#neg(@y)) -> c_72()
#eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
#eq#(#s(@x),#0()) -> c_74()
#eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
#eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
#eq#(::(@x_1,@x_2),nil()) -> c_77()
#eq#(nil(),::(@y_1,@y_2)) -> c_78()
#eq#(nil(),nil()) -> c_79()
#equal#(@x,@y) -> c_5(#eq#(@x,@y))
#greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
#pred#(#0()) -> c_80()
#pred#(#neg(#s(@x))) -> c_81()
#pred#(#pos(#s(#0()))) -> c_82()
#pred#(#pos(#s(#s(@x)))) -> c_83()
#succ#(#0()) -> c_84()
#succ#(#neg(#s(#0()))) -> c_85()
#succ#(#neg(#s(#s(@x)))) -> c_86()
#succ#(#pos(#s(@x))) -> c_87()
+#(@x,@y) -> c_7(#add#(@x,@y))
firstline#1#(nil()) -> c_10()
lcs#3#(::(@len,@_@1)) -> c_15()
lcstable#3#(nil(),@l2,@x) -> c_22()
max#1#(#false(),@a,@b) -> c_24()
max#1#(#true(),@a,@b) -> c_25()
newline#1#(nil(),@lastline,@y) -> c_28()
newline#2#(nil(),@x,@xs,@y) -> c_30()
newline#6#(@elem,@nl) -> c_34()
right#1#(::(@x,@xs)) -> c_38()
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/2,c_10/0,c_11/2,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/2
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{6,7,13,21,23}
by application of
Pre({6,7,13,21,23}) = {4,5,19,20,22}.
Here rules are labelled as follows:
1: firstline#(@l) -> c_8(firstline#1#(@l))
2: firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
3: lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
4: lcs#1#(@m) -> c_12(lcs#2#(@m))
5: lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
6: lcs#2#(nil()) -> c_14(#abs#(#0()))
7: lcs#3#(nil()) -> c_16(#abs#(#0()))
8: lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
9: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
10: lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
11: lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
12: lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
13: max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
14: newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
15: newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
16: newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
17: newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
18: newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
19: newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
20: newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
21: newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
22: right#(@l) -> c_37(right#1#(@l))
23: right#1#(nil()) -> c_39(#abs#(#0()))
24: #abs#(#0()) -> c_1()
25: #abs#(#neg(@x)) -> c_2()
26: #abs#(#pos(@x)) -> c_3()
27: #abs#(#s(@x)) -> c_4()
28: #add#(#0(),@y) -> c_40()
29: #add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
30: #add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
31: #add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
32: #add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
33: #and#(#false(),#false()) -> c_45()
34: #and#(#false(),#true()) -> c_46()
35: #and#(#true(),#false()) -> c_47()
36: #and#(#true(),#true()) -> c_48()
37: #ckgt#(#EQ()) -> c_49()
38: #ckgt#(#GT()) -> c_50()
39: #ckgt#(#LT()) -> c_51()
40: #compare#(#0(),#0()) -> c_52()
41: #compare#(#0(),#neg(@y)) -> c_53()
42: #compare#(#0(),#pos(@y)) -> c_54()
43: #compare#(#0(),#s(@y)) -> c_55()
44: #compare#(#neg(@x),#0()) -> c_56()
45: #compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
46: #compare#(#neg(@x),#pos(@y)) -> c_58()
47: #compare#(#pos(@x),#0()) -> c_59()
48: #compare#(#pos(@x),#neg(@y)) -> c_60()
49: #compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
50: #compare#(#s(@x),#0()) -> c_62()
51: #compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
52: #eq#(#0(),#0()) -> c_64()
53: #eq#(#0(),#neg(@y)) -> c_65()
54: #eq#(#0(),#pos(@y)) -> c_66()
55: #eq#(#0(),#s(@y)) -> c_67()
56: #eq#(#neg(@x),#0()) -> c_68()
57: #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
58: #eq#(#neg(@x),#pos(@y)) -> c_70()
59: #eq#(#pos(@x),#0()) -> c_71()
60: #eq#(#pos(@x),#neg(@y)) -> c_72()
61: #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
62: #eq#(#s(@x),#0()) -> c_74()
63: #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
64: #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
65: #eq#(::(@x_1,@x_2),nil()) -> c_77()
66: #eq#(nil(),::(@y_1,@y_2)) -> c_78()
67: #eq#(nil(),nil()) -> c_79()
68: #equal#(@x,@y) -> c_5(#eq#(@x,@y))
69: #greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
70: #pred#(#0()) -> c_80()
71: #pred#(#neg(#s(@x))) -> c_81()
72: #pred#(#pos(#s(#0()))) -> c_82()
73: #pred#(#pos(#s(#s(@x)))) -> c_83()
74: #succ#(#0()) -> c_84()
75: #succ#(#neg(#s(#0()))) -> c_85()
76: #succ#(#neg(#s(#s(@x)))) -> c_86()
77: #succ#(#pos(#s(@x))) -> c_87()
78: +#(@x,@y) -> c_7(#add#(@x,@y))
79: firstline#1#(nil()) -> c_10()
80: lcs#3#(::(@len,@_@1)) -> c_15()
81: lcstable#3#(nil(),@l2,@x) -> c_22()
82: max#1#(#false(),@a,@b) -> c_24()
83: max#1#(#true(),@a,@b) -> c_25()
84: newline#1#(nil(),@lastline,@y) -> c_28()
85: newline#2#(nil(),@x,@xs,@y) -> c_30()
86: newline#6#(@elem,@nl) -> c_34()
87: right#1#(::(@x,@xs)) -> c_38()
* Step 6: PredecessorEstimation WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
lcs#1#(@m) -> c_12(lcs#2#(@m))
lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
right#(@l) -> c_37(right#1#(@l))
- Weak DPs:
#abs#(#0()) -> c_1()
#abs#(#neg(@x)) -> c_2()
#abs#(#pos(@x)) -> c_3()
#abs#(#s(@x)) -> c_4()
#add#(#0(),@y) -> c_40()
#add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
#add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
#add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#and#(#false(),#false()) -> c_45()
#and#(#false(),#true()) -> c_46()
#and#(#true(),#false()) -> c_47()
#and#(#true(),#true()) -> c_48()
#ckgt#(#EQ()) -> c_49()
#ckgt#(#GT()) -> c_50()
#ckgt#(#LT()) -> c_51()
#compare#(#0(),#0()) -> c_52()
#compare#(#0(),#neg(@y)) -> c_53()
#compare#(#0(),#pos(@y)) -> c_54()
#compare#(#0(),#s(@y)) -> c_55()
#compare#(#neg(@x),#0()) -> c_56()
#compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
#compare#(#neg(@x),#pos(@y)) -> c_58()
#compare#(#pos(@x),#0()) -> c_59()
#compare#(#pos(@x),#neg(@y)) -> c_60()
#compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
#compare#(#s(@x),#0()) -> c_62()
#compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
#eq#(#0(),#0()) -> c_64()
#eq#(#0(),#neg(@y)) -> c_65()
#eq#(#0(),#pos(@y)) -> c_66()
#eq#(#0(),#s(@y)) -> c_67()
#eq#(#neg(@x),#0()) -> c_68()
#eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
#eq#(#neg(@x),#pos(@y)) -> c_70()
#eq#(#pos(@x),#0()) -> c_71()
#eq#(#pos(@x),#neg(@y)) -> c_72()
#eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
#eq#(#s(@x),#0()) -> c_74()
#eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
#eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
#eq#(::(@x_1,@x_2),nil()) -> c_77()
#eq#(nil(),::(@y_1,@y_2)) -> c_78()
#eq#(nil(),nil()) -> c_79()
#equal#(@x,@y) -> c_5(#eq#(@x,@y))
#greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
#pred#(#0()) -> c_80()
#pred#(#neg(#s(@x))) -> c_81()
#pred#(#pos(#s(#0()))) -> c_82()
#pred#(#pos(#s(#s(@x)))) -> c_83()
#succ#(#0()) -> c_84()
#succ#(#neg(#s(#0()))) -> c_85()
#succ#(#neg(#s(#s(@x)))) -> c_86()
#succ#(#pos(#s(@x))) -> c_87()
+#(@x,@y) -> c_7(#add#(@x,@y))
firstline#1#(nil()) -> c_10()
lcs#2#(nil()) -> c_14(#abs#(#0()))
lcs#3#(::(@len,@_@1)) -> c_15()
lcs#3#(nil()) -> c_16(#abs#(#0()))
lcstable#3#(nil(),@l2,@x) -> c_22()
max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
max#1#(#false(),@a,@b) -> c_24()
max#1#(#true(),@a,@b) -> c_25()
newline#1#(nil(),@lastline,@y) -> c_28()
newline#2#(nil(),@x,@xs,@y) -> c_30()
newline#6#(@elem,@nl) -> c_34()
newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
right#1#(::(@x,@xs)) -> c_38()
right#1#(nil()) -> c_39(#abs#(#0()))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/2,c_10/0,c_11/2,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/2
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{5,17,18}
by application of
Pre({5,17,18}) = {4,14,15,16}.
Here rules are labelled as follows:
1: firstline#(@l) -> c_8(firstline#1#(@l))
2: firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
3: lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
4: lcs#1#(@m) -> c_12(lcs#2#(@m))
5: lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
6: lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
7: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
8: lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
9: lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
10: lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
11: newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
12: newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
13: newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
14: newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
15: newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
16: newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
17: newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
18: right#(@l) -> c_37(right#1#(@l))
19: #abs#(#0()) -> c_1()
20: #abs#(#neg(@x)) -> c_2()
21: #abs#(#pos(@x)) -> c_3()
22: #abs#(#s(@x)) -> c_4()
23: #add#(#0(),@y) -> c_40()
24: #add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
25: #add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
26: #add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
27: #add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
28: #and#(#false(),#false()) -> c_45()
29: #and#(#false(),#true()) -> c_46()
30: #and#(#true(),#false()) -> c_47()
31: #and#(#true(),#true()) -> c_48()
32: #ckgt#(#EQ()) -> c_49()
33: #ckgt#(#GT()) -> c_50()
34: #ckgt#(#LT()) -> c_51()
35: #compare#(#0(),#0()) -> c_52()
36: #compare#(#0(),#neg(@y)) -> c_53()
37: #compare#(#0(),#pos(@y)) -> c_54()
38: #compare#(#0(),#s(@y)) -> c_55()
39: #compare#(#neg(@x),#0()) -> c_56()
40: #compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
41: #compare#(#neg(@x),#pos(@y)) -> c_58()
42: #compare#(#pos(@x),#0()) -> c_59()
43: #compare#(#pos(@x),#neg(@y)) -> c_60()
44: #compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
45: #compare#(#s(@x),#0()) -> c_62()
46: #compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
47: #eq#(#0(),#0()) -> c_64()
48: #eq#(#0(),#neg(@y)) -> c_65()
49: #eq#(#0(),#pos(@y)) -> c_66()
50: #eq#(#0(),#s(@y)) -> c_67()
51: #eq#(#neg(@x),#0()) -> c_68()
52: #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
53: #eq#(#neg(@x),#pos(@y)) -> c_70()
54: #eq#(#pos(@x),#0()) -> c_71()
55: #eq#(#pos(@x),#neg(@y)) -> c_72()
56: #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
57: #eq#(#s(@x),#0()) -> c_74()
58: #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
59: #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
60: #eq#(::(@x_1,@x_2),nil()) -> c_77()
61: #eq#(nil(),::(@y_1,@y_2)) -> c_78()
62: #eq#(nil(),nil()) -> c_79()
63: #equal#(@x,@y) -> c_5(#eq#(@x,@y))
64: #greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
65: #pred#(#0()) -> c_80()
66: #pred#(#neg(#s(@x))) -> c_81()
67: #pred#(#pos(#s(#0()))) -> c_82()
68: #pred#(#pos(#s(#s(@x)))) -> c_83()
69: #succ#(#0()) -> c_84()
70: #succ#(#neg(#s(#0()))) -> c_85()
71: #succ#(#neg(#s(#s(@x)))) -> c_86()
72: #succ#(#pos(#s(@x))) -> c_87()
73: +#(@x,@y) -> c_7(#add#(@x,@y))
74: firstline#1#(nil()) -> c_10()
75: lcs#2#(nil()) -> c_14(#abs#(#0()))
76: lcs#3#(::(@len,@_@1)) -> c_15()
77: lcs#3#(nil()) -> c_16(#abs#(#0()))
78: lcstable#3#(nil(),@l2,@x) -> c_22()
79: max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
80: max#1#(#false(),@a,@b) -> c_24()
81: max#1#(#true(),@a,@b) -> c_25()
82: newline#1#(nil(),@lastline,@y) -> c_28()
83: newline#2#(nil(),@x,@xs,@y) -> c_30()
84: newline#6#(@elem,@nl) -> c_34()
85: newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
86: right#1#(::(@x,@xs)) -> c_38()
87: right#1#(nil()) -> c_39(#abs#(#0()))
* Step 7: PredecessorEstimation WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
lcs#1#(@m) -> c_12(lcs#2#(@m))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
- Weak DPs:
#abs#(#0()) -> c_1()
#abs#(#neg(@x)) -> c_2()
#abs#(#pos(@x)) -> c_3()
#abs#(#s(@x)) -> c_4()
#add#(#0(),@y) -> c_40()
#add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
#add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
#add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#and#(#false(),#false()) -> c_45()
#and#(#false(),#true()) -> c_46()
#and#(#true(),#false()) -> c_47()
#and#(#true(),#true()) -> c_48()
#ckgt#(#EQ()) -> c_49()
#ckgt#(#GT()) -> c_50()
#ckgt#(#LT()) -> c_51()
#compare#(#0(),#0()) -> c_52()
#compare#(#0(),#neg(@y)) -> c_53()
#compare#(#0(),#pos(@y)) -> c_54()
#compare#(#0(),#s(@y)) -> c_55()
#compare#(#neg(@x),#0()) -> c_56()
#compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
#compare#(#neg(@x),#pos(@y)) -> c_58()
#compare#(#pos(@x),#0()) -> c_59()
#compare#(#pos(@x),#neg(@y)) -> c_60()
#compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
#compare#(#s(@x),#0()) -> c_62()
#compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
#eq#(#0(),#0()) -> c_64()
#eq#(#0(),#neg(@y)) -> c_65()
#eq#(#0(),#pos(@y)) -> c_66()
#eq#(#0(),#s(@y)) -> c_67()
#eq#(#neg(@x),#0()) -> c_68()
#eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
#eq#(#neg(@x),#pos(@y)) -> c_70()
#eq#(#pos(@x),#0()) -> c_71()
#eq#(#pos(@x),#neg(@y)) -> c_72()
#eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
#eq#(#s(@x),#0()) -> c_74()
#eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
#eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
#eq#(::(@x_1,@x_2),nil()) -> c_77()
#eq#(nil(),::(@y_1,@y_2)) -> c_78()
#eq#(nil(),nil()) -> c_79()
#equal#(@x,@y) -> c_5(#eq#(@x,@y))
#greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
#pred#(#0()) -> c_80()
#pred#(#neg(#s(@x))) -> c_81()
#pred#(#pos(#s(#0()))) -> c_82()
#pred#(#pos(#s(#s(@x)))) -> c_83()
#succ#(#0()) -> c_84()
#succ#(#neg(#s(#0()))) -> c_85()
#succ#(#neg(#s(#s(@x)))) -> c_86()
#succ#(#pos(#s(@x))) -> c_87()
+#(@x,@y) -> c_7(#add#(@x,@y))
firstline#1#(nil()) -> c_10()
lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
lcs#2#(nil()) -> c_14(#abs#(#0()))
lcs#3#(::(@len,@_@1)) -> c_15()
lcs#3#(nil()) -> c_16(#abs#(#0()))
lcstable#3#(nil(),@l2,@x) -> c_22()
max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
max#1#(#false(),@a,@b) -> c_24()
max#1#(#true(),@a,@b) -> c_25()
newline#1#(nil(),@lastline,@y) -> c_28()
newline#2#(nil(),@x,@xs,@y) -> c_30()
newline#6#(@elem,@nl) -> c_34()
newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
right#(@l) -> c_37(right#1#(@l))
right#1#(::(@x,@xs)) -> c_38()
right#1#(nil()) -> c_39(#abs#(#0()))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/2,c_10/0,c_11/2,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/2
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{4,15}
by application of
Pre({4,15}) = {3,14}.
Here rules are labelled as follows:
1: firstline#(@l) -> c_8(firstline#1#(@l))
2: firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
3: lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
4: lcs#1#(@m) -> c_12(lcs#2#(@m))
5: lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
6: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
7: lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
8: lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
9: lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
10: newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
11: newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
12: newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
13: newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
14: newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
15: newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
16: #abs#(#0()) -> c_1()
17: #abs#(#neg(@x)) -> c_2()
18: #abs#(#pos(@x)) -> c_3()
19: #abs#(#s(@x)) -> c_4()
20: #add#(#0(),@y) -> c_40()
21: #add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
22: #add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
23: #add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
24: #add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
25: #and#(#false(),#false()) -> c_45()
26: #and#(#false(),#true()) -> c_46()
27: #and#(#true(),#false()) -> c_47()
28: #and#(#true(),#true()) -> c_48()
29: #ckgt#(#EQ()) -> c_49()
30: #ckgt#(#GT()) -> c_50()
31: #ckgt#(#LT()) -> c_51()
32: #compare#(#0(),#0()) -> c_52()
33: #compare#(#0(),#neg(@y)) -> c_53()
34: #compare#(#0(),#pos(@y)) -> c_54()
35: #compare#(#0(),#s(@y)) -> c_55()
36: #compare#(#neg(@x),#0()) -> c_56()
37: #compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
38: #compare#(#neg(@x),#pos(@y)) -> c_58()
39: #compare#(#pos(@x),#0()) -> c_59()
40: #compare#(#pos(@x),#neg(@y)) -> c_60()
41: #compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
42: #compare#(#s(@x),#0()) -> c_62()
43: #compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
44: #eq#(#0(),#0()) -> c_64()
45: #eq#(#0(),#neg(@y)) -> c_65()
46: #eq#(#0(),#pos(@y)) -> c_66()
47: #eq#(#0(),#s(@y)) -> c_67()
48: #eq#(#neg(@x),#0()) -> c_68()
49: #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
50: #eq#(#neg(@x),#pos(@y)) -> c_70()
51: #eq#(#pos(@x),#0()) -> c_71()
52: #eq#(#pos(@x),#neg(@y)) -> c_72()
53: #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
54: #eq#(#s(@x),#0()) -> c_74()
55: #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
56: #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
57: #eq#(::(@x_1,@x_2),nil()) -> c_77()
58: #eq#(nil(),::(@y_1,@y_2)) -> c_78()
59: #eq#(nil(),nil()) -> c_79()
60: #equal#(@x,@y) -> c_5(#eq#(@x,@y))
61: #greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
62: #pred#(#0()) -> c_80()
63: #pred#(#neg(#s(@x))) -> c_81()
64: #pred#(#pos(#s(#0()))) -> c_82()
65: #pred#(#pos(#s(#s(@x)))) -> c_83()
66: #succ#(#0()) -> c_84()
67: #succ#(#neg(#s(#0()))) -> c_85()
68: #succ#(#neg(#s(#s(@x)))) -> c_86()
69: #succ#(#pos(#s(@x))) -> c_87()
70: +#(@x,@y) -> c_7(#add#(@x,@y))
71: firstline#1#(nil()) -> c_10()
72: lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
73: lcs#2#(nil()) -> c_14(#abs#(#0()))
74: lcs#3#(::(@len,@_@1)) -> c_15()
75: lcs#3#(nil()) -> c_16(#abs#(#0()))
76: lcstable#3#(nil(),@l2,@x) -> c_22()
77: max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
78: max#1#(#false(),@a,@b) -> c_24()
79: max#1#(#true(),@a,@b) -> c_25()
80: newline#1#(nil(),@lastline,@y) -> c_28()
81: newline#2#(nil(),@x,@xs,@y) -> c_30()
82: newline#6#(@elem,@nl) -> c_34()
83: newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
84: newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
85: right#(@l) -> c_37(right#1#(@l))
86: right#1#(::(@x,@xs)) -> c_38()
87: right#1#(nil()) -> c_39(#abs#(#0()))
* Step 8: PredecessorEstimation WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
- Weak DPs:
#abs#(#0()) -> c_1()
#abs#(#neg(@x)) -> c_2()
#abs#(#pos(@x)) -> c_3()
#abs#(#s(@x)) -> c_4()
#add#(#0(),@y) -> c_40()
#add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
#add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
#add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#and#(#false(),#false()) -> c_45()
#and#(#false(),#true()) -> c_46()
#and#(#true(),#false()) -> c_47()
#and#(#true(),#true()) -> c_48()
#ckgt#(#EQ()) -> c_49()
#ckgt#(#GT()) -> c_50()
#ckgt#(#LT()) -> c_51()
#compare#(#0(),#0()) -> c_52()
#compare#(#0(),#neg(@y)) -> c_53()
#compare#(#0(),#pos(@y)) -> c_54()
#compare#(#0(),#s(@y)) -> c_55()
#compare#(#neg(@x),#0()) -> c_56()
#compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
#compare#(#neg(@x),#pos(@y)) -> c_58()
#compare#(#pos(@x),#0()) -> c_59()
#compare#(#pos(@x),#neg(@y)) -> c_60()
#compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
#compare#(#s(@x),#0()) -> c_62()
#compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
#eq#(#0(),#0()) -> c_64()
#eq#(#0(),#neg(@y)) -> c_65()
#eq#(#0(),#pos(@y)) -> c_66()
#eq#(#0(),#s(@y)) -> c_67()
#eq#(#neg(@x),#0()) -> c_68()
#eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
#eq#(#neg(@x),#pos(@y)) -> c_70()
#eq#(#pos(@x),#0()) -> c_71()
#eq#(#pos(@x),#neg(@y)) -> c_72()
#eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
#eq#(#s(@x),#0()) -> c_74()
#eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
#eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
#eq#(::(@x_1,@x_2),nil()) -> c_77()
#eq#(nil(),::(@y_1,@y_2)) -> c_78()
#eq#(nil(),nil()) -> c_79()
#equal#(@x,@y) -> c_5(#eq#(@x,@y))
#greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
#pred#(#0()) -> c_80()
#pred#(#neg(#s(@x))) -> c_81()
#pred#(#pos(#s(#0()))) -> c_82()
#pred#(#pos(#s(#s(@x)))) -> c_83()
#succ#(#0()) -> c_84()
#succ#(#neg(#s(#0()))) -> c_85()
#succ#(#neg(#s(#s(@x)))) -> c_86()
#succ#(#pos(#s(@x))) -> c_87()
+#(@x,@y) -> c_7(#add#(@x,@y))
firstline#1#(nil()) -> c_10()
lcs#1#(@m) -> c_12(lcs#2#(@m))
lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
lcs#2#(nil()) -> c_14(#abs#(#0()))
lcs#3#(::(@len,@_@1)) -> c_15()
lcs#3#(nil()) -> c_16(#abs#(#0()))
lcstable#3#(nil(),@l2,@x) -> c_22()
max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
max#1#(#false(),@a,@b) -> c_24()
max#1#(#true(),@a,@b) -> c_25()
newline#1#(nil(),@lastline,@y) -> c_28()
newline#2#(nil(),@x,@xs,@y) -> c_30()
newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
newline#6#(@elem,@nl) -> c_34()
newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
right#(@l) -> c_37(right#1#(@l))
right#1#(::(@x,@xs)) -> c_38()
right#1#(nil()) -> c_39(#abs#(#0()))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/2,c_10/0,c_11/2,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/2
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{13}
by application of
Pre({13}) = {12}.
Here rules are labelled as follows:
1: firstline#(@l) -> c_8(firstline#1#(@l))
2: firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
3: lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
4: lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
5: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
6: lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
7: lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
8: lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
9: newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
10: newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
11: newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
12: newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
13: newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
14: #abs#(#0()) -> c_1()
15: #abs#(#neg(@x)) -> c_2()
16: #abs#(#pos(@x)) -> c_3()
17: #abs#(#s(@x)) -> c_4()
18: #add#(#0(),@y) -> c_40()
19: #add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
20: #add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
21: #add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
22: #add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
23: #and#(#false(),#false()) -> c_45()
24: #and#(#false(),#true()) -> c_46()
25: #and#(#true(),#false()) -> c_47()
26: #and#(#true(),#true()) -> c_48()
27: #ckgt#(#EQ()) -> c_49()
28: #ckgt#(#GT()) -> c_50()
29: #ckgt#(#LT()) -> c_51()
30: #compare#(#0(),#0()) -> c_52()
31: #compare#(#0(),#neg(@y)) -> c_53()
32: #compare#(#0(),#pos(@y)) -> c_54()
33: #compare#(#0(),#s(@y)) -> c_55()
34: #compare#(#neg(@x),#0()) -> c_56()
35: #compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
36: #compare#(#neg(@x),#pos(@y)) -> c_58()
37: #compare#(#pos(@x),#0()) -> c_59()
38: #compare#(#pos(@x),#neg(@y)) -> c_60()
39: #compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
40: #compare#(#s(@x),#0()) -> c_62()
41: #compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
42: #eq#(#0(),#0()) -> c_64()
43: #eq#(#0(),#neg(@y)) -> c_65()
44: #eq#(#0(),#pos(@y)) -> c_66()
45: #eq#(#0(),#s(@y)) -> c_67()
46: #eq#(#neg(@x),#0()) -> c_68()
47: #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
48: #eq#(#neg(@x),#pos(@y)) -> c_70()
49: #eq#(#pos(@x),#0()) -> c_71()
50: #eq#(#pos(@x),#neg(@y)) -> c_72()
51: #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
52: #eq#(#s(@x),#0()) -> c_74()
53: #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
54: #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
55: #eq#(::(@x_1,@x_2),nil()) -> c_77()
56: #eq#(nil(),::(@y_1,@y_2)) -> c_78()
57: #eq#(nil(),nil()) -> c_79()
58: #equal#(@x,@y) -> c_5(#eq#(@x,@y))
59: #greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
60: #pred#(#0()) -> c_80()
61: #pred#(#neg(#s(@x))) -> c_81()
62: #pred#(#pos(#s(#0()))) -> c_82()
63: #pred#(#pos(#s(#s(@x)))) -> c_83()
64: #succ#(#0()) -> c_84()
65: #succ#(#neg(#s(#0()))) -> c_85()
66: #succ#(#neg(#s(#s(@x)))) -> c_86()
67: #succ#(#pos(#s(@x))) -> c_87()
68: +#(@x,@y) -> c_7(#add#(@x,@y))
69: firstline#1#(nil()) -> c_10()
70: lcs#1#(@m) -> c_12(lcs#2#(@m))
71: lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
72: lcs#2#(nil()) -> c_14(#abs#(#0()))
73: lcs#3#(::(@len,@_@1)) -> c_15()
74: lcs#3#(nil()) -> c_16(#abs#(#0()))
75: lcstable#3#(nil(),@l2,@x) -> c_22()
76: max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
77: max#1#(#false(),@a,@b) -> c_24()
78: max#1#(#true(),@a,@b) -> c_25()
79: newline#1#(nil(),@lastline,@y) -> c_28()
80: newline#2#(nil(),@x,@xs,@y) -> c_30()
81: newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
82: newline#6#(@elem,@nl) -> c_34()
83: newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
84: newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
85: right#(@l) -> c_37(right#1#(@l))
86: right#1#(::(@x,@xs)) -> c_38()
87: right#1#(nil()) -> c_39(#abs#(#0()))
* Step 9: PredecessorEstimation WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
- Weak DPs:
#abs#(#0()) -> c_1()
#abs#(#neg(@x)) -> c_2()
#abs#(#pos(@x)) -> c_3()
#abs#(#s(@x)) -> c_4()
#add#(#0(),@y) -> c_40()
#add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
#add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
#add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#and#(#false(),#false()) -> c_45()
#and#(#false(),#true()) -> c_46()
#and#(#true(),#false()) -> c_47()
#and#(#true(),#true()) -> c_48()
#ckgt#(#EQ()) -> c_49()
#ckgt#(#GT()) -> c_50()
#ckgt#(#LT()) -> c_51()
#compare#(#0(),#0()) -> c_52()
#compare#(#0(),#neg(@y)) -> c_53()
#compare#(#0(),#pos(@y)) -> c_54()
#compare#(#0(),#s(@y)) -> c_55()
#compare#(#neg(@x),#0()) -> c_56()
#compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
#compare#(#neg(@x),#pos(@y)) -> c_58()
#compare#(#pos(@x),#0()) -> c_59()
#compare#(#pos(@x),#neg(@y)) -> c_60()
#compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
#compare#(#s(@x),#0()) -> c_62()
#compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
#eq#(#0(),#0()) -> c_64()
#eq#(#0(),#neg(@y)) -> c_65()
#eq#(#0(),#pos(@y)) -> c_66()
#eq#(#0(),#s(@y)) -> c_67()
#eq#(#neg(@x),#0()) -> c_68()
#eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
#eq#(#neg(@x),#pos(@y)) -> c_70()
#eq#(#pos(@x),#0()) -> c_71()
#eq#(#pos(@x),#neg(@y)) -> c_72()
#eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
#eq#(#s(@x),#0()) -> c_74()
#eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
#eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
#eq#(::(@x_1,@x_2),nil()) -> c_77()
#eq#(nil(),::(@y_1,@y_2)) -> c_78()
#eq#(nil(),nil()) -> c_79()
#equal#(@x,@y) -> c_5(#eq#(@x,@y))
#greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
#pred#(#0()) -> c_80()
#pred#(#neg(#s(@x))) -> c_81()
#pred#(#pos(#s(#0()))) -> c_82()
#pred#(#pos(#s(#s(@x)))) -> c_83()
#succ#(#0()) -> c_84()
#succ#(#neg(#s(#0()))) -> c_85()
#succ#(#neg(#s(#s(@x)))) -> c_86()
#succ#(#pos(#s(@x))) -> c_87()
+#(@x,@y) -> c_7(#add#(@x,@y))
firstline#1#(nil()) -> c_10()
lcs#1#(@m) -> c_12(lcs#2#(@m))
lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
lcs#2#(nil()) -> c_14(#abs#(#0()))
lcs#3#(::(@len,@_@1)) -> c_15()
lcs#3#(nil()) -> c_16(#abs#(#0()))
lcstable#3#(nil(),@l2,@x) -> c_22()
max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
max#1#(#false(),@a,@b) -> c_24()
max#1#(#true(),@a,@b) -> c_25()
newline#1#(nil(),@lastline,@y) -> c_28()
newline#2#(nil(),@x,@xs,@y) -> c_30()
newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
newline#6#(@elem,@nl) -> c_34()
newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
right#(@l) -> c_37(right#1#(@l))
right#1#(::(@x,@xs)) -> c_38()
right#1#(nil()) -> c_39(#abs#(#0()))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/2,c_10/0,c_11/2,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/2
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{12}
by application of
Pre({12}) = {11}.
Here rules are labelled as follows:
1: firstline#(@l) -> c_8(firstline#1#(@l))
2: firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
3: lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
4: lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
5: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
6: lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
7: lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
8: lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
9: newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
10: newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
11: newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
12: newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
13: #abs#(#0()) -> c_1()
14: #abs#(#neg(@x)) -> c_2()
15: #abs#(#pos(@x)) -> c_3()
16: #abs#(#s(@x)) -> c_4()
17: #add#(#0(),@y) -> c_40()
18: #add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
19: #add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
20: #add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
21: #add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
22: #and#(#false(),#false()) -> c_45()
23: #and#(#false(),#true()) -> c_46()
24: #and#(#true(),#false()) -> c_47()
25: #and#(#true(),#true()) -> c_48()
26: #ckgt#(#EQ()) -> c_49()
27: #ckgt#(#GT()) -> c_50()
28: #ckgt#(#LT()) -> c_51()
29: #compare#(#0(),#0()) -> c_52()
30: #compare#(#0(),#neg(@y)) -> c_53()
31: #compare#(#0(),#pos(@y)) -> c_54()
32: #compare#(#0(),#s(@y)) -> c_55()
33: #compare#(#neg(@x),#0()) -> c_56()
34: #compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
35: #compare#(#neg(@x),#pos(@y)) -> c_58()
36: #compare#(#pos(@x),#0()) -> c_59()
37: #compare#(#pos(@x),#neg(@y)) -> c_60()
38: #compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
39: #compare#(#s(@x),#0()) -> c_62()
40: #compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
41: #eq#(#0(),#0()) -> c_64()
42: #eq#(#0(),#neg(@y)) -> c_65()
43: #eq#(#0(),#pos(@y)) -> c_66()
44: #eq#(#0(),#s(@y)) -> c_67()
45: #eq#(#neg(@x),#0()) -> c_68()
46: #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
47: #eq#(#neg(@x),#pos(@y)) -> c_70()
48: #eq#(#pos(@x),#0()) -> c_71()
49: #eq#(#pos(@x),#neg(@y)) -> c_72()
50: #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
51: #eq#(#s(@x),#0()) -> c_74()
52: #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
53: #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
54: #eq#(::(@x_1,@x_2),nil()) -> c_77()
55: #eq#(nil(),::(@y_1,@y_2)) -> c_78()
56: #eq#(nil(),nil()) -> c_79()
57: #equal#(@x,@y) -> c_5(#eq#(@x,@y))
58: #greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
59: #pred#(#0()) -> c_80()
60: #pred#(#neg(#s(@x))) -> c_81()
61: #pred#(#pos(#s(#0()))) -> c_82()
62: #pred#(#pos(#s(#s(@x)))) -> c_83()
63: #succ#(#0()) -> c_84()
64: #succ#(#neg(#s(#0()))) -> c_85()
65: #succ#(#neg(#s(#s(@x)))) -> c_86()
66: #succ#(#pos(#s(@x))) -> c_87()
67: +#(@x,@y) -> c_7(#add#(@x,@y))
68: firstline#1#(nil()) -> c_10()
69: lcs#1#(@m) -> c_12(lcs#2#(@m))
70: lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
71: lcs#2#(nil()) -> c_14(#abs#(#0()))
72: lcs#3#(::(@len,@_@1)) -> c_15()
73: lcs#3#(nil()) -> c_16(#abs#(#0()))
74: lcstable#3#(nil(),@l2,@x) -> c_22()
75: max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
76: max#1#(#false(),@a,@b) -> c_24()
77: max#1#(#true(),@a,@b) -> c_25()
78: newline#1#(nil(),@lastline,@y) -> c_28()
79: newline#2#(nil(),@x,@xs,@y) -> c_30()
80: newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
81: newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
82: newline#6#(@elem,@nl) -> c_34()
83: newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
84: newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
85: right#(@l) -> c_37(right#1#(@l))
86: right#1#(::(@x,@xs)) -> c_38()
87: right#1#(nil()) -> c_39(#abs#(#0()))
* Step 10: RemoveWeakSuffixes WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
- Weak DPs:
#abs#(#0()) -> c_1()
#abs#(#neg(@x)) -> c_2()
#abs#(#pos(@x)) -> c_3()
#abs#(#s(@x)) -> c_4()
#add#(#0(),@y) -> c_40()
#add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
#add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
#add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
#and#(#false(),#false()) -> c_45()
#and#(#false(),#true()) -> c_46()
#and#(#true(),#false()) -> c_47()
#and#(#true(),#true()) -> c_48()
#ckgt#(#EQ()) -> c_49()
#ckgt#(#GT()) -> c_50()
#ckgt#(#LT()) -> c_51()
#compare#(#0(),#0()) -> c_52()
#compare#(#0(),#neg(@y)) -> c_53()
#compare#(#0(),#pos(@y)) -> c_54()
#compare#(#0(),#s(@y)) -> c_55()
#compare#(#neg(@x),#0()) -> c_56()
#compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
#compare#(#neg(@x),#pos(@y)) -> c_58()
#compare#(#pos(@x),#0()) -> c_59()
#compare#(#pos(@x),#neg(@y)) -> c_60()
#compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
#compare#(#s(@x),#0()) -> c_62()
#compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
#eq#(#0(),#0()) -> c_64()
#eq#(#0(),#neg(@y)) -> c_65()
#eq#(#0(),#pos(@y)) -> c_66()
#eq#(#0(),#s(@y)) -> c_67()
#eq#(#neg(@x),#0()) -> c_68()
#eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
#eq#(#neg(@x),#pos(@y)) -> c_70()
#eq#(#pos(@x),#0()) -> c_71()
#eq#(#pos(@x),#neg(@y)) -> c_72()
#eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
#eq#(#s(@x),#0()) -> c_74()
#eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
#eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
#eq#(::(@x_1,@x_2),nil()) -> c_77()
#eq#(nil(),::(@y_1,@y_2)) -> c_78()
#eq#(nil(),nil()) -> c_79()
#equal#(@x,@y) -> c_5(#eq#(@x,@y))
#greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
#pred#(#0()) -> c_80()
#pred#(#neg(#s(@x))) -> c_81()
#pred#(#pos(#s(#0()))) -> c_82()
#pred#(#pos(#s(#s(@x)))) -> c_83()
#succ#(#0()) -> c_84()
#succ#(#neg(#s(#0()))) -> c_85()
#succ#(#neg(#s(#s(@x)))) -> c_86()
#succ#(#pos(#s(@x))) -> c_87()
+#(@x,@y) -> c_7(#add#(@x,@y))
firstline#1#(nil()) -> c_10()
lcs#1#(@m) -> c_12(lcs#2#(@m))
lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
lcs#2#(nil()) -> c_14(#abs#(#0()))
lcs#3#(::(@len,@_@1)) -> c_15()
lcs#3#(nil()) -> c_16(#abs#(#0()))
lcstable#3#(nil(),@l2,@x) -> c_22()
max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
max#1#(#false(),@a,@b) -> c_24()
max#1#(#true(),@a,@b) -> c_25()
newline#1#(nil(),@lastline,@y) -> c_28()
newline#2#(nil(),@x,@xs,@y) -> c_30()
newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
newline#6#(@elem,@nl) -> c_34()
newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
right#(@l) -> c_37(right#1#(@l))
right#1#(::(@x,@xs)) -> c_38()
right#1#(nil()) -> c_39(#abs#(#0()))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/2,c_10/0,c_11/2,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/2
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:firstline#(@l) -> c_8(firstline#1#(@l))
-->_1 firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs)):2
-->_1 firstline#1#(nil()) -> c_10():67
2:S:firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
-->_1 #abs#(#0()) -> c_1():12
-->_2 firstline#(@l) -> c_8(firstline#1#(@l)):1
3:S:lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
-->_1 lcs#1#(@m) -> c_12(lcs#2#(@m)):68
-->_2 lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2)):4
4:S:lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
-->_1 lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2)):6
-->_1 lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2)):5
5:S:lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
-->_1 lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x)):7
-->_2 lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2)):4
6:S:lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):1
7:S:lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
-->_1 lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2)):8
-->_1 lcstable#3#(nil(),@l2,@x) -> c_22():73
8:S:lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
-->_1 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):9
9:S:newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
-->_1 newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y)):10
-->_1 newline#1#(nil(),@lastline,@y) -> c_28():77
10:S:newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
-->_1 newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs)):11
-->_1 newline#2#(nil(),@x,@xs,@y) -> c_30():78
11:S:newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
-->_1 newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl)
,@belowVal
,@lastline'
,@nl
,@x
,@y)
,right#(@nl)):79
-->_2 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):9
12:W:#abs#(#0()) -> c_1()
13:W:#abs#(#neg(@x)) -> c_2()
14:W:#abs#(#pos(@x)) -> c_3()
15:W:#abs#(#s(@x)) -> c_4()
16:W:#add#(#0(),@y) -> c_40()
17:W:#add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
-->_1 #pred#(#pos(#s(#s(@x)))) -> c_83():61
-->_1 #pred#(#pos(#s(#0()))) -> c_82():60
-->_1 #pred#(#neg(#s(@x))) -> c_81():59
-->_1 #pred#(#0()) -> c_80():58
18:W:#add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
-->_2 #add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y)):20
-->_2 #add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y)):19
-->_1 #pred#(#pos(#s(#s(@x)))) -> c_83():61
-->_1 #pred#(#pos(#s(#0()))) -> c_82():60
-->_1 #pred#(#neg(#s(@x))) -> c_81():59
-->_1 #pred#(#0()) -> c_80():58
19:W:#add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
-->_1 #succ#(#pos(#s(@x))) -> c_87():65
-->_1 #succ#(#neg(#s(#s(@x)))) -> c_86():64
-->_1 #succ#(#neg(#s(#0()))) -> c_85():63
-->_1 #succ#(#0()) -> c_84():62
20:W:#add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
-->_1 #succ#(#pos(#s(@x))) -> c_87():65
-->_1 #succ#(#neg(#s(#s(@x)))) -> c_86():64
-->_1 #succ#(#neg(#s(#0()))) -> c_85():63
-->_1 #succ#(#0()) -> c_84():62
-->_2 #add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y)):20
-->_2 #add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y)):19
21:W:#and#(#false(),#false()) -> c_45()
22:W:#and#(#false(),#true()) -> c_46()
23:W:#and#(#true(),#false()) -> c_47()
24:W:#and#(#true(),#true()) -> c_48()
25:W:#ckgt#(#EQ()) -> c_49()
26:W:#ckgt#(#GT()) -> c_50()
27:W:#ckgt#(#LT()) -> c_51()
28:W:#compare#(#0(),#0()) -> c_52()
29:W:#compare#(#0(),#neg(@y)) -> c_53()
30:W:#compare#(#0(),#pos(@y)) -> c_54()
31:W:#compare#(#0(),#s(@y)) -> c_55()
32:W:#compare#(#neg(@x),#0()) -> c_56()
33:W:#compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
-->_1 #compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y)):39
-->_1 #compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y)):37
-->_1 #compare#(#s(@x),#0()) -> c_62():38
-->_1 #compare#(#pos(@x),#neg(@y)) -> c_60():36
-->_1 #compare#(#pos(@x),#0()) -> c_59():35
-->_1 #compare#(#neg(@x),#pos(@y)) -> c_58():34
-->_1 #compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x)):33
-->_1 #compare#(#neg(@x),#0()) -> c_56():32
-->_1 #compare#(#0(),#s(@y)) -> c_55():31
-->_1 #compare#(#0(),#pos(@y)) -> c_54():30
-->_1 #compare#(#0(),#neg(@y)) -> c_53():29
-->_1 #compare#(#0(),#0()) -> c_52():28
34:W:#compare#(#neg(@x),#pos(@y)) -> c_58()
35:W:#compare#(#pos(@x),#0()) -> c_59()
36:W:#compare#(#pos(@x),#neg(@y)) -> c_60()
37:W:#compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
-->_1 #compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y)):39
-->_1 #compare#(#s(@x),#0()) -> c_62():38
-->_1 #compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y)):37
-->_1 #compare#(#pos(@x),#neg(@y)) -> c_60():36
-->_1 #compare#(#pos(@x),#0()) -> c_59():35
-->_1 #compare#(#neg(@x),#pos(@y)) -> c_58():34
-->_1 #compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x)):33
-->_1 #compare#(#neg(@x),#0()) -> c_56():32
-->_1 #compare#(#0(),#s(@y)) -> c_55():31
-->_1 #compare#(#0(),#pos(@y)) -> c_54():30
-->_1 #compare#(#0(),#neg(@y)) -> c_53():29
-->_1 #compare#(#0(),#0()) -> c_52():28
38:W:#compare#(#s(@x),#0()) -> c_62()
39:W:#compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
-->_1 #compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y)):39
-->_1 #compare#(#s(@x),#0()) -> c_62():38
-->_1 #compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y)):37
-->_1 #compare#(#pos(@x),#neg(@y)) -> c_60():36
-->_1 #compare#(#pos(@x),#0()) -> c_59():35
-->_1 #compare#(#neg(@x),#pos(@y)) -> c_58():34
-->_1 #compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x)):33
-->_1 #compare#(#neg(@x),#0()) -> c_56():32
-->_1 #compare#(#0(),#s(@y)) -> c_55():31
-->_1 #compare#(#0(),#pos(@y)) -> c_54():30
-->_1 #compare#(#0(),#neg(@y)) -> c_53():29
-->_1 #compare#(#0(),#0()) -> c_52():28
40:W:#eq#(#0(),#0()) -> c_64()
41:W:#eq#(#0(),#neg(@y)) -> c_65()
42:W:#eq#(#0(),#pos(@y)) -> c_66()
43:W:#eq#(#0(),#s(@y)) -> c_67()
44:W:#eq#(#neg(@x),#0()) -> c_68()
45:W:#eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
-->_1 #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2)):52
-->_1 #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y)):51
-->_1 #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y)):49
-->_1 #eq#(nil(),nil()) -> c_79():55
-->_1 #eq#(nil(),::(@y_1,@y_2)) -> c_78():54
-->_1 #eq#(::(@x_1,@x_2),nil()) -> c_77():53
-->_1 #eq#(#s(@x),#0()) -> c_74():50
-->_1 #eq#(#pos(@x),#neg(@y)) -> c_72():48
-->_1 #eq#(#pos(@x),#0()) -> c_71():47
-->_1 #eq#(#neg(@x),#pos(@y)) -> c_70():46
-->_1 #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y)):45
-->_1 #eq#(#neg(@x),#0()) -> c_68():44
-->_1 #eq#(#0(),#s(@y)) -> c_67():43
-->_1 #eq#(#0(),#pos(@y)) -> c_66():42
-->_1 #eq#(#0(),#neg(@y)) -> c_65():41
-->_1 #eq#(#0(),#0()) -> c_64():40
46:W:#eq#(#neg(@x),#pos(@y)) -> c_70()
47:W:#eq#(#pos(@x),#0()) -> c_71()
48:W:#eq#(#pos(@x),#neg(@y)) -> c_72()
49:W:#eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
-->_1 #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2)):52
-->_1 #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y)):51
-->_1 #eq#(nil(),nil()) -> c_79():55
-->_1 #eq#(nil(),::(@y_1,@y_2)) -> c_78():54
-->_1 #eq#(::(@x_1,@x_2),nil()) -> c_77():53
-->_1 #eq#(#s(@x),#0()) -> c_74():50
-->_1 #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y)):49
-->_1 #eq#(#pos(@x),#neg(@y)) -> c_72():48
-->_1 #eq#(#pos(@x),#0()) -> c_71():47
-->_1 #eq#(#neg(@x),#pos(@y)) -> c_70():46
-->_1 #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y)):45
-->_1 #eq#(#neg(@x),#0()) -> c_68():44
-->_1 #eq#(#0(),#s(@y)) -> c_67():43
-->_1 #eq#(#0(),#pos(@y)) -> c_66():42
-->_1 #eq#(#0(),#neg(@y)) -> c_65():41
-->_1 #eq#(#0(),#0()) -> c_64():40
50:W:#eq#(#s(@x),#0()) -> c_74()
51:W:#eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
-->_1 #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2)):52
-->_1 #eq#(nil(),nil()) -> c_79():55
-->_1 #eq#(nil(),::(@y_1,@y_2)) -> c_78():54
-->_1 #eq#(::(@x_1,@x_2),nil()) -> c_77():53
-->_1 #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y)):51
-->_1 #eq#(#s(@x),#0()) -> c_74():50
-->_1 #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y)):49
-->_1 #eq#(#pos(@x),#neg(@y)) -> c_72():48
-->_1 #eq#(#pos(@x),#0()) -> c_71():47
-->_1 #eq#(#neg(@x),#pos(@y)) -> c_70():46
-->_1 #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y)):45
-->_1 #eq#(#neg(@x),#0()) -> c_68():44
-->_1 #eq#(#0(),#s(@y)) -> c_67():43
-->_1 #eq#(#0(),#pos(@y)) -> c_66():42
-->_1 #eq#(#0(),#neg(@y)) -> c_65():41
-->_1 #eq#(#0(),#0()) -> c_64():40
52:W:#eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
-->_3 #eq#(nil(),nil()) -> c_79():55
-->_2 #eq#(nil(),nil()) -> c_79():55
-->_3 #eq#(nil(),::(@y_1,@y_2)) -> c_78():54
-->_2 #eq#(nil(),::(@y_1,@y_2)) -> c_78():54
-->_3 #eq#(::(@x_1,@x_2),nil()) -> c_77():53
-->_2 #eq#(::(@x_1,@x_2),nil()) -> c_77():53
-->_3 #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2)):52
-->_2 #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2)):52
-->_3 #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y)):51
-->_2 #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y)):51
-->_3 #eq#(#s(@x),#0()) -> c_74():50
-->_2 #eq#(#s(@x),#0()) -> c_74():50
-->_3 #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y)):49
-->_2 #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y)):49
-->_3 #eq#(#pos(@x),#neg(@y)) -> c_72():48
-->_2 #eq#(#pos(@x),#neg(@y)) -> c_72():48
-->_3 #eq#(#pos(@x),#0()) -> c_71():47
-->_2 #eq#(#pos(@x),#0()) -> c_71():47
-->_3 #eq#(#neg(@x),#pos(@y)) -> c_70():46
-->_2 #eq#(#neg(@x),#pos(@y)) -> c_70():46
-->_3 #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y)):45
-->_2 #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y)):45
-->_3 #eq#(#neg(@x),#0()) -> c_68():44
-->_2 #eq#(#neg(@x),#0()) -> c_68():44
-->_3 #eq#(#0(),#s(@y)) -> c_67():43
-->_2 #eq#(#0(),#s(@y)) -> c_67():43
-->_3 #eq#(#0(),#pos(@y)) -> c_66():42
-->_2 #eq#(#0(),#pos(@y)) -> c_66():42
-->_3 #eq#(#0(),#neg(@y)) -> c_65():41
-->_2 #eq#(#0(),#neg(@y)) -> c_65():41
-->_3 #eq#(#0(),#0()) -> c_64():40
-->_2 #eq#(#0(),#0()) -> c_64():40
-->_1 #and#(#true(),#true()) -> c_48():24
-->_1 #and#(#true(),#false()) -> c_47():23
-->_1 #and#(#false(),#true()) -> c_46():22
-->_1 #and#(#false(),#false()) -> c_45():21
53:W:#eq#(::(@x_1,@x_2),nil()) -> c_77()
54:W:#eq#(nil(),::(@y_1,@y_2)) -> c_78()
55:W:#eq#(nil(),nil()) -> c_79()
56:W:#equal#(@x,@y) -> c_5(#eq#(@x,@y))
-->_1 #eq#(nil(),nil()) -> c_79():55
-->_1 #eq#(nil(),::(@y_1,@y_2)) -> c_78():54
-->_1 #eq#(::(@x_1,@x_2),nil()) -> c_77():53
-->_1 #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2)):52
-->_1 #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y)):51
-->_1 #eq#(#s(@x),#0()) -> c_74():50
-->_1 #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y)):49
-->_1 #eq#(#pos(@x),#neg(@y)) -> c_72():48
-->_1 #eq#(#pos(@x),#0()) -> c_71():47
-->_1 #eq#(#neg(@x),#pos(@y)) -> c_70():46
-->_1 #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y)):45
-->_1 #eq#(#neg(@x),#0()) -> c_68():44
-->_1 #eq#(#0(),#s(@y)) -> c_67():43
-->_1 #eq#(#0(),#pos(@y)) -> c_66():42
-->_1 #eq#(#0(),#neg(@y)) -> c_65():41
-->_1 #eq#(#0(),#0()) -> c_64():40
57:W:#greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
-->_2 #compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y)):39
-->_2 #compare#(#s(@x),#0()) -> c_62():38
-->_2 #compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y)):37
-->_2 #compare#(#pos(@x),#neg(@y)) -> c_60():36
-->_2 #compare#(#pos(@x),#0()) -> c_59():35
-->_2 #compare#(#neg(@x),#pos(@y)) -> c_58():34
-->_2 #compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x)):33
-->_2 #compare#(#neg(@x),#0()) -> c_56():32
-->_2 #compare#(#0(),#s(@y)) -> c_55():31
-->_2 #compare#(#0(),#pos(@y)) -> c_54():30
-->_2 #compare#(#0(),#neg(@y)) -> c_53():29
-->_2 #compare#(#0(),#0()) -> c_52():28
-->_1 #ckgt#(#LT()) -> c_51():27
-->_1 #ckgt#(#GT()) -> c_50():26
-->_1 #ckgt#(#EQ()) -> c_49():25
58:W:#pred#(#0()) -> c_80()
59:W:#pred#(#neg(#s(@x))) -> c_81()
60:W:#pred#(#pos(#s(#0()))) -> c_82()
61:W:#pred#(#pos(#s(#s(@x)))) -> c_83()
62:W:#succ#(#0()) -> c_84()
63:W:#succ#(#neg(#s(#0()))) -> c_85()
64:W:#succ#(#neg(#s(#s(@x)))) -> c_86()
65:W:#succ#(#pos(#s(@x))) -> c_87()
66:W:+#(@x,@y) -> c_7(#add#(@x,@y))
-->_1 #add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y)):20
-->_1 #add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y)):19
-->_1 #add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y)):18
-->_1 #add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y)):17
-->_1 #add#(#0(),@y) -> c_40():16
67:W:firstline#1#(nil()) -> c_10()
68:W:lcs#1#(@m) -> c_12(lcs#2#(@m))
-->_1 lcs#2#(nil()) -> c_14(#abs#(#0())):70
-->_1 lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1)):69
69:W:lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
-->_1 lcs#3#(nil()) -> c_16(#abs#(#0())):72
-->_1 lcs#3#(::(@len,@_@1)) -> c_15():71
70:W:lcs#2#(nil()) -> c_14(#abs#(#0()))
-->_1 #abs#(#0()) -> c_1():12
71:W:lcs#3#(::(@len,@_@1)) -> c_15()
72:W:lcs#3#(nil()) -> c_16(#abs#(#0()))
-->_1 #abs#(#0()) -> c_1():12
73:W:lcstable#3#(nil(),@l2,@x) -> c_22()
74:W:max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
-->_1 max#1#(#true(),@a,@b) -> c_25():76
-->_1 max#1#(#false(),@a,@b) -> c_24():75
-->_2 #greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y)):57
75:W:max#1#(#false(),@a,@b) -> c_24()
76:W:max#1#(#true(),@a,@b) -> c_25()
77:W:newline#1#(nil(),@lastline,@y) -> c_28()
78:W:newline#2#(nil(),@x,@xs,@y) -> c_30()
79:W:newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl)
,@belowVal
,@lastline'
,@nl
,@x
,@y)
,right#(@nl))
-->_2 right#(@l) -> c_37(right#1#(@l)):85
-->_1 newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline')):80
80:W:newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
-->_2 right#(@l) -> c_37(right#1#(@l)):85
-->_1 newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y)):81
81:W:newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
-->_2 newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0())))):84
-->_2 newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal)):83
-->_1 newline#6#(@elem,@nl) -> c_34():82
-->_3 #equal#(@x,@y) -> c_5(#eq#(@x,@y)):56
82:W:newline#6#(@elem,@nl) -> c_34()
83:W:newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
-->_1 max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b)):74
84:W:newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
-->_1 +#(@x,@y) -> c_7(#add#(@x,@y)):66
85:W:right#(@l) -> c_37(right#1#(@l))
-->_1 right#1#(nil()) -> c_39(#abs#(#0())):87
-->_1 right#1#(::(@x,@xs)) -> c_38():86
86:W:right#1#(::(@x,@xs)) -> c_38()
87:W:right#1#(nil()) -> c_39(#abs#(#0()))
-->_1 #abs#(#0()) -> c_1():12
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
15: #abs#(#s(@x)) -> c_4()
14: #abs#(#pos(@x)) -> c_3()
13: #abs#(#neg(@x)) -> c_2()
73: lcstable#3#(nil(),@l2,@x) -> c_22()
77: newline#1#(nil(),@lastline,@y) -> c_28()
78: newline#2#(nil(),@x,@xs,@y) -> c_30()
79: newline#3#(@nl,@belowVal,@lastline',@x,@y) -> c_31(newline#4#(right(@nl),@belowVal,@lastline',@nl,@x,@y)
,right#(@nl))
80: newline#4#(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> c_32(newline#5#(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
,right#(@lastline'))
81: newline#5#(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> c_33(newline#6#(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
,newline#7#(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,#equal#(@x,@y))
56: #equal#(@x,@y) -> c_5(#eq#(@x,@y))
52: #eq#(::(@x_1,@x_2),::(@y_1,@y_2)) -> c_76(#and#(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
,#eq#(@x_1,@y_1)
,#eq#(@x_2,@y_2))
51: #eq#(#s(@x),#s(@y)) -> c_75(#eq#(@x,@y))
49: #eq#(#pos(@x),#pos(@y)) -> c_73(#eq#(@x,@y))
45: #eq#(#neg(@x),#neg(@y)) -> c_69(#eq#(@x,@y))
21: #and#(#false(),#false()) -> c_45()
22: #and#(#false(),#true()) -> c_46()
23: #and#(#true(),#false()) -> c_47()
24: #and#(#true(),#true()) -> c_48()
40: #eq#(#0(),#0()) -> c_64()
41: #eq#(#0(),#neg(@y)) -> c_65()
42: #eq#(#0(),#pos(@y)) -> c_66()
43: #eq#(#0(),#s(@y)) -> c_67()
44: #eq#(#neg(@x),#0()) -> c_68()
46: #eq#(#neg(@x),#pos(@y)) -> c_70()
47: #eq#(#pos(@x),#0()) -> c_71()
48: #eq#(#pos(@x),#neg(@y)) -> c_72()
50: #eq#(#s(@x),#0()) -> c_74()
53: #eq#(::(@x_1,@x_2),nil()) -> c_77()
54: #eq#(nil(),::(@y_1,@y_2)) -> c_78()
55: #eq#(nil(),nil()) -> c_79()
82: newline#6#(@elem,@nl) -> c_34()
83: newline#7#(#false(),@belowVal,@diagVal,@rightVal) -> c_35(max#(@belowVal,@rightVal))
74: max#(@a,@b) -> c_23(max#1#(#greater(@a,@b),@a,@b),#greater#(@a,@b))
57: #greater#(@x,@y) -> c_6(#ckgt#(#compare(@x,@y)),#compare#(@x,@y))
25: #ckgt#(#EQ()) -> c_49()
26: #ckgt#(#GT()) -> c_50()
27: #ckgt#(#LT()) -> c_51()
39: #compare#(#s(@x),#s(@y)) -> c_63(#compare#(@x,@y))
37: #compare#(#pos(@x),#pos(@y)) -> c_61(#compare#(@x,@y))
33: #compare#(#neg(@x),#neg(@y)) -> c_57(#compare#(@y,@x))
28: #compare#(#0(),#0()) -> c_52()
29: #compare#(#0(),#neg(@y)) -> c_53()
30: #compare#(#0(),#pos(@y)) -> c_54()
31: #compare#(#0(),#s(@y)) -> c_55()
32: #compare#(#neg(@x),#0()) -> c_56()
34: #compare#(#neg(@x),#pos(@y)) -> c_58()
35: #compare#(#pos(@x),#0()) -> c_59()
36: #compare#(#pos(@x),#neg(@y)) -> c_60()
38: #compare#(#s(@x),#0()) -> c_62()
75: max#1#(#false(),@a,@b) -> c_24()
76: max#1#(#true(),@a,@b) -> c_25()
84: newline#7#(#true(),@belowVal,@diagVal,@rightVal) -> c_36(+#(@diagVal,#pos(#s(#0()))))
66: +#(@x,@y) -> c_7(#add#(@x,@y))
16: #add#(#0(),@y) -> c_40()
17: #add#(#neg(#s(#0())),@y) -> c_41(#pred#(@y))
18: #add#(#neg(#s(#s(@x))),@y) -> c_42(#pred#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
58: #pred#(#0()) -> c_80()
59: #pred#(#neg(#s(@x))) -> c_81()
60: #pred#(#pos(#s(#0()))) -> c_82()
61: #pred#(#pos(#s(#s(@x)))) -> c_83()
20: #add#(#pos(#s(#s(@x))),@y) -> c_44(#succ#(#add(#pos(#s(@x)),@y)),#add#(#pos(#s(@x)),@y))
19: #add#(#pos(#s(#0())),@y) -> c_43(#succ#(@y))
62: #succ#(#0()) -> c_84()
63: #succ#(#neg(#s(#0()))) -> c_85()
64: #succ#(#neg(#s(#s(@x)))) -> c_86()
65: #succ#(#pos(#s(@x))) -> c_87()
85: right#(@l) -> c_37(right#1#(@l))
86: right#1#(::(@x,@xs)) -> c_38()
87: right#1#(nil()) -> c_39(#abs#(#0()))
68: lcs#1#(@m) -> c_12(lcs#2#(@m))
69: lcs#2#(::(@l1,@_@2)) -> c_13(lcs#3#(@l1))
71: lcs#3#(::(@len,@_@1)) -> c_15()
72: lcs#3#(nil()) -> c_16(#abs#(#0()))
70: lcs#2#(nil()) -> c_14(#abs#(#0()))
67: firstline#1#(nil()) -> c_10()
12: #abs#(#0()) -> c_1()
* Step 11: SimplifyRHS WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/2,c_10/0,c_11/2,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/2
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:firstline#(@l) -> c_8(firstline#1#(@l))
-->_1 firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs)):2
2:S:firstline#1#(::(@x,@xs)) -> c_9(#abs#(#0()),firstline#(@xs))
-->_2 firstline#(@l) -> c_8(firstline#1#(@l)):1
3:S:lcs#(@l1,@l2) -> c_11(lcs#1#(lcstable(@l1,@l2)),lcstable#(@l1,@l2))
-->_2 lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2)):4
4:S:lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
-->_1 lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2)):6
-->_1 lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2)):5
5:S:lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
-->_1 lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x)):7
-->_2 lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2)):4
6:S:lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):1
7:S:lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
-->_1 lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2)):8
8:S:lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
-->_1 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):9
9:S:newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
-->_1 newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y)):10
10:S:newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
-->_1 newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs)):11
11:S:newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#3#(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
,newline#(@y,@lastline',@xs))
-->_2 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):9
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
lcs#(@l1,@l2) -> c_11(lcstable#(@l1,@l2))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
* Step 12: RemoveHeads WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
lcs#(@l1,@l2) -> c_11(lcstable#(@l1,@l2))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
RemoveHeads
+ Details:
Consider the dependency graph
1:S:firstline#(@l) -> c_8(firstline#1#(@l))
-->_1 firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs)):2
2:S:firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):1
3:S:lcs#(@l1,@l2) -> c_11(lcstable#(@l1,@l2))
-->_1 lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2)):4
4:S:lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
-->_1 lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2)):6
-->_1 lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2)):5
5:S:lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
-->_1 lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x)):7
-->_2 lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2)):4
6:S:lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):1
7:S:lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
-->_1 lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2)):8
8:S:lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
-->_1 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):9
9:S:newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
-->_1 newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y)):10
10:S:newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
-->_1 newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs)):11
11:S:newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
-->_1 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):9
Following roots of the dependency graph are removed, as the considered set of starting terms is closed under reduction with respect to these rules (modulo compound contexts).
[(3,lcs#(@l1,@l2) -> c_11(lcstable#(@l1,@l2)))]
* Step 13: Decompose WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd}
+ Details:
We analyse the complexity of following sub-problems (R) and (S).
Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component.
Problem (R)
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
- Weak DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2
,max#1/3,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4
,right/1,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1
,#succ#/1,+#/2,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2
,lcstable#2#/3,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5
,newline#4#/6,newline#5#/6,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0
,#false/0,#neg/1,#pos/1,#s/1,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1
,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0
,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1
,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0
,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1
,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0
,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#
,#greater#,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#
,lcstable#2#,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#
,newline#6#,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
Problem (S)
- Strict DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
- Weak DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2
,max#1/3,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4
,right/1,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1
,#succ#/1,+#/2,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2
,lcstable#2#/3,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5
,newline#4#/6,newline#5#/6,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0
,#false/0,#neg/1,#pos/1,#s/1,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1
,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0
,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1
,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0
,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1
,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0
,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#
,#greater#,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#
,lcstable#2#,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#
,newline#6#,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
** Step 13.a:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
- Weak DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:firstline#(@l) -> c_8(firstline#1#(@l))
-->_1 firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs)):2
2:S:firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):1
4:W:lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
-->_1 lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2)):6
-->_1 lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2)):5
5:W:lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
-->_2 lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2)):4
-->_1 lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x)):7
6:W:lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):1
7:W:lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
-->_1 lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2)):8
8:W:lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
-->_1 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):9
9:W:newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
-->_1 newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y)):10
10:W:newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
-->_1 newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs)):11
11:W:newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
-->_1 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):9
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
7: lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
8: lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
9: newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
11: newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
10: newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
** Step 13.a:2: SimplifyRHS WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
- Weak DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:firstline#(@l) -> c_8(firstline#1#(@l))
-->_1 firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs)):2
2:S:firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):1
4:W:lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
-->_1 lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2)):6
-->_1 lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2)):5
5:W:lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
-->_2 lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2)):4
6:W:lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):1
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
** Step 13.a:3: UsableRules WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
- Weak DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
** Step 13.a:4: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
- Weak DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
2: firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
The strictly oriented rules are moved into the weak component.
*** Step 13.a:4.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
- Weak DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(c_8) = {1},
uargs(c_9) = {1},
uargs(c_17) = {1},
uargs(c_18) = {1},
uargs(c_19) = {1}
Following symbols are considered usable:
{#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#
,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#,lcstable#3#,max#,max#1#,newline#,newline#1#
,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#,newline#7#,right#,right#1#}
TcT has computed the following interpretation:
p(#0) = [0]
p(#EQ) = [0]
p(#GT) = [0]
p(#LT) = [0]
p(#abs) = [0]
p(#add) = [0]
p(#and) = [0]
p(#ckgt) = [0]
p(#compare) = [0]
p(#eq) = [0]
p(#equal) = [1] x2 + [0]
p(#false) = [1]
p(#greater) = [8] x1 + [0]
p(#neg) = [1]
p(#pos) = [1] x1 + [0]
p(#pred) = [2] x1 + [1]
p(#s) = [1] x1 + [0]
p(#succ) = [1] x1 + [0]
p(#true) = [0]
p(+) = [1] x2 + [2]
p(::) = [1] x1 + [1] x2 + [4]
p(firstline) = [1] x1 + [2]
p(firstline#1) = [2] x1 + [1]
p(lcs) = [1]
p(lcs#1) = [1] x1 + [0]
p(lcs#2) = [4] x1 + [1]
p(lcs#3) = [1] x1 + [0]
p(lcstable) = [1] x1 + [1] x2 + [1]
p(lcstable#1) = [1] x1 + [2]
p(lcstable#2) = [2] x1 + [1] x2 + [2] x3 + [1]
p(lcstable#3) = [1] x3 + [4]
p(max) = [1] x1 + [1]
p(max#1) = [2] x1 + [1] x2 + [1] x3 + [1]
p(newline) = [1] x3 + [8]
p(newline#1) = [8] x1 + [0]
p(newline#2) = [1] x1 + [0]
p(newline#3) = [0]
p(newline#4) = [0]
p(newline#5) = [0]
p(newline#6) = [0]
p(newline#7) = [0]
p(nil) = [0]
p(right) = [0]
p(right#1) = [0]
p(#abs#) = [0]
p(#add#) = [0]
p(#and#) = [0]
p(#ckgt#) = [0]
p(#compare#) = [0]
p(#eq#) = [0]
p(#equal#) = [0]
p(#greater#) = [0]
p(#pred#) = [0]
p(#succ#) = [0]
p(+#) = [0]
p(firstline#) = [2] x1 + [0]
p(firstline#1#) = [2] x1 + [0]
p(lcs#) = [0]
p(lcs#1#) = [0]
p(lcs#2#) = [0]
p(lcs#3#) = [0]
p(lcstable#) = [8] x2 + [7]
p(lcstable#1#) = [8] x2 + [7]
p(lcstable#2#) = [0]
p(lcstable#3#) = [0]
p(max#) = [0]
p(max#1#) = [0]
p(newline#) = [0]
p(newline#1#) = [0]
p(newline#2#) = [0]
p(newline#3#) = [0]
p(newline#4#) = [0]
p(newline#5#) = [0]
p(newline#6#) = [0]
p(newline#7#) = [0]
p(right#) = [0]
p(right#1#) = [0]
p(c_1) = [0]
p(c_2) = [0]
p(c_3) = [0]
p(c_4) = [0]
p(c_5) = [0]
p(c_6) = [0]
p(c_7) = [0]
p(c_8) = [1] x1 + [0]
p(c_9) = [1] x1 + [7]
p(c_10) = [0]
p(c_11) = [0]
p(c_12) = [0]
p(c_13) = [0]
p(c_14) = [0]
p(c_15) = [0]
p(c_16) = [0]
p(c_17) = [1] x1 + [0]
p(c_18) = [1] x1 + [0]
p(c_19) = [4] x1 + [1]
p(c_20) = [4] x1 + [0]
p(c_21) = [0]
p(c_22) = [0]
p(c_23) = [1] x1 + [4] x2 + [0]
p(c_24) = [0]
p(c_25) = [0]
p(c_26) = [0]
p(c_27) = [1] x1 + [0]
p(c_28) = [0]
p(c_29) = [4] x1 + [0]
p(c_30) = [0]
p(c_31) = [1] x1 + [0]
p(c_32) = [1] x1 + [2] x2 + [0]
p(c_33) = [1] x2 + [0]
p(c_34) = [0]
p(c_35) = [0]
p(c_36) = [0]
p(c_37) = [1] x1 + [0]
p(c_38) = [0]
p(c_39) = [8] x1 + [0]
p(c_40) = [0]
p(c_41) = [1] x1 + [0]
p(c_42) = [2] x2 + [8]
p(c_43) = [1]
p(c_44) = [1] x2 + [1]
p(c_45) = [2]
p(c_46) = [0]
p(c_47) = [4]
p(c_48) = [0]
p(c_49) = [1]
p(c_50) = [0]
p(c_51) = [0]
p(c_52) = [1]
p(c_53) = [0]
p(c_54) = [1]
p(c_55) = [2]
p(c_56) = [4]
p(c_57) = [1] x1 + [1]
p(c_58) = [1]
p(c_59) = [2]
p(c_60) = [0]
p(c_61) = [1]
p(c_62) = [2]
p(c_63) = [0]
p(c_64) = [0]
p(c_65) = [1]
p(c_66) = [0]
p(c_67) = [0]
p(c_68) = [1]
p(c_69) = [8] x1 + [1]
p(c_70) = [2]
p(c_71) = [0]
p(c_72) = [0]
p(c_73) = [8] x1 + [1]
p(c_74) = [0]
p(c_75) = [1] x1 + [0]
p(c_76) = [8] x1 + [1] x2 + [2] x3 + [0]
p(c_77) = [2]
p(c_78) = [1]
p(c_79) = [1]
p(c_80) = [1]
p(c_81) = [0]
p(c_82) = [0]
p(c_83) = [1]
p(c_84) = [1]
p(c_85) = [2]
p(c_86) = [1]
p(c_87) = [4]
Following rules are strictly oriented:
firstline#1#(::(@x,@xs)) = [2] @x + [2] @xs + [8]
> [2] @xs + [7]
= c_9(firstline#(@xs))
Following rules are (at-least) weakly oriented:
firstline#(@l) = [2] @l + [0]
>= [2] @l + [0]
= c_8(firstline#1#(@l))
lcstable#(@l1,@l2) = [8] @l2 + [7]
>= [8] @l2 + [7]
= c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) = [8] @l2 + [7]
>= [8] @l2 + [7]
= c_18(lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) = [8] @l2 + [7]
>= [8] @l2 + [1]
= c_19(firstline#(@l2))
*** Step 13.a:4.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
- Weak DPs:
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
*** Step 13.a:4.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
- Weak DPs:
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: firstline#(@l) -> c_8(firstline#1#(@l))
Consider the set of all dependency pairs
1: firstline#(@l) -> c_8(firstline#1#(@l))
2: firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
3: lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
4: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
5: lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^1))
SPACE(?,?)on application of the dependency pairs
{1}
These cover all (indirect) predecessors of dependency pairs
{1,2}
their number of applications is equally bounded.
The dependency pairs are shifted into the weak component.
**** Step 13.a:4.b:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
- Weak DPs:
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(c_8) = {1},
uargs(c_9) = {1},
uargs(c_17) = {1},
uargs(c_18) = {1},
uargs(c_19) = {1}
Following symbols are considered usable:
{#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#
,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#,lcstable#3#,max#,max#1#,newline#,newline#1#
,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#,newline#7#,right#,right#1#}
TcT has computed the following interpretation:
p(#0) = [0]
p(#EQ) = [1]
p(#GT) = [0]
p(#LT) = [2]
p(#abs) = [1]
p(#add) = [2] x1 + [1] x2 + [0]
p(#and) = [8] x1 + [0]
p(#ckgt) = [1]
p(#compare) = [1] x1 + [1] x2 + [0]
p(#eq) = [1]
p(#equal) = [1] x1 + [4] x2 + [0]
p(#false) = [0]
p(#greater) = [1] x1 + [1] x2 + [1]
p(#neg) = [1] x1 + [0]
p(#pos) = [1] x1 + [1]
p(#pred) = [1] x1 + [1]
p(#s) = [1]
p(#succ) = [1] x1 + [1]
p(#true) = [1]
p(+) = [1]
p(::) = [1] x1 + [1] x2 + [3]
p(firstline) = [1] x1 + [0]
p(firstline#1) = [4] x1 + [1]
p(lcs) = [1] x1 + [2] x2 + [1]
p(lcs#1) = [1] x1 + [1]
p(lcs#2) = [2] x1 + [8]
p(lcs#3) = [8] x1 + [2]
p(lcstable) = [1] x1 + [2]
p(lcstable#1) = [1] x2 + [2]
p(lcstable#2) = [1] x1 + [8] x2 + [1] x3 + [1]
p(lcstable#3) = [2] x1 + [8] x2 + [4] x3 + [1]
p(max) = [1] x1 + [1] x2 + [2]
p(max#1) = [2] x1 + [1] x2 + [1]
p(newline) = [2] x1 + [1] x2 + [1] x3 + [1]
p(newline#1) = [2] x3 + [8]
p(newline#2) = [1]
p(newline#3) = [0]
p(newline#4) = [0]
p(newline#5) = [0]
p(newline#6) = [0]
p(newline#7) = [0]
p(nil) = [8]
p(right) = [0]
p(right#1) = [0]
p(#abs#) = [0]
p(#add#) = [0]
p(#and#) = [0]
p(#ckgt#) = [0]
p(#compare#) = [0]
p(#eq#) = [0]
p(#equal#) = [0]
p(#greater#) = [0]
p(#pred#) = [0]
p(#succ#) = [0]
p(+#) = [0]
p(firstline#) = [8] x1 + [8]
p(firstline#1#) = [8] x1 + [1]
p(lcs#) = [0]
p(lcs#1#) = [0]
p(lcs#2#) = [0]
p(lcs#3#) = [0]
p(lcstable#) = [1] x1 + [8] x2 + [1]
p(lcstable#1#) = [1] x1 + [8] x2 + [0]
p(lcstable#2#) = [2] x1 + [0]
p(lcstable#3#) = [0]
p(max#) = [0]
p(max#1#) = [0]
p(newline#) = [0]
p(newline#1#) = [0]
p(newline#2#) = [0]
p(newline#3#) = [1] x3 + [0]
p(newline#4#) = [0]
p(newline#5#) = [0]
p(newline#6#) = [0]
p(newline#7#) = [2] x2 + [1] x4 + [0]
p(right#) = [2] x1 + [2]
p(right#1#) = [0]
p(c_1) = [1]
p(c_2) = [8]
p(c_3) = [0]
p(c_4) = [1]
p(c_5) = [8]
p(c_6) = [2] x1 + [1] x2 + [1]
p(c_7) = [0]
p(c_8) = [1] x1 + [5]
p(c_9) = [1] x1 + [8]
p(c_10) = [1]
p(c_11) = [1]
p(c_12) = [0]
p(c_13) = [2]
p(c_14) = [2]
p(c_15) = [1]
p(c_16) = [1]
p(c_17) = [1] x1 + [0]
p(c_18) = [1] x1 + [2]
p(c_19) = [1] x1 + [0]
p(c_20) = [0]
p(c_21) = [0]
p(c_22) = [2]
p(c_23) = [1] x1 + [2] x2 + [0]
p(c_24) = [1]
p(c_25) = [1]
p(c_26) = [0]
p(c_27) = [1] x1 + [1]
p(c_28) = [4]
p(c_29) = [1] x1 + [8]
p(c_30) = [1]
p(c_31) = [1] x1 + [1] x2 + [0]
p(c_32) = [1] x1 + [2]
p(c_33) = [1] x2 + [2]
p(c_34) = [0]
p(c_35) = [1]
p(c_36) = [0]
p(c_37) = [0]
p(c_38) = [1]
p(c_39) = [0]
p(c_40) = [2]
p(c_41) = [1]
p(c_42) = [2] x1 + [2] x2 + [1]
p(c_43) = [2] x1 + [1]
p(c_44) = [4] x1 + [2] x2 + [4]
p(c_45) = [0]
p(c_46) = [1]
p(c_47) = [0]
p(c_48) = [1]
p(c_49) = [1]
p(c_50) = [1]
p(c_51) = [2]
p(c_52) = [0]
p(c_53) = [0]
p(c_54) = [2]
p(c_55) = [1]
p(c_56) = [0]
p(c_57) = [2] x1 + [2]
p(c_58) = [0]
p(c_59) = [0]
p(c_60) = [8]
p(c_61) = [1] x1 + [0]
p(c_62) = [0]
p(c_63) = [1] x1 + [1]
p(c_64) = [8]
p(c_65) = [2]
p(c_66) = [1]
p(c_67) = [1]
p(c_68) = [2]
p(c_69) = [2] x1 + [0]
p(c_70) = [1]
p(c_71) = [0]
p(c_72) = [1]
p(c_73) = [1] x1 + [2]
p(c_74) = [0]
p(c_75) = [1] x1 + [8]
p(c_76) = [1] x2 + [4]
p(c_77) = [0]
p(c_78) = [0]
p(c_79) = [1]
p(c_80) = [1]
p(c_81) = [1]
p(c_82) = [2]
p(c_83) = [0]
p(c_84) = [0]
p(c_85) = [0]
p(c_86) = [1]
p(c_87) = [1]
Following rules are strictly oriented:
firstline#(@l) = [8] @l + [8]
> [8] @l + [6]
= c_8(firstline#1#(@l))
Following rules are (at-least) weakly oriented:
firstline#1#(::(@x,@xs)) = [8] @x + [8] @xs + [25]
>= [8] @xs + [16]
= c_9(firstline#(@xs))
lcstable#(@l1,@l2) = [1] @l1 + [8] @l2 + [1]
>= [1] @l1 + [8] @l2 + [0]
= c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) = [8] @l2 + [1] @x + [1] @xs + [3]
>= [8] @l2 + [1] @xs + [3]
= c_18(lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) = [8] @l2 + [8]
>= [8] @l2 + [8]
= c_19(firstline#(@l2))
**** Step 13.a:4.b:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
**** Step 13.a:4.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:firstline#(@l) -> c_8(firstline#1#(@l))
-->_1 firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs)):2
2:W:firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):1
3:W:lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
-->_1 lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2)):5
-->_1 lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2)):4
4:W:lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
-->_1 lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2)):3
5:W:lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
3: lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
4: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#(@xs,@l2))
5: lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
1: firstline#(@l) -> c_8(firstline#1#(@l))
2: firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
**** Step 13.a:4.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/1,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
** Step 13.b:1: PredecessorEstimation WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
- Weak DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{3}
by application of
Pre({3}) = {1}.
Here rules are labelled as follows:
1: lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
2: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
3: lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
4: lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
5: lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
6: newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
7: newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
8: newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
9: firstline#(@l) -> c_8(firstline#1#(@l))
10: firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
** Step 13.b:2: RemoveWeakSuffixes WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
- Weak DPs:
firstline#(@l) -> c_8(firstline#1#(@l))
firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
-->_1 lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2)):10
-->_1 lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2)):2
2:S:lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
-->_1 lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x)):3
-->_2 lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2)):1
3:S:lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
-->_1 lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2)):4
4:S:lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
-->_1 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):5
5:S:newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
-->_1 newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y)):6
6:S:newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
-->_1 newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs)):7
7:S:newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
-->_1 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):5
8:W:firstline#(@l) -> c_8(firstline#1#(@l))
-->_1 firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs)):9
9:W:firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):8
10:W:lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
-->_1 firstline#(@l) -> c_8(firstline#1#(@l)):8
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
10: lcstable#1#(nil(),@l2) -> c_19(firstline#(@l2))
8: firstline#(@l) -> c_8(firstline#1#(@l))
9: firstline#1#(::(@x,@xs)) -> c_9(firstline#(@xs))
** Step 13.b:3: PredecessorEstimationCP WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
2: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
3: lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
7: newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
Consider the set of all dependency pairs
1: lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
2: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
3: lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
4: lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
5: newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
6: newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
7: newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
Processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^2))
SPACE(?,?)on application of the dependency pairs
{2,3,7}
These cover all (indirect) predecessors of dependency pairs
{1,2,3,4,5,6,7}
their number of applications is equally bounded.
The dependency pairs are shifted into the weak component.
*** Step 13.b:3.a:1: NaturalPI WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a polynomial interpretation of kind constructor-based(mixed(2)):
The following argument positions are considered usable:
uargs(c_17) = {1},
uargs(c_18) = {1,2},
uargs(c_20) = {1},
uargs(c_21) = {1},
uargs(c_26) = {1},
uargs(c_27) = {1},
uargs(c_29) = {1}
Following symbols are considered usable:
{#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#
,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#,lcstable#3#,max#,max#1#,newline#,newline#1#
,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#,newline#7#,right#,right#1#}
TcT has computed the following interpretation:
p(#0) = 0
p(#EQ) = 0
p(#GT) = 0
p(#LT) = 0
p(#abs) = 0
p(#add) = 0
p(#and) = x1 + x1^2
p(#ckgt) = x1
p(#compare) = x2
p(#eq) = x1^2
p(#equal) = 0
p(#false) = 0
p(#greater) = x1 + x1^2 + x2
p(#neg) = 0
p(#pos) = 0
p(#pred) = 1
p(#s) = 0
p(#succ) = 0
p(#true) = 0
p(+) = 0
p(::) = 1 + x2
p(firstline) = 0
p(firstline#1) = 1 + x1
p(lcs) = 0
p(lcs#1) = 0
p(lcs#2) = 0
p(lcs#3) = 0
p(lcstable) = 0
p(lcstable#1) = 1 + x2
p(lcstable#2) = 0
p(lcstable#3) = 1 + x3 + x3^2
p(max) = 1 + x2^2
p(max#1) = x1 + x1^2
p(newline) = x1*x2 + x1^2
p(newline#1) = x1
p(newline#2) = x3*x4
p(newline#3) = 1 + x1 + x3 + x3*x5 + x5^2
p(newline#4) = x2^2 + x3^2 + x4^2
p(newline#5) = x5 + x5*x6 + x6
p(newline#6) = 0
p(newline#7) = 0
p(nil) = 1
p(right) = 0
p(right#1) = 0
p(#abs#) = 0
p(#add#) = 0
p(#and#) = 0
p(#ckgt#) = 0
p(#compare#) = 0
p(#eq#) = 0
p(#equal#) = 0
p(#greater#) = 0
p(#pred#) = 0
p(#succ#) = 0
p(+#) = 0
p(firstline#) = 0
p(firstline#1#) = 0
p(lcs#) = 0
p(lcs#1#) = 0
p(lcs#2#) = 0
p(lcs#3#) = 0
p(lcstable#) = x1 + x1*x2 + x1^2 + x2^2
p(lcstable#1#) = x1 + x1*x2 + x1^2 + x2^2
p(lcstable#2#) = 1 + x2
p(lcstable#3#) = x2
p(max#) = 0
p(max#1#) = 0
p(newline#) = x3
p(newline#1#) = x1
p(newline#2#) = 1 + x3
p(newline#3#) = 0
p(newline#4#) = 0
p(newline#5#) = 0
p(newline#6#) = 0
p(newline#7#) = 0
p(right#) = 0
p(right#1#) = 0
p(c_1) = 0
p(c_2) = 0
p(c_3) = 0
p(c_4) = 0
p(c_5) = 0
p(c_6) = 0
p(c_7) = 0
p(c_8) = 0
p(c_9) = 0
p(c_10) = 0
p(c_11) = 0
p(c_12) = 0
p(c_13) = 0
p(c_14) = 0
p(c_15) = 0
p(c_16) = 0
p(c_17) = x1
p(c_18) = x1 + x2
p(c_19) = 0
p(c_20) = x1
p(c_21) = x1
p(c_22) = 0
p(c_23) = 0
p(c_24) = 0
p(c_25) = 0
p(c_26) = x1
p(c_27) = x1
p(c_28) = 0
p(c_29) = x1
p(c_30) = 0
p(c_31) = 0
p(c_32) = 0
p(c_33) = 0
p(c_34) = 0
p(c_35) = 0
p(c_36) = 0
p(c_37) = 0
p(c_38) = 0
p(c_39) = 0
p(c_40) = 0
p(c_41) = 0
p(c_42) = 0
p(c_43) = 0
p(c_44) = 0
p(c_45) = 0
p(c_46) = 0
p(c_47) = 0
p(c_48) = 0
p(c_49) = 0
p(c_50) = 0
p(c_51) = 0
p(c_52) = 0
p(c_53) = 0
p(c_54) = 0
p(c_55) = 0
p(c_56) = 0
p(c_57) = 0
p(c_58) = 0
p(c_59) = 0
p(c_60) = 0
p(c_61) = 0
p(c_62) = 0
p(c_63) = 0
p(c_64) = 0
p(c_65) = 0
p(c_66) = 0
p(c_67) = 0
p(c_68) = 0
p(c_69) = 0
p(c_70) = 0
p(c_71) = 0
p(c_72) = 0
p(c_73) = 0
p(c_74) = 0
p(c_75) = 0
p(c_76) = 0
p(c_77) = 0
p(c_78) = 0
p(c_79) = 0
p(c_80) = 0
p(c_81) = 0
p(c_82) = 0
p(c_83) = 0
p(c_84) = 0
p(c_85) = 0
p(c_86) = 0
p(c_87) = 0
Following rules are strictly oriented:
lcstable#1#(::(@x,@xs),@l2) = 2 + @l2 + @l2*@xs + @l2^2 + 3*@xs + @xs^2
> 1 + @l2 + @l2*@xs + @l2^2 + @xs + @xs^2
= c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#2#(@m,@l2,@x) = 1 + @l2
> @l2
= c_20(lcstable#3#(@m,@l2,@x))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) = 1 + @xs
> @xs
= c_29(newline#(@y,@lastline',@xs))
Following rules are (at-least) weakly oriented:
lcstable#(@l1,@l2) = @l1 + @l1*@l2 + @l1^2 + @l2^2
>= @l1 + @l1*@l2 + @l1^2 + @l2^2
= c_17(lcstable#1#(@l1,@l2))
lcstable#3#(::(@l,@ls),@l2,@x) = @l2
>= @l2
= c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) = @l
>= @l
= c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) = 1 + @xs
>= 1 + @xs
= c_27(newline#2#(@lastline,@x,@xs,@y))
*** Step 13.b:3.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
- Weak DPs:
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
*** Step 13.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
-->_1 lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2)):2
2:W:lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
-->_1 lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x)):3
-->_2 lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2)):1
3:W:lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
-->_1 lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2)):4
4:W:lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
-->_1 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):5
5:W:newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
-->_1 newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y)):6
6:W:newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
-->_1 newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs)):7
7:W:newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
-->_1 newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y)):5
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: lcstable#(@l1,@l2) -> c_17(lcstable#1#(@l1,@l2))
2: lcstable#1#(::(@x,@xs),@l2) -> c_18(lcstable#2#(lcstable(@xs,@l2),@l2,@x),lcstable#(@xs,@l2))
3: lcstable#2#(@m,@l2,@x) -> c_20(lcstable#3#(@m,@l2,@x))
4: lcstable#3#(::(@l,@ls),@l2,@x) -> c_21(newline#(@x,@l,@l2))
5: newline#(@y,@lastline,@l) -> c_26(newline#1#(@l,@lastline,@y))
7: newline#2#(::(@belowVal,@lastline'),@x,@xs,@y) -> c_29(newline#(@y,@lastline',@xs))
6: newline#1#(::(@x,@xs),@lastline,@y) -> c_27(newline#2#(@lastline,@x,@xs,@y))
*** Step 13.b:3.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
#abs(#0()) -> #0()
#add(#0(),@y) -> @y
#add(#neg(#s(#0())),@y) -> #pred(@y)
#add(#neg(#s(#s(@x))),@y) -> #pred(#add(#pos(#s(@x)),@y))
#add(#pos(#s(#0())),@y) -> #succ(@y)
#add(#pos(#s(#s(@x))),@y) -> #succ(#add(#pos(#s(@x)),@y))
#and(#false(),#false()) -> #false()
#and(#false(),#true()) -> #false()
#and(#true(),#false()) -> #false()
#and(#true(),#true()) -> #true()
#ckgt(#EQ()) -> #false()
#ckgt(#GT()) -> #true()
#ckgt(#LT()) -> #false()
#compare(#0(),#0()) -> #EQ()
#compare(#0(),#neg(@y)) -> #GT()
#compare(#0(),#pos(@y)) -> #LT()
#compare(#0(),#s(@y)) -> #LT()
#compare(#neg(@x),#0()) -> #LT()
#compare(#neg(@x),#neg(@y)) -> #compare(@y,@x)
#compare(#neg(@x),#pos(@y)) -> #LT()
#compare(#pos(@x),#0()) -> #GT()
#compare(#pos(@x),#neg(@y)) -> #GT()
#compare(#pos(@x),#pos(@y)) -> #compare(@x,@y)
#compare(#s(@x),#0()) -> #GT()
#compare(#s(@x),#s(@y)) -> #compare(@x,@y)
#eq(#0(),#0()) -> #true()
#eq(#0(),#neg(@y)) -> #false()
#eq(#0(),#pos(@y)) -> #false()
#eq(#0(),#s(@y)) -> #false()
#eq(#neg(@x),#0()) -> #false()
#eq(#neg(@x),#neg(@y)) -> #eq(@x,@y)
#eq(#neg(@x),#pos(@y)) -> #false()
#eq(#pos(@x),#0()) -> #false()
#eq(#pos(@x),#neg(@y)) -> #false()
#eq(#pos(@x),#pos(@y)) -> #eq(@x,@y)
#eq(#s(@x),#0()) -> #false()
#eq(#s(@x),#s(@y)) -> #eq(@x,@y)
#eq(::(@x_1,@x_2),::(@y_1,@y_2)) -> #and(#eq(@x_1,@y_1),#eq(@x_2,@y_2))
#eq(::(@x_1,@x_2),nil()) -> #false()
#eq(nil(),::(@y_1,@y_2)) -> #false()
#eq(nil(),nil()) -> #true()
#equal(@x,@y) -> #eq(@x,@y)
#greater(@x,@y) -> #ckgt(#compare(@x,@y))
#pred(#0()) -> #neg(#s(#0()))
#pred(#neg(#s(@x))) -> #neg(#s(#s(@x)))
#pred(#pos(#s(#0()))) -> #0()
#pred(#pos(#s(#s(@x)))) -> #pos(#s(@x))
#succ(#0()) -> #pos(#s(#0()))
#succ(#neg(#s(#0()))) -> #0()
#succ(#neg(#s(#s(@x)))) -> #neg(#s(@x))
#succ(#pos(#s(@x))) -> #pos(#s(#s(@x)))
+(@x,@y) -> #add(@x,@y)
firstline(@l) -> firstline#1(@l)
firstline#1(::(@x,@xs)) -> ::(#abs(#0()),firstline(@xs))
firstline#1(nil()) -> nil()
lcstable(@l1,@l2) -> lcstable#1(@l1,@l2)
lcstable#1(::(@x,@xs),@l2) -> lcstable#2(lcstable(@xs,@l2),@l2,@x)
lcstable#1(nil(),@l2) -> ::(firstline(@l2),nil())
lcstable#2(@m,@l2,@x) -> lcstable#3(@m,@l2,@x)
lcstable#3(::(@l,@ls),@l2,@x) -> ::(newline(@x,@l,@l2),::(@l,@ls))
lcstable#3(nil(),@l2,@x) -> nil()
max(@a,@b) -> max#1(#greater(@a,@b),@a,@b)
max#1(#false(),@a,@b) -> @b
max#1(#true(),@a,@b) -> @a
newline(@y,@lastline,@l) -> newline#1(@l,@lastline,@y)
newline#1(::(@x,@xs),@lastline,@y) -> newline#2(@lastline,@x,@xs,@y)
newline#1(nil(),@lastline,@y) -> nil()
newline#2(::(@belowVal,@lastline'),@x,@xs,@y) -> newline#3(newline(@y,@lastline',@xs)
,@belowVal
,@lastline'
,@x
,@y)
newline#2(nil(),@x,@xs,@y) -> nil()
newline#3(@nl,@belowVal,@lastline',@x,@y) -> newline#4(right(@nl),@belowVal,@lastline',@nl,@x,@y)
newline#4(@rightVal,@belowVal,@lastline',@nl,@x,@y) -> newline#5(right(@lastline')
,@belowVal
,@nl
,@rightVal
,@x
,@y)
newline#5(@diagVal,@belowVal,@nl,@rightVal,@x,@y) -> newline#6(newline#7(#equal(@x,@y)
,@belowVal
,@diagVal
,@rightVal)
,@nl)
newline#6(@elem,@nl) -> ::(@elem,@nl)
newline#7(#false(),@belowVal,@diagVal,@rightVal) -> max(@belowVal,@rightVal)
newline#7(#true(),@belowVal,@diagVal,@rightVal) -> +(@diagVal,#pos(#s(#0())))
right(@l) -> right#1(@l)
right#1(::(@x,@xs)) -> @x
right#1(nil()) -> #abs(#0())
- Signature:
{#abs/1,#add/2,#and/2,#ckgt/1,#compare/2,#eq/2,#equal/2,#greater/2,#pred/1,#succ/1,+/2,firstline/1
,firstline#1/1,lcs/2,lcs#1/1,lcs#2/1,lcs#3/1,lcstable/2,lcstable#1/2,lcstable#2/3,lcstable#3/3,max/2,max#1/3
,newline/3,newline#1/3,newline#2/4,newline#3/5,newline#4/6,newline#5/6,newline#6/2,newline#7/4,right/1
,right#1/1,#abs#/1,#add#/2,#and#/2,#ckgt#/1,#compare#/2,#eq#/2,#equal#/2,#greater#/2,#pred#/1,#succ#/1,+#/2
,firstline#/1,firstline#1#/1,lcs#/2,lcs#1#/1,lcs#2#/1,lcs#3#/1,lcstable#/2,lcstable#1#/2,lcstable#2#/3
,lcstable#3#/3,max#/2,max#1#/3,newline#/3,newline#1#/3,newline#2#/4,newline#3#/5,newline#4#/6,newline#5#/6
,newline#6#/2,newline#7#/4,right#/1,right#1#/1} / {#0/0,#EQ/0,#GT/0,#LT/0,#false/0,#neg/1,#pos/1,#s/1
,#true/0,::/2,nil/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1,c_6/2,c_7/1,c_8/1,c_9/1,c_10/0,c_11/1,c_12/1,c_13/1,c_14/1
,c_15/0,c_16/1,c_17/1,c_18/2,c_19/1,c_20/1,c_21/1,c_22/0,c_23/2,c_24/0,c_25/0,c_26/1,c_27/1,c_28/0,c_29/1
,c_30/0,c_31/2,c_32/2,c_33/3,c_34/0,c_35/1,c_36/1,c_37/1,c_38/0,c_39/1,c_40/0,c_41/1,c_42/2,c_43/1,c_44/2
,c_45/0,c_46/0,c_47/0,c_48/0,c_49/0,c_50/0,c_51/0,c_52/0,c_53/0,c_54/0,c_55/0,c_56/0,c_57/1,c_58/0,c_59/0
,c_60/0,c_61/1,c_62/0,c_63/1,c_64/0,c_65/0,c_66/0,c_67/0,c_68/0,c_69/1,c_70/0,c_71/0,c_72/0,c_73/1,c_74/0
,c_75/1,c_76/3,c_77/0,c_78/0,c_79/0,c_80/0,c_81/0,c_82/0,c_83/0,c_84/0,c_85/0,c_86/0,c_87/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {#abs#,#add#,#and#,#ckgt#,#compare#,#eq#,#equal#,#greater#
,#pred#,#succ#,+#,firstline#,firstline#1#,lcs#,lcs#1#,lcs#2#,lcs#3#,lcstable#,lcstable#1#,lcstable#2#
,lcstable#3#,max#,max#1#,newline#,newline#1#,newline#2#,newline#3#,newline#4#,newline#5#,newline#6#
,newline#7#,right#,right#1#} and constructors {#0,#EQ,#GT,#LT,#false,#neg,#pos,#s,#true,::,nil}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
WORST_CASE(?,O(n^2))