The rewrite relation of the following TRS is considered.
breadth(@breadth@1,@breadth@2) | → | breadth#1(dequeue(@breadth@1,@breadth@2)) | (1) |
breadth#1(tuple#2(@queue',@elem)) | → | breadth#2(@elem,@queue') | (2) |
breadth#2(::(@z,@_@9),@queue') | → | breadth#3(breadth#4(@z),@queue') | (3) |
breadth#2(nil,@queue') | → | nil | (4) |
breadth#3(tuple#2(@x,@ys),@queue') | → | ::(@x,breadth#5(enqueues(@ys,@queue'))) | (5) |
breadth#4(tuple#4(@children@3,@children@4,@children@5,@children@6)) | → | children(@children@3,@children@4,@children@5,@children@6) | (6) |
breadth#5(tuple#2(@breadth@7,@breadth@8)) | → | breadth(@breadth@7,@breadth@8) | (7) |
children(@a,@b,@l1,@l2) | → | tuple#2(tuple#2(@a,@b),children#1(@l1,@b,@l2)) | (8) |
children#1(::(@x,@xs),@b,@l2) | → | children#3(@l2,@b,@x,@xs) | (9) |
children#1(nil,@b,@l2) | → | children#2(@l2,@b) | (10) |
children#2(::(@y,@ys),@b) | → | ::(tuple#4(@y,@b,nil,@ys),nil) | (11) |
children#2(nil,@b) | → | nil | (12) |
children#3(::(@y,@ys),@b,@x,@xs) | → | ::(tuple#4(@x,@b,nil,@xs),::(tuple#4(@x,@y,@xs,@ys),nil)) | (13) |
children#3(nil,@b,@x,@xs) | → | nil | (14) |
copyover(@copyover@1,@copyover@2) | → | copyover#1(tuple#2(@copyover@1,@copyover@2)) | (15) |
copyover#1(tuple#2(@inq,@outq)) | → | copyover#2(@inq,@outq) | (16) |
copyover#2(::(@x,@xs),@outq) | → | copyover(@xs,::(@x,@outq)) | (17) |
copyover#2(nil,@outq) | → | tuple#2(nil,@outq) | (18) |
dequeue(@dequeue@1,@dequeue@2) | → | dequeue#1(tuple#2(@dequeue@1,@dequeue@2)) | (19) |
dequeue#1(tuple#2(@inq,@outq)) | → | dequeue#2(@outq,@inq) | (20) |
dequeue#2(::(@y,@ys),@inq) | → | tuple#2(tuple#2(@inq,@ys),::(@y,nil)) | (21) |
dequeue#2(nil,@inq) | → | dequeue#3(@inq) | (22) |
dequeue#3(::(@x,@xs)) | → | dequeue#4(copyover(::(@x,@xs),nil)) | (23) |
dequeue#3(nil) | → | tuple#2(tuple#2(nil,nil),nil) | (24) |
dequeue#4(tuple#2(@dequeue@3,@dequeue@4)) | → | dequeue(@dequeue@3,@dequeue@4) | (25) |
empty(@x) | → | tuple#2(nil,nil) | (26) |
enqueue(@x,@queue) | → | enqueue#1(@queue,@x) | (27) |
enqueue#1(tuple#2(@inq,@outq),@x) | → | tuple#2(::(@x,@inq),@outq) | (28) |
enqueues(@l,@queue) | → | enqueues#1(@l,@queue) | (29) |
enqueues#1(::(@x,@xs),@queue) | → | enqueues(@xs,enqueue(@x,@queue)) | (30) |
enqueues#1(nil,@queue) | → | @queue | (31) |
startBreadth(@xs) | → | startBreadth#1(@xs) | (32) |
startBreadth#1(::(@x,@xs)) | → | startBreadth#2(enqueue(tuple#4(@x,@x,@xs,@xs),empty(#unit))) | (33) |
startBreadth#1(nil) | → | nil | (34) |
startBreadth#2(tuple#2(@breadth@1,@breadth@2)) | → | breadth(@breadth@1,@breadth@2) | (35) |
breadth#(@breadth@1,@breadth@2) | → | breadth#1#(dequeue(@breadth@1,@breadth@2)) | (36) |
breadth#(@breadth@1,@breadth@2) | → | dequeue#(@breadth@1,@breadth@2) | (37) |
breadth#1#(tuple#2(@queue',@elem)) | → | breadth#2#(@elem,@queue') | (38) |
breadth#2#(::(@z,@_@9),@queue') | → | breadth#3#(breadth#4(@z),@queue') | (39) |
breadth#2#(::(@z,@_@9),@queue') | → | breadth#4#(@z) | (40) |
breadth#3#(tuple#2(@x,@ys),@queue') | → | breadth#5#(enqueues(@ys,@queue')) | (41) |
breadth#3#(tuple#2(@x,@ys),@queue') | → | enqueues#(@ys,@queue') | (42) |
breadth#4#(tuple#4(@children@3,@children@4,@children@5,@children@6)) | → | children#(@children@3,@children@4,@children@5,@children@6) | (43) |
breadth#5#(tuple#2(@breadth@7,@breadth@8)) | → | breadth#(@breadth@7,@breadth@8) | (44) |
children#(@a,@b,@l1,@l2) | → | children#1#(@l1,@b,@l2) | (45) |
children#1#(::(@x,@xs),@b,@l2) | → | children#3#(@l2,@b,@x,@xs) | (46) |
children#1#(nil,@b,@l2) | → | children#2#(@l2,@b) | (47) |
copyover#(@copyover@1,@copyover@2) | → | copyover#1#(tuple#2(@copyover@1,@copyover@2)) | (48) |
copyover#1#(tuple#2(@inq,@outq)) | → | copyover#2#(@inq,@outq) | (49) |
copyover#2#(::(@x,@xs),@outq) | → | copyover#(@xs,::(@x,@outq)) | (50) |
dequeue#(@dequeue@1,@dequeue@2) | → | dequeue#1#(tuple#2(@dequeue@1,@dequeue@2)) | (51) |
dequeue#1#(tuple#2(@inq,@outq)) | → | dequeue#2#(@outq,@inq) | (52) |
dequeue#2#(nil,@inq) | → | dequeue#3#(@inq) | (53) |
dequeue#3#(::(@x,@xs)) | → | dequeue#4#(copyover(::(@x,@xs),nil)) | (54) |
dequeue#3#(::(@x,@xs)) | → | copyover#(::(@x,@xs),nil) | (55) |
dequeue#4#(tuple#2(@dequeue@3,@dequeue@4)) | → | dequeue#(@dequeue@3,@dequeue@4) | (56) |
enqueue#(@x,@queue) | → | enqueue#1#(@queue,@x) | (57) |
enqueues#(@l,@queue) | → | enqueues#1#(@l,@queue) | (58) |
enqueues#1#(::(@x,@xs),@queue) | → | enqueues#(@xs,enqueue(@x,@queue)) | (59) |
enqueues#1#(::(@x,@xs),@queue) | → | enqueue#(@x,@queue) | (60) |
startBreadth#(@xs) | → | startBreadth#1#(@xs) | (61) |
startBreadth#1#(::(@x,@xs)) | → | startBreadth#2#(enqueue(tuple#4(@x,@x,@xs,@xs),empty(#unit))) | (62) |
startBreadth#1#(::(@x,@xs)) | → | enqueue#(tuple#4(@x,@x,@xs,@xs),empty(#unit)) | (63) |
startBreadth#1#(::(@x,@xs)) | → | empty#(#unit) | (64) |
startBreadth#2#(tuple#2(@breadth@1,@breadth@2)) | → | breadth#(@breadth@1,@breadth@2) | (65) |
The dependency pairs are split into 4 components.
breadth#1#(tuple#2(@queue',@elem)) | → | breadth#2#(@elem,@queue') | (38) |
breadth#2#(::(@z,@_@9),@queue') | → | breadth#3#(breadth#4(@z),@queue') | (39) |
breadth#3#(tuple#2(@x,@ys),@queue') | → | breadth#5#(enqueues(@ys,@queue')) | (41) |
breadth#5#(tuple#2(@breadth@7,@breadth@8)) | → | breadth#(@breadth@7,@breadth@8) | (44) |
breadth#(@breadth@1,@breadth@2) | → | breadth#1#(dequeue(@breadth@1,@breadth@2)) | (36) |
We restrict the rewrite rules to the following usable rules of the DP problem.
dequeue#1(tuple#2(@inq,@outq)) | → | dequeue#2(@outq,@inq) | (20) |
dequeue#2(nil,@inq) | → | dequeue#3(@inq) | (22) |
dequeue#3(::(@x,@xs)) | → | dequeue#4(copyover(::(@x,@xs),nil)) | (23) |
dequeue#4(tuple#2(@dequeue@3,@dequeue@4)) | → | dequeue(@dequeue@3,@dequeue@4) | (25) |
dequeue(@dequeue@1,@dequeue@2) | → | dequeue#1(tuple#2(@dequeue@1,@dequeue@2)) | (19) |
dequeue#2(::(@y,@ys),@inq) | → | tuple#2(tuple#2(@inq,@ys),::(@y,nil)) | (21) |
dequeue#3(nil) | → | tuple#2(tuple#2(nil,nil),nil) | (24) |
copyover#1(tuple#2(@inq,@outq)) | → | copyover#2(@inq,@outq) | (16) |
copyover#2(::(@x,@xs),@outq) | → | copyover(@xs,::(@x,@outq)) | (17) |
copyover(@copyover@1,@copyover@2) | → | copyover#1(tuple#2(@copyover@1,@copyover@2)) | (15) |
copyover#2(nil,@outq) | → | tuple#2(nil,@outq) | (18) |
enqueues#1(::(@x,@xs),@queue) | → | enqueues(@xs,enqueue(@x,@queue)) | (30) |
enqueues(@l,@queue) | → | enqueues#1(@l,@queue) | (29) |
enqueue(@x,@queue) | → | enqueue#1(@queue,@x) | (27) |
enqueues#1(nil,@queue) | → | @queue | (31) |
enqueue#1(tuple#2(@inq,@outq),@x) | → | tuple#2(::(@x,@inq),@outq) | (28) |
breadth#4(tuple#4(@children@3,@children@4,@children@5,@children@6)) | → | children(@children@3,@children@4,@children@5,@children@6) | (6) |
children(@a,@b,@l1,@l2) | → | tuple#2(tuple#2(@a,@b),children#1(@l1,@b,@l2)) | (8) |
children#1(::(@x,@xs),@b,@l2) | → | children#3(@l2,@b,@x,@xs) | (9) |
children#1(nil,@b,@l2) | → | children#2(@l2,@b) | (10) |
children#2(::(@y,@ys),@b) | → | ::(tuple#4(@y,@b,nil,@ys),nil) | (11) |
children#2(nil,@b) | → | nil | (12) |
children#3(::(@y,@ys),@b,@x,@xs) | → | ::(tuple#4(@x,@b,nil,@xs),::(tuple#4(@x,@y,@xs,@ys),nil)) | (13) |
children#3(nil,@b,@x,@xs) | → | nil | (14) |
We restrict the innermost strategy to the following left hand sides.
breadth#4(tuple#4(x0,x1,x2,x3)) |
children(x0,x1,x2,x3) |
children#1(::(x0,x1),x2,x3) |
children#1(nil,x0,x1) |
children#2(::(x0,x1),x2) |
children#2(nil,x0) |
children#3(::(x0,x1),x2,x3,x4) |
children#3(nil,x0,x1,x2) |
copyover(x0,x1) |
copyover#1(tuple#2(x0,x1)) |
copyover#2(::(x0,x1),x2) |
copyover#2(nil,x0) |
dequeue(x0,x1) |
dequeue#1(tuple#2(x0,x1)) |
dequeue#2(::(x0,x1),x2) |
dequeue#2(nil,x0) |
dequeue#3(::(x0,x1)) |
dequeue#3(nil) |
dequeue#4(tuple#2(x0,x1)) |
enqueue(x0,x1) |
enqueue#1(tuple#2(x0,x1),x2) |
enqueues(x0,x1) |
enqueues#1(::(x0,x1),x2) |
enqueues#1(nil,x0) |
[breadth#1#(x1)] | = |
|
|||||||||||||||||||||||||||||||||
[tuple#2(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[breadth#2#(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[::(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[breadth#3#(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[breadth#4(x1)] | = |
|
|||||||||||||||||||||||||||||||||
[breadth#5#(x1)] | = |
|
|||||||||||||||||||||||||||||||||
[enqueues(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[breadth#(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[dequeue(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[tuple#4(x1,...,x4)] | = |
|
|||||||||||||||||||||||||||||||||
[children(x1,...,x4)] | = |
|
|||||||||||||||||||||||||||||||||
[enqueues#1(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[enqueue(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[dequeue#2(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[nil] | = |
|
|||||||||||||||||||||||||||||||||
[dequeue#3(x1)] | = |
|
|||||||||||||||||||||||||||||||||
[dequeue#4(x1)] | = |
|
|||||||||||||||||||||||||||||||||
[copyover(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[dequeue#1(x1)] | = |
|
|||||||||||||||||||||||||||||||||
[copyover#2(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[copyover#1(x1)] | = |
|
|||||||||||||||||||||||||||||||||
[enqueue#1(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||
[children#1(x1, x2, x3)] | = |
|
|||||||||||||||||||||||||||||||||
[children#3(x1,...,x4)] | = |
|
|||||||||||||||||||||||||||||||||
[children#2(x1, x2)] | = |
|
breadth#2#(::(@z,@_@9),@queue') | → | breadth#3#(breadth#4(@z),@queue') | (39) |
The dependency pairs are split into 0 components.
dequeue#3#(::(@x,@xs)) | → | dequeue#4#(copyover(::(@x,@xs),nil)) | (54) |
dequeue#4#(tuple#2(@dequeue@3,@dequeue@4)) | → | dequeue#(@dequeue@3,@dequeue@4) | (56) |
dequeue#(@dequeue@1,@dequeue@2) | → | dequeue#1#(tuple#2(@dequeue@1,@dequeue@2)) | (51) |
dequeue#1#(tuple#2(@inq,@outq)) | → | dequeue#2#(@outq,@inq) | (52) |
dequeue#2#(nil,@inq) | → | dequeue#3#(@inq) | (53) |
We restrict the rewrite rules to the following usable rules of the DP problem.
copyover#1(tuple#2(@inq,@outq)) | → | copyover#2(@inq,@outq) | (16) |
copyover#2(::(@x,@xs),@outq) | → | copyover(@xs,::(@x,@outq)) | (17) |
copyover(@copyover@1,@copyover@2) | → | copyover#1(tuple#2(@copyover@1,@copyover@2)) | (15) |
copyover#2(nil,@outq) | → | tuple#2(nil,@outq) | (18) |
We restrict the innermost strategy to the following left hand sides.
copyover(x0,x1) |
copyover#1(tuple#2(x0,x1)) |
copyover#2(::(x0,x1),x2) |
copyover#2(nil,x0) |
[copyover#1(x1)] | = | 1 · x1 |
[tuple#2(x1, x2)] | = | 2 · x1 + 1 · x2 |
[copyover#2(x1, x2)] | = | 2 · x1 + 1 · x2 |
[::(x1, x2)] | = | 2 + 2 · x1 + 1 · x2 |
[copyover(x1, x2)] | = | 2 · x1 + 1 · x2 |
[nil] | = | 0 |
[dequeue#3#(x1)] | = | 2 · x1 |
[dequeue#4#(x1)] | = | 1 · x1 |
[dequeue#(x1, x2)] | = | 2 · x1 + 1 · x2 |
[dequeue#1#(x1)] | = | 1 · x1 |
[dequeue#2#(x1, x2)] | = | 1 · x1 + 2 · x2 |
breadth(@breadth@1,@breadth@2) | → | breadth#1(dequeue(@breadth@1,@breadth@2)) | (1) |
breadth#1(tuple#2(@queue',@elem)) | → | breadth#2(@elem,@queue') | (2) |
breadth#2(::(@z,@_@9),@queue') | → | breadth#3(breadth#4(@z),@queue') | (3) |
breadth#2(nil,@queue') | → | nil | (4) |
breadth#3(tuple#2(@x,@ys),@queue') | → | ::(@x,breadth#5(enqueues(@ys,@queue'))) | (5) |
breadth#4(tuple#4(@children@3,@children@4,@children@5,@children@6)) | → | children(@children@3,@children@4,@children@5,@children@6) | (6) |
breadth#5(tuple#2(@breadth@7,@breadth@8)) | → | breadth(@breadth@7,@breadth@8) | (7) |
children(@a,@b,@l1,@l2) | → | tuple#2(tuple#2(@a,@b),children#1(@l1,@b,@l2)) | (8) |
children#1(::(@x,@xs),@b,@l2) | → | children#3(@l2,@b,@x,@xs) | (9) |
children#1(nil,@b,@l2) | → | children#2(@l2,@b) | (10) |
children#2(::(@y,@ys),@b) | → | ::(tuple#4(@y,@b,nil,@ys),nil) | (11) |
children#2(nil,@b) | → | nil | (12) |
children#3(::(@y,@ys),@b,@x,@xs) | → | ::(tuple#4(@x,@b,nil,@xs),::(tuple#4(@x,@y,@xs,@ys),nil)) | (13) |
children#3(nil,@b,@x,@xs) | → | nil | (14) |
copyover#2(::(@x,@xs),@outq) | → | copyover(@xs,::(@x,@outq)) | (17) |
dequeue(@dequeue@1,@dequeue@2) | → | dequeue#1(tuple#2(@dequeue@1,@dequeue@2)) | (19) |
dequeue#1(tuple#2(@inq,@outq)) | → | dequeue#2(@outq,@inq) | (20) |
dequeue#2(::(@y,@ys),@inq) | → | tuple#2(tuple#2(@inq,@ys),::(@y,nil)) | (21) |
dequeue#2(nil,@inq) | → | dequeue#3(@inq) | (22) |
dequeue#3(::(@x,@xs)) | → | dequeue#4(copyover(::(@x,@xs),nil)) | (23) |
dequeue#3(nil) | → | tuple#2(tuple#2(nil,nil),nil) | (24) |
dequeue#4(tuple#2(@dequeue@3,@dequeue@4)) | → | dequeue(@dequeue@3,@dequeue@4) | (25) |
empty(@x) | → | tuple#2(nil,nil) | (26) |
enqueue(@x,@queue) | → | enqueue#1(@queue,@x) | (27) |
enqueue#1(tuple#2(@inq,@outq),@x) | → | tuple#2(::(@x,@inq),@outq) | (28) |
enqueues(@l,@queue) | → | enqueues#1(@l,@queue) | (29) |
enqueues#1(::(@x,@xs),@queue) | → | enqueues(@xs,enqueue(@x,@queue)) | (30) |
enqueues#1(nil,@queue) | → | @queue | (31) |
startBreadth(@xs) | → | startBreadth#1(@xs) | (32) |
startBreadth#1(::(@x,@xs)) | → | startBreadth#2(enqueue(tuple#4(@x,@x,@xs,@xs),empty(#unit))) | (33) |
startBreadth#1(nil) | → | nil | (34) |
startBreadth#2(tuple#2(@breadth@1,@breadth@2)) | → | breadth(@breadth@1,@breadth@2) | (35) |
[dequeue#4#(x1)] | = | 1 + 2 · x1 |
[copyover(x1, x2)] | = | 1 |
[copyover#1(x1)] | = | 1 |
[tuple#2(x1, x2)] | = | x1 |
[copyover#2(x1, x2)] | = | 1 |
[nil] | = | 0 |
[dequeue#3#(x1)] | = | 2 · x1 |
[::(x1, x2)] | = | 2 |
[dequeue#(x1, x2)] | = | 1 + 2 · x1 |
[dequeue#1#(x1)] | = | 2 · x1 |
[dequeue#2#(x1, x2)] | = | 2 · x2 |
dequeue#3#(::(@x,@xs)) | → | dequeue#4#(copyover(::(@x,@xs),nil)) | (54) |
dequeue#(@dequeue@1,@dequeue@2) | → | dequeue#1#(tuple#2(@dequeue@1,@dequeue@2)) | (51) |
The dependency pairs are split into 0 components.
enqueues#1#(::(@x,@xs),@queue) | → | enqueues#(@xs,enqueue(@x,@queue)) | (59) |
enqueues#(@l,@queue) | → | enqueues#1#(@l,@queue) | (58) |
We restrict the rewrite rules to the following usable rules of the DP problem.
enqueue(@x,@queue) | → | enqueue#1(@queue,@x) | (27) |
enqueue#1(tuple#2(@inq,@outq),@x) | → | tuple#2(::(@x,@inq),@outq) | (28) |
We restrict the innermost strategy to the following left hand sides.
enqueue(x0,x1) |
enqueue#1(tuple#2(x0,x1),x2) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
enqueues#(@l,@queue) | → | enqueues#1#(@l,@queue) | (58) |
1 | ≥ | 1 | |
2 | ≥ | 2 | |
enqueues#1#(::(@x,@xs),@queue) | → | enqueues#(@xs,enqueue(@x,@queue)) | (59) |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
copyover#1#(tuple#2(@inq,@outq)) | → | copyover#2#(@inq,@outq) | (49) |
copyover#2#(::(@x,@xs),@outq) | → | copyover#(@xs,::(@x,@outq)) | (50) |
copyover#(@copyover@1,@copyover@2) | → | copyover#1#(tuple#2(@copyover@1,@copyover@2)) | (48) |
We restrict the rewrite rules to the following usable rules of the DP problem.
There are no rules.
We restrict the innermost strategy to the following left hand sides.
There are no lhss.
[copyover#1#(x1)] | = | 1 · x1 |
[tuple#2(x1, x2)] | = | 2 · x1 + 1 · x2 |
[copyover#2#(x1, x2)] | = | 2 · x1 + 1 · x2 |
[::(x1, x2)] | = | 2 + 2 · x1 + 1 · x2 |
[copyover#(x1, x2)] | = | 1 + 2 · x1 + 1 · x2 |
copyover#2#(::(@x,@xs),@outq) | → | copyover#(@xs,::(@x,@outq)) | (50) |
copyover#(@copyover@1,@copyover@2) | → | copyover#1#(tuple#2(@copyover@1,@copyover@2)) | (48) |
breadth(@breadth@1,@breadth@2) | → | breadth#1(dequeue(@breadth@1,@breadth@2)) | (1) |
breadth#1(tuple#2(@queue',@elem)) | → | breadth#2(@elem,@queue') | (2) |
breadth#2(::(@z,@_@9),@queue') | → | breadth#3(breadth#4(@z),@queue') | (3) |
breadth#2(nil,@queue') | → | nil | (4) |
breadth#3(tuple#2(@x,@ys),@queue') | → | ::(@x,breadth#5(enqueues(@ys,@queue'))) | (5) |
breadth#4(tuple#4(@children@3,@children@4,@children@5,@children@6)) | → | children(@children@3,@children@4,@children@5,@children@6) | (6) |
breadth#5(tuple#2(@breadth@7,@breadth@8)) | → | breadth(@breadth@7,@breadth@8) | (7) |
children(@a,@b,@l1,@l2) | → | tuple#2(tuple#2(@a,@b),children#1(@l1,@b,@l2)) | (8) |
children#1(::(@x,@xs),@b,@l2) | → | children#3(@l2,@b,@x,@xs) | (9) |
children#1(nil,@b,@l2) | → | children#2(@l2,@b) | (10) |
children#2(::(@y,@ys),@b) | → | ::(tuple#4(@y,@b,nil,@ys),nil) | (11) |
children#2(nil,@b) | → | nil | (12) |
children#3(::(@y,@ys),@b,@x,@xs) | → | ::(tuple#4(@x,@b,nil,@xs),::(tuple#4(@x,@y,@xs,@ys),nil)) | (13) |
children#3(nil,@b,@x,@xs) | → | nil | (14) |
copyover(@copyover@1,@copyover@2) | → | copyover#1(tuple#2(@copyover@1,@copyover@2)) | (15) |
copyover#1(tuple#2(@inq,@outq)) | → | copyover#2(@inq,@outq) | (16) |
copyover#2(::(@x,@xs),@outq) | → | copyover(@xs,::(@x,@outq)) | (17) |
copyover#2(nil,@outq) | → | tuple#2(nil,@outq) | (18) |
dequeue(@dequeue@1,@dequeue@2) | → | dequeue#1(tuple#2(@dequeue@1,@dequeue@2)) | (19) |
dequeue#1(tuple#2(@inq,@outq)) | → | dequeue#2(@outq,@inq) | (20) |
dequeue#2(::(@y,@ys),@inq) | → | tuple#2(tuple#2(@inq,@ys),::(@y,nil)) | (21) |
dequeue#2(nil,@inq) | → | dequeue#3(@inq) | (22) |
dequeue#3(::(@x,@xs)) | → | dequeue#4(copyover(::(@x,@xs),nil)) | (23) |
dequeue#3(nil) | → | tuple#2(tuple#2(nil,nil),nil) | (24) |
dequeue#4(tuple#2(@dequeue@3,@dequeue@4)) | → | dequeue(@dequeue@3,@dequeue@4) | (25) |
empty(@x) | → | tuple#2(nil,nil) | (26) |
enqueue(@x,@queue) | → | enqueue#1(@queue,@x) | (27) |
enqueue#1(tuple#2(@inq,@outq),@x) | → | tuple#2(::(@x,@inq),@outq) | (28) |
enqueues(@l,@queue) | → | enqueues#1(@l,@queue) | (29) |
enqueues#1(::(@x,@xs),@queue) | → | enqueues(@xs,enqueue(@x,@queue)) | (30) |
enqueues#1(nil,@queue) | → | @queue | (31) |
startBreadth(@xs) | → | startBreadth#1(@xs) | (32) |
startBreadth#1(::(@x,@xs)) | → | startBreadth#2(enqueue(tuple#4(@x,@x,@xs,@xs),empty(#unit))) | (33) |
startBreadth#1(nil) | → | nil | (34) |
startBreadth#2(tuple#2(@breadth@1,@breadth@2)) | → | breadth(@breadth@1,@breadth@2) | (35) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
copyover#1#(tuple#2(@inq,@outq)) | → | copyover#2#(@inq,@outq) | (49) |
1 | > | 1 | |
1 | > | 2 |
As there is no critical graph in the transitive closure, there are no infinite chains.