7.69/3.56 YES 9.39/4.06 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 9.39/4.06 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 9.39/4.06 9.39/4.06 9.39/4.06 H-Termination with start terms of the given HASKELL could be proven: 9.39/4.06 9.39/4.06 (0) HASKELL 9.39/4.06 (1) BR [EQUIVALENT, 0 ms] 9.39/4.06 (2) HASKELL 9.39/4.06 (3) COR [EQUIVALENT, 0 ms] 9.39/4.06 (4) HASKELL 9.39/4.06 (5) Narrow [EQUIVALENT, 34 ms] 9.39/4.06 (6) YES 9.39/4.06 9.39/4.06 9.39/4.06 ---------------------------------------- 9.39/4.06 9.39/4.06 (0) 9.39/4.06 Obligation: 9.39/4.06 mainModule Main 9.39/4.06 module Main where { 9.39/4.06 import qualified Prelude; 9.39/4.06 data MyBool = MyTrue | MyFalse ; 9.39/4.06 9.39/4.06 data Ordering = LT | EQ | GT ; 9.39/4.06 9.39/4.06 compare0 x y MyTrue = GT; 9.39/4.06 9.39/4.06 compare1 x y MyTrue = LT; 9.39/4.06 compare1 x y MyFalse = compare0 x y otherwise; 9.39/4.06 9.39/4.06 compare2 x y MyTrue = EQ; 9.39/4.06 compare2 x y MyFalse = compare1 x y (ltEsOrdering x y); 9.39/4.06 9.39/4.06 compare3 x y = compare2 x y (esEsOrdering x y); 9.39/4.06 9.39/4.06 compareOrdering :: Ordering -> Ordering -> Ordering; 9.39/4.06 compareOrdering x y = compare3 x y; 9.39/4.06 9.39/4.06 esEsOrdering :: Ordering -> Ordering -> MyBool; 9.39/4.06 esEsOrdering LT LT = MyTrue; 9.39/4.06 esEsOrdering LT EQ = MyFalse; 9.39/4.06 esEsOrdering LT GT = MyFalse; 9.39/4.06 esEsOrdering EQ LT = MyFalse; 9.39/4.06 esEsOrdering EQ EQ = MyTrue; 9.39/4.06 esEsOrdering EQ GT = MyFalse; 9.39/4.06 esEsOrdering GT LT = MyFalse; 9.39/4.06 esEsOrdering GT EQ = MyFalse; 9.39/4.06 esEsOrdering GT GT = MyTrue; 9.39/4.06 9.39/4.06 gtOrdering :: Ordering -> Ordering -> MyBool; 9.39/4.06 gtOrdering x y = esEsOrdering (compareOrdering x y) GT; 9.39/4.06 9.39/4.06 ltEsOrdering :: Ordering -> Ordering -> MyBool; 9.39/4.06 ltEsOrdering LT LT = MyTrue; 9.39/4.06 ltEsOrdering LT EQ = MyTrue; 9.39/4.06 ltEsOrdering LT GT = MyTrue; 9.39/4.06 ltEsOrdering EQ LT = MyFalse; 9.39/4.06 ltEsOrdering EQ EQ = MyTrue; 9.39/4.06 ltEsOrdering EQ GT = MyTrue; 9.39/4.06 ltEsOrdering GT LT = MyFalse; 9.39/4.06 ltEsOrdering GT EQ = MyFalse; 9.39/4.06 ltEsOrdering GT GT = MyTrue; 9.39/4.06 9.39/4.06 otherwise :: MyBool; 9.39/4.06 otherwise = MyTrue; 9.39/4.06 9.39/4.06 } 9.39/4.06 9.39/4.06 ---------------------------------------- 9.39/4.06 9.39/4.06 (1) BR (EQUIVALENT) 9.39/4.06 Replaced joker patterns by fresh variables and removed binding patterns. 9.39/4.06 ---------------------------------------- 9.39/4.06 9.39/4.06 (2) 9.39/4.06 Obligation: 9.39/4.06 mainModule Main 9.39/4.06 module Main where { 9.39/4.06 import qualified Prelude; 9.39/4.06 data MyBool = MyTrue | MyFalse ; 9.39/4.06 9.39/4.06 data Ordering = LT | EQ | GT ; 9.39/4.06 9.39/4.06 compare0 x y MyTrue = GT; 9.39/4.06 9.39/4.06 compare1 x y MyTrue = LT; 9.39/4.06 compare1 x y MyFalse = compare0 x y otherwise; 9.39/4.06 9.39/4.06 compare2 x y MyTrue = EQ; 9.39/4.06 compare2 x y MyFalse = compare1 x y (ltEsOrdering x y); 9.39/4.06 9.39/4.06 compare3 x y = compare2 x y (esEsOrdering x y); 9.39/4.06 9.39/4.06 compareOrdering :: Ordering -> Ordering -> Ordering; 9.39/4.06 compareOrdering x y = compare3 x y; 9.39/4.06 9.39/4.06 esEsOrdering :: Ordering -> Ordering -> MyBool; 9.39/4.06 esEsOrdering LT LT = MyTrue; 9.39/4.06 esEsOrdering LT EQ = MyFalse; 9.39/4.06 esEsOrdering LT GT = MyFalse; 9.39/4.06 esEsOrdering EQ LT = MyFalse; 9.39/4.06 esEsOrdering EQ EQ = MyTrue; 9.39/4.06 esEsOrdering EQ GT = MyFalse; 9.39/4.06 esEsOrdering GT LT = MyFalse; 9.39/4.06 esEsOrdering GT EQ = MyFalse; 9.39/4.06 esEsOrdering GT GT = MyTrue; 9.39/4.06 9.39/4.06 gtOrdering :: Ordering -> Ordering -> MyBool; 9.39/4.06 gtOrdering x y = esEsOrdering (compareOrdering x y) GT; 9.39/4.06 9.39/4.06 ltEsOrdering :: Ordering -> Ordering -> MyBool; 9.39/4.06 ltEsOrdering LT LT = MyTrue; 9.39/4.06 ltEsOrdering LT EQ = MyTrue; 9.39/4.06 ltEsOrdering LT GT = MyTrue; 9.39/4.06 ltEsOrdering EQ LT = MyFalse; 9.39/4.06 ltEsOrdering EQ EQ = MyTrue; 9.39/4.06 ltEsOrdering EQ GT = MyTrue; 9.39/4.06 ltEsOrdering GT LT = MyFalse; 9.39/4.06 ltEsOrdering GT EQ = MyFalse; 9.39/4.06 ltEsOrdering GT GT = MyTrue; 9.39/4.06 9.39/4.06 otherwise :: MyBool; 9.39/4.06 otherwise = MyTrue; 9.39/4.06 9.39/4.06 } 9.39/4.06 9.39/4.06 ---------------------------------------- 9.39/4.06 9.39/4.06 (3) COR (EQUIVALENT) 9.39/4.06 Cond Reductions: 9.39/4.06 The following Function with conditions 9.39/4.06 "undefined |Falseundefined; 9.39/4.06 " 9.39/4.06 is transformed to 9.39/4.06 "undefined = undefined1; 9.39/4.06 " 9.39/4.06 "undefined0 True = undefined; 9.39/4.06 " 9.39/4.06 "undefined1 = undefined0 False; 9.39/4.06 " 9.39/4.06 9.39/4.06 ---------------------------------------- 9.39/4.06 9.39/4.06 (4) 9.39/4.06 Obligation: 9.39/4.06 mainModule Main 9.39/4.06 module Main where { 9.39/4.06 import qualified Prelude; 9.39/4.06 data MyBool = MyTrue | MyFalse ; 9.39/4.06 9.39/4.06 data Ordering = LT | EQ | GT ; 9.39/4.06 9.39/4.06 compare0 x y MyTrue = GT; 9.39/4.06 9.39/4.06 compare1 x y MyTrue = LT; 9.39/4.06 compare1 x y MyFalse = compare0 x y otherwise; 9.39/4.06 9.39/4.06 compare2 x y MyTrue = EQ; 9.39/4.06 compare2 x y MyFalse = compare1 x y (ltEsOrdering x y); 9.39/4.06 9.39/4.06 compare3 x y = compare2 x y (esEsOrdering x y); 9.39/4.06 9.39/4.06 compareOrdering :: Ordering -> Ordering -> Ordering; 9.39/4.06 compareOrdering x y = compare3 x y; 9.39/4.06 9.39/4.06 esEsOrdering :: Ordering -> Ordering -> MyBool; 9.39/4.06 esEsOrdering LT LT = MyTrue; 9.39/4.06 esEsOrdering LT EQ = MyFalse; 9.39/4.06 esEsOrdering LT GT = MyFalse; 9.39/4.06 esEsOrdering EQ LT = MyFalse; 9.39/4.06 esEsOrdering EQ EQ = MyTrue; 9.39/4.06 esEsOrdering EQ GT = MyFalse; 9.39/4.06 esEsOrdering GT LT = MyFalse; 9.39/4.06 esEsOrdering GT EQ = MyFalse; 9.39/4.06 esEsOrdering GT GT = MyTrue; 9.39/4.06 9.39/4.06 gtOrdering :: Ordering -> Ordering -> MyBool; 9.39/4.06 gtOrdering x y = esEsOrdering (compareOrdering x y) GT; 9.39/4.06 9.39/4.06 ltEsOrdering :: Ordering -> Ordering -> MyBool; 9.39/4.06 ltEsOrdering LT LT = MyTrue; 9.39/4.06 ltEsOrdering LT EQ = MyTrue; 9.39/4.06 ltEsOrdering LT GT = MyTrue; 9.39/4.06 ltEsOrdering EQ LT = MyFalse; 9.39/4.06 ltEsOrdering EQ EQ = MyTrue; 9.39/4.06 ltEsOrdering EQ GT = MyTrue; 9.39/4.06 ltEsOrdering GT LT = MyFalse; 9.39/4.06 ltEsOrdering GT EQ = MyFalse; 9.39/4.06 ltEsOrdering GT GT = MyTrue; 9.39/4.06 9.39/4.06 otherwise :: MyBool; 9.39/4.06 otherwise = MyTrue; 9.39/4.06 9.39/4.06 } 9.39/4.06 9.39/4.06 ---------------------------------------- 9.39/4.06 9.39/4.06 (5) Narrow (EQUIVALENT) 9.39/4.06 Haskell To QDPs 9.39/4.06 9.39/4.06 digraph dp_graph { 9.39/4.06 node [outthreshold=100, inthreshold=100];1[label="gtOrdering",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 9.39/4.06 3[label="gtOrdering vx3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 9.39/4.06 4[label="gtOrdering vx3 vx4",fontsize=16,color="black",shape="triangle"];4 -> 5[label="",style="solid", color="black", weight=3]; 9.39/4.06 5[label="esEsOrdering (compareOrdering vx3 vx4) GT",fontsize=16,color="black",shape="box"];5 -> 6[label="",style="solid", color="black", weight=3]; 9.39/4.06 6[label="esEsOrdering (compare3 vx3 vx4) GT",fontsize=16,color="black",shape="box"];6 -> 7[label="",style="solid", color="black", weight=3]; 9.39/4.06 7[label="esEsOrdering (compare2 vx3 vx4 (esEsOrdering vx3 vx4)) GT",fontsize=16,color="burlywood",shape="box"];59[label="vx3/LT",fontsize=10,color="white",style="solid",shape="box"];7 -> 59[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 59 -> 8[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 60[label="vx3/EQ",fontsize=10,color="white",style="solid",shape="box"];7 -> 60[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 60 -> 9[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 61[label="vx3/GT",fontsize=10,color="white",style="solid",shape="box"];7 -> 61[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 61 -> 10[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 8[label="esEsOrdering (compare2 LT vx4 (esEsOrdering LT vx4)) GT",fontsize=16,color="burlywood",shape="box"];62[label="vx4/LT",fontsize=10,color="white",style="solid",shape="box"];8 -> 62[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 62 -> 11[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 63[label="vx4/EQ",fontsize=10,color="white",style="solid",shape="box"];8 -> 63[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 63 -> 12[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 64[label="vx4/GT",fontsize=10,color="white",style="solid",shape="box"];8 -> 64[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 64 -> 13[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 9[label="esEsOrdering (compare2 EQ vx4 (esEsOrdering EQ vx4)) GT",fontsize=16,color="burlywood",shape="box"];65[label="vx4/LT",fontsize=10,color="white",style="solid",shape="box"];9 -> 65[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 65 -> 14[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 66[label="vx4/EQ",fontsize=10,color="white",style="solid",shape="box"];9 -> 66[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 66 -> 15[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 67[label="vx4/GT",fontsize=10,color="white",style="solid",shape="box"];9 -> 67[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 67 -> 16[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 10[label="esEsOrdering (compare2 GT vx4 (esEsOrdering GT vx4)) GT",fontsize=16,color="burlywood",shape="box"];68[label="vx4/LT",fontsize=10,color="white",style="solid",shape="box"];10 -> 68[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 68 -> 17[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 69[label="vx4/EQ",fontsize=10,color="white",style="solid",shape="box"];10 -> 69[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 69 -> 18[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 70[label="vx4/GT",fontsize=10,color="white",style="solid",shape="box"];10 -> 70[label="",style="solid", color="burlywood", weight=9]; 9.39/4.06 70 -> 19[label="",style="solid", color="burlywood", weight=3]; 9.39/4.06 11[label="esEsOrdering (compare2 LT LT (esEsOrdering LT LT)) GT",fontsize=16,color="black",shape="box"];11 -> 20[label="",style="solid", color="black", weight=3]; 9.39/4.06 12[label="esEsOrdering (compare2 LT EQ (esEsOrdering LT EQ)) GT",fontsize=16,color="black",shape="box"];12 -> 21[label="",style="solid", color="black", weight=3]; 9.39/4.06 13[label="esEsOrdering (compare2 LT GT (esEsOrdering LT GT)) GT",fontsize=16,color="black",shape="box"];13 -> 22[label="",style="solid", color="black", weight=3]; 9.39/4.06 14[label="esEsOrdering (compare2 EQ LT (esEsOrdering EQ LT)) GT",fontsize=16,color="black",shape="box"];14 -> 23[label="",style="solid", color="black", weight=3]; 9.39/4.06 15[label="esEsOrdering (compare2 EQ EQ (esEsOrdering EQ EQ)) GT",fontsize=16,color="black",shape="box"];15 -> 24[label="",style="solid", color="black", weight=3]; 9.39/4.06 16[label="esEsOrdering (compare2 EQ GT (esEsOrdering EQ GT)) GT",fontsize=16,color="black",shape="box"];16 -> 25[label="",style="solid", color="black", weight=3]; 9.39/4.06 17[label="esEsOrdering (compare2 GT LT (esEsOrdering GT LT)) GT",fontsize=16,color="black",shape="box"];17 -> 26[label="",style="solid", color="black", weight=3]; 9.39/4.06 18[label="esEsOrdering (compare2 GT EQ (esEsOrdering GT EQ)) GT",fontsize=16,color="black",shape="box"];18 -> 27[label="",style="solid", color="black", weight=3]; 9.39/4.06 19[label="esEsOrdering (compare2 GT GT (esEsOrdering GT GT)) GT",fontsize=16,color="black",shape="box"];19 -> 28[label="",style="solid", color="black", weight=3]; 9.39/4.06 20[label="esEsOrdering (compare2 LT LT MyTrue) GT",fontsize=16,color="black",shape="box"];20 -> 29[label="",style="solid", color="black", weight=3]; 9.39/4.06 21[label="esEsOrdering (compare2 LT EQ MyFalse) GT",fontsize=16,color="black",shape="box"];21 -> 30[label="",style="solid", color="black", weight=3]; 9.39/4.06 22[label="esEsOrdering (compare2 LT GT MyFalse) GT",fontsize=16,color="black",shape="box"];22 -> 31[label="",style="solid", color="black", weight=3]; 9.39/4.06 23[label="esEsOrdering (compare2 EQ LT MyFalse) GT",fontsize=16,color="black",shape="box"];23 -> 32[label="",style="solid", color="black", weight=3]; 9.39/4.06 24[label="esEsOrdering (compare2 EQ EQ MyTrue) GT",fontsize=16,color="black",shape="box"];24 -> 33[label="",style="solid", color="black", weight=3]; 9.39/4.06 25[label="esEsOrdering (compare2 EQ GT MyFalse) GT",fontsize=16,color="black",shape="box"];25 -> 34[label="",style="solid", color="black", weight=3]; 9.39/4.06 26[label="esEsOrdering (compare2 GT LT MyFalse) GT",fontsize=16,color="black",shape="box"];26 -> 35[label="",style="solid", color="black", weight=3]; 9.39/4.06 27[label="esEsOrdering (compare2 GT EQ MyFalse) GT",fontsize=16,color="black",shape="box"];27 -> 36[label="",style="solid", color="black", weight=3]; 9.39/4.06 28[label="esEsOrdering (compare2 GT GT MyTrue) GT",fontsize=16,color="black",shape="box"];28 -> 37[label="",style="solid", color="black", weight=3]; 9.39/4.06 29[label="esEsOrdering EQ GT",fontsize=16,color="black",shape="triangle"];29 -> 38[label="",style="solid", color="black", weight=3]; 9.39/4.06 30[label="esEsOrdering (compare1 LT EQ (ltEsOrdering LT EQ)) GT",fontsize=16,color="black",shape="box"];30 -> 39[label="",style="solid", color="black", weight=3]; 9.39/4.06 31[label="esEsOrdering (compare1 LT GT (ltEsOrdering LT GT)) GT",fontsize=16,color="black",shape="box"];31 -> 40[label="",style="solid", color="black", weight=3]; 9.39/4.06 32[label="esEsOrdering (compare1 EQ LT (ltEsOrdering EQ LT)) GT",fontsize=16,color="black",shape="box"];32 -> 41[label="",style="solid", color="black", weight=3]; 9.39/4.06 33 -> 29[label="",style="dashed", color="red", weight=0]; 9.39/4.06 33[label="esEsOrdering EQ GT",fontsize=16,color="magenta"];34[label="esEsOrdering (compare1 EQ GT (ltEsOrdering EQ GT)) GT",fontsize=16,color="black",shape="box"];34 -> 42[label="",style="solid", color="black", weight=3]; 9.39/4.06 35[label="esEsOrdering (compare1 GT LT (ltEsOrdering GT LT)) GT",fontsize=16,color="black",shape="box"];35 -> 43[label="",style="solid", color="black", weight=3]; 9.39/4.06 36[label="esEsOrdering (compare1 GT EQ (ltEsOrdering GT EQ)) GT",fontsize=16,color="black",shape="box"];36 -> 44[label="",style="solid", color="black", weight=3]; 9.39/4.06 37 -> 29[label="",style="dashed", color="red", weight=0]; 9.39/4.06 37[label="esEsOrdering EQ GT",fontsize=16,color="magenta"];38[label="MyFalse",fontsize=16,color="green",shape="box"];39[label="esEsOrdering (compare1 LT EQ MyTrue) GT",fontsize=16,color="black",shape="box"];39 -> 45[label="",style="solid", color="black", weight=3]; 9.39/4.06 40[label="esEsOrdering (compare1 LT GT MyTrue) GT",fontsize=16,color="black",shape="box"];40 -> 46[label="",style="solid", color="black", weight=3]; 9.39/4.06 41[label="esEsOrdering (compare1 EQ LT MyFalse) GT",fontsize=16,color="black",shape="box"];41 -> 47[label="",style="solid", color="black", weight=3]; 9.39/4.06 42[label="esEsOrdering (compare1 EQ GT MyTrue) GT",fontsize=16,color="black",shape="box"];42 -> 48[label="",style="solid", color="black", weight=3]; 9.39/4.06 43[label="esEsOrdering (compare1 GT LT MyFalse) GT",fontsize=16,color="black",shape="box"];43 -> 49[label="",style="solid", color="black", weight=3]; 9.39/4.06 44[label="esEsOrdering (compare1 GT EQ MyFalse) GT",fontsize=16,color="black",shape="box"];44 -> 50[label="",style="solid", color="black", weight=3]; 9.39/4.06 45[label="esEsOrdering LT GT",fontsize=16,color="black",shape="triangle"];45 -> 51[label="",style="solid", color="black", weight=3]; 9.39/4.06 46 -> 45[label="",style="dashed", color="red", weight=0]; 9.39/4.06 46[label="esEsOrdering LT GT",fontsize=16,color="magenta"];47[label="esEsOrdering (compare0 EQ LT otherwise) GT",fontsize=16,color="black",shape="box"];47 -> 52[label="",style="solid", color="black", weight=3]; 9.39/4.06 48 -> 45[label="",style="dashed", color="red", weight=0]; 9.39/4.06 48[label="esEsOrdering LT GT",fontsize=16,color="magenta"];49[label="esEsOrdering (compare0 GT LT otherwise) GT",fontsize=16,color="black",shape="box"];49 -> 53[label="",style="solid", color="black", weight=3]; 9.39/4.06 50[label="esEsOrdering (compare0 GT EQ otherwise) GT",fontsize=16,color="black",shape="box"];50 -> 54[label="",style="solid", color="black", weight=3]; 9.39/4.06 51[label="MyFalse",fontsize=16,color="green",shape="box"];52[label="esEsOrdering (compare0 EQ LT MyTrue) GT",fontsize=16,color="black",shape="box"];52 -> 55[label="",style="solid", color="black", weight=3]; 9.39/4.06 53[label="esEsOrdering (compare0 GT LT MyTrue) GT",fontsize=16,color="black",shape="box"];53 -> 56[label="",style="solid", color="black", weight=3]; 9.39/4.06 54[label="esEsOrdering (compare0 GT EQ MyTrue) GT",fontsize=16,color="black",shape="box"];54 -> 57[label="",style="solid", color="black", weight=3]; 9.39/4.06 55[label="esEsOrdering GT GT",fontsize=16,color="black",shape="triangle"];55 -> 58[label="",style="solid", color="black", weight=3]; 9.39/4.06 56 -> 55[label="",style="dashed", color="red", weight=0]; 9.39/4.06 56[label="esEsOrdering GT GT",fontsize=16,color="magenta"];57 -> 55[label="",style="dashed", color="red", weight=0]; 9.39/4.06 57[label="esEsOrdering GT GT",fontsize=16,color="magenta"];58[label="MyTrue",fontsize=16,color="green",shape="box"];} 9.39/4.06 9.39/4.06 ---------------------------------------- 9.39/4.06 9.39/4.06 (6) 9.39/4.06 YES 9.54/8.48 EOF