R
↳Dependency Pair Analysis
PRIMES -> SIEVE(from(s(s(0))))
PRIMES -> FROM(s(s(0)))
FROM(X) -> FROM(s(X))
FILTER(s(s(X)), cons(Y, Z)) -> IF(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(s(s(X)), Z)
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(X, sieve(Y))
FILTER(s(s(X)), cons(Y, Z)) -> SIEVE(Y)
SIEVE(cons(X, Y)) -> FILTER(X, sieve(Y))
SIEVE(cons(X, Y)) -> SIEVE(Y)
R
↳DPs
→DP Problem 1
↳Narrowing Transformation
→DP Problem 2
↳Remaining
SIEVE(cons(X, Y)) -> SIEVE(Y)
FILTER(s(s(X)), cons(Y, Z)) -> SIEVE(Y)
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(X, sieve(Y))
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(s(s(X)), Z)
SIEVE(cons(X, Y)) -> FILTER(X, sieve(Y))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
innermost
one new Dependency Pair is created:
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(X, sieve(Y))
FILTER(s(s(X)), cons(cons(X'', Y''), Z)) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 3
↳Narrowing Transformation
→DP Problem 2
↳Remaining
FILTER(s(s(X)), cons(cons(X'', Y''), Z)) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
FILTER(s(s(X)), cons(Y, Z)) -> SIEVE(Y)
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(s(s(X)), Z)
SIEVE(cons(X, Y)) -> FILTER(X, sieve(Y))
SIEVE(cons(X, Y)) -> SIEVE(Y)
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
innermost
one new Dependency Pair is created:
SIEVE(cons(X, Y)) -> FILTER(X, sieve(Y))
SIEVE(cons(X, cons(X'', Y''))) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 3
↳Nar
...
→DP Problem 4
↳Forward Instantiation Transformation
→DP Problem 2
↳Remaining
SIEVE(cons(X, cons(X'', Y''))) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
SIEVE(cons(X, Y)) -> SIEVE(Y)
FILTER(s(s(X)), cons(Y, Z)) -> SIEVE(Y)
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(s(s(X)), Z)
FILTER(s(s(X)), cons(cons(X'', Y''), Z)) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
innermost
two new Dependency Pairs are created:
FILTER(s(s(X)), cons(Y, Z)) -> FILTER(s(s(X)), Z)
FILTER(s(s(X'')), cons(Y, cons(Y'', Z''))) -> FILTER(s(s(X'')), cons(Y'', Z''))
FILTER(s(s(X'')), cons(Y, cons(cons(X'''', Y''''), Z''))) -> FILTER(s(s(X'')), cons(cons(X'''', Y''''), Z''))
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 3
↳Nar
...
→DP Problem 5
↳Forward Instantiation Transformation
→DP Problem 2
↳Remaining
FILTER(s(s(X'')), cons(Y, cons(cons(X'''', Y''''), Z''))) -> FILTER(s(s(X'')), cons(cons(X'''', Y''''), Z''))
FILTER(s(s(X'')), cons(Y, cons(Y'', Z''))) -> FILTER(s(s(X'')), cons(Y'', Z''))
FILTER(s(s(X)), cons(cons(X'', Y''), Z)) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
SIEVE(cons(X, Y)) -> SIEVE(Y)
FILTER(s(s(X)), cons(Y, Z)) -> SIEVE(Y)
SIEVE(cons(X, cons(X'', Y''))) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
innermost
two new Dependency Pairs are created:
FILTER(s(s(X)), cons(Y, Z)) -> SIEVE(Y)
FILTER(s(s(X)), cons(cons(X'', Y''), Z)) -> SIEVE(cons(X'', Y''))
FILTER(s(s(X)), cons(cons(X'', cons(X'''', Y'''')), Z)) -> SIEVE(cons(X'', cons(X'''', Y'''')))
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 3
↳Nar
...
→DP Problem 6
↳Forward Instantiation Transformation
→DP Problem 2
↳Remaining
FILTER(s(s(X)), cons(cons(X'', cons(X'''', Y'''')), Z)) -> SIEVE(cons(X'', cons(X'''', Y'''')))
SIEVE(cons(X, cons(X'', Y''))) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
SIEVE(cons(X, Y)) -> SIEVE(Y)
FILTER(s(s(X)), cons(cons(X'', Y''), Z)) -> SIEVE(cons(X'', Y''))
FILTER(s(s(X'')), cons(Y, cons(Y'', Z''))) -> FILTER(s(s(X'')), cons(Y'', Z''))
FILTER(s(s(X)), cons(cons(X'', Y''), Z)) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
FILTER(s(s(X'')), cons(Y, cons(cons(X'''', Y''''), Z''))) -> FILTER(s(s(X'')), cons(cons(X'''', Y''''), Z''))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
innermost
two new Dependency Pairs are created:
SIEVE(cons(X, Y)) -> SIEVE(Y)
SIEVE(cons(X, cons(X'', Y''))) -> SIEVE(cons(X'', Y''))
SIEVE(cons(X, cons(X'', cons(X'''', Y'''')))) -> SIEVE(cons(X'', cons(X'''', Y'''')))
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 2
↳Remaining Obligation(s)
SIEVE(cons(X, cons(X'', cons(X'''', Y'''')))) -> SIEVE(cons(X'', cons(X'''', Y'''')))
SIEVE(cons(X, cons(X'', Y''))) -> SIEVE(cons(X'', Y''))
FILTER(s(s(X)), cons(cons(X'', Y''), Z)) -> SIEVE(cons(X'', Y''))
FILTER(s(s(X'')), cons(Y, cons(cons(X'''', Y''''), Z''))) -> FILTER(s(s(X'')), cons(cons(X'''', Y''''), Z''))
FILTER(s(s(X'')), cons(Y, cons(Y'', Z''))) -> FILTER(s(s(X'')), cons(Y'', Z''))
FILTER(s(s(X)), cons(cons(X'', Y''), Z)) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
SIEVE(cons(X, cons(X'', Y''))) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
FILTER(s(s(X)), cons(cons(X'', cons(X'''', Y'''')), Z)) -> SIEVE(cons(X'', cons(X'''', Y'''')))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
innermost
FROM(X) -> FROM(s(X))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
innermost
R
↳DPs
→DP Problem 1
↳Nar
→DP Problem 2
↳Remaining Obligation(s)
SIEVE(cons(X, cons(X'', cons(X'''', Y'''')))) -> SIEVE(cons(X'', cons(X'''', Y'''')))
SIEVE(cons(X, cons(X'', Y''))) -> SIEVE(cons(X'', Y''))
FILTER(s(s(X)), cons(cons(X'', Y''), Z)) -> SIEVE(cons(X'', Y''))
FILTER(s(s(X'')), cons(Y, cons(cons(X'''', Y''''), Z''))) -> FILTER(s(s(X'')), cons(cons(X'''', Y''''), Z''))
FILTER(s(s(X'')), cons(Y, cons(Y'', Z''))) -> FILTER(s(s(X'')), cons(Y'', Z''))
FILTER(s(s(X)), cons(cons(X'', Y''), Z)) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
SIEVE(cons(X, cons(X'', Y''))) -> FILTER(X, cons(X'', filter(X'', sieve(Y''))))
FILTER(s(s(X)), cons(cons(X'', cons(X'''', Y'''')), Z)) -> SIEVE(cons(X'', cons(X'''', Y'''')))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
innermost
FROM(X) -> FROM(s(X))
primes -> sieve(from(s(s(0))))
from(X) -> cons(X, from(s(X)))
head(cons(X, Y)) -> X
tail(cons(X, Y)) -> Y
if(true, X, Y) -> X
if(false, X, Y) -> Y
filter(s(s(X)), cons(Y, Z)) -> if(divides(s(s(X)), Y), filter(s(s(X)), Z), cons(Y, filter(X, sieve(Y))))
sieve(cons(X, Y)) -> cons(X, filter(X, sieve(Y)))
innermost