7.94/3.49 YES 9.47/3.99 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 9.47/3.99 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 9.47/3.99 9.47/3.99 9.47/3.99 H-Termination with start terms of the given HASKELL could be proven: 9.47/3.99 9.47/3.99 (0) HASKELL 9.47/3.99 (1) BR [EQUIVALENT, 0 ms] 9.47/3.99 (2) HASKELL 9.47/3.99 (3) COR [EQUIVALENT, 0 ms] 9.47/3.99 (4) HASKELL 9.47/3.99 (5) Narrow [EQUIVALENT, 26 ms] 9.47/3.99 (6) YES 9.47/3.99 9.47/3.99 9.47/3.99 ---------------------------------------- 9.47/3.99 9.47/3.99 (0) 9.47/3.99 Obligation: 9.47/3.99 mainModule Main 9.47/3.99 module Main where { 9.47/3.99 import qualified Prelude; 9.47/3.99 data MyBool = MyTrue | MyFalse ; 9.47/3.99 9.47/3.99 data Ordering = LT | EQ | GT ; 9.47/3.99 9.47/3.99 data Tup0 = Tup0 ; 9.47/3.99 9.47/3.99 compareTup0 :: Tup0 -> Tup0 -> Ordering; 9.47/3.99 compareTup0 Tup0 Tup0 = EQ; 9.47/3.99 9.47/3.99 esEsOrdering :: Ordering -> Ordering -> MyBool; 9.47/3.99 esEsOrdering LT LT = MyTrue; 9.47/3.99 esEsOrdering LT EQ = MyFalse; 9.47/3.99 esEsOrdering LT GT = MyFalse; 9.47/3.99 esEsOrdering EQ LT = MyFalse; 9.47/3.99 esEsOrdering EQ EQ = MyTrue; 9.47/3.99 esEsOrdering EQ GT = MyFalse; 9.47/3.99 esEsOrdering GT LT = MyFalse; 9.47/3.99 esEsOrdering GT EQ = MyFalse; 9.47/3.99 esEsOrdering GT GT = MyTrue; 9.47/3.99 9.47/3.99 fsEsOrdering :: Ordering -> Ordering -> MyBool; 9.47/3.99 fsEsOrdering x y = not (esEsOrdering x y); 9.47/3.99 9.47/3.99 ltEsTup0 :: Tup0 -> Tup0 -> MyBool; 9.47/3.99 ltEsTup0 x y = fsEsOrdering (compareTup0 x y) GT; 9.47/3.99 9.47/3.99 max0 x y MyTrue = x; 9.47/3.99 9.47/3.99 max1 x y MyTrue = y; 9.47/3.99 max1 x y MyFalse = max0 x y otherwise; 9.47/3.99 9.47/3.99 max2 x y = max1 x y (ltEsTup0 x y); 9.47/3.99 9.47/3.99 maxTup0 :: Tup0 -> Tup0 -> Tup0; 9.47/3.99 maxTup0 x y = max2 x y; 9.47/3.99 9.47/3.99 not :: MyBool -> MyBool; 9.47/3.99 not MyTrue = MyFalse; 9.47/3.99 not MyFalse = MyTrue; 9.47/3.99 9.47/3.99 otherwise :: MyBool; 9.47/3.99 otherwise = MyTrue; 9.47/3.99 9.47/3.99 } 9.47/3.99 9.47/3.99 ---------------------------------------- 9.47/3.99 9.47/3.99 (1) BR (EQUIVALENT) 9.47/3.99 Replaced joker patterns by fresh variables and removed binding patterns. 9.47/3.99 ---------------------------------------- 9.47/3.99 9.47/3.99 (2) 9.47/3.99 Obligation: 9.47/3.99 mainModule Main 9.47/3.99 module Main where { 9.47/3.99 import qualified Prelude; 9.47/3.99 data MyBool = MyTrue | MyFalse ; 9.47/3.99 9.47/3.99 data Ordering = LT | EQ | GT ; 9.47/3.99 9.47/3.99 data Tup0 = Tup0 ; 9.47/3.99 9.47/3.99 compareTup0 :: Tup0 -> Tup0 -> Ordering; 9.47/3.99 compareTup0 Tup0 Tup0 = EQ; 9.47/3.99 9.47/3.99 esEsOrdering :: Ordering -> Ordering -> MyBool; 9.47/3.99 esEsOrdering LT LT = MyTrue; 9.47/3.99 esEsOrdering LT EQ = MyFalse; 9.47/3.99 esEsOrdering LT GT = MyFalse; 9.47/3.99 esEsOrdering EQ LT = MyFalse; 9.47/3.99 esEsOrdering EQ EQ = MyTrue; 9.47/3.99 esEsOrdering EQ GT = MyFalse; 9.47/3.99 esEsOrdering GT LT = MyFalse; 9.47/3.99 esEsOrdering GT EQ = MyFalse; 9.47/3.99 esEsOrdering GT GT = MyTrue; 9.47/3.99 9.47/3.99 fsEsOrdering :: Ordering -> Ordering -> MyBool; 9.47/3.99 fsEsOrdering x y = not (esEsOrdering x y); 9.47/3.99 9.47/3.99 ltEsTup0 :: Tup0 -> Tup0 -> MyBool; 9.47/3.99 ltEsTup0 x y = fsEsOrdering (compareTup0 x y) GT; 9.47/3.99 9.47/3.99 max0 x y MyTrue = x; 9.47/3.99 9.47/3.99 max1 x y MyTrue = y; 9.47/3.99 max1 x y MyFalse = max0 x y otherwise; 9.47/3.99 9.47/3.99 max2 x y = max1 x y (ltEsTup0 x y); 9.47/3.99 9.47/3.99 maxTup0 :: Tup0 -> Tup0 -> Tup0; 9.47/3.99 maxTup0 x y = max2 x y; 9.47/3.99 9.47/3.99 not :: MyBool -> MyBool; 9.47/3.99 not MyTrue = MyFalse; 9.47/3.99 not MyFalse = MyTrue; 9.47/3.99 9.47/3.99 otherwise :: MyBool; 9.47/3.99 otherwise = MyTrue; 9.47/3.99 9.47/3.99 } 9.47/3.99 9.47/3.99 ---------------------------------------- 9.47/3.99 9.47/3.99 (3) COR (EQUIVALENT) 9.47/3.99 Cond Reductions: 9.47/3.99 The following Function with conditions 9.47/3.99 "undefined |Falseundefined; 9.47/3.99 " 9.47/3.99 is transformed to 9.47/3.99 "undefined = undefined1; 9.47/3.99 " 9.47/3.99 "undefined0 True = undefined; 9.47/3.99 " 9.47/3.99 "undefined1 = undefined0 False; 9.47/3.99 " 9.47/3.99 9.47/3.99 ---------------------------------------- 9.47/3.99 9.47/3.99 (4) 9.47/3.99 Obligation: 9.47/3.99 mainModule Main 9.47/3.99 module Main where { 9.47/3.99 import qualified Prelude; 9.47/3.99 data MyBool = MyTrue | MyFalse ; 9.47/3.99 9.47/3.99 data Ordering = LT | EQ | GT ; 9.47/3.99 9.47/3.99 data Tup0 = Tup0 ; 9.47/3.99 9.47/3.99 compareTup0 :: Tup0 -> Tup0 -> Ordering; 9.47/3.99 compareTup0 Tup0 Tup0 = EQ; 9.47/3.99 9.47/3.99 esEsOrdering :: Ordering -> Ordering -> MyBool; 9.47/3.99 esEsOrdering LT LT = MyTrue; 9.47/3.99 esEsOrdering LT EQ = MyFalse; 9.47/3.99 esEsOrdering LT GT = MyFalse; 9.47/3.99 esEsOrdering EQ LT = MyFalse; 9.47/3.99 esEsOrdering EQ EQ = MyTrue; 9.47/3.99 esEsOrdering EQ GT = MyFalse; 9.47/3.99 esEsOrdering GT LT = MyFalse; 9.47/3.99 esEsOrdering GT EQ = MyFalse; 9.47/3.99 esEsOrdering GT GT = MyTrue; 9.47/3.99 9.47/3.99 fsEsOrdering :: Ordering -> Ordering -> MyBool; 9.47/3.99 fsEsOrdering x y = not (esEsOrdering x y); 9.47/3.99 9.47/3.99 ltEsTup0 :: Tup0 -> Tup0 -> MyBool; 9.47/3.99 ltEsTup0 x y = fsEsOrdering (compareTup0 x y) GT; 9.47/3.99 9.47/3.99 max0 x y MyTrue = x; 9.47/3.99 9.47/3.99 max1 x y MyTrue = y; 9.47/3.99 max1 x y MyFalse = max0 x y otherwise; 9.47/3.99 9.47/3.99 max2 x y = max1 x y (ltEsTup0 x y); 9.47/3.99 9.47/3.99 maxTup0 :: Tup0 -> Tup0 -> Tup0; 9.47/3.99 maxTup0 x y = max2 x y; 9.47/3.99 9.47/3.99 not :: MyBool -> MyBool; 9.47/3.99 not MyTrue = MyFalse; 9.47/3.99 not MyFalse = MyTrue; 9.47/3.99 9.47/3.99 otherwise :: MyBool; 9.47/3.99 otherwise = MyTrue; 9.47/3.99 9.47/3.99 } 9.47/3.99 9.47/3.99 ---------------------------------------- 9.47/3.99 9.47/3.99 (5) Narrow (EQUIVALENT) 9.47/3.99 Haskell To QDPs 9.47/3.99 9.47/3.99 digraph dp_graph { 9.47/3.99 node [outthreshold=100, inthreshold=100];1[label="maxTup0",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 9.47/3.99 3[label="maxTup0 vx3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 9.47/3.99 4[label="maxTup0 vx3 vx4",fontsize=16,color="black",shape="triangle"];4 -> 5[label="",style="solid", color="black", weight=3]; 9.47/3.99 5[label="max2 vx3 vx4",fontsize=16,color="black",shape="box"];5 -> 6[label="",style="solid", color="black", weight=3]; 9.47/3.99 6[label="max1 vx3 vx4 (ltEsTup0 vx3 vx4)",fontsize=16,color="black",shape="box"];6 -> 7[label="",style="solid", color="black", weight=3]; 9.47/3.99 7[label="max1 vx3 vx4 (fsEsOrdering (compareTup0 vx3 vx4) GT)",fontsize=16,color="black",shape="box"];7 -> 8[label="",style="solid", color="black", weight=3]; 9.47/3.99 8[label="max1 vx3 vx4 (not (esEsOrdering (compareTup0 vx3 vx4) GT))",fontsize=16,color="burlywood",shape="box"];15[label="vx3/Tup0",fontsize=10,color="white",style="solid",shape="box"];8 -> 15[label="",style="solid", color="burlywood", weight=9]; 9.47/3.99 15 -> 9[label="",style="solid", color="burlywood", weight=3]; 9.47/3.99 9[label="max1 Tup0 vx4 (not (esEsOrdering (compareTup0 Tup0 vx4) GT))",fontsize=16,color="burlywood",shape="box"];16[label="vx4/Tup0",fontsize=10,color="white",style="solid",shape="box"];9 -> 16[label="",style="solid", color="burlywood", weight=9]; 9.47/3.99 16 -> 10[label="",style="solid", color="burlywood", weight=3]; 9.47/3.99 10[label="max1 Tup0 Tup0 (not (esEsOrdering (compareTup0 Tup0 Tup0) GT))",fontsize=16,color="black",shape="box"];10 -> 11[label="",style="solid", color="black", weight=3]; 9.47/3.99 11[label="max1 Tup0 Tup0 (not (esEsOrdering EQ GT))",fontsize=16,color="black",shape="box"];11 -> 12[label="",style="solid", color="black", weight=3]; 9.47/3.99 12[label="max1 Tup0 Tup0 (not MyFalse)",fontsize=16,color="black",shape="box"];12 -> 13[label="",style="solid", color="black", weight=3]; 9.47/3.99 13[label="max1 Tup0 Tup0 MyTrue",fontsize=16,color="black",shape="box"];13 -> 14[label="",style="solid", color="black", weight=3]; 9.47/3.99 14[label="Tup0",fontsize=16,color="green",shape="box"];} 9.47/3.99 9.47/3.99 ---------------------------------------- 9.47/3.99 9.47/3.99 (6) 9.47/3.99 YES 9.78/4.04 EOF