/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: append : [c * c] --> c cons : [b * c] --> c flatwith : [a -> b * b] --> c flatwithsub : [a -> b * c] --> c leaf : [a] --> b nil : [] --> c node : [c] --> b Rules: append(nil, x) => x append(cons(x, y), z) => cons(x, append(y, z)) flatwith(f, leaf(x)) => cons(f x, nil) flatwith(f, node(x)) => flatwithsub(f, x) flatwithsub(f, nil) => nil flatwithsub(f, cons(x, y)) => append(flatwith(f, x), flatwithsub(f, y)) This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): append(nil, X) >? X append(cons(X, Y), Z) >? cons(X, append(Y, Z)) flatwith(F, leaf(X)) >? cons(F X, nil) flatwith(F, node(X)) >? flatwithsub(F, X) flatwithsub(F, nil) >? nil flatwithsub(F, cons(X, Y)) >? append(flatwith(F, X), flatwithsub(F, Y)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: append = \y0y1.y0 + y1 cons = \y0y1.1 + y0 + y1 flatwith = \G0y1.y1 + G0(y1) + 2y1G0(y1) flatwithsub = \G0y1.y1 + G0(0) + G0(y1) + 2y1G0(y1) leaf = \y0.3 + 3y0 nil = 2 node = \y0.3 + 3y0 Using this interpretation, the requirements translate to: [[append(nil, _x0)]] = 2 + x0 > x0 = [[_x0]] [[append(cons(_x0, _x1), _x2)]] = 1 + x0 + x1 + x2 >= 1 + x0 + x1 + x2 = [[cons(_x0, append(_x1, _x2))]] [[flatwith(_F0, leaf(_x1))]] = 3 + 3x1 + 6x1F0(3 + 3x1) + 7F0(3 + 3x1) >= 3 + x1 + F0(x1) = [[cons(_F0 _x1, nil)]] [[flatwith(_F0, node(_x1))]] = 3 + 3x1 + 6x1F0(3 + 3x1) + 7F0(3 + 3x1) > x1 + F0(0) + F0(x1) + 2x1F0(x1) = [[flatwithsub(_F0, _x1)]] [[flatwithsub(_F0, nil)]] = 2 + F0(0) + 5F0(2) >= 2 = [[nil]] [[flatwithsub(_F0, cons(_x1, _x2))]] = 1 + x1 + x2 + F0(0) + 2x1F0(1 + x1 + x2) + 2x2F0(1 + x1 + x2) + 3F0(1 + x1 + x2) > x1 + x2 + F0(0) + F0(x1) + F0(x2) + 2x1F0(x1) + 2x2F0(x2) = [[append(flatwith(_F0, _x1), flatwithsub(_F0, _x2))]] We can thus remove the following rules: append(nil, X) => X flatwith(F, node(X)) => flatwithsub(F, X) flatwithsub(F, cons(X, Y)) => append(flatwith(F, X), flatwithsub(F, Y)) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): append(cons(X, Y), Z) >? cons(X, append(Y, Z)) flatwith(F, leaf(X)) >? cons(F X, nil) flatwithsub(F, nil) >? nil We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: append = \y0y1.y1 + 3y0 cons = \y0y1.y0 + y1 flatwith = \G0y1.3 + 3y1 + G0(0) + y1G0(y1) flatwithsub = \G0y1.3 + 3y1 + G0(0) leaf = \y0.3 + 3y0 nil = 0 Using this interpretation, the requirements translate to: [[append(cons(_x0, _x1), _x2)]] = x2 + 3x0 + 3x1 >= x0 + x2 + 3x1 = [[cons(_x0, append(_x1, _x2))]] [[flatwith(_F0, leaf(_x1))]] = 12 + 9x1 + F0(0) + 3x1F0(3 + 3x1) + 3F0(3 + 3x1) > x1 + F0(x1) = [[cons(_F0 _x1, nil)]] [[flatwithsub(_F0, nil)]] = 3 + F0(0) > 0 = [[nil]] We can thus remove the following rules: flatwith(F, leaf(X)) => cons(F X, nil) flatwithsub(F, nil) => nil We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): append(cons(X, Y), Z) >? cons(X, append(Y, Z)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: append = \y0y1.y1 + 3y0 cons = \y0y1.1 + y0 + y1 Using this interpretation, the requirements translate to: [[append(cons(_x0, _x1), _x2)]] = 3 + x2 + 3x0 + 3x1 > 1 + x0 + x2 + 3x1 = [[cons(_x0, append(_x1, _x2))]] We can thus remove the following rules: append(cons(X, Y), Z) => cons(X, append(Y, Z)) 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 +++ [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.