The rewrite relation of the following TRS is considered.
f(true,xs) | → | f(isList(xs),append(cons(a,nil),xs)) | (1) |
isList(nil) | → | true | (2) |
isList(cons(x,xs)) | → | isList(xs) | (3) |
append(xs,ys) | → | appendAkk(reverse(xs),ys) | (4) |
appendAkk(nil,ys) | → | ys | (5) |
appendAkk(cons(x,xs),ys) | → | appendAkk(xs,cons(x,ys)) | (6) |
reverse(nil) | → | nil | (7) |
reverse(cons(x,xs)) | → | append(reverse(xs),cons(x,nil)) | (8) |
f(true,x0) |
isList(nil) |
isList(cons(x0,x1)) |
append(x0,x1) |
appendAkk(nil,x0) |
appendAkk(cons(x0,x1),x2) |
reverse(nil) |
reverse(cons(x0,x1)) |
f#(true,xs) | → | f#(isList(xs),append(cons(a,nil),xs)) | (9) |
f#(true,xs) | → | isList#(xs) | (10) |
f#(true,xs) | → | append#(cons(a,nil),xs) | (11) |
isList#(cons(x,xs)) | → | isList#(xs) | (12) |
append#(xs,ys) | → | appendAkk#(reverse(xs),ys) | (13) |
append#(xs,ys) | → | reverse#(xs) | (14) |
appendAkk#(cons(x,xs),ys) | → | appendAkk#(xs,cons(x,ys)) | (15) |
reverse#(cons(x,xs)) | → | append#(reverse(xs),cons(x,nil)) | (16) |
reverse#(cons(x,xs)) | → | reverse#(xs) | (17) |
f#(true,xs) | → | isList#(xs) | (10) |
f#(true,xs) | → | append#(cons(a,nil),xs) | (11) |
isList#(cons(x,xs)) | → | isList#(xs) | (12) |
append#(xs,ys) | → | appendAkk#(reverse(xs),ys) | (13) |
append#(xs,ys) | → | reverse#(xs) | (14) |
appendAkk#(cons(x,xs),ys) | → | appendAkk#(xs,cons(x,ys)) | (15) |
reverse#(cons(x,xs)) | → | append#(reverse(xs),cons(x,nil)) | (16) |
reverse#(cons(x,xs)) | → | reverse#(xs) | (17) |
An infinite (possibly non-looping) derivation has been detected due to the following pattern rule.
f#(true,cons(a,zr1)) {zr1/nil} n {zr1/cons(a,zr1)} →+f#(true,cons(a,cons(a,zr1))) {zr1/nil} n {zr1/cons(a,zr1)}