We consider termination of the LCSTRS with only rule scheme Calc: Signature: comp :: (Int -> ret) -> (Int -> Int) -> Int -> ret error :: ret fact :: Int -> (Int -> ret) -> ret return :: Int -> ret Rules: comp(f, g, x) -> f(g(x)) fact(n, k) -> error | n < 0 fact(n, k) -> k(1) | n = 0 fact(n, k) -> fact(n - 1, comp(k, [*](n))) | n > 0 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) fact#(n, k) => comp#(k, [*](n), fresh1) | n > 0 (2) fact#(n, k) => fact#(n - 1, comp(k, [*](n))) | n > 0 ***** We apply the Graph Processor on D1 = (P1, R, i, c). We compute a graph approximation with the following edges: 1: 2: 1 2 There is only one SCC, so all DPs not inside the SCC can be removed. Processor output: { D2 = (P2, R, i, c) }, where: P2. (1) fact#(n, k) => fact#(n - 1, comp(k, [*](n))) | n > 0 ***** We apply the Integer Function Processor on D2 = (P2, R, i, c). We use the following integer mapping: J(fact#) = arg_1 We thus have: (1) n > 0 |= n > n - 1 (and n >= 0) All DPs are strictly oriented, and may be removed. Hence, this DP problem is finite. Processor output: { }.