/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 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) mark(f(X)) => active(f(mark(X))) mark(if(X, Y, Z)) => active(if(mark(X), mark(Y), Z)) mark(c) => active(c) mark(true) => active(true) mark(false) => active(false) f(mark(X)) => f(X) f(active(X)) => f(X) if(mark(X), Y, Z) => if(X, Y, Z) if(X, mark(Y), Z) => if(X, Y, Z) if(X, Y, mark(Z)) => if(X, Y, Z) if(active(X), Y, Z) => if(X, Y, Z) if(X, active(Y), Z) => if(X, Y, Z) if(X, Y, active(Z)) => if(X, Y, Z) 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) mark(f(X)) >? active(f(mark(X))) mark(if(X, Y, Z)) >? active(if(mark(X), mark(Y), Z)) mark(c) >? active(c) mark(true) >? active(true) mark(false) >? active(false) f(mark(X)) >? f(X) f(active(X)) >? f(X) if(mark(X), Y, Z) >? if(X, Y, Z) if(X, mark(Y), Z) >? if(X, Y, Z) if(X, Y, mark(Z)) >? if(X, Y, Z) if(active(X), Y, Z) >? if(X, Y, Z) if(X, active(Y), Z) >? if(X, Y, Z) if(X, Y, active(Z)) >? 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.3y0 false = 2 if = \y0y1y2.y0 + 2y1 + 3y2 mark = \y0.2y0 true = 0 Using this interpretation, the requirements translate to: [[active(f(_x0))]] = 3x0 >= 2x0 = [[mark(if(_x0, c, f(true)))]] [[active(if(true, _x0, _x1))]] = 2x0 + 3x1 >= 2x0 = [[mark(_x0)]] [[active(if(false, _x0, _x1))]] = 2 + 2x0 + 3x1 > 2x1 = [[mark(_x1)]] [[mark(f(_x0))]] = 6x0 >= 6x0 = [[active(f(mark(_x0)))]] [[mark(if(_x0, _x1, _x2))]] = 2x0 + 4x1 + 6x2 >= 2x0 + 3x2 + 4x1 = [[active(if(mark(_x0), mark(_x1), _x2))]] [[mark(c)]] = 0 >= 0 = [[active(c)]] [[mark(true)]] = 0 >= 0 = [[active(true)]] [[mark(false)]] = 4 > 2 = [[active(false)]] [[f(mark(_x0))]] = 6x0 >= 3x0 = [[f(_x0)]] [[f(active(_x0))]] = 3x0 >= 3x0 = [[f(_x0)]] [[if(mark(_x0), _x1, _x2)]] = 2x0 + 2x1 + 3x2 >= x0 + 2x1 + 3x2 = [[if(_x0, _x1, _x2)]] [[if(_x0, mark(_x1), _x2)]] = x0 + 3x2 + 4x1 >= x0 + 2x1 + 3x2 = [[if(_x0, _x1, _x2)]] [[if(_x0, _x1, mark(_x2))]] = x0 + 2x1 + 6x2 >= x0 + 2x1 + 3x2 = [[if(_x0, _x1, _x2)]] [[if(active(_x0), _x1, _x2)]] = x0 + 2x1 + 3x2 >= x0 + 2x1 + 3x2 = [[if(_x0, _x1, _x2)]] [[if(_x0, active(_x1), _x2)]] = x0 + 2x1 + 3x2 >= x0 + 2x1 + 3x2 = [[if(_x0, _x1, _x2)]] [[if(_x0, _x1, active(_x2))]] = x0 + 2x1 + 3x2 >= x0 + 2x1 + 3x2 = [[if(_x0, _x1, _x2)]] We can thus remove the following rules: active(if(false, X, Y)) => mark(Y) mark(false) => active(false) 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)) =#> mark#(if(X, c, f(true))) 1] active#(f(X)) =#> if#(X, c, f(true)) 2] active#(f(X)) =#> f#(true) 3] active#(if(true, X, Y)) =#> mark#(X) 4] mark#(f(X)) =#> active#(f(mark(X))) 5] mark#(f(X)) =#> f#(mark(X)) 6] mark#(f(X)) =#> mark#(X) 7] mark#(if(X, Y, Z)) =#> active#(if(mark(X), mark(Y), Z)) 8] mark#(if(X, Y, Z)) =#> if#(mark(X), mark(Y), Z) 9] mark#(if(X, Y, Z)) =#> mark#(X) 10] mark#(if(X, Y, Z)) =#> mark#(Y) 11] mark#(c) =#> active#(c) 12] mark#(true) =#> active#(true) 13] f#(mark(X)) =#> f#(X) 14] f#(active(X)) =#> f#(X) 15] if#(mark(X), Y, Z) =#> if#(X, Y, Z) 16] if#(X, mark(Y), Z) =#> if#(X, Y, Z) 17] if#(X, Y, mark(Z)) =#> if#(X, Y, Z) 18] if#(active(X), Y, Z) =#> if#(X, Y, Z) 19] if#(X, active(Y), Z) =#> if#(X, Y, Z) 20] if#(X, Y, active(Z)) =#> if#(X, Y, Z) Rules R_0: active(f(X)) => mark(if(X, c, f(true))) active(if(true, X, Y)) => mark(X) mark(f(X)) => active(f(mark(X))) mark(if(X, Y, Z)) => active(if(mark(X), mark(Y), Z)) mark(c) => active(c) mark(true) => active(true) f(mark(X)) => f(X) f(active(X)) => f(X) if(mark(X), Y, Z) => if(X, Y, Z) if(X, mark(Y), Z) => if(X, Y, Z) if(X, Y, mark(Z)) => if(X, Y, Z) if(active(X), Y, Z) => if(X, Y, Z) if(X, active(Y), Z) => if(X, Y, Z) if(X, Y, active(Z)) => if(X, Y, Z) 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, 10 * 1 : 15, 18 * 2 : * 3 : 4, 5, 6, 7, 8, 9, 10, 11, 12 * 4 : 0, 1, 2 * 5 : 13, 14 * 6 : 4, 5, 6, 7, 8, 9, 10, 11, 12 * 7 : 3 * 8 : 15, 16, 17, 18, 19, 20 * 9 : 4, 5, 6, 7, 8, 9, 10, 11, 12 * 10 : 4, 5, 6, 7, 8, 9, 10, 11, 12 * 11 : * 12 : * 13 : 13, 14 * 14 : 13, 14 * 15 : 15, 16, 17, 18, 19, 20 * 16 : 15, 16, 17, 18, 19, 20 * 17 : 15, 16, 17, 18, 19, 20 * 18 : 15, 16, 17, 18, 19, 20 * 19 : 15, 16, 17, 18, 19, 20 * 20 : 15, 16, 17, 18, 19, 20 This graph has the following strongly connected components: P_1: active#(f(X)) =#> mark#(if(X, c, f(true))) active#(if(true, X, Y)) =#> mark#(X) mark#(f(X)) =#> active#(f(mark(X))) mark#(f(X)) =#> mark#(X) mark#(if(X, Y, Z)) =#> active#(if(mark(X), mark(Y), Z)) mark#(if(X, Y, Z)) =#> mark#(X) mark#(if(X, Y, Z)) =#> mark#(Y) P_2: f#(mark(X)) =#> f#(X) f#(active(X)) =#> f#(X) P_3: if#(mark(X), Y, Z) =#> if#(X, Y, Z) if#(X, mark(Y), Z) =#> if#(X, Y, Z) if#(X, Y, mark(Z)) =#> if#(X, Y, Z) if#(active(X), Y, Z) =#> if#(X, Y, Z) if#(X, active(Y), Z) =#> if#(X, Y, Z) if#(X, Y, active(Z)) =#> if#(X, Y, Z) 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) and (P_3, 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) 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#(X, Y, mark(Z))) = X = X = nu(if#(X, Y, Z)) nu(if#(active(X), Y, Z)) = active(X) |> X = nu(if#(X, Y, Z)) nu(if#(X, active(Y), Z)) = X = X = nu(if#(X, Y, Z)) nu(if#(X, Y, active(Z))) = 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_4, R_0, minimal, f), where P_4 contains: if#(X, mark(Y), Z) =#> if#(X, Y, Z) if#(X, Y, mark(Z)) =#> if#(X, Y, Z) if#(X, active(Y), Z) =#> if#(X, Y, Z) if#(X, Y, active(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_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(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)) nu(if#(X, Y, mark(Z))) = Y = Y = nu(if#(X, Y, Z)) nu(if#(X, active(Y), Z)) = active(Y) |> Y = nu(if#(X, Y, Z)) nu(if#(X, Y, active(Z))) = Y = Y = nu(if#(X, Y, Z)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_4, R_0, minimal, f) by (P_5, R_0, minimal, f), where P_5 contains: if#(X, Y, mark(Z)) =#> if#(X, Y, Z) if#(X, Y, active(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_5, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_5, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(if#) = 3 Thus, we can orient the dependency pairs as follows: nu(if#(X, Y, mark(Z))) = mark(Z) |> Z = nu(if#(X, Y, Z)) nu(if#(X, Y, active(Z))) = active(Z) |> Z = nu(if#(X, Y, Z)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_5, 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#(active(X))) = active(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 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: active#(f(X)) >? mark#(if(X, c, f(true))) active#(if(true, X, Y)) >? mark#(X) mark#(f(X)) >? active#(f(mark(X))) mark#(f(X)) >? mark#(X) mark#(if(X, Y, Z)) >? active#(if(mark(X), mark(Y), Z)) mark#(if(X, Y, Z)) >? mark#(X) mark#(if(X, Y, Z)) >? mark#(Y) active(f(X)) >= mark(if(X, c, f(true))) active(if(true, X, Y)) >= mark(X) mark(f(X)) >= active(f(mark(X))) mark(if(X, Y, Z)) >= active(if(mark(X), mark(Y), Z)) mark(c) >= active(c) mark(true) >= active(true) f(mark(X)) >= f(X) f(active(X)) >= f(X) if(mark(X), Y, Z) >= if(X, Y, Z) if(X, mark(Y), Z) >= if(X, Y, Z) if(X, Y, mark(Z)) >= if(X, Y, Z) if(active(X), Y, Z) >= if(X, Y, Z) if(X, active(Y), Z) >= if(X, Y, Z) if(X, Y, active(Z)) >= 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 active# = \y0.y0 c = 0 f = \y0.1 + 2y0 if = \y0y1y2.y0 + 2y1 mark = \y0.2y0 mark# = \y0.1 + 2y0 true = 2 Using this interpretation, the requirements translate to: [[active#(f(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[mark#(if(_x0, c, f(true)))]] [[active#(if(true, _x0, _x1))]] = 2 + 2x0 > 1 + 2x0 = [[mark#(_x0)]] [[mark#(f(_x0))]] = 3 + 4x0 > 1 + 4x0 = [[active#(f(mark(_x0)))]] [[mark#(f(_x0))]] = 3 + 4x0 > 1 + 2x0 = [[mark#(_x0)]] [[mark#(if(_x0, _x1, _x2))]] = 1 + 2x0 + 4x1 > 2x0 + 4x1 = [[active#(if(mark(_x0), mark(_x1), _x2))]] [[mark#(if(_x0, _x1, _x2))]] = 1 + 2x0 + 4x1 >= 1 + 2x0 = [[mark#(_x0)]] [[mark#(if(_x0, _x1, _x2))]] = 1 + 2x0 + 4x1 >= 1 + 2x1 = [[mark#(_x1)]] [[active(f(_x0))]] = 1 + 2x0 >= 2x0 = [[mark(if(_x0, c, f(true)))]] [[active(if(true, _x0, _x1))]] = 2 + 2x0 >= 2x0 = [[mark(_x0)]] [[mark(f(_x0))]] = 2 + 4x0 >= 1 + 4x0 = [[active(f(mark(_x0)))]] [[mark(if(_x0, _x1, _x2))]] = 2x0 + 4x1 >= 2x0 + 4x1 = [[active(if(mark(_x0), mark(_x1), _x2))]] [[mark(c)]] = 0 >= 0 = [[active(c)]] [[mark(true)]] = 4 >= 2 = [[active(true)]] [[f(mark(_x0))]] = 1 + 4x0 >= 1 + 2x0 = [[f(_x0)]] [[f(active(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[f(_x0)]] [[if(mark(_x0), _x1, _x2)]] = 2x0 + 2x1 >= x0 + 2x1 = [[if(_x0, _x1, _x2)]] [[if(_x0, mark(_x1), _x2)]] = x0 + 4x1 >= x0 + 2x1 = [[if(_x0, _x1, _x2)]] [[if(_x0, _x1, mark(_x2))]] = x0 + 2x1 >= x0 + 2x1 = [[if(_x0, _x1, _x2)]] [[if(active(_x0), _x1, _x2)]] = x0 + 2x1 >= x0 + 2x1 = [[if(_x0, _x1, _x2)]] [[if(_x0, active(_x1), _x2)]] = x0 + 2x1 >= x0 + 2x1 = [[if(_x0, _x1, _x2)]] [[if(_x0, _x1, active(_x2))]] = x0 + 2x1 >= x0 + 2x1 = [[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_1, R_0, minimal, formative) by (P_6, R_0, minimal, formative), where P_6 consists of: active#(f(X)) =#> mark#(if(X, c, f(true))) mark#(if(X, Y, Z)) =#> mark#(X) mark#(if(X, Y, Z)) =#> mark#(Y) Thus, the original system is terminating if (P_6, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_6, 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 : 1, 2 * 1 : 1, 2 * 2 : 1, 2 This graph has the following strongly connected components: P_7: mark#(if(X, Y, Z)) =#> mark#(X) mark#(if(X, Y, Z)) =#> mark#(Y) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_6, R_0, m, f) by (P_7, R_0, m, f). Thus, the original system is terminating if (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(mark#) = 1 Thus, we can orient the dependency pairs as follows: nu(mark#(if(X, Y, Z))) = if(X, Y, Z) |> X = nu(mark#(X)) nu(mark#(if(X, Y, Z))) = if(X, Y, Z) |> Y = nu(mark#(Y)) 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. 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.