We consider termination of the LCTRS with only rule scheme Calc: Signature: eval :: Int -> Int -> Int -> Int -> Int -> o Rules: eval(an, bn, cn, i, j) -> eval(an, bn, cn + 1, i, j + 1) | j < bn /\ i < an /\ cn = cn eval(an, bn, cn, i, j) -> eval(an, bn, cn + 1, i + 1, j) | j < bn /\ i < an /\ cn = cn eval(an, bn, cn, i, j) -> eval(an, bn, cn + 1, i + 1, j) | j >= bn /\ i < an /\ cn = cn eval(an, bn, cn, i, j) -> eval(an, bn, cn + 1, i, j + 1) | j < bn /\ i >= an /\ cn = cn The system is accessible function passing by a sort ordering that equates all sorts. We start by computing the initial DP problem D1 = (P1, R, i, c), where: P1. (1) eval#(an, bn, cn, i, j) => eval#(an, bn, cn + 1, i, j + 1) | j < bn /\ i < an /\ cn = cn (2) eval#(an, bn, cn, i, j) => eval#(an, bn, cn + 1, i + 1, j) | j < bn /\ i < an /\ cn = cn (3) eval#(an, bn, cn, i, j) => eval#(an, bn, cn + 1, i + 1, j) | j >= bn /\ i < an /\ cn = cn (4) eval#(an, bn, cn, i, j) => eval#(an, bn, cn + 1, i, j + 1) | j < bn /\ i >= an /\ cn = cn ***** We apply the Graph Processor on D1 = (P1, R, i, c). We compute a graph approximation with the following edges: 1: 1 2 3 2: 1 2 4 3: 3 4: 4 There are 3 SCCs. Processor output: { D2 = (P2, R, i, c) ; D3 = (P3, R, i, c) ; D4 = (P4, R, i, c) }, where: P2. (1) eval#(an, bn, cn, i, j) => eval#(an, bn, cn + 1, i, j + 1) | j < bn /\ i >= an /\ cn = cn P3. (1) eval#(an, bn, cn, i, j) => eval#(an, bn, cn + 1, i + 1, j) | j >= bn /\ i < an /\ cn = cn P4. (1) eval#(an, bn, cn, i, j) => eval#(an, bn, cn + 1, i, j + 1) | j < bn /\ i < an /\ cn = cn (2) eval#(an, bn, cn, i, j) => eval#(an, bn, cn + 1, i + 1, j) | j < bn /\ i < an /\ cn = cn ***** We apply the Integer Function Processor on D2 = (P2, R, i, c). We use the following integer mapping: J(eval#) = arg_2 - arg_5 We thus have: (1) j < bn /\ i >= an /\ cn = cn |= bn - j > bn - (j + 1) (and bn - j >= 0) All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }. ***** We apply the Integer Function Processor on D3 = (P3, R, i, c). We use the following integer mapping: J(eval#) = arg_1 - arg_4 We thus have: (1) j >= bn /\ i < an /\ cn = cn |= an - i > an - (i + 1) (and an - i >= 0) All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }. ***** We apply the Integer Function Processor on D4 = (P4, R, i, c). We use the following integer mapping: J(eval#) = arg_1 - arg_4 - 1 We thus have: (1) j < bn /\ i < an /\ cn = cn |= an - i - 1 >= an - i - 1 (2) j < bn /\ i < an /\ cn = cn |= an - i - 1 > an - (i + 1) - 1 (and an - i - 1 >= 0) We may remove the strictly oriented DPs, which yields: Processor output: { D5 = (P5, R, i, c) }, where: P5. (1) eval#(an, bn, cn, i, j) => eval#(an, bn, cn + 1, i, j + 1) | j < bn /\ i < an /\ cn = cn ***** We apply the Integer Function Processor on D5 = (P5, R, i, c). We use the following integer mapping: J(eval#) = arg_2 - arg_5 We thus have: (1) j < bn /\ i < an /\ cn = cn |= bn - j > bn - (j + 1) (and bn - j >= 0) All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }.