1.06/1.35 YES 1.06/1.35 1.06/1.35 Problem 1: 1.06/1.35 1.06/1.35 (VAR x y) 1.06/1.35 (STRATEGY CONTEXTSENSITIVE 1.06/1.35 (if 1) 1.06/1.35 (isZero 1) 1.06/1.35 (p 1) 1.06/1.35 (plus 1 2) 1.06/1.35 (0) 1.06/1.35 (false) 1.06/1.35 (s 1) 1.06/1.35 (true) 1.06/1.35 ) 1.06/1.35 (RULES 1.06/1.35 if(false,x,y) -> y 1.06/1.35 if(true,x,y) -> x 1.06/1.35 isZero(0) -> true 1.06/1.35 isZero(s(x)) -> false 1.06/1.35 p(s(x)) -> x 1.06/1.35 plus(x,y) -> if(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 ) 1.06/1.35 1.06/1.35 Problem 1: 1.06/1.35 1.06/1.35 Innermost Equivalent Processor: 1.06/1.35 -> Rules: 1.06/1.35 if(false,x,y) -> y 1.06/1.35 if(true,x,y) -> x 1.06/1.35 isZero(0) -> true 1.06/1.35 isZero(s(x)) -> false 1.06/1.35 p(s(x)) -> x 1.06/1.35 plus(x,y) -> if(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 -> The context-sensitive term rewriting system is an orthogonal system. Therefore, innermost cs-termination implies cs-termination. 1.06/1.35 1.06/1.35 1.06/1.35 Problem 1: 1.06/1.35 1.06/1.35 Dependency Pairs Processor: 1.06/1.35 -> Pairs: 1.06/1.35 IF(false,x,y) -> y 1.06/1.35 IF(true,x,y) -> x 1.06/1.35 PLUS(x,y) -> IF(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 PLUS(x,y) -> ISZERO(x) 1.06/1.35 -> Rules: 1.06/1.35 if(false,x,y) -> y 1.06/1.35 if(true,x,y) -> x 1.06/1.35 isZero(0) -> true 1.06/1.35 isZero(s(x)) -> false 1.06/1.35 p(s(x)) -> x 1.06/1.35 plus(x,y) -> if(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 -> Unhiding Rules: 1.06/1.35 s(plus(p(x),y)) -> P(x) 1.06/1.35 s(plus(p(x),y)) -> PLUS(p(x),y) 1.06/1.35 1.06/1.35 Problem 1: 1.06/1.35 1.06/1.35 SCC Processor: 1.06/1.35 -> Pairs: 1.06/1.35 IF(false,x,y) -> y 1.06/1.35 IF(true,x,y) -> x 1.06/1.35 PLUS(x,y) -> IF(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 PLUS(x,y) -> ISZERO(x) 1.06/1.35 -> Rules: 1.06/1.35 if(false,x,y) -> y 1.06/1.35 if(true,x,y) -> x 1.06/1.35 isZero(0) -> true 1.06/1.35 isZero(s(x)) -> false 1.06/1.35 p(s(x)) -> x 1.06/1.35 plus(x,y) -> if(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 -> Unhiding rules: 1.06/1.35 s(plus(p(x),y)) -> P(x) 1.06/1.35 s(plus(p(x),y)) -> PLUS(p(x),y) 1.06/1.35 ->Strongly Connected Components: 1.06/1.35 ->->Cycle: 1.06/1.35 ->->-> Pairs: 1.06/1.35 IF(false,x,y) -> y 1.06/1.35 IF(true,x,y) -> x 1.06/1.35 PLUS(x,y) -> IF(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 ->->-> Rules: 1.06/1.35 if(false,x,y) -> y 1.06/1.35 if(true,x,y) -> x 1.06/1.35 isZero(0) -> true 1.06/1.35 isZero(s(x)) -> false 1.06/1.35 p(s(x)) -> x 1.06/1.35 plus(x,y) -> if(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 ->->-> Unhiding rules: 1.06/1.35 s(plus(p(x),y)) -> PLUS(p(x),y) 1.06/1.35 1.06/1.35 Problem 1: 1.06/1.35 1.06/1.35 Reduction Pairs Processor: 1.06/1.35 -> Pairs: 1.06/1.35 IF(false,x,y) -> y 1.06/1.35 IF(true,x,y) -> x 1.06/1.35 PLUS(x,y) -> IF(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 -> Rules: 1.06/1.35 if(false,x,y) -> y 1.06/1.35 if(true,x,y) -> x 1.06/1.35 isZero(0) -> true 1.06/1.35 isZero(s(x)) -> false 1.06/1.35 p(s(x)) -> x 1.06/1.35 plus(x,y) -> if(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 -> Unhiding rules: 1.06/1.35 s(plus(p(x),y)) -> PLUS(p(x),y) 1.06/1.35 -> Usable rules: 1.06/1.35 isZero(0) -> true 1.06/1.35 isZero(s(x)) -> false 1.06/1.35 p(s(x)) -> x 1.06/1.35 ->Interpretation type: 1.06/1.35 Simple mixed 1.06/1.35 ->Coefficients: 1.06/1.35 All rationals 1.06/1.35 ->Dimension: 1.06/1.35 1 1.06/1.35 ->Bound: 1.06/1.35 2 1.06/1.35 ->Interpretation: 1.06/1.35 1.06/1.35 [isZero](X) = 2.X 1.06/1.35 [p](X) = 1/2.X 1.06/1.35 [plus](X1,X2) = X1.X2 + X1 + 1/2 1.06/1.35 [0] = 2 1.06/1.35 [false] = 2 1.06/1.35 [s](X) = 2.X + 1 1.06/1.35 [true] = 2 1.06/1.35 [IF](X1,X2,X3) = 1/2.X1.X2 + 1/2.X1 + X3 1.06/1.35 [PLUS](X1,X2) = 2.X1.X2 + 2.X1 + 2 1.06/1.35 1.06/1.35 Problem 1: 1.06/1.35 1.06/1.35 SCC Processor: 1.06/1.35 -> Pairs: 1.06/1.35 IF(true,x,y) -> x 1.06/1.35 PLUS(x,y) -> IF(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 -> Rules: 1.06/1.35 if(false,x,y) -> y 1.06/1.35 if(true,x,y) -> x 1.06/1.35 isZero(0) -> true 1.06/1.35 isZero(s(x)) -> false 1.06/1.35 p(s(x)) -> x 1.06/1.35 plus(x,y) -> if(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 -> Unhiding rules: 1.06/1.35 s(plus(p(x),y)) -> PLUS(p(x),y) 1.06/1.35 ->Strongly Connected Components: 1.06/1.35 ->->Cycle: 1.06/1.35 ->->-> Pairs: 1.06/1.35 IF(true,x,y) -> x 1.06/1.35 PLUS(x,y) -> IF(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 ->->-> Rules: 1.06/1.35 if(false,x,y) -> y 1.06/1.35 if(true,x,y) -> x 1.06/1.35 isZero(0) -> true 1.06/1.35 isZero(s(x)) -> false 1.06/1.35 p(s(x)) -> x 1.06/1.35 plus(x,y) -> if(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 ->->-> Unhiding rules: 1.06/1.35 s(plus(p(x),y)) -> PLUS(p(x),y) 1.06/1.35 1.06/1.35 Problem 1: 1.06/1.35 1.06/1.35 SubNColl Processor: 1.06/1.35 -> Pairs: 1.06/1.35 IF(true,x,y) -> x 1.06/1.35 PLUS(x,y) -> IF(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 -> Rules: 1.06/1.35 if(false,x,y) -> y 1.06/1.35 if(true,x,y) -> x 1.06/1.35 isZero(0) -> true 1.06/1.35 isZero(s(x)) -> false 1.06/1.35 p(s(x)) -> x 1.06/1.35 plus(x,y) -> if(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 -> Unhiding rules: 1.06/1.35 s(plus(p(x),y)) -> PLUS(p(x),y) 1.06/1.35 ->Projection: 1.06/1.35 pi(IF) = 2 1.06/1.35 pi(PLUS) = 2 1.06/1.35 1.06/1.35 Problem 1: 1.06/1.35 1.06/1.35 SCC Processor: 1.06/1.35 -> Pairs: 1.06/1.35 IF(true,x,y) -> x 1.06/1.35 PLUS(x,y) -> IF(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 -> Rules: 1.06/1.35 if(false,x,y) -> y 1.06/1.35 if(true,x,y) -> x 1.06/1.35 isZero(0) -> true 1.06/1.35 isZero(s(x)) -> false 1.06/1.35 p(s(x)) -> x 1.06/1.35 plus(x,y) -> if(isZero(x),y,s(plus(p(x),y))) 1.06/1.35 -> Unhiding rules: 1.06/1.35 Empty 1.06/1.35 ->Strongly Connected Components: 1.06/1.35 There is no strongly connected component 1.06/1.35 1.06/1.35 The problem is finite. 1.29/1.38 EOF