R
↳Dependency Pair Analysis
PRIMES -> SIEVE(from(s(s(0))))
PRIMES -> FROM(s(s(0)))
PRIMES -> S(s(0))
PRIMES -> S(0)
FROM(X) -> CONS(X, nfrom(ns(X)))
TAIL(cons(X, Y)) -> ACTIVATE(Y)
IF(true, X, Y) -> ACTIVATE(X)
IF(false, X, Y) -> ACTIVATE(Y)
FILTER(s(s(X)), cons(Y, Z)) -> IF(divides(s(s(X)), Y), nfilter(ns(ns(X)), activate(Z)), ncons(Y, nfilter(X, nsieve(Y))))
FILTER(s(s(X)), cons(Y, Z)) -> ACTIVATE(Z)
SIEVE(cons(X, Y)) -> CONS(X, nfilter(X, nsieve(activate(Y))))
SIEVE(cons(X, Y)) -> ACTIVATE(Y)
ACTIVATE(nfrom(X)) -> FROM(activate(X))
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(ns(X)) -> S(activate(X))
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfilter(X1, X2)) -> FILTER(activate(X1), activate(X2))
ACTIVATE(nfilter(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfilter(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(ncons(X1, X2)) -> CONS(activate(X1), X2)
ACTIVATE(ncons(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nsieve(X)) -> SIEVE(activate(X))
ACTIVATE(nsieve(X)) -> ACTIVATE(X)
R
↳DPs
→DP Problem 1
↳Argument Filtering and Ordering
ACTIVATE(nsieve(X)) -> ACTIVATE(X)
ACTIVATE(ncons(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfilter(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfilter(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> activate(Y)
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), nfilter(ns(ns(X)), activate(Z)), ncons(Y, nfilter(X, nsieve(Y))))
filter(X1, X2) -> nfilter(X1, X2)
sieve(cons(X, Y)) -> cons(X, nfilter(X, nsieve(activate(Y))))
sieve(X) -> nsieve(X)
s(X) -> ns(X)
cons(X1, X2) -> ncons(X1, X2)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfilter(X1, X2)) -> filter(activate(X1), activate(X2))
activate(ncons(X1, X2)) -> cons(activate(X1), X2)
activate(nsieve(X)) -> sieve(activate(X))
activate(X) -> X
innermost
ACTIVATE(nsieve(X)) -> ACTIVATE(X)
ACTIVATE(ncons(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfilter(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfilter(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(x1) -> ACTIVATE(x1)
nsieve(x1) -> nsieve(x1)
ncons(x1, x2) -> ncons(x1, x2)
nfilter(x1, x2) -> nfilter(x1, x2)
ns(x1) -> ns(x1)
nfrom(x1) -> nfrom(x1)
R
↳DPs
→DP Problem 1
↳AFS
→DP Problem 2
↳Dependency Graph
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> activate(Y)
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), nfilter(ns(ns(X)), activate(Z)), ncons(Y, nfilter(X, nsieve(Y))))
filter(X1, X2) -> nfilter(X1, X2)
sieve(cons(X, Y)) -> cons(X, nfilter(X, nsieve(activate(Y))))
sieve(X) -> nsieve(X)
s(X) -> ns(X)
cons(X1, X2) -> ncons(X1, X2)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfilter(X1, X2)) -> filter(activate(X1), activate(X2))
activate(ncons(X1, X2)) -> cons(activate(X1), X2)
activate(nsieve(X)) -> sieve(activate(X))
activate(X) -> X
innermost