/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.hs /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.hs # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty H-Termination with start terms of the given HASKELL could be proven: (0) HASKELL (1) BR [EQUIVALENT, 0 ms] (2) HASKELL (3) COR [EQUIVALENT, 0 ms] (4) HASKELL (5) Narrow [SOUND, 0 ms] (6) QDP (7) QDPSizeChangeProof [EQUIVALENT, 0 ms] (8) YES ---------------------------------------- (0) Obligation: mainModule Main module Main where { import qualified Prelude; data List a = Cons a (List a) | Nil ; data MyBool = MyTrue | MyFalse ; data Ordering = LT | EQ | GT ; foldl :: (b -> a -> b) -> b -> List a -> b; foldl f z Nil = z; foldl f z (Cons x xs) = foldl f (f z x) xs; foldl1 :: (a -> a -> a) -> List a -> a; foldl1 f (Cons x xs) = foldl f x xs; ltEsOrdering :: Ordering -> Ordering -> MyBool; ltEsOrdering LT LT = MyTrue; ltEsOrdering LT EQ = MyTrue; ltEsOrdering LT GT = MyTrue; ltEsOrdering EQ LT = MyFalse; ltEsOrdering EQ EQ = MyTrue; ltEsOrdering EQ GT = MyTrue; ltEsOrdering GT LT = MyFalse; ltEsOrdering GT EQ = MyFalse; ltEsOrdering GT GT = MyTrue; min0 x y MyTrue = y; min1 x y MyTrue = x; min1 x y MyFalse = min0 x y otherwise; min2 x y = min1 x y (ltEsOrdering x y); minOrdering :: Ordering -> Ordering -> Ordering; minOrdering x y = min2 x y; minimumOrdering :: List Ordering -> Ordering; minimumOrdering = foldl1 minOrdering; otherwise :: MyBool; otherwise = MyTrue; } ---------------------------------------- (1) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. ---------------------------------------- (2) Obligation: mainModule Main module Main where { import qualified Prelude; data List a = Cons a (List a) | Nil ; data MyBool = MyTrue | MyFalse ; data Ordering = LT | EQ | GT ; foldl :: (a -> b -> a) -> a -> List b -> a; foldl f z Nil = z; foldl f z (Cons x xs) = foldl f (f z x) xs; foldl1 :: (a -> a -> a) -> List a -> a; foldl1 f (Cons x xs) = foldl f x xs; ltEsOrdering :: Ordering -> Ordering -> MyBool; ltEsOrdering LT LT = MyTrue; ltEsOrdering LT EQ = MyTrue; ltEsOrdering LT GT = MyTrue; ltEsOrdering EQ LT = MyFalse; ltEsOrdering EQ EQ = MyTrue; ltEsOrdering EQ GT = MyTrue; ltEsOrdering GT LT = MyFalse; ltEsOrdering GT EQ = MyFalse; ltEsOrdering GT GT = MyTrue; min0 x y MyTrue = y; min1 x y MyTrue = x; min1 x y MyFalse = min0 x y otherwise; min2 x y = min1 x y (ltEsOrdering x y); minOrdering :: Ordering -> Ordering -> Ordering; minOrdering x y = min2 x y; minimumOrdering :: List Ordering -> Ordering; minimumOrdering = foldl1 minOrdering; otherwise :: MyBool; otherwise = MyTrue; } ---------------------------------------- (3) COR (EQUIVALENT) Cond Reductions: The following Function with conditions "undefined |Falseundefined; " is transformed to "undefined = undefined1; " "undefined0 True = undefined; " "undefined1 = undefined0 False; " ---------------------------------------- (4) Obligation: mainModule Main module Main where { import qualified Prelude; data List a = Cons a (List a) | Nil ; data MyBool = MyTrue | MyFalse ; data Ordering = LT | EQ | GT ; foldl :: (a -> b -> a) -> a -> List b -> a; foldl f z Nil = z; foldl f z (Cons x xs) = foldl f (f z x) xs; foldl1 :: (a -> a -> a) -> List a -> a; foldl1 f (Cons x xs) = foldl f x xs; ltEsOrdering :: Ordering -> Ordering -> MyBool; ltEsOrdering LT LT = MyTrue; ltEsOrdering LT EQ = MyTrue; ltEsOrdering LT GT = MyTrue; ltEsOrdering EQ LT = MyFalse; ltEsOrdering EQ EQ = MyTrue; ltEsOrdering EQ GT = MyTrue; ltEsOrdering GT LT = MyFalse; ltEsOrdering GT EQ = MyFalse; ltEsOrdering GT GT = MyTrue; min0 x y MyTrue = y; min1 x y MyTrue = x; min1 x y MyFalse = min0 x y otherwise; min2 x y = min1 x y (ltEsOrdering x y); minOrdering :: Ordering -> Ordering -> Ordering; minOrdering x y = min2 x y; minimumOrdering :: List Ordering -> Ordering; minimumOrdering = foldl1 minOrdering; otherwise :: MyBool; otherwise = MyTrue; } ---------------------------------------- (5) Narrow (SOUND) Haskell To QDPs digraph dp_graph { node [outthreshold=100, inthreshold=100];1[label="minimumOrdering",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="minimumOrdering vx3",fontsize=16,color="black",shape="triangle"];3 -> 4[label="",style="solid", color="black", weight=3]; 4[label="foldl1 minOrdering vx3",fontsize=16,color="burlywood",shape="box"];53[label="vx3/Cons vx30 vx31",fontsize=10,color="white",style="solid",shape="box"];4 -> 53[label="",style="solid", color="burlywood", weight=9]; 53 -> 5[label="",style="solid", color="burlywood", weight=3]; 54[label="vx3/Nil",fontsize=10,color="white",style="solid",shape="box"];4 -> 54[label="",style="solid", color="burlywood", weight=9]; 54 -> 6[label="",style="solid", color="burlywood", weight=3]; 5[label="foldl1 minOrdering (Cons vx30 vx31)",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 6[label="foldl1 minOrdering Nil",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 7[label="foldl minOrdering vx30 vx31",fontsize=16,color="burlywood",shape="triangle"];55[label="vx31/Cons vx310 vx311",fontsize=10,color="white",style="solid",shape="box"];7 -> 55[label="",style="solid", color="burlywood", weight=9]; 55 -> 9[label="",style="solid", color="burlywood", weight=3]; 56[label="vx31/Nil",fontsize=10,color="white",style="solid",shape="box"];7 -> 56[label="",style="solid", color="burlywood", weight=9]; 56 -> 10[label="",style="solid", color="burlywood", weight=3]; 8[label="error []",fontsize=16,color="red",shape="box"];9[label="foldl minOrdering vx30 (Cons vx310 vx311)",fontsize=16,color="black",shape="box"];9 -> 11[label="",style="solid", color="black", weight=3]; 10[label="foldl minOrdering vx30 Nil",fontsize=16,color="black",shape="box"];10 -> 12[label="",style="solid", color="black", weight=3]; 11 -> 7[label="",style="dashed", color="red", weight=0]; 11[label="foldl minOrdering (minOrdering vx30 vx310) vx311",fontsize=16,color="magenta"];11 -> 13[label="",style="dashed", color="magenta", weight=3]; 11 -> 14[label="",style="dashed", color="magenta", weight=3]; 12[label="vx30",fontsize=16,color="green",shape="box"];13[label="minOrdering vx30 vx310",fontsize=16,color="black",shape="box"];13 -> 15[label="",style="solid", color="black", weight=3]; 14[label="vx311",fontsize=16,color="green",shape="box"];15[label="min2 vx30 vx310",fontsize=16,color="black",shape="box"];15 -> 16[label="",style="solid", color="black", weight=3]; 16[label="min1 vx30 vx310 (ltEsOrdering vx30 vx310)",fontsize=16,color="burlywood",shape="box"];57[label="vx30/LT",fontsize=10,color="white",style="solid",shape="box"];16 -> 57[label="",style="solid", color="burlywood", weight=9]; 57 -> 17[label="",style="solid", color="burlywood", weight=3]; 58[label="vx30/EQ",fontsize=10,color="white",style="solid",shape="box"];16 -> 58[label="",style="solid", color="burlywood", weight=9]; 58 -> 18[label="",style="solid", color="burlywood", weight=3]; 59[label="vx30/GT",fontsize=10,color="white",style="solid",shape="box"];16 -> 59[label="",style="solid", color="burlywood", weight=9]; 59 -> 19[label="",style="solid", color="burlywood", weight=3]; 17[label="min1 LT vx310 (ltEsOrdering LT vx310)",fontsize=16,color="burlywood",shape="box"];60[label="vx310/LT",fontsize=10,color="white",style="solid",shape="box"];17 -> 60[label="",style="solid", color="burlywood", weight=9]; 60 -> 20[label="",style="solid", color="burlywood", weight=3]; 61[label="vx310/EQ",fontsize=10,color="white",style="solid",shape="box"];17 -> 61[label="",style="solid", color="burlywood", weight=9]; 61 -> 21[label="",style="solid", color="burlywood", weight=3]; 62[label="vx310/GT",fontsize=10,color="white",style="solid",shape="box"];17 -> 62[label="",style="solid", color="burlywood", weight=9]; 62 -> 22[label="",style="solid", color="burlywood", weight=3]; 18[label="min1 EQ vx310 (ltEsOrdering EQ vx310)",fontsize=16,color="burlywood",shape="box"];63[label="vx310/LT",fontsize=10,color="white",style="solid",shape="box"];18 -> 63[label="",style="solid", color="burlywood", weight=9]; 63 -> 23[label="",style="solid", color="burlywood", weight=3]; 64[label="vx310/EQ",fontsize=10,color="white",style="solid",shape="box"];18 -> 64[label="",style="solid", color="burlywood", weight=9]; 64 -> 24[label="",style="solid", color="burlywood", weight=3]; 65[label="vx310/GT",fontsize=10,color="white",style="solid",shape="box"];18 -> 65[label="",style="solid", color="burlywood", weight=9]; 65 -> 25[label="",style="solid", color="burlywood", weight=3]; 19[label="min1 GT vx310 (ltEsOrdering GT vx310)",fontsize=16,color="burlywood",shape="box"];66[label="vx310/LT",fontsize=10,color="white",style="solid",shape="box"];19 -> 66[label="",style="solid", color="burlywood", weight=9]; 66 -> 26[label="",style="solid", color="burlywood", weight=3]; 67[label="vx310/EQ",fontsize=10,color="white",style="solid",shape="box"];19 -> 67[label="",style="solid", color="burlywood", weight=9]; 67 -> 27[label="",style="solid", color="burlywood", weight=3]; 68[label="vx310/GT",fontsize=10,color="white",style="solid",shape="box"];19 -> 68[label="",style="solid", color="burlywood", weight=9]; 68 -> 28[label="",style="solid", color="burlywood", weight=3]; 20[label="min1 LT LT (ltEsOrdering LT LT)",fontsize=16,color="black",shape="box"];20 -> 29[label="",style="solid", color="black", weight=3]; 21[label="min1 LT EQ (ltEsOrdering LT EQ)",fontsize=16,color="black",shape="box"];21 -> 30[label="",style="solid", color="black", weight=3]; 22[label="min1 LT GT (ltEsOrdering LT GT)",fontsize=16,color="black",shape="box"];22 -> 31[label="",style="solid", color="black", weight=3]; 23[label="min1 EQ LT (ltEsOrdering EQ LT)",fontsize=16,color="black",shape="box"];23 -> 32[label="",style="solid", color="black", weight=3]; 24[label="min1 EQ EQ (ltEsOrdering EQ EQ)",fontsize=16,color="black",shape="box"];24 -> 33[label="",style="solid", color="black", weight=3]; 25[label="min1 EQ GT (ltEsOrdering EQ GT)",fontsize=16,color="black",shape="box"];25 -> 34[label="",style="solid", color="black", weight=3]; 26[label="min1 GT LT (ltEsOrdering GT LT)",fontsize=16,color="black",shape="box"];26 -> 35[label="",style="solid", color="black", weight=3]; 27[label="min1 GT EQ (ltEsOrdering GT EQ)",fontsize=16,color="black",shape="box"];27 -> 36[label="",style="solid", color="black", weight=3]; 28[label="min1 GT GT (ltEsOrdering GT GT)",fontsize=16,color="black",shape="box"];28 -> 37[label="",style="solid", color="black", weight=3]; 29[label="min1 LT LT MyTrue",fontsize=16,color="black",shape="box"];29 -> 38[label="",style="solid", color="black", weight=3]; 30[label="min1 LT EQ MyTrue",fontsize=16,color="black",shape="box"];30 -> 39[label="",style="solid", color="black", weight=3]; 31[label="min1 LT GT MyTrue",fontsize=16,color="black",shape="box"];31 -> 40[label="",style="solid", color="black", weight=3]; 32[label="min1 EQ LT MyFalse",fontsize=16,color="black",shape="box"];32 -> 41[label="",style="solid", color="black", weight=3]; 33[label="min1 EQ EQ MyTrue",fontsize=16,color="black",shape="box"];33 -> 42[label="",style="solid", color="black", weight=3]; 34[label="min1 EQ GT MyTrue",fontsize=16,color="black",shape="box"];34 -> 43[label="",style="solid", color="black", weight=3]; 35[label="min1 GT LT MyFalse",fontsize=16,color="black",shape="box"];35 -> 44[label="",style="solid", color="black", weight=3]; 36[label="min1 GT EQ MyFalse",fontsize=16,color="black",shape="box"];36 -> 45[label="",style="solid", color="black", weight=3]; 37[label="min1 GT GT MyTrue",fontsize=16,color="black",shape="box"];37 -> 46[label="",style="solid", color="black", weight=3]; 38[label="LT",fontsize=16,color="green",shape="box"];39[label="LT",fontsize=16,color="green",shape="box"];40[label="LT",fontsize=16,color="green",shape="box"];41[label="min0 EQ LT otherwise",fontsize=16,color="black",shape="box"];41 -> 47[label="",style="solid", color="black", weight=3]; 42[label="EQ",fontsize=16,color="green",shape="box"];43[label="EQ",fontsize=16,color="green",shape="box"];44[label="min0 GT LT otherwise",fontsize=16,color="black",shape="box"];44 -> 48[label="",style="solid", color="black", weight=3]; 45[label="min0 GT EQ otherwise",fontsize=16,color="black",shape="box"];45 -> 49[label="",style="solid", color="black", weight=3]; 46[label="GT",fontsize=16,color="green",shape="box"];47[label="min0 EQ LT MyTrue",fontsize=16,color="black",shape="box"];47 -> 50[label="",style="solid", color="black", weight=3]; 48[label="min0 GT LT MyTrue",fontsize=16,color="black",shape="box"];48 -> 51[label="",style="solid", color="black", weight=3]; 49[label="min0 GT EQ MyTrue",fontsize=16,color="black",shape="box"];49 -> 52[label="",style="solid", color="black", weight=3]; 50[label="LT",fontsize=16,color="green",shape="box"];51[label="LT",fontsize=16,color="green",shape="box"];52[label="EQ",fontsize=16,color="green",shape="box"];} ---------------------------------------- (6) Obligation: Q DP problem: The TRS P consists of the following rules: new_foldl(vx30, Cons(vx310, vx311)) -> new_foldl(new_min1(vx30, vx310), vx311) The TRS R consists of the following rules: new_min1(LT, GT) -> LT new_min1(GT, LT) -> LT new_min1(GT, GT) -> GT new_min1(EQ, EQ) -> EQ new_min1(LT, EQ) -> LT new_min1(EQ, LT) -> LT new_min1(EQ, GT) -> EQ new_min1(GT, EQ) -> EQ new_min1(LT, LT) -> LT The set Q consists of the following terms: new_min1(LT, EQ) new_min1(EQ, LT) new_min1(EQ, GT) new_min1(GT, EQ) new_min1(LT, GT) new_min1(GT, LT) new_min1(EQ, EQ) new_min1(GT, GT) new_min1(LT, LT) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (7) QDPSizeChangeProof (EQUIVALENT) 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. From the DPs we obtained the following set of size-change graphs: *new_foldl(vx30, Cons(vx310, vx311)) -> new_foldl(new_min1(vx30, vx310), vx311) The graph contains the following edges 2 > 2 ---------------------------------------- (8) YES