R
↳Dependency Pair Analysis
QSORT(.(x, y)) -> QSORT(lowers(x, y))
QSORT(.(x, y)) -> LOWERS(x, y)
QSORT(.(x, y)) -> QSORT(greaters(x, y))
QSORT(.(x, y)) -> GREATERS(x, y)
LOWERS(x, .(y, z)) -> LOWERS(x, z)
GREATERS(x, .(y, z)) -> GREATERS(x, z)
R
↳DPs
→DP Problem 1
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Nar
LOWERS(x, .(y, z)) -> LOWERS(x, z)
qsort(nil) -> nil
qsort(.(x, y)) -> ++(qsort(lowers(x, y)), .(x, qsort(greaters(x, y))))
lowers(x, nil) -> nil
lowers(x, .(y, z)) -> if(<=(y, x), .(y, lowers(x, z)), lowers(x, z))
greaters(x, nil) -> nil
greaters(x, .(y, z)) -> if(<=(y, x), greaters(x, z), .(y, greaters(x, z)))
one new Dependency Pair is created:
LOWERS(x, .(y, z)) -> LOWERS(x, z)
LOWERS(x'', .(y, .(y'', z''))) -> LOWERS(x'', .(y'', z''))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 4
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Nar
LOWERS(x'', .(y, .(y'', z''))) -> LOWERS(x'', .(y'', z''))
qsort(nil) -> nil
qsort(.(x, y)) -> ++(qsort(lowers(x, y)), .(x, qsort(greaters(x, y))))
lowers(x, nil) -> nil
lowers(x, .(y, z)) -> if(<=(y, x), .(y, lowers(x, z)), lowers(x, z))
greaters(x, nil) -> nil
greaters(x, .(y, z)) -> if(<=(y, x), greaters(x, z), .(y, greaters(x, z)))
one new Dependency Pair is created:
LOWERS(x'', .(y, .(y'', z''))) -> LOWERS(x'', .(y'', z''))
LOWERS(x'''', .(y, .(y''0, .(y'''', z'''')))) -> LOWERS(x'''', .(y''0, .(y'''', z'''')))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 4
↳FwdInst
...
→DP Problem 5
↳Polynomial Ordering
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Nar
LOWERS(x'''', .(y, .(y''0, .(y'''', z'''')))) -> LOWERS(x'''', .(y''0, .(y'''', z'''')))
qsort(nil) -> nil
qsort(.(x, y)) -> ++(qsort(lowers(x, y)), .(x, qsort(greaters(x, y))))
lowers(x, nil) -> nil
lowers(x, .(y, z)) -> if(<=(y, x), .(y, lowers(x, z)), lowers(x, z))
greaters(x, nil) -> nil
greaters(x, .(y, z)) -> if(<=(y, x), greaters(x, z), .(y, greaters(x, z)))
LOWERS(x'''', .(y, .(y''0, .(y'''', z'''')))) -> LOWERS(x'''', .(y''0, .(y'''', z'''')))
POL(LOWERS(x1, x2)) = 1 + x2 POL(.(x1, x2)) = 1 + x2
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 4
↳FwdInst
...
→DP Problem 6
↳Dependency Graph
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Nar
qsort(nil) -> nil
qsort(.(x, y)) -> ++(qsort(lowers(x, y)), .(x, qsort(greaters(x, y))))
lowers(x, nil) -> nil
lowers(x, .(y, z)) -> if(<=(y, x), .(y, lowers(x, z)), lowers(x, z))
greaters(x, nil) -> nil
greaters(x, .(y, z)) -> if(<=(y, x), greaters(x, z), .(y, greaters(x, z)))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳Forward Instantiation Transformation
→DP Problem 3
↳Nar
GREATERS(x, .(y, z)) -> GREATERS(x, z)
qsort(nil) -> nil
qsort(.(x, y)) -> ++(qsort(lowers(x, y)), .(x, qsort(greaters(x, y))))
lowers(x, nil) -> nil
lowers(x, .(y, z)) -> if(<=(y, x), .(y, lowers(x, z)), lowers(x, z))
greaters(x, nil) -> nil
greaters(x, .(y, z)) -> if(<=(y, x), greaters(x, z), .(y, greaters(x, z)))
one new Dependency Pair is created:
GREATERS(x, .(y, z)) -> GREATERS(x, z)
GREATERS(x'', .(y, .(y'', z''))) -> GREATERS(x'', .(y'', z''))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 7
↳Forward Instantiation Transformation
→DP Problem 3
↳Nar
GREATERS(x'', .(y, .(y'', z''))) -> GREATERS(x'', .(y'', z''))
qsort(nil) -> nil
qsort(.(x, y)) -> ++(qsort(lowers(x, y)), .(x, qsort(greaters(x, y))))
lowers(x, nil) -> nil
lowers(x, .(y, z)) -> if(<=(y, x), .(y, lowers(x, z)), lowers(x, z))
greaters(x, nil) -> nil
greaters(x, .(y, z)) -> if(<=(y, x), greaters(x, z), .(y, greaters(x, z)))
one new Dependency Pair is created:
GREATERS(x'', .(y, .(y'', z''))) -> GREATERS(x'', .(y'', z''))
GREATERS(x'''', .(y, .(y''0, .(y'''', z'''')))) -> GREATERS(x'''', .(y''0, .(y'''', z'''')))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 7
↳FwdInst
...
→DP Problem 8
↳Polynomial Ordering
→DP Problem 3
↳Nar
GREATERS(x'''', .(y, .(y''0, .(y'''', z'''')))) -> GREATERS(x'''', .(y''0, .(y'''', z'''')))
qsort(nil) -> nil
qsort(.(x, y)) -> ++(qsort(lowers(x, y)), .(x, qsort(greaters(x, y))))
lowers(x, nil) -> nil
lowers(x, .(y, z)) -> if(<=(y, x), .(y, lowers(x, z)), lowers(x, z))
greaters(x, nil) -> nil
greaters(x, .(y, z)) -> if(<=(y, x), greaters(x, z), .(y, greaters(x, z)))
GREATERS(x'''', .(y, .(y''0, .(y'''', z'''')))) -> GREATERS(x'''', .(y''0, .(y'''', z'''')))
POL(GREATERS(x1, x2)) = 1 + x2 POL(.(x1, x2)) = 1 + x2
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 7
↳FwdInst
...
→DP Problem 9
↳Dependency Graph
→DP Problem 3
↳Nar
qsort(nil) -> nil
qsort(.(x, y)) -> ++(qsort(lowers(x, y)), .(x, qsort(greaters(x, y))))
lowers(x, nil) -> nil
lowers(x, .(y, z)) -> if(<=(y, x), .(y, lowers(x, z)), lowers(x, z))
greaters(x, nil) -> nil
greaters(x, .(y, z)) -> if(<=(y, x), greaters(x, z), .(y, greaters(x, z)))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Narrowing Transformation
QSORT(.(x, y)) -> QSORT(greaters(x, y))
QSORT(.(x, y)) -> QSORT(lowers(x, y))
qsort(nil) -> nil
qsort(.(x, y)) -> ++(qsort(lowers(x, y)), .(x, qsort(greaters(x, y))))
lowers(x, nil) -> nil
lowers(x, .(y, z)) -> if(<=(y, x), .(y, lowers(x, z)), lowers(x, z))
greaters(x, nil) -> nil
greaters(x, .(y, z)) -> if(<=(y, x), greaters(x, z), .(y, greaters(x, z)))
two new Dependency Pairs are created:
QSORT(.(x, y)) -> QSORT(lowers(x, y))
QSORT(.(x'', nil)) -> QSORT(nil)
QSORT(.(x'', .(y'', z'))) -> QSORT(if(<=(y'', x''), .(y'', lowers(x'', z')), lowers(x'', z')))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Nar
→DP Problem 10
↳Narrowing Transformation
QSORT(.(x, y)) -> QSORT(greaters(x, y))
qsort(nil) -> nil
qsort(.(x, y)) -> ++(qsort(lowers(x, y)), .(x, qsort(greaters(x, y))))
lowers(x, nil) -> nil
lowers(x, .(y, z)) -> if(<=(y, x), .(y, lowers(x, z)), lowers(x, z))
greaters(x, nil) -> nil
greaters(x, .(y, z)) -> if(<=(y, x), greaters(x, z), .(y, greaters(x, z)))
two new Dependency Pairs are created:
QSORT(.(x, y)) -> QSORT(greaters(x, y))
QSORT(.(x'', nil)) -> QSORT(nil)
QSORT(.(x'', .(y'', z'))) -> QSORT(if(<=(y'', x''), greaters(x'', z'), .(y'', greaters(x'', z'))))