Term Rewriting System R:
[y, x]
app(app(ack, 0), y) -> app(succ, y)
app(app(ack, app(succ, x)), y) -> app(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), app(succ, y)) -> app(app(ack, x), app(app(ack, app(succ, x)), y))
Termination of R to be shown.
R
↳Dependency Pair Analysis
R contains the following Dependency Pairs:
APP(app(ack, 0), y) -> APP(succ, y)
APP(app(ack, app(succ, x)), y) -> APP(app(ack, x), app(succ, 0))
APP(app(ack, app(succ, x)), y) -> APP(ack, x)
APP(app(ack, app(succ, x)), y) -> APP(succ, 0)
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, x), app(app(ack, app(succ, x)), y))
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(ack, x)
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, app(succ, x)), y)
Furthermore, R contains one SCC.
R
↳DPs
→DP Problem 1
↳Size-Change Principle
Dependency Pairs:
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, app(succ, x)), y)
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, x), app(app(ack, app(succ, x)), y))
APP(app(ack, app(succ, x)), y) -> APP(app(ack, x), app(succ, 0))
Rules:
app(app(ack, 0), y) -> app(succ, y)
app(app(ack, app(succ, x)), y) -> app(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), app(succ, y)) -> app(app(ack, x), app(app(ack, app(succ, x)), y))
The original DP problem is in applicative form. Its DPs and usable rules are the following.
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, app(succ, x)), y)
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, x), app(app(ack, app(succ, x)), y))
APP(app(ack, app(succ, x)), y) -> APP(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), y) -> app(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), app(succ, y)) -> app(app(ack, x), app(app(ack, app(succ, x)), y))
app(app(ack, 0), y) -> app(succ, y)
It is proper and hence, it can be A-transformed which results in the DP problem
ACK(succ(x), succ(y)) -> ACK(succ(x), y)
ACK(succ(x), succ(y)) -> ACK(x, ack(succ(x), y))
ACK(succ(x), y) -> ACK(x, succ(0))
ack(succ(x), y) -> ack(x, succ(0))
ack(succ(x), succ(y)) -> ack(x, ack(succ(x), y))
ack(0, y) -> succ(y)
We number the DPs as follows:
- ACK(succ(x), succ(y)) -> ACK(succ(x), y)
- ACK(succ(x), succ(y)) -> ACK(x, ack(succ(x), y))
- ACK(succ(x), y) -> ACK(x, succ(0))
and get the following Size-Change Graph(s): {1, 2, 3} | , | {1, 2, 3} |
---|
1 | = | 1 |
2 | > | 2 |
|
|
which lead(s) to this/these maximal multigraph(s): {1, 2, 3} | , | {1, 2, 3} |
---|
1 | = | 1 |
2 | > | 2 |
|
|
DP: empty set
Oriented Rules: none
We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial
with Argument Filtering System:
succ(x1) -> succ(x1)
We obtain no new DP problems.
Termination of R successfully shown.
Duration:
0:00 minutes