Term Rewriting System R:
[x, l, l1, l2]
isempty(nil) -> true
isempty(cons(x, l)) -> false
hd(cons(x, l)) -> x
tl(cons(x, l)) -> cons(x, 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 Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

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)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Usable Rules (Innermost)


Dependency Pairs:

IFAPPEND(l1, l2, false) -> APPEND(tl(l1), l2)
APPEND(l1, l2) -> IFAPPEND(l1, l2, isempty(l1))


Rules:


isempty(nil) -> true
isempty(cons(x, l)) -> false
hd(cons(x, l)) -> x
tl(cons(x, l)) -> cons(x, 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))


Strategy:

innermost




As we are in the innermost case, we can delete all 4 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
           →DP Problem 2
Non Termination


Dependency Pairs:

IFAPPEND(l1, l2, false) -> APPEND(tl(l1), l2)
APPEND(l1, l2) -> IFAPPEND(l1, l2, isempty(l1))


Rules:


tl(cons(x, l)) -> cons(x, l)
isempty(cons(x, l)) -> false
isempty(nil) -> true


Strategy:

innermost




Found an infinite P-chain over R:
P =

IFAPPEND(l1, l2, false) -> APPEND(tl(l1), l2)
APPEND(l1, l2) -> IFAPPEND(l1, l2, isempty(l1))

R =

tl(cons(x, l)) -> cons(x, l)
isempty(cons(x, l)) -> false
isempty(nil) -> true

s = APPEND(tl(cons(x''', l''')), l2''')
evaluates to t =APPEND(tl(cons(x''', l''')), l2''')

Thus, s starts an infinite chain.

Innermost Non-Termination of R could be shown.
Duration:
0:00 minutes