/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 add : [o * o] --> o app : [o * o] --> o false : [] --> o head : [o] --> o high : [o * o] --> o if!6220high : [o * o * o] --> o if!6220low : [o * o * o] --> o if!6220qs : [o * o * o * o] --> o isempty : [o] --> o le : [o * o] --> o low : [o * o] --> o nil : [] --> o quicksort : [o] --> o s : [o] --> o tail : [o] --> o true : [] --> o le(0, X) => true le(s(X), 0) => false le(s(X), s(Y)) => le(X, Y) app(nil, X) => X app(add(X, Y), Z) => add(X, app(Y, Z)) low(X, nil) => nil low(X, add(Y, Z)) => if!6220low(le(Y, X), X, add(Y, Z)) if!6220low(true, X, add(Y, Z)) => add(Y, low(X, Z)) if!6220low(false, X, add(Y, Z)) => low(X, Z) high(X, nil) => nil high(X, add(Y, Z)) => if!6220high(le(Y, X), X, add(Y, Z)) if!6220high(true, X, add(Y, Z)) => high(X, Z) if!6220high(false, X, add(Y, Z)) => add(Y, high(X, Z)) head(add(X, Y)) => X tail(add(X, Y)) => Y isempty(nil) => true isempty(add(X, Y)) => false quicksort(X) => if!6220qs(isempty(X), low(head(X), tail(X)), head(X), high(head(X), tail(X))) if!6220qs(true, X, Y, Z) => nil if!6220qs(false, X, Y, Z) => app(quicksort(X), add(Y, quicksort(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 : [] --> jh add : [jh * jh] --> jh app : [jh * jh] --> jh false : [] --> cg head : [jh] --> jh high : [jh * jh] --> jh if!6220high : [cg * jh * jh] --> jh if!6220low : [cg * jh * jh] --> jh if!6220qs : [cg * jh * jh * jh] --> jh isempty : [jh] --> cg le : [jh * jh] --> cg low : [jh * jh] --> jh nil : [] --> jh quicksort : [jh] --> jh s : [jh] --> jh tail : [jh] --> jh true : [] --> cg +++ 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.