/export/starexec/sandbox2/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- MAYBE We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. 0 : [] --> o addList : [o * o] --> o addLists : [o * o * o] --> o append : [o * o] --> o cons : [o * o] --> o differentLengthError : [] --> o false : [] --> o head : [o] --> o if : [o * o * o * o * o * o * o * o * o] --> o inc : [o] --> o isEmpty : [o] --> o isZero : [o] --> o nil : [] --> o p : [o] --> o s : [o] --> o tail : [o] --> o true : [] --> o isEmpty(cons(X, Y)) => false isEmpty(nil) => true isZero(0) => true isZero(s(X)) => false head(cons(X, Y)) => X tail(cons(X, Y)) => Y tail(nil) => nil append(nil, X) => cons(X, nil) append(cons(X, Y), Z) => cons(X, append(Y, Z)) p(s(s(X))) => s(p(s(X))) p(s(0)) => 0 p(0) => 0 inc(s(X)) => s(inc(X)) inc(0) => s(0) addLists(X, Y, Z) => if(isEmpty(X), isEmpty(Y), isZero(head(X)), tail(X), tail(Y), cons(p(head(X)), tail(X)), cons(inc(head(Y)), tail(Y)), Z, append(Z, head(Y))) if(true, true, X, Y, Z, U, V, W, Q) => W if(true, false, X, Y, Z, U, V, W, Q) => differentLengthError if(false, true, X, Y, Z, U, V, W, Q) => differentLengthError if(false, false, false, X, Y, Z, U, V, W) => addLists(Z, U, V) if(false, false, true, X, Y, Z, U, V, W) => addLists(X, Y, W) addList(X, Y) => addLists(X, Y, nil) As the system is orthogonal, it is terminating if it is innermost terminating by [Gra95]. Then, by [FuhGieParSchSwi11], it suffices to prove (innermost) termination of the typed system, with sort annotations chosen to respect the rules, as follows: 0 : [] --> ye addList : [ci * ci] --> ci addLists : [ci * ci * ci] --> ci append : [ci * ye] --> ci cons : [ye * ci] --> ci differentLengthError : [] --> ci false : [] --> ff head : [ci] --> ye if : [ff * ff * ff * ci * ci * ci * ci * ci * ci] --> ci inc : [ye] --> ye isEmpty : [ci] --> ff isZero : [ye] --> ff nil : [] --> ci p : [ye] --> ye s : [ye] --> ye tail : [ci] --> ci true : [] --> ff +++ Citations +++ [FuhGieParSchSwi11] C. Fuhs, J. Giesl, M. Parting, P. Schneider-Kamp, and S. Swiderski. Proving Termination by Dependency Pairs and Inductive Theorem Proving. In volume 47(2) of Journal of Automated Reasoning. 133--160, 2011. [Gra95] B. Gramlich. Abstract Relations Between Restricted Termination and Confluence Properties of Rewrite Systems. In volume 24(1-2) of Fundamentae Informaticae. 3--23, 1995.