/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 1 : [] --> o bin2s : [o] --> o bin2ss : [o * o] --> o bug!6220list!6220not : [] --> o cons : [o * o] --> o double : [o] --> o eq : [o * o] --> o false : [] --> o half : [o] --> o if1 : [o * o * o * o] --> o if2 : [o * o * o * o] --> o log : [o] --> o lt : [o * o] --> o more : [o] --> o nil : [] --> o s : [o] --> o s2bin : [o] --> o s2bin1 : [o * o * o] --> o s2bin2 : [o * o] --> o true : [] --> o eq(0, 0) => true eq(0, s(X)) => false eq(s(X), 0) => false eq(s(X), s(Y)) => eq(X, Y) lt(0, s(X)) => true lt(X, 0) => false lt(s(X), s(Y)) => lt(X, Y) bin2s(nil) => 0 bin2s(cons(X, Y)) => bin2ss(X, Y) bin2ss(X, nil) => X bin2ss(X, cons(0, Y)) => bin2ss(double(X), Y) bin2ss(X, cons(1, Y)) => bin2ss(s(double(X)), Y) half(0) => 0 half(s(0)) => 0 half(s(s(X))) => s(half(X)) log(0) => 0 log(s(0)) => 0 log(s(s(X))) => s(log(half(s(s(X))))) more(nil) => nil more(cons(X, Y)) => cons(cons(0, X), cons(cons(1, X), cons(X, Y))) s2bin(X) => s2bin1(X, 0, cons(nil, nil)) s2bin1(X, Y, Z) => if1(lt(Y, log(X)), X, Y, Z) if1(true, X, Y, Z) => s2bin1(X, s(Y), more(Z)) if1(false, X, Y, Z) => s2bin2(X, Z) s2bin2(X, nil) => bug!6220list!6220not s2bin2(X, cons(Y, Z)) => if2(eq(X, bin2s(Y)), X, Y, Z) if2(true, X, Y, Z) => Y if2(false, X, Y, Z) => s2bin2(X, Z) 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 : [] --> lj 1 : [] --> lj bin2s : [lj] --> lj bin2ss : [lj * lj] --> lj bug!6220list!6220not : [] --> lj cons : [lj * lj] --> lj double : [lj] --> lj eq : [lj * lj] --> ri false : [] --> ri half : [lj] --> lj if1 : [ri * lj * lj * lj] --> lj if2 : [ri * lj * lj * lj] --> lj log : [lj] --> lj lt : [lj * lj] --> ri more : [lj] --> lj nil : [] --> lj s : [lj] --> lj s2bin : [lj] --> lj s2bin1 : [lj * lj * lj] --> lj s2bin2 : [lj * lj] --> lj true : [] --> ri +++ 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.