R
↳Dependency Pair Analysis
APPEND(l1, l2) -> IFAPPEND(l1, l2, isempty(l1))
APPEND(l1, l2) -> ISEMPTY(l1)
IFAPPEND(l1, l2, false) -> HD(l1)
IFAPPEND(l1, l2, false) -> APPEND(tl(l1), l2)
IFAPPEND(l1, l2, false) -> TL(l1)
R
↳DPs
→DP Problem 1
↳Narrowing Transformation
IFAPPEND(l1, l2, false) -> APPEND(tl(l1), l2)
APPEND(l1, l2) -> IFAPPEND(l1, l2, isempty(l1))
isempty(nil) -> true
isempty(cons(x, l)) -> false
hd(cons(x, l)) -> x
tl(cons(x, l)) -> l
append(l1, l2) -> ifappend(l1, l2, isempty(l1))
ifappend(l1, l2, true) -> l2
ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2))
innermost
two new Dependency Pairs are created:
APPEND(l1, l2) -> IFAPPEND(l1, l2, isempty(l1))
APPEND(nil, l2) -> IFAPPEND(nil, l2, true)
APPEND(cons(x', l'), l2) -> IFAPPEND(cons(x', l'), l2, false)
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 2
↳Narrowing Transformation
APPEND(cons(x', l'), l2) -> IFAPPEND(cons(x', l'), l2, false)
IFAPPEND(l1, l2, false) -> APPEND(tl(l1), l2)
isempty(nil) -> true
isempty(cons(x, l)) -> false
hd(cons(x, l)) -> x
tl(cons(x, l)) -> l
append(l1, l2) -> ifappend(l1, l2, isempty(l1))
ifappend(l1, l2, true) -> l2
ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2))
innermost
one new Dependency Pair is created:
IFAPPEND(l1, l2, false) -> APPEND(tl(l1), l2)
IFAPPEND(cons(x', l'), l2, false) -> APPEND(l', l2)
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 2
↳Nar
...
→DP Problem 3
↳Argument Filtering and Ordering
IFAPPEND(cons(x', l'), l2, false) -> APPEND(l', l2)
APPEND(cons(x', l'), l2) -> IFAPPEND(cons(x', l'), l2, false)
isempty(nil) -> true
isempty(cons(x, l)) -> false
hd(cons(x, l)) -> x
tl(cons(x, l)) -> l
append(l1, l2) -> ifappend(l1, l2, isempty(l1))
ifappend(l1, l2, true) -> l2
ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2))
innermost
APPEND(cons(x', l'), l2) -> IFAPPEND(cons(x', l'), l2, false)
POL(IFAPPEND(x1, x2, x3)) = x1 + x2 + x3 POL(cons(x1, x2)) = 1 + x1 + x2 POL(false) = 0 POL(APPEND(x1, x2)) = 1 + x1 + x2
APPEND(x1, x2) -> APPEND(x1, x2)
IFAPPEND(x1, x2, x3) -> IFAPPEND(x1, x2, x3)
cons(x1, x2) -> cons(x1, x2)
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 2
↳Nar
...
→DP Problem 4
↳Dependency Graph
IFAPPEND(cons(x', l'), l2, false) -> APPEND(l', l2)
isempty(nil) -> true
isempty(cons(x, l)) -> false
hd(cons(x, l)) -> x
tl(cons(x, l)) -> l
append(l1, l2) -> ifappend(l1, l2, isempty(l1))
ifappend(l1, l2, true) -> l2
ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2))
innermost