/export/starexec/sandbox2/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. 0 : [] --> o activate : [o] --> o cons : [o * o] --> o filter : [o * o * o] --> o n!6220!6220filter : [o * o * o] --> o n!6220!6220nats : [o] --> o n!6220!6220sieve : [o] --> o nats : [o] --> o s : [o] --> o sieve : [o] --> o zprimes : [] --> o filter(cons(X, Y), 0, Z) => cons(0, n!6220!6220filter(activate(Y), Z, Z)) filter(cons(X, Y), s(Z), U) => cons(X, n!6220!6220filter(activate(Y), Z, U)) sieve(cons(0, X)) => cons(0, n!6220!6220sieve(activate(X))) sieve(cons(s(X), Y)) => cons(s(X), n!6220!6220sieve(filter(activate(Y), X, X))) nats(X) => cons(X, n!6220!6220nats(s(X))) zprimes => sieve(nats(s(s(0)))) filter(X, Y, Z) => n!6220!6220filter(X, Y, Z) sieve(X) => n!6220!6220sieve(X) nats(X) => n!6220!6220nats(X) activate(n!6220!6220filter(X, Y, Z)) => filter(X, Y, Z) activate(n!6220!6220sieve(X)) => sieve(X) activate(n!6220!6220nats(X)) => nats(X) activate(X) => X We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs in [Kop12, Ch. 7.8]). We thus obtain the following dependency pair problem (P_0, R_0, minimal, formative): Dependency Pairs P_0: 0] filter#(cons(X, Y), 0, Z) =#> activate#(Y) 1] filter#(cons(X, Y), s(Z), U) =#> activate#(Y) 2] sieve#(cons(0, X)) =#> activate#(X) 3] sieve#(cons(s(X), Y)) =#> filter#(activate(Y), X, X) 4] sieve#(cons(s(X), Y)) =#> activate#(Y) 5] zprimes# =#> sieve#(nats(s(s(0)))) 6] zprimes# =#> nats#(s(s(0))) 7] activate#(n!6220!6220filter(X, Y, Z)) =#> filter#(X, Y, Z) 8] activate#(n!6220!6220sieve(X)) =#> sieve#(X) 9] activate#(n!6220!6220nats(X)) =#> nats#(X) Rules R_0: filter(cons(X, Y), 0, Z) => cons(0, n!6220!6220filter(activate(Y), Z, Z)) filter(cons(X, Y), s(Z), U) => cons(X, n!6220!6220filter(activate(Y), Z, U)) sieve(cons(0, X)) => cons(0, n!6220!6220sieve(activate(X))) sieve(cons(s(X), Y)) => cons(s(X), n!6220!6220sieve(filter(activate(Y), X, X))) nats(X) => cons(X, n!6220!6220nats(s(X))) zprimes => sieve(nats(s(s(0)))) filter(X, Y, Z) => n!6220!6220filter(X, Y, Z) sieve(X) => n!6220!6220sieve(X) nats(X) => n!6220!6220nats(X) activate(n!6220!6220filter(X, Y, Z)) => filter(X, Y, Z) activate(n!6220!6220sieve(X)) => sieve(X) activate(n!6220!6220nats(X)) => nats(X) activate(X) => X Thus, the original system is terminating if (P_0, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_0, R_0, minimal, formative). We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : 7, 8, 9 * 1 : 7, 8, 9 * 2 : 7, 8, 9 * 3 : 0, 1 * 4 : 7, 8, 9 * 5 : 2, 3, 4 * 6 : * 7 : 0, 1 * 8 : 2, 3, 4 * 9 : This graph has the following strongly connected components: P_1: filter#(cons(X, Y), 0, Z) =#> activate#(Y) filter#(cons(X, Y), s(Z), U) =#> activate#(Y) sieve#(cons(0, X)) =#> activate#(X) sieve#(cons(s(X), Y)) =#> filter#(activate(Y), X, X) sieve#(cons(s(X), Y)) =#> activate#(Y) activate#(n!6220!6220filter(X, Y, Z)) =#> filter#(X, Y, Z) activate#(n!6220!6220sieve(X)) =#> sieve#(X) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_0, R_0, m, f) by (P_1, R_0, m, f). Thus, the original system is terminating if (P_1, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_1, R_0, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. The usable rules of (P_1, R_0) are: filter(cons(X, Y), 0, Z) => cons(0, n!6220!6220filter(activate(Y), Z, Z)) filter(cons(X, Y), s(Z), U) => cons(X, n!6220!6220filter(activate(Y), Z, U)) sieve(cons(0, X)) => cons(0, n!6220!6220sieve(activate(X))) sieve(cons(s(X), Y)) => cons(s(X), n!6220!6220sieve(filter(activate(Y), X, X))) nats(X) => cons(X, n!6220!6220nats(s(X))) filter(X, Y, Z) => n!6220!6220filter(X, Y, Z) sieve(X) => n!6220!6220sieve(X) nats(X) => n!6220!6220nats(X) activate(n!6220!6220filter(X, Y, Z)) => filter(X, Y, Z) activate(n!6220!6220sieve(X)) => sieve(X) activate(n!6220!6220nats(X)) => nats(X) activate(X) => X It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: filter#(cons(X, Y), 0, Z) >? activate#(Y) filter#(cons(X, Y), s(Z), U) >? activate#(Y) sieve#(cons(0, X)) >? activate#(X) sieve#(cons(s(X), Y)) >? filter#(activate(Y), X, X) sieve#(cons(s(X), Y)) >? activate#(Y) activate#(n!6220!6220filter(X, Y, Z)) >? filter#(X, Y, Z) activate#(n!6220!6220sieve(X)) >? sieve#(X) filter(cons(X, Y), 0, Z) >= cons(0, n!6220!6220filter(activate(Y), Z, Z)) filter(cons(X, Y), s(Z), U) >= cons(X, n!6220!6220filter(activate(Y), Z, U)) sieve(cons(0, X)) >= cons(0, n!6220!6220sieve(activate(X))) sieve(cons(s(X), Y)) >= cons(s(X), n!6220!6220sieve(filter(activate(Y), X, X))) nats(X) >= cons(X, n!6220!6220nats(s(X))) filter(X, Y, Z) >= n!6220!6220filter(X, Y, Z) sieve(X) >= n!6220!6220sieve(X) nats(X) >= n!6220!6220nats(X) activate(n!6220!6220filter(X, Y, Z)) >= filter(X, Y, Z) activate(n!6220!6220sieve(X)) >= sieve(X) activate(n!6220!6220nats(X)) >= nats(X) activate(X) >= X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 activate = \y0.y0 activate# = \y0.y0 cons = \y0y1.y1 filter = \y0y1y2.y0 filter# = \y0y1y2.y0 n!6220!6220filter = \y0y1y2.y0 n!6220!6220nats = \y0.0 n!6220!6220sieve = \y0.1 + 2y0 nats = \y0.0 s = \y0.0 sieve = \y0.1 + 2y0 sieve# = \y0.1 + y0 Using this interpretation, the requirements translate to: [[filter#(cons(_x0, _x1), 0, _x2)]] = x1 >= x1 = [[activate#(_x1)]] [[filter#(cons(_x0, _x1), s(_x2), _x3)]] = x1 >= x1 = [[activate#(_x1)]] [[sieve#(cons(0, _x0))]] = 1 + x0 > x0 = [[activate#(_x0)]] [[sieve#(cons(s(_x0), _x1))]] = 1 + x1 > x1 = [[filter#(activate(_x1), _x0, _x0)]] [[sieve#(cons(s(_x0), _x1))]] = 1 + x1 > x1 = [[activate#(_x1)]] [[activate#(n!6220!6220filter(_x0, _x1, _x2))]] = x0 >= x0 = [[filter#(_x0, _x1, _x2)]] [[activate#(n!6220!6220sieve(_x0))]] = 1 + 2x0 >= 1 + x0 = [[sieve#(_x0)]] [[filter(cons(_x0, _x1), 0, _x2)]] = x1 >= x1 = [[cons(0, n!6220!6220filter(activate(_x1), _x2, _x2))]] [[filter(cons(_x0, _x1), s(_x2), _x3)]] = x1 >= x1 = [[cons(_x0, n!6220!6220filter(activate(_x1), _x2, _x3))]] [[sieve(cons(0, _x0))]] = 1 + 2x0 >= 1 + 2x0 = [[cons(0, n!6220!6220sieve(activate(_x0)))]] [[sieve(cons(s(_x0), _x1))]] = 1 + 2x1 >= 1 + 2x1 = [[cons(s(_x0), n!6220!6220sieve(filter(activate(_x1), _x0, _x0)))]] [[nats(_x0)]] = 0 >= 0 = [[cons(_x0, n!6220!6220nats(s(_x0)))]] [[filter(_x0, _x1, _x2)]] = x0 >= x0 = [[n!6220!6220filter(_x0, _x1, _x2)]] [[sieve(_x0)]] = 1 + 2x0 >= 1 + 2x0 = [[n!6220!6220sieve(_x0)]] [[nats(_x0)]] = 0 >= 0 = [[n!6220!6220nats(_x0)]] [[activate(n!6220!6220filter(_x0, _x1, _x2))]] = x0 >= x0 = [[filter(_x0, _x1, _x2)]] [[activate(n!6220!6220sieve(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[sieve(_x0)]] [[activate(n!6220!6220nats(_x0))]] = 0 >= 0 = [[nats(_x0)]] [[activate(_x0)]] = x0 >= x0 = [[_x0]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_1, R_0, minimal, formative) by (P_2, R_0, minimal, formative), where P_2 consists of: filter#(cons(X, Y), 0, Z) =#> activate#(Y) filter#(cons(X, Y), s(Z), U) =#> activate#(Y) activate#(n!6220!6220filter(X, Y, Z)) =#> filter#(X, Y, Z) activate#(n!6220!6220sieve(X)) =#> sieve#(X) Thus, the original system is terminating if (P_2, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_2, R_0, minimal, formative). We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : 2, 3 * 1 : 2, 3 * 2 : 0, 1 * 3 : This graph has the following strongly connected components: P_3: filter#(cons(X, Y), 0, Z) =#> activate#(Y) filter#(cons(X, Y), s(Z), U) =#> activate#(Y) activate#(n!6220!6220filter(X, Y, Z)) =#> filter#(X, Y, Z) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_2, R_0, m, f) by (P_3, R_0, m, f). Thus, the original system is terminating if (P_3, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_3, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(activate#) = 1 nu(filter#) = 1 Thus, we can orient the dependency pairs as follows: nu(filter#(cons(X, Y), 0, Z)) = cons(X, Y) |> Y = nu(activate#(Y)) nu(filter#(cons(X, Y), s(Z), U)) = cons(X, Y) |> Y = nu(activate#(Y)) nu(activate#(n!6220!6220filter(X, Y, Z))) = n!6220!6220filter(X, Y, Z) |> X = nu(filter#(X, Y, Z)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_3, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. As all dependency pair problems were succesfully simplified with sound (and complete) processors until nothing remained, we conclude termination. +++ Citations +++ [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. [KusIsoSakBla09] K. Kusakari, Y. Isogai, M. Sakai, and F. Blanqui. Static Dependency Pair Method Based On Strong Computability for Higher-Order Rewrite Systems. In volume 92(10) of IEICE Transactions on Information and Systems. 2007--2015, 2009.