R
↳Dependency Pair Analysis
FUNCTION(p, s(s(x)), dummy, dummy2) -> FUNCTION(p, s(x), x, x)
FUNCTION(plus, dummy, x, y) -> FUNCTION(if, function(iszero, x, x, x), x, y)
FUNCTION(plus, dummy, x, y) -> FUNCTION(iszero, x, x, x)
FUNCTION(if, false, x, y) -> FUNCTION(plus, function(third, x, y, y), function(p, x, x, y), s(y))
FUNCTION(if, false, x, y) -> FUNCTION(third, x, y, y)
FUNCTION(if, false, x, y) -> FUNCTION(p, x, x, y)
R
↳DPs
→DP Problem 1
↳Argument Filtering and Ordering
→DP Problem 2
↳Rw
FUNCTION(p, s(s(x)), dummy, dummy2) -> FUNCTION(p, s(x), x, x)
function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z
innermost
FUNCTION(p, s(s(x)), dummy, dummy2) -> FUNCTION(p, s(x), x, x)
trivial
FUNCTION(x1, x2, x3, x4) -> FUNCTION(x1, x2, x3, x4)
s(x1) -> s(x1)
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 3
↳Dependency Graph
→DP Problem 2
↳Rw
function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z
innermost
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳Rewriting Transformation
FUNCTION(if, false, x, y) -> FUNCTION(plus, function(third, x, y, y), function(p, x, x, y), s(y))
FUNCTION(plus, dummy, x, y) -> FUNCTION(if, function(iszero, x, x, x), x, y)
function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z
innermost
one new Dependency Pair is created:
FUNCTION(if, false, x, y) -> FUNCTION(plus, function(third, x, y, y), function(p, x, x, y), s(y))
FUNCTION(if, false, x, y) -> FUNCTION(plus, y, function(p, x, x, y), s(y))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳Rw
→DP Problem 4
↳Narrowing Transformation
FUNCTION(if, false, x, y) -> FUNCTION(plus, y, function(p, x, x, y), s(y))
FUNCTION(plus, dummy, x, y) -> FUNCTION(if, function(iszero, x, x, x), x, y)
function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z
innermost
two new Dependency Pairs are created:
FUNCTION(plus, dummy, x, y) -> FUNCTION(if, function(iszero, x, x, x), x, y)
FUNCTION(plus, dummy, 0, y) -> FUNCTION(if, true, 0, y)
FUNCTION(plus, dummy, s(x''), y) -> FUNCTION(if, false, s(x''), y)
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳Rw
→DP Problem 4
↳Nar
...
→DP Problem 5
↳Narrowing Transformation
FUNCTION(plus, dummy, s(x''), y) -> FUNCTION(if, false, s(x''), y)
FUNCTION(if, false, x, y) -> FUNCTION(plus, y, function(p, x, x, y), s(y))
function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z
innermost
three new Dependency Pairs are created:
FUNCTION(if, false, x, y) -> FUNCTION(plus, y, function(p, x, x, y), s(y))
FUNCTION(if, false, 0, y') -> FUNCTION(plus, y', 0, s(y'))
FUNCTION(if, false, s(0), y') -> FUNCTION(plus, y', 0, s(y'))
FUNCTION(if, false, s(s(x'')), y') -> FUNCTION(plus, y', s(function(p, s(x''), x'', x'')), s(y'))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳Rw
→DP Problem 4
↳Nar
...
→DP Problem 6
↳Instantiation Transformation
FUNCTION(if, false, s(s(x'')), y') -> FUNCTION(plus, y', s(function(p, s(x''), x'', x'')), s(y'))
FUNCTION(plus, dummy, s(x''), y) -> FUNCTION(if, false, s(x''), y)
function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z
innermost
one new Dependency Pair is created:
FUNCTION(plus, dummy, s(x''), y) -> FUNCTION(if, false, s(x''), y)
FUNCTION(plus, dummy', s(x'''), s(dummy')) -> FUNCTION(if, false, s(x'''), s(dummy'))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳Rw
→DP Problem 4
↳Nar
...
→DP Problem 7
↳Instantiation Transformation
FUNCTION(plus, dummy', s(x'''), s(dummy')) -> FUNCTION(if, false, s(x'''), s(dummy'))
FUNCTION(if, false, s(s(x'')), y') -> FUNCTION(plus, y', s(function(p, s(x''), x'', x'')), s(y'))
function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z
innermost
one new Dependency Pair is created:
FUNCTION(if, false, s(s(x'')), y') -> FUNCTION(plus, y', s(function(p, s(x''), x'', x'')), s(y'))
FUNCTION(if, false, s(s(x''')), s(dummy''')) -> FUNCTION(plus, s(dummy'''), s(function(p, s(x'''), x''', x''')), s(s(dummy''')))
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳Rw
→DP Problem 4
↳Nar
...
→DP Problem 8
↳Remaining Obligation(s)
FUNCTION(if, false, s(s(x''')), s(dummy''')) -> FUNCTION(plus, s(dummy'''), s(function(p, s(x'''), x''', x''')), s(s(dummy''')))
FUNCTION(plus, dummy', s(x'''), s(dummy')) -> FUNCTION(if, false, s(x'''), s(dummy'))
function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z
innermost