/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. active : [o] --> o c : [] --> o f : [o] --> o false : [] --> o if : [o * o * o] --> o mark : [o] --> o ok : [o] --> o proper : [o] --> o top : [o] --> o true : [] --> o active(f(X)) => mark(if(X, c, f(true))) active(if(true, X, Y)) => mark(X) active(if(false, X, Y)) => mark(Y) active(f(X)) => f(active(X)) active(if(X, Y, Z)) => if(active(X), Y, Z) active(if(X, Y, Z)) => if(X, active(Y), Z) f(mark(X)) => mark(f(X)) if(mark(X), Y, Z) => mark(if(X, Y, Z)) if(X, mark(Y), Z) => mark(if(X, Y, Z)) proper(f(X)) => f(proper(X)) proper(if(X, Y, Z)) => if(proper(X), proper(Y), proper(Z)) proper(c) => ok(c) proper(true) => ok(true) proper(false) => ok(false) f(ok(X)) => ok(f(X)) if(ok(X), ok(Y), ok(Z)) => ok(if(X, Y, Z)) top(mark(X)) => top(proper(X)) top(ok(X)) => top(active(X)) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): active(f(X)) >? mark(if(X, c, f(true))) active(if(true, X, Y)) >? mark(X) active(if(false, X, Y)) >? mark(Y) active(f(X)) >? f(active(X)) active(if(X, Y, Z)) >? if(active(X), Y, Z) active(if(X, Y, Z)) >? if(X, active(Y), Z) f(mark(X)) >? mark(f(X)) if(mark(X), Y, Z) >? mark(if(X, Y, Z)) if(X, mark(Y), Z) >? mark(if(X, Y, Z)) proper(f(X)) >? f(proper(X)) proper(if(X, Y, Z)) >? if(proper(X), proper(Y), proper(Z)) proper(c) >? ok(c) proper(true) >? ok(true) proper(false) >? ok(false) f(ok(X)) >? ok(f(X)) if(ok(X), ok(Y), ok(Z)) >? ok(if(X, Y, Z)) top(mark(X)) >? top(proper(X)) top(ok(X)) >? top(active(X)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.y0 c = 0 f = \y0.2y0 false = 1 if = \y0y1y2.y2 + 2y0 + 2y1 mark = \y0.y0 ok = \y0.y0 proper = \y0.y0 top = \y0.y0 true = 0 Using this interpretation, the requirements translate to: [[active(f(_x0))]] = 2x0 >= 2x0 = [[mark(if(_x0, c, f(true)))]] [[active(if(true, _x0, _x1))]] = x1 + 2x0 >= x0 = [[mark(_x0)]] [[active(if(false, _x0, _x1))]] = 2 + x1 + 2x0 > x1 = [[mark(_x1)]] [[active(f(_x0))]] = 2x0 >= 2x0 = [[f(active(_x0))]] [[active(if(_x0, _x1, _x2))]] = x2 + 2x0 + 2x1 >= x2 + 2x0 + 2x1 = [[if(active(_x0), _x1, _x2)]] [[active(if(_x0, _x1, _x2))]] = x2 + 2x0 + 2x1 >= x2 + 2x0 + 2x1 = [[if(_x0, active(_x1), _x2)]] [[f(mark(_x0))]] = 2x0 >= 2x0 = [[mark(f(_x0))]] [[if(mark(_x0), _x1, _x2)]] = x2 + 2x0 + 2x1 >= x2 + 2x0 + 2x1 = [[mark(if(_x0, _x1, _x2))]] [[if(_x0, mark(_x1), _x2)]] = x2 + 2x0 + 2x1 >= x2 + 2x0 + 2x1 = [[mark(if(_x0, _x1, _x2))]] [[proper(f(_x0))]] = 2x0 >= 2x0 = [[f(proper(_x0))]] [[proper(if(_x0, _x1, _x2))]] = x2 + 2x0 + 2x1 >= x2 + 2x0 + 2x1 = [[if(proper(_x0), proper(_x1), proper(_x2))]] [[proper(c)]] = 0 >= 0 = [[ok(c)]] [[proper(true)]] = 0 >= 0 = [[ok(true)]] [[proper(false)]] = 1 >= 1 = [[ok(false)]] [[f(ok(_x0))]] = 2x0 >= 2x0 = [[ok(f(_x0))]] [[if(ok(_x0), ok(_x1), ok(_x2))]] = x2 + 2x0 + 2x1 >= x2 + 2x0 + 2x1 = [[ok(if(_x0, _x1, _x2))]] [[top(mark(_x0))]] = x0 >= x0 = [[top(proper(_x0))]] [[top(ok(_x0))]] = x0 >= x0 = [[top(active(_x0))]] We can thus remove the following rules: active(if(false, X, Y)) => mark(Y) 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] active#(f(X)) =#> if#(X, c, f(true)) 1] active#(f(X)) =#> f#(true) 2] active#(f(X)) =#> f#(active(X)) 3] active#(f(X)) =#> active#(X) 4] active#(if(X, Y, Z)) =#> if#(active(X), Y, Z) 5] active#(if(X, Y, Z)) =#> active#(X) 6] active#(if(X, Y, Z)) =#> if#(X, active(Y), Z) 7] active#(if(X, Y, Z)) =#> active#(Y) 8] f#(mark(X)) =#> f#(X) 9] if#(mark(X), Y, Z) =#> if#(X, Y, Z) 10] if#(X, mark(Y), Z) =#> if#(X, Y, Z) 11] proper#(f(X)) =#> f#(proper(X)) 12] proper#(f(X)) =#> proper#(X) 13] proper#(if(X, Y, Z)) =#> if#(proper(X), proper(Y), proper(Z)) 14] proper#(if(X, Y, Z)) =#> proper#(X) 15] proper#(if(X, Y, Z)) =#> proper#(Y) 16] proper#(if(X, Y, Z)) =#> proper#(Z) 17] f#(ok(X)) =#> f#(X) 18] if#(ok(X), ok(Y), ok(Z)) =#> if#(X, Y, Z) 19] top#(mark(X)) =#> top#(proper(X)) 20] top#(mark(X)) =#> proper#(X) 21] top#(ok(X)) =#> top#(active(X)) 22] top#(ok(X)) =#> active#(X) Rules R_0: active(f(X)) => mark(if(X, c, f(true))) active(if(true, X, Y)) => mark(X) active(f(X)) => f(active(X)) active(if(X, Y, Z)) => if(active(X), Y, Z) active(if(X, Y, Z)) => if(X, active(Y), Z) f(mark(X)) => mark(f(X)) if(mark(X), Y, Z) => mark(if(X, Y, Z)) if(X, mark(Y), Z) => mark(if(X, Y, Z)) proper(f(X)) => f(proper(X)) proper(if(X, Y, Z)) => if(proper(X), proper(Y), proper(Z)) proper(c) => ok(c) proper(true) => ok(true) proper(false) => ok(false) f(ok(X)) => ok(f(X)) if(ok(X), ok(Y), ok(Z)) => ok(if(X, Y, Z)) top(mark(X)) => top(proper(X)) top(ok(X)) => top(active(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 : 9 * 1 : * 2 : 8, 17 * 3 : 0, 1, 2, 3, 4, 5, 6, 7 * 4 : 9, 10, 18 * 5 : 0, 1, 2, 3, 4, 5, 6, 7 * 6 : 9, 10, 18 * 7 : 0, 1, 2, 3, 4, 5, 6, 7 * 8 : 8, 17 * 9 : 9, 10, 18 * 10 : 9, 10, 18 * 11 : 8, 17 * 12 : 11, 12, 13, 14, 15, 16 * 13 : 9, 10, 18 * 14 : 11, 12, 13, 14, 15, 16 * 15 : 11, 12, 13, 14, 15, 16 * 16 : 11, 12, 13, 14, 15, 16 * 17 : 8, 17 * 18 : 9, 10, 18 * 19 : 19, 20, 21, 22 * 20 : 11, 12, 13, 14, 15, 16 * 21 : 19, 20, 21, 22 * 22 : 0, 1, 2, 3, 4, 5, 6, 7 This graph has the following strongly connected components: P_1: active#(f(X)) =#> active#(X) active#(if(X, Y, Z)) =#> active#(X) active#(if(X, Y, Z)) =#> active#(Y) P_2: f#(mark(X)) =#> f#(X) f#(ok(X)) =#> f#(X) P_3: if#(mark(X), Y, Z) =#> if#(X, Y, Z) if#(X, mark(Y), Z) =#> if#(X, Y, Z) if#(ok(X), ok(Y), ok(Z)) =#> if#(X, Y, Z) P_4: proper#(f(X)) =#> proper#(X) proper#(if(X, Y, Z)) =#> proper#(X) proper#(if(X, Y, Z)) =#> proper#(Y) proper#(if(X, Y, Z)) =#> proper#(Z) P_5: top#(mark(X)) =#> top#(proper(X)) top#(ok(X)) =#> top#(active(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), (P_2, R_0, m, f), (P_3, R_0, m, f), (P_4, R_0, m, f) and (P_5, R_0, m, f). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative) and (P_5, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_5, R_0, minimal, formative). The formative rules of (P_5, R_0) are R_1 ::= active(f(X)) => mark(if(X, c, f(true))) active(if(true, X, Y)) => mark(X) active(f(X)) => f(active(X)) active(if(X, Y, Z)) => if(active(X), Y, Z) active(if(X, Y, Z)) => if(X, active(Y), Z) f(mark(X)) => mark(f(X)) if(mark(X), Y, Z) => mark(if(X, Y, Z)) if(X, mark(Y), Z) => mark(if(X, Y, Z)) proper(f(X)) => f(proper(X)) proper(if(X, Y, Z)) => if(proper(X), proper(Y), proper(Z)) proper(c) => ok(c) proper(true) => ok(true) proper(false) => ok(false) f(ok(X)) => ok(f(X)) if(ok(X), ok(Y), ok(Z)) => ok(if(X, Y, Z)) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_5, R_0, minimal, formative) by (P_5, R_1, minimal, formative). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative) and (P_5, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_5, R_1, minimal, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: top#(mark(X)) >? top#(proper(X)) top#(ok(X)) >? top#(active(X)) active(f(X)) >= mark(if(X, c, f(true))) active(if(true, X, Y)) >= mark(X) active(f(X)) >= f(active(X)) active(if(X, Y, Z)) >= if(active(X), Y, Z) active(if(X, Y, Z)) >= if(X, active(Y), Z) f(mark(X)) >= mark(f(X)) if(mark(X), Y, Z) >= mark(if(X, Y, Z)) if(X, mark(Y), Z) >= mark(if(X, Y, Z)) proper(f(X)) >= f(proper(X)) proper(if(X, Y, Z)) >= if(proper(X), proper(Y), proper(Z)) proper(c) >= ok(c) proper(true) >= ok(true) proper(false) >= ok(false) f(ok(X)) >= ok(f(X)) if(ok(X), ok(Y), ok(Z)) >= ok(if(X, Y, Z)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.y0 c = 0 f = \y0.1 + y0 false = 0 if = \y0y1y2.y0 + y1 mark = \y0.1 + y0 ok = \y0.y0 proper = \y0.y0 top# = \y0.2y0 true = 1 Using this interpretation, the requirements translate to: [[top#(mark(_x0))]] = 2 + 2x0 > 2x0 = [[top#(proper(_x0))]] [[top#(ok(_x0))]] = 2x0 >= 2x0 = [[top#(active(_x0))]] [[active(f(_x0))]] = 1 + x0 >= 1 + x0 = [[mark(if(_x0, c, f(true)))]] [[active(if(true, _x0, _x1))]] = 1 + x0 >= 1 + x0 = [[mark(_x0)]] [[active(f(_x0))]] = 1 + x0 >= 1 + x0 = [[f(active(_x0))]] [[active(if(_x0, _x1, _x2))]] = x0 + x1 >= x0 + x1 = [[if(active(_x0), _x1, _x2)]] [[active(if(_x0, _x1, _x2))]] = x0 + x1 >= x0 + x1 = [[if(_x0, active(_x1), _x2)]] [[f(mark(_x0))]] = 2 + x0 >= 2 + x0 = [[mark(f(_x0))]] [[if(mark(_x0), _x1, _x2)]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[mark(if(_x0, _x1, _x2))]] [[if(_x0, mark(_x1), _x2)]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[mark(if(_x0, _x1, _x2))]] [[proper(f(_x0))]] = 1 + x0 >= 1 + x0 = [[f(proper(_x0))]] [[proper(if(_x0, _x1, _x2))]] = x0 + x1 >= x0 + x1 = [[if(proper(_x0), proper(_x1), proper(_x2))]] [[proper(c)]] = 0 >= 0 = [[ok(c)]] [[proper(true)]] = 1 >= 1 = [[ok(true)]] [[proper(false)]] = 0 >= 0 = [[ok(false)]] [[f(ok(_x0))]] = 1 + x0 >= 1 + x0 = [[ok(f(_x0))]] [[if(ok(_x0), ok(_x1), ok(_x2))]] = x0 + x1 >= x0 + x1 = [[ok(if(_x0, _x1, _x2))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_5, R_1, minimal, formative) by (P_6, R_1, minimal, formative), where P_6 consists of: top#(ok(X)) =#> top#(active(X)) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative) and (P_6, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_6, R_1, minimal, formative). The formative rules of (P_6, R_1) are R_2 ::= active(f(X)) => f(active(X)) active(if(X, Y, Z)) => if(active(X), Y, Z) active(if(X, Y, Z)) => if(X, active(Y), Z) proper(f(X)) => f(proper(X)) proper(if(X, Y, Z)) => if(proper(X), proper(Y), proper(Z)) proper(c) => ok(c) proper(true) => ok(true) proper(false) => ok(false) f(ok(X)) => ok(f(X)) if(ok(X), ok(Y), ok(Z)) => ok(if(X, Y, Z)) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_6, R_1, minimal, formative) by (P_6, R_2, minimal, formative). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative) and (P_6, R_2, minimal, formative) is finite. We consider the dependency pair problem (P_6, R_2, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. The usable rules of (P_6, R_2) are: active(f(X)) => f(active(X)) active(if(X, Y, Z)) => if(active(X), Y, Z) active(if(X, Y, Z)) => if(X, active(Y), Z) f(ok(X)) => ok(f(X)) if(ok(X), ok(Y), ok(Z)) => ok(if(X, Y, Z)) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: top#(ok(X)) >? top#(active(X)) active(f(X)) >= f(active(X)) active(if(X, Y, Z)) >= if(active(X), Y, Z) active(if(X, Y, Z)) >= if(X, active(Y), Z) f(ok(X)) >= ok(f(X)) if(ok(X), ok(Y), ok(Z)) >= ok(if(X, Y, Z)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.2y0 f = \y0.y0 if = \y0y1y2.2 + 2y1 ok = \y0.3 + 2y0 top# = \y0.3y0 Using this interpretation, the requirements translate to: [[top#(ok(_x0))]] = 9 + 6x0 > 6x0 = [[top#(active(_x0))]] [[active(f(_x0))]] = 2x0 >= 2x0 = [[f(active(_x0))]] [[active(if(_x0, _x1, _x2))]] = 4 + 4x1 >= 2 + 2x1 = [[if(active(_x0), _x1, _x2)]] [[active(if(_x0, _x1, _x2))]] = 4 + 4x1 >= 2 + 4x1 = [[if(_x0, active(_x1), _x2)]] [[f(ok(_x0))]] = 3 + 2x0 >= 3 + 2x0 = [[ok(f(_x0))]] [[if(ok(_x0), ok(_x1), ok(_x2))]] = 8 + 4x1 >= 7 + 4x1 = [[ok(if(_x0, _x1, _x2))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_6, R_2) by ({}, R_2). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative) and (P_4, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_4, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(proper#) = 1 Thus, we can orient the dependency pairs as follows: nu(proper#(f(X))) = f(X) |> X = nu(proper#(X)) nu(proper#(if(X, Y, Z))) = if(X, Y, Z) |> X = nu(proper#(X)) nu(proper#(if(X, Y, Z))) = if(X, Y, Z) |> Y = nu(proper#(Y)) nu(proper#(if(X, Y, Z))) = if(X, Y, Z) |> Z = nu(proper#(Z)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_4, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative) and (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(if#) = 1 Thus, we can orient the dependency pairs as follows: nu(if#(mark(X), Y, Z)) = mark(X) |> X = nu(if#(X, Y, Z)) nu(if#(X, mark(Y), Z)) = X = X = nu(if#(X, Y, Z)) nu(if#(ok(X), ok(Y), ok(Z))) = ok(X) |> X = nu(if#(X, Y, Z)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_3, R_0, minimal, f) by (P_7, R_0, minimal, f), where P_7 contains: if#(X, mark(Y), Z) =#> if#(X, Y, Z) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative) and (P_7, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_7, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(if#) = 2 Thus, we can orient the dependency pairs as follows: nu(if#(X, mark(Y), Z)) = mark(Y) |> Y = nu(if#(X, Y, Z)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_7, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if each of (P_1, R_0, minimal, formative) and (P_2, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_2, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(f#) = 1 Thus, we can orient the dependency pairs as follows: nu(f#(mark(X))) = mark(X) |> X = nu(f#(X)) nu(f#(ok(X))) = ok(X) |> X = nu(f#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_2, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. 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 apply the subterm criterion with the following projection function: nu(active#) = 1 Thus, we can orient the dependency pairs as follows: nu(active#(f(X))) = f(X) |> X = nu(active#(X)) nu(active#(if(X, Y, Z))) = if(X, Y, Z) |> X = nu(active#(X)) nu(active#(if(X, Y, Z))) = if(X, Y, Z) |> Y = nu(active#(Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_1, 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.