/export/starexec/sandbox/solver/bin/starexec_run_HigherOrder /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. Alphabet: NIL : [] --> A in : [] --> N -> N -> A -> A new : [] --> N -> A -> A out : [] --> N -> N -> A -> A sum : [] --> A -> A -> A tau : [] --> A -> A Rules: sum NIL x => x new (/\x.y) => y new (/\x.sum (f x) (g x)) => sum (new (/\y.f y)) (new (/\z.g z)) new (/\x.out x y (f x)) => NIL new (/\x.out y z (f x)) => out y z (new (/\u.f u)) new (/\x.in y (/\z.f x z)) => in y (/\u.new (/\v.f v u)) new (/\x.tau (f x)) => tau (new (/\y.f y)) new (/\x.in x (/\y.f x y)) => NIL Using the transformations described in [Kop11], this system can be brought in a form without leading free variables in the left-hand side, and where the left-hand side of a variable is always a functional term or application headed by a functional term. We now transform the resulting AFS into an AFSM by replacing all free variables by meta-variables (with arity 0). This leads to the following AFSM: Alphabet: NIL : [] --> A in : [N * N -> A] --> A new : [N -> A] --> A out : [N * N * A] --> A sum : [A * A] --> A tau : [A] --> A ~AP1 : [N -> A * N] --> A ~AP2 : [N -> N -> A * N] --> N -> A Rules: sum(NIL, X) => X new(/\x.X) => X new(/\x.sum(~AP1(F, x), ~AP1(G, x))) => sum(new(/\y.~AP1(F, y)), new(/\z.~AP1(G, z))) new(/\x.out(x, X, ~AP1(F, x))) => NIL new(/\x.out(X, Y, ~AP1(F, x))) => out(X, Y, new(/\y.~AP1(F, y))) new(/\x.in(X, /\y.~AP1(~AP2(F, x), y))) => in(X, /\z.new(/\u.~AP1(~AP2(F, u), z))) new(/\x.tau(~AP1(F, x))) => tau(new(/\y.~AP1(F, y))) new(/\x.in(x, /\y.~AP1(~AP2(F, x), y))) => NIL ~AP1(F, X) => F X ~AP2(F, X) => F 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]): sum(NIL, X) >? X new(/\x.X) >? X new(/\x.sum(~AP1(F, x), ~AP1(G, x))) >? sum(new(/\y.~AP1(F, y)), new(/\z.~AP1(G, z))) new(/\x.out(x, X, ~AP1(F, x))) >? NIL new(/\x.out(X, Y, ~AP1(F, x))) >? out(X, Y, new(/\y.~AP1(F, y))) new(/\x.in(X, /\y.~AP1(~AP2(F, x), y))) >? in(X, /\z.new(/\u.~AP1(~AP2(F, u), z))) new(/\x.tau(~AP1(F, x))) >? tau(new(/\y.~AP1(F, y))) new(/\x.in(x, /\y.~AP1(~AP2(F, x), y))) >? NIL ~AP1(F, X) >? F X ~AP2(F, X) >? F X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: NIL = 0 in = \y0G1.3 + y0 + 2G1(y0) new = \G0.3G0(0) out = \y0y1y2.3 + y1 + 2y0 + 2y2 sum = \y0y1.3 + y0 + y1 tau = \y0.3 + y0 ~AP1 = \G0y1.3 + 2y1 + G0(0) + G0(y1) ~AP2 = \G0y1y2.3 + y1 + 2G0(y1,y2) Using this interpretation, the requirements translate to: [[sum(NIL, _x0)]] = 3 + x0 > x0 = [[_x0]] [[new(/\x._x0)]] = 3x0 >= x0 = [[_x0]] [[new(/\x.sum(~AP1(_F0, x), ~AP1(_F1, x)))]] = 27 + 6F0(0) + 6F1(0) > 21 + 6F0(0) + 6F1(0) = [[sum(new(/\x.~AP1(_F0, x)), new(/\y.~AP1(_F1, y)))]] [[new(/\x.out(x, _x0, ~AP1(_F1, x)))]] = 27 + 3x0 + 12F1(0) > 0 = [[NIL]] [[new(/\x.out(_x0, _x1, ~AP1(_F2, x)))]] = 27 + 3x1 + 6x0 + 12F2(0) > 21 + x1 + 2x0 + 12F2(0) = [[out(_x0, _x1, new(/\x.~AP1(_F2, x)))]] [[new(/\x.in(_x0, /\y.~AP1(~AP2(_F1, x), y)))]] = 63 + 15x0 + 12F1(0,0) + 12F1(0,x0) > 57 + 13x0 + 12F1(0,0) + 12F1(0,x0) = [[in(_x0, /\x.new(/\y.~AP1(~AP2(_F1, y), x)))]] [[new(/\x.tau(~AP1(_F0, x)))]] = 18 + 6F0(0) > 12 + 6F0(0) = [[tau(new(/\x.~AP1(_F0, x)))]] [[new(/\x.in(x, /\y.~AP1(~AP2(_F0, x), y)))]] = 63 + 24F0(0,0) > 0 = [[NIL]] [[~AP1(_F0, _x1)]] = 3 + 2x1 + F0(0) + F0(x1) > x1 + F0(x1) = [[_F0 _x1]] [[~AP2(_F0, _x1)]] = \y0.3 + x1 + 2F0(x1,y0) > \y0.x1 + F0(x1,y0) = [[_F0 _x1]] We can thus remove the following rules: sum(NIL, X) => X new(/\x.sum(~AP1(F, x), ~AP1(G, x))) => sum(new(/\y.~AP1(F, y)), new(/\z.~AP1(G, z))) new(/\x.out(x, X, ~AP1(F, x))) => NIL new(/\x.out(X, Y, ~AP1(F, x))) => out(X, Y, new(/\y.~AP1(F, y))) new(/\x.in(X, /\y.~AP1(~AP2(F, x), y))) => in(X, /\z.new(/\u.~AP1(~AP2(F, u), z))) new(/\x.tau(~AP1(F, x))) => tau(new(/\y.~AP1(F, y))) new(/\x.in(x, /\y.~AP1(~AP2(F, x), y))) => NIL ~AP1(F, X) => F X ~AP2(F, X) => F 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]): new(/\x.X) >? X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: new = \G0.1 + G0(0) Using this interpretation, the requirements translate to: [[new(/\x._x0)]] = 1 + x0 > x0 = [[_x0]] We can thus remove the following rules: new(/\x.X) => X All rules were succesfully removed. Thus, termination of the original system has been reduced to termination of the beta-rule, which is well-known to hold. +++ Citations +++ [Kop11] C. Kop. Simplifying Algebraic Functional Systems. In Proceedings of CAI 2011, volume 6742 of LNCS. 201--215, Springer, 2011. [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.