R
↳Dependency Pair Analysis
FACT(X) -> IF(zero(X), ns(n0), nprod(X, nfact(np(X))))
FACT(X) -> ZERO(X)
ADD(s(X), Y) -> S(add(X, Y))
ADD(s(X), Y) -> ADD(X, Y)
PROD(s(X), Y) -> ADD(Y, prod(X, Y))
PROD(s(X), Y) -> PROD(X, Y)
IF(true, X, Y) -> ACTIVATE(X)
IF(false, X, Y) -> ACTIVATE(Y)
ACTIVATE(ns(X)) -> S(activate(X))
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(n0) -> 0'
ACTIVATE(nprod(X1, X2)) -> PROD(activate(X1), activate(X2))
ACTIVATE(nprod(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nprod(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfact(X)) -> FACT(activate(X))
ACTIVATE(nfact(X)) -> ACTIVATE(X)
ACTIVATE(np(X)) -> P(activate(X))
ACTIVATE(np(X)) -> ACTIVATE(X)
R
↳DPs
→DP Problem 1
↳Narrowing Transformation
IF(false, X, Y) -> ACTIVATE(Y)
ACTIVATE(np(X)) -> ACTIVATE(X)
ACTIVATE(nfact(X)) -> ACTIVATE(X)
ACTIVATE(nfact(X)) -> FACT(activate(X))
ACTIVATE(nprod(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nprod(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
IF(true, X, Y) -> ACTIVATE(X)
FACT(X) -> IF(zero(X), ns(n0), nprod(X, nfact(np(X))))
fact(X) -> if(zero(X), ns(n0), nprod(X, nfact(np(X))))
fact(X) -> nfact(X)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
prod(X1, X2) -> nprod(X1, X2)
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
p(X) -> np(X)
s(X) -> ns(X)
0 -> n0
activate(ns(X)) -> s(activate(X))
activate(n0) -> 0
activate(nprod(X1, X2)) -> prod(activate(X1), activate(X2))
activate(nfact(X)) -> fact(activate(X))
activate(np(X)) -> p(activate(X))
activate(X) -> X
innermost
no new Dependency Pairs are created.
FACT(X) -> IF(zero(X), ns(n0), nprod(X, nfact(np(X))))
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 2
↳Argument Filtering and Ordering
ACTIVATE(np(X)) -> ACTIVATE(X)
ACTIVATE(nfact(X)) -> ACTIVATE(X)
ACTIVATE(nprod(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nprod(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
fact(X) -> if(zero(X), ns(n0), nprod(X, nfact(np(X))))
fact(X) -> nfact(X)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
prod(X1, X2) -> nprod(X1, X2)
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
p(X) -> np(X)
s(X) -> ns(X)
0 -> n0
activate(ns(X)) -> s(activate(X))
activate(n0) -> 0
activate(nprod(X1, X2)) -> prod(activate(X1), activate(X2))
activate(nfact(X)) -> fact(activate(X))
activate(np(X)) -> p(activate(X))
activate(X) -> X
innermost
ACTIVATE(np(X)) -> ACTIVATE(X)
ACTIVATE(nfact(X)) -> ACTIVATE(X)
ACTIVATE(nprod(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nprod(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(x1) -> ACTIVATE(x1)
np(x1) -> np(x1)
ns(x1) -> ns(x1)
nprod(x1, x2) -> nprod(x1, x2)
nfact(x1) -> nfact(x1)
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 2
↳AFS
...
→DP Problem 3
↳Dependency Graph
fact(X) -> if(zero(X), ns(n0), nprod(X, nfact(np(X))))
fact(X) -> nfact(X)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
prod(0, X) -> 0
prod(s(X), Y) -> add(Y, prod(X, Y))
prod(X1, X2) -> nprod(X1, X2)
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
p(X) -> np(X)
s(X) -> ns(X)
0 -> n0
activate(ns(X)) -> s(activate(X))
activate(n0) -> 0
activate(nprod(X1, X2)) -> prod(activate(X1), activate(X2))
activate(nfact(X)) -> fact(activate(X))
activate(np(X)) -> p(activate(X))
activate(X) -> X
innermost