8.38/3.61 YES 9.98/4.12 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 9.98/4.12 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 9.98/4.12 9.98/4.12 9.98/4.12 H-Termination with start terms of the given HASKELL could be proven: 9.98/4.12 9.98/4.12 (0) HASKELL 9.98/4.12 (1) BR [EQUIVALENT, 0 ms] 9.98/4.12 (2) HASKELL 9.98/4.12 (3) COR [EQUIVALENT, 0 ms] 9.98/4.12 (4) HASKELL 9.98/4.12 (5) Narrow [SOUND, 0 ms] 9.98/4.12 (6) QDP 9.98/4.12 (7) QDPSizeChangeProof [EQUIVALENT, 0 ms] 9.98/4.12 (8) YES 9.98/4.12 9.98/4.12 9.98/4.12 ---------------------------------------- 9.98/4.12 9.98/4.12 (0) 9.98/4.12 Obligation: 9.98/4.12 mainModule Main 9.98/4.12 module Main where { 9.98/4.12 import qualified Prelude; 9.98/4.12 data List a = Cons a (List a) | Nil ; 9.98/4.12 9.98/4.12 data MyBool = MyTrue | MyFalse ; 9.98/4.12 9.98/4.12 data Tup2 a b = Tup2 a b ; 9.98/4.12 9.98/4.12 otherwise :: MyBool; 9.98/4.12 otherwise = MyTrue; 9.98/4.12 9.98/4.12 span :: (a -> MyBool) -> List a -> Tup2 (List a) (List a); 9.98/4.12 span p Nil = span3 p Nil; 9.98/4.12 span p (Cons vv vw) = span2 p (Cons vv vw); 9.98/4.12 9.98/4.12 span2 p (Cons vv vw) = span2Span1 p vw p vv vw (p vv); 9.98/4.12 9.98/4.12 span2Span0 wx wy p vv vw MyTrue = Tup2 Nil (Cons vv vw); 9.98/4.12 9.98/4.12 span2Span1 wx wy p vv vw MyTrue = Tup2 (Cons vv (span2Ys wx wy)) (span2Zs wx wy); 9.98/4.12 span2Span1 wx wy p vv vw MyFalse = span2Span0 wx wy p vv vw otherwise; 9.98/4.12 9.98/4.12 span2Vu43 wx wy = span wx wy; 9.98/4.12 9.98/4.12 span2Ys wx wy = span2Ys0 wx wy (span2Vu43 wx wy); 9.98/4.12 9.98/4.12 span2Ys0 wx wy (Tup2 ys vx) = ys; 9.98/4.12 9.98/4.12 span2Zs wx wy = span2Zs0 wx wy (span2Vu43 wx wy); 9.98/4.12 9.98/4.12 span2Zs0 wx wy (Tup2 vy zs) = zs; 9.98/4.12 9.98/4.12 span3 p Nil = Tup2 Nil Nil; 9.98/4.12 span3 wv ww = span2 wv ww; 9.98/4.12 9.98/4.12 } 9.98/4.12 9.98/4.12 ---------------------------------------- 9.98/4.12 9.98/4.12 (1) BR (EQUIVALENT) 9.98/4.12 Replaced joker patterns by fresh variables and removed binding patterns. 9.98/4.12 ---------------------------------------- 9.98/4.12 9.98/4.12 (2) 9.98/4.12 Obligation: 9.98/4.12 mainModule Main 9.98/4.12 module Main where { 9.98/4.12 import qualified Prelude; 9.98/4.12 data List a = Cons a (List a) | Nil ; 9.98/4.12 9.98/4.12 data MyBool = MyTrue | MyFalse ; 9.98/4.12 9.98/4.12 data Tup2 b a = Tup2 b a ; 9.98/4.12 9.98/4.12 otherwise :: MyBool; 9.98/4.12 otherwise = MyTrue; 9.98/4.12 9.98/4.12 span :: (a -> MyBool) -> List a -> Tup2 (List a) (List a); 9.98/4.12 span p Nil = span3 p Nil; 9.98/4.12 span p (Cons vv vw) = span2 p (Cons vv vw); 9.98/4.12 9.98/4.12 span2 p (Cons vv vw) = span2Span1 p vw p vv vw (p vv); 9.98/4.12 9.98/4.12 span2Span0 wx wy p vv vw MyTrue = Tup2 Nil (Cons vv vw); 9.98/4.12 9.98/4.12 span2Span1 wx wy p vv vw MyTrue = Tup2 (Cons vv (span2Ys wx wy)) (span2Zs wx wy); 9.98/4.12 span2Span1 wx wy p vv vw MyFalse = span2Span0 wx wy p vv vw otherwise; 9.98/4.12 9.98/4.12 span2Vu43 wx wy = span wx wy; 9.98/4.12 9.98/4.12 span2Ys wx wy = span2Ys0 wx wy (span2Vu43 wx wy); 9.98/4.12 9.98/4.12 span2Ys0 wx wy (Tup2 ys vx) = ys; 9.98/4.12 9.98/4.12 span2Zs wx wy = span2Zs0 wx wy (span2Vu43 wx wy); 9.98/4.12 9.98/4.12 span2Zs0 wx wy (Tup2 vy zs) = zs; 9.98/4.12 9.98/4.12 span3 p Nil = Tup2 Nil Nil; 9.98/4.12 span3 wv ww = span2 wv ww; 9.98/4.12 9.98/4.12 } 9.98/4.12 9.98/4.12 ---------------------------------------- 9.98/4.12 9.98/4.12 (3) COR (EQUIVALENT) 9.98/4.12 Cond Reductions: 9.98/4.12 The following Function with conditions 9.98/4.12 "undefined |Falseundefined; 9.98/4.12 " 9.98/4.12 is transformed to 9.98/4.12 "undefined = undefined1; 9.98/4.12 " 9.98/4.12 "undefined0 True = undefined; 9.98/4.12 " 9.98/4.12 "undefined1 = undefined0 False; 9.98/4.12 " 9.98/4.12 9.98/4.12 ---------------------------------------- 9.98/4.12 9.98/4.12 (4) 9.98/4.12 Obligation: 9.98/4.12 mainModule Main 9.98/4.12 module Main where { 9.98/4.12 import qualified Prelude; 9.98/4.12 data List a = Cons a (List a) | Nil ; 9.98/4.12 9.98/4.12 data MyBool = MyTrue | MyFalse ; 9.98/4.12 9.98/4.12 data Tup2 a b = Tup2 a b ; 9.98/4.12 9.98/4.12 otherwise :: MyBool; 9.98/4.12 otherwise = MyTrue; 9.98/4.12 9.98/4.12 span :: (a -> MyBool) -> List a -> Tup2 (List a) (List a); 9.98/4.12 span p Nil = span3 p Nil; 9.98/4.12 span p (Cons vv vw) = span2 p (Cons vv vw); 9.98/4.12 9.98/4.12 span2 p (Cons vv vw) = span2Span1 p vw p vv vw (p vv); 9.98/4.12 9.98/4.12 span2Span0 wx wy p vv vw MyTrue = Tup2 Nil (Cons vv vw); 9.98/4.12 9.98/4.12 span2Span1 wx wy p vv vw MyTrue = Tup2 (Cons vv (span2Ys wx wy)) (span2Zs wx wy); 9.98/4.12 span2Span1 wx wy p vv vw MyFalse = span2Span0 wx wy p vv vw otherwise; 9.98/4.12 9.98/4.12 span2Vu43 wx wy = span wx wy; 9.98/4.12 9.98/4.12 span2Ys wx wy = span2Ys0 wx wy (span2Vu43 wx wy); 9.98/4.12 9.98/4.12 span2Ys0 wx wy (Tup2 ys vx) = ys; 9.98/4.12 9.98/4.12 span2Zs wx wy = span2Zs0 wx wy (span2Vu43 wx wy); 9.98/4.12 9.98/4.12 span2Zs0 wx wy (Tup2 vy zs) = zs; 9.98/4.12 9.98/4.12 span3 p Nil = Tup2 Nil Nil; 9.98/4.12 span3 wv ww = span2 wv ww; 9.98/4.12 9.98/4.12 } 9.98/4.12 9.98/4.12 ---------------------------------------- 9.98/4.12 9.98/4.12 (5) Narrow (SOUND) 9.98/4.12 Haskell To QDPs 9.98/4.12 9.98/4.12 digraph dp_graph { 9.98/4.12 node [outthreshold=100, inthreshold=100];1[label="span",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 9.98/4.12 3[label="span wz3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 9.98/4.12 4[label="span wz3 wz4",fontsize=16,color="burlywood",shape="triangle"];39[label="wz4/Cons wz40 wz41",fontsize=10,color="white",style="solid",shape="box"];4 -> 39[label="",style="solid", color="burlywood", weight=9]; 9.98/4.12 39 -> 5[label="",style="solid", color="burlywood", weight=3]; 9.98/4.12 40[label="wz4/Nil",fontsize=10,color="white",style="solid",shape="box"];4 -> 40[label="",style="solid", color="burlywood", weight=9]; 9.98/4.12 40 -> 6[label="",style="solid", color="burlywood", weight=3]; 9.98/4.12 5[label="span wz3 (Cons wz40 wz41)",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 9.98/4.12 6[label="span wz3 Nil",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 9.98/4.12 7[label="span2 wz3 (Cons wz40 wz41)",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 9.98/4.12 8[label="span3 wz3 Nil",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 9.98/4.12 9 -> 11[label="",style="dashed", color="red", weight=0]; 9.98/4.12 9[label="span2Span1 wz3 wz41 wz3 wz40 wz41 (wz3 wz40)",fontsize=16,color="magenta"];9 -> 12[label="",style="dashed", color="magenta", weight=3]; 9.98/4.12 10[label="Tup2 Nil Nil",fontsize=16,color="green",shape="box"];12[label="wz3 wz40",fontsize=16,color="green",shape="box"];12 -> 16[label="",style="dashed", color="green", weight=3]; 9.98/4.12 11[label="span2Span1 wz3 wz41 wz3 wz40 wz41 wz5",fontsize=16,color="burlywood",shape="triangle"];41[label="wz5/MyTrue",fontsize=10,color="white",style="solid",shape="box"];11 -> 41[label="",style="solid", color="burlywood", weight=9]; 9.98/4.12 41 -> 14[label="",style="solid", color="burlywood", weight=3]; 9.98/4.12 42[label="wz5/MyFalse",fontsize=10,color="white",style="solid",shape="box"];11 -> 42[label="",style="solid", color="burlywood", weight=9]; 9.98/4.12 42 -> 15[label="",style="solid", color="burlywood", weight=3]; 9.98/4.12 16[label="wz40",fontsize=16,color="green",shape="box"];14[label="span2Span1 wz3 wz41 wz3 wz40 wz41 MyTrue",fontsize=16,color="black",shape="box"];14 -> 17[label="",style="solid", color="black", weight=3]; 9.98/4.12 15[label="span2Span1 wz3 wz41 wz3 wz40 wz41 MyFalse",fontsize=16,color="black",shape="box"];15 -> 18[label="",style="solid", color="black", weight=3]; 9.98/4.12 17[label="Tup2 (Cons wz40 (span2Ys wz3 wz41)) (span2Zs wz3 wz41)",fontsize=16,color="green",shape="box"];17 -> 19[label="",style="dashed", color="green", weight=3]; 9.98/4.12 17 -> 20[label="",style="dashed", color="green", weight=3]; 9.98/4.12 18[label="span2Span0 wz3 wz41 wz3 wz40 wz41 otherwise",fontsize=16,color="black",shape="box"];18 -> 21[label="",style="solid", color="black", weight=3]; 9.98/4.12 19[label="span2Ys wz3 wz41",fontsize=16,color="black",shape="box"];19 -> 22[label="",style="solid", color="black", weight=3]; 9.98/4.12 20[label="span2Zs wz3 wz41",fontsize=16,color="black",shape="box"];20 -> 23[label="",style="solid", color="black", weight=3]; 9.98/4.12 21[label="span2Span0 wz3 wz41 wz3 wz40 wz41 MyTrue",fontsize=16,color="black",shape="box"];21 -> 24[label="",style="solid", color="black", weight=3]; 9.98/4.12 22 -> 27[label="",style="dashed", color="red", weight=0]; 9.98/4.12 22[label="span2Ys0 wz3 wz41 (span2Vu43 wz3 wz41)",fontsize=16,color="magenta"];22 -> 28[label="",style="dashed", color="magenta", weight=3]; 9.98/4.12 23 -> 32[label="",style="dashed", color="red", weight=0]; 9.98/4.12 23[label="span2Zs0 wz3 wz41 (span2Vu43 wz3 wz41)",fontsize=16,color="magenta"];23 -> 33[label="",style="dashed", color="magenta", weight=3]; 9.98/4.12 24[label="Tup2 Nil (Cons wz40 wz41)",fontsize=16,color="green",shape="box"];28[label="span2Vu43 wz3 wz41",fontsize=16,color="black",shape="triangle"];28 -> 30[label="",style="solid", color="black", weight=3]; 9.98/4.12 27[label="span2Ys0 wz3 wz41 wz6",fontsize=16,color="burlywood",shape="triangle"];43[label="wz6/Tup2 wz60 wz61",fontsize=10,color="white",style="solid",shape="box"];27 -> 43[label="",style="solid", color="burlywood", weight=9]; 9.98/4.12 43 -> 31[label="",style="solid", color="burlywood", weight=3]; 9.98/4.12 33 -> 28[label="",style="dashed", color="red", weight=0]; 9.98/4.12 33[label="span2Vu43 wz3 wz41",fontsize=16,color="magenta"];32[label="span2Zs0 wz3 wz41 wz7",fontsize=16,color="burlywood",shape="triangle"];44[label="wz7/Tup2 wz70 wz71",fontsize=10,color="white",style="solid",shape="box"];32 -> 44[label="",style="solid", color="burlywood", weight=9]; 9.98/4.12 44 -> 35[label="",style="solid", color="burlywood", weight=3]; 9.98/4.12 30 -> 4[label="",style="dashed", color="red", weight=0]; 9.98/4.12 30[label="span wz3 wz41",fontsize=16,color="magenta"];30 -> 36[label="",style="dashed", color="magenta", weight=3]; 9.98/4.12 31[label="span2Ys0 wz3 wz41 (Tup2 wz60 wz61)",fontsize=16,color="black",shape="box"];31 -> 37[label="",style="solid", color="black", weight=3]; 9.98/4.12 35[label="span2Zs0 wz3 wz41 (Tup2 wz70 wz71)",fontsize=16,color="black",shape="box"];35 -> 38[label="",style="solid", color="black", weight=3]; 9.98/4.12 36[label="wz41",fontsize=16,color="green",shape="box"];37[label="wz60",fontsize=16,color="green",shape="box"];38[label="wz71",fontsize=16,color="green",shape="box"];} 9.98/4.12 9.98/4.12 ---------------------------------------- 9.98/4.12 9.98/4.12 (6) 9.98/4.12 Obligation: 9.98/4.12 Q DP problem: 9.98/4.12 The TRS P consists of the following rules: 9.98/4.12 9.98/4.12 new_span2Vu43(wz3, wz41, h) -> new_span(wz3, wz41, h) 9.98/4.12 new_span(wz3, Cons(wz40, wz41), h) -> new_span2Span1(wz3, wz41, wz40, h) 9.98/4.12 new_span2Span1(wz3, wz41, wz40, h) -> new_span(wz3, wz41, h) 9.98/4.12 new_span2Span1(wz3, wz41, wz40, h) -> new_span2Vu43(wz3, wz41, h) 9.98/4.12 9.98/4.12 R is empty. 9.98/4.12 Q is empty. 9.98/4.12 We have to consider all minimal (P,Q,R)-chains. 9.98/4.12 ---------------------------------------- 9.98/4.12 9.98/4.12 (7) QDPSizeChangeProof (EQUIVALENT) 9.98/4.12 By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 9.98/4.12 9.98/4.12 From the DPs we obtained the following set of size-change graphs: 9.98/4.12 *new_span(wz3, Cons(wz40, wz41), h) -> new_span2Span1(wz3, wz41, wz40, h) 9.98/4.12 The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3, 3 >= 4 9.98/4.12 9.98/4.12 9.98/4.12 *new_span2Span1(wz3, wz41, wz40, h) -> new_span2Vu43(wz3, wz41, h) 9.98/4.12 The graph contains the following edges 1 >= 1, 2 >= 2, 4 >= 3 9.98/4.12 9.98/4.12 9.98/4.12 *new_span2Span1(wz3, wz41, wz40, h) -> new_span(wz3, wz41, h) 9.98/4.12 The graph contains the following edges 1 >= 1, 2 >= 2, 4 >= 3 9.98/4.12 9.98/4.12 9.98/4.12 *new_span2Vu43(wz3, wz41, h) -> new_span(wz3, wz41, h) 9.98/4.12 The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3 9.98/4.12 9.98/4.12 9.98/4.12 ---------------------------------------- 9.98/4.12 9.98/4.12 (8) 9.98/4.12 YES 10.35/4.15 EOF