/export/starexec/sandbox/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- MAYBE We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. 0 : [] --> o cadr : [o] --> o car : [o] --> o cddr : [o] --> o cons : [o * o] --> o false : [] --> o if : [o * o * o] --> o if2 : [o * o] --> o ifplus : [o * o * o] --> o iftimes : [o * o * o] --> o isZero : [o] --> o nil : [] --> o p : [o] --> o plus : [o * o] --> o prod : [o] --> o s : [o] --> o shorter : [o * o] --> o times : [o * o] --> o true : [] --> o car(cons(X, Y)) => X cddr(nil) => nil cddr(cons(X, nil)) => nil cddr(cons(X, cons(Y, Z))) => Z cadr(cons(X, cons(Y, Z))) => Y isZero(0) => true isZero(s(X)) => false plus(X, Y) => ifplus(isZero(X), X, Y) ifplus(true, X, Y) => Y ifplus(false, X, Y) => s(plus(p(X), Y)) times(X, Y) => iftimes(isZero(X), X, Y) iftimes(true, X, Y) => 0 iftimes(false, X, Y) => plus(Y, times(p(X), Y)) p(s(X)) => X p(0) => 0 shorter(nil, X) => true shorter(cons(X, Y), 0) => false shorter(cons(X, Y), s(Z)) => shorter(Y, Z) prod(X) => if(shorter(X, 0), shorter(X, s(0)), X) if(true, X, Y) => s(0) if(false, X, Y) => if2(X, Y) if2(true, X) => car(X) if2(false, X) => prod(cons(times(car(X), cadr(X)), cddr(X))) 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 : [] --> fh cadr : [eh] --> fh car : [eh] --> fh cddr : [eh] --> eh cons : [fh * eh] --> eh false : [] --> zf if : [zf * zf * eh] --> fh if2 : [zf * eh] --> fh ifplus : [zf * fh * fh] --> fh iftimes : [zf * fh * fh] --> fh isZero : [fh] --> zf nil : [] --> eh p : [fh] --> fh plus : [fh * fh] --> fh prod : [eh] --> fh s : [fh] --> fh shorter : [eh * fh] --> zf times : [fh * fh] --> fh true : [] --> zf +++ 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.