R
↳Dependency Pair Analysis
PURGE(.(x, y)) -> PURGE(remove(x, y))
PURGE(.(x, y)) -> REMOVE(x, y)
REMOVE(x, .(y, z)) -> REMOVE(x, z)
R
↳DPs
→DP Problem 1
↳Forward Instantiation Transformation
→DP Problem 2
↳Nar
REMOVE(x, .(y, z)) -> REMOVE(x, z)
purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))
innermost
one new Dependency Pair is created:
REMOVE(x, .(y, z)) -> REMOVE(x, z)
REMOVE(x'', .(y, .(y'', z''))) -> REMOVE(x'', .(y'', z''))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳Forward Instantiation Transformation
→DP Problem 2
↳Nar
REMOVE(x'', .(y, .(y'', z''))) -> REMOVE(x'', .(y'', z''))
purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))
innermost
one new Dependency Pair is created:
REMOVE(x'', .(y, .(y'', z''))) -> REMOVE(x'', .(y'', z''))
REMOVE(x'''', .(y, .(y''0, .(y'''', z'''')))) -> REMOVE(x'''', .(y''0, .(y'''', z'''')))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 4
↳Argument Filtering and Ordering
→DP Problem 2
↳Nar
REMOVE(x'''', .(y, .(y''0, .(y'''', z'''')))) -> REMOVE(x'''', .(y''0, .(y'''', z'''')))
purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))
innermost
REMOVE(x'''', .(y, .(y''0, .(y'''', z'''')))) -> REMOVE(x'''', .(y''0, .(y'''', z'''')))
REMOVE(x1, x2) -> REMOVE(x1, x2)
.(x1, x2) -> .(x1, x2)
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 5
↳Dependency Graph
→DP Problem 2
↳Nar
purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))
innermost
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳Narrowing Transformation
PURGE(.(x, y)) -> PURGE(remove(x, y))
purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))
innermost
two new Dependency Pairs are created:
PURGE(.(x, y)) -> PURGE(remove(x, y))
PURGE(.(x'', nil)) -> PURGE(nil)
PURGE(.(x'', .(y'', z'))) -> PURGE(if(=(x'', y''), remove(x'', z'), .(y'', remove(x'', z'))))