R
↳Dependency Pair Analysis
FACT(X) -> IF(zero(X), s(0), prod(X, fact(p(X))))
FACT(X) -> ZERO(X)
FACT(X) -> PROD(X, fact(p(X)))
FACT(X) -> FACT(p(X))
FACT(X) -> P(X)
ADD(s(X), Y) -> ADD(X, Y)
PROD(s(X), Y) -> ADD(Y, prod(X, Y))
PROD(s(X), Y) -> PROD(X, Y)
R
↳DPs
→DP Problem 1
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Remaining
ADD(s(X), Y) -> ADD(X, Y)
fact(X) -> if(zero(X), s(0), prod(X, fact(p(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))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
innermost
one new Dependency Pair is created:
ADD(s(X), Y) -> ADD(X, Y)
ADD(s(s(X'')), Y'') -> ADD(s(X''), Y'')
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 4
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Remaining
ADD(s(s(X'')), Y'') -> ADD(s(X''), Y'')
fact(X) -> if(zero(X), s(0), prod(X, fact(p(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))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
innermost
one new Dependency Pair is created:
ADD(s(s(X'')), Y'') -> ADD(s(X''), Y'')
ADD(s(s(s(X''''))), Y'''') -> ADD(s(s(X'''')), Y'''')
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 4
↳FwdInst
...
→DP Problem 5
↳Argument Filtering and Ordering
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Remaining
ADD(s(s(s(X''''))), Y'''') -> ADD(s(s(X'''')), Y'''')
fact(X) -> if(zero(X), s(0), prod(X, fact(p(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))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
innermost
ADD(s(s(s(X''''))), Y'''') -> ADD(s(s(X'''')), Y'''')
ADD(x1, x2) -> ADD(x1, x2)
s(x1) -> s(x1)
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 4
↳FwdInst
...
→DP Problem 6
↳Dependency Graph
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Remaining
fact(X) -> if(zero(X), s(0), prod(X, fact(p(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))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
innermost
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳Forward Instantiation Transformation
→DP Problem 3
↳Remaining
PROD(s(X), Y) -> PROD(X, Y)
fact(X) -> if(zero(X), s(0), prod(X, fact(p(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))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
innermost
one new Dependency Pair is created:
PROD(s(X), Y) -> PROD(X, Y)
PROD(s(s(X'')), Y'') -> PROD(s(X''), Y'')
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 7
↳Forward Instantiation Transformation
→DP Problem 3
↳Remaining
PROD(s(s(X'')), Y'') -> PROD(s(X''), Y'')
fact(X) -> if(zero(X), s(0), prod(X, fact(p(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))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
innermost
one new Dependency Pair is created:
PROD(s(s(X'')), Y'') -> PROD(s(X''), Y'')
PROD(s(s(s(X''''))), Y'''') -> PROD(s(s(X'''')), Y'''')
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 7
↳FwdInst
...
→DP Problem 8
↳Argument Filtering and Ordering
→DP Problem 3
↳Remaining
PROD(s(s(s(X''''))), Y'''') -> PROD(s(s(X'''')), Y'''')
fact(X) -> if(zero(X), s(0), prod(X, fact(p(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))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
innermost
PROD(s(s(s(X''''))), Y'''') -> PROD(s(s(X'''')), Y'''')
PROD(x1, x2) -> PROD(x1, x2)
s(x1) -> s(x1)
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 7
↳FwdInst
...
→DP Problem 9
↳Dependency Graph
→DP Problem 3
↳Remaining
fact(X) -> if(zero(X), s(0), prod(X, fact(p(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))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
innermost
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 3
↳Remaining Obligation(s)
FACT(X) -> FACT(p(X))
fact(X) -> if(zero(X), s(0), prod(X, fact(p(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))
if(true, X, Y) -> X
if(false, X, Y) -> Y
zero(0) -> true
zero(s(X)) -> false
p(s(X)) -> X
innermost