/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: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty H-Termination with start terms of the given HASKELL could be proven: (0) HASKELL (1) LR [EQUIVALENT, 0 ms] (2) HASKELL (3) CR [EQUIVALENT, 0 ms] (4) HASKELL (5) IFR [EQUIVALENT, 0 ms] (6) HASKELL (7) BR [EQUIVALENT, 0 ms] (8) HASKELL (9) COR [EQUIVALENT, 0 ms] (10) HASKELL (11) Narrow [SOUND, 0 ms] (12) QDP (13) QDPSizeChangeProof [EQUIVALENT, 0 ms] (14) YES ---------------------------------------- (0) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; listToMaybe :: [a] -> Maybe a; listToMaybe [] = Nothing; listToMaybe (a : _) = Just a; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; find :: (a -> Bool) -> [a] -> Maybe a; find p = Maybe.listToMaybe . filter p; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (1) LR (EQUIVALENT) Lambda Reductions: The following Lambda expression "\vu39->case vu39 of { x -> if p x then x : [] else []; _ -> []} " is transformed to "filter0 p vu39 = case vu39 of { x -> if p x then x : [] else []; _ -> []} ; " ---------------------------------------- (2) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; listToMaybe :: [a] -> Maybe a; listToMaybe [] = Nothing; listToMaybe (a : _) = Just a; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; find :: (a -> Bool) -> [a] -> Maybe a; find p = Maybe.listToMaybe . filter p; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (3) CR (EQUIVALENT) Case Reductions: The following Case expression "case vu39 of { x -> if p x then x : [] else []; _ -> []} " is transformed to "filter00 p x = if p x then x : [] else []; filter00 p _ = []; " ---------------------------------------- (4) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; listToMaybe :: [a] -> Maybe a; listToMaybe [] = Nothing; listToMaybe (a : _) = Just a; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; find :: (a -> Bool) -> [a] -> Maybe a; find p = Maybe.listToMaybe . filter p; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (5) IFR (EQUIVALENT) If Reductions: The following If expression "if p x then x : [] else []" is transformed to "filter000 x True = x : []; filter000 x False = []; " ---------------------------------------- (6) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; listToMaybe :: [a] -> Maybe a; listToMaybe [] = Nothing; listToMaybe (a : _) = Just a; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; find :: (a -> Bool) -> [a] -> Maybe a; find p = Maybe.listToMaybe . filter p; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (7) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. ---------------------------------------- (8) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; listToMaybe :: [a] -> Maybe a; listToMaybe [] = Nothing; listToMaybe (a : vz) = Just a; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; find :: (a -> Bool) -> [a] -> Maybe a; find p = Maybe.listToMaybe . filter p; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (9) COR (EQUIVALENT) Cond Reductions: The following Function with conditions "undefined |Falseundefined; " is transformed to "undefined = undefined1; " "undefined0 True = undefined; " "undefined1 = undefined0 False; " ---------------------------------------- (10) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; listToMaybe :: [a] -> Maybe a; listToMaybe [] = Nothing; listToMaybe (a : vz) = Just a; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; find :: (a -> Bool) -> [a] -> Maybe a; find p = Maybe.listToMaybe . filter p; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (11) Narrow (SOUND) Haskell To QDPs digraph dp_graph { node [outthreshold=100, inthreshold=100];1[label="List.find",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="List.find wu3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 4[label="List.find wu3 wu4",fontsize=16,color="black",shape="triangle"];4 -> 5[label="",style="solid", color="black", weight=3]; 5[label="Maybe.listToMaybe . filter wu3",fontsize=16,color="black",shape="box"];5 -> 6[label="",style="solid", color="black", weight=3]; 6[label="Maybe.listToMaybe (filter wu3 wu4)",fontsize=16,color="black",shape="box"];6 -> 7[label="",style="solid", color="black", weight=3]; 7[label="Maybe.listToMaybe (concatMap (filter0 wu3) wu4)",fontsize=16,color="black",shape="box"];7 -> 8[label="",style="solid", color="black", weight=3]; 8[label="Maybe.listToMaybe (concat . map (filter0 wu3))",fontsize=16,color="black",shape="box"];8 -> 9[label="",style="solid", color="black", weight=3]; 9[label="Maybe.listToMaybe (concat (map (filter0 wu3) wu4))",fontsize=16,color="black",shape="box"];9 -> 10[label="",style="solid", color="black", weight=3]; 10[label="Maybe.listToMaybe (foldr (++) [] (map (filter0 wu3) wu4))",fontsize=16,color="burlywood",shape="triangle"];32[label="wu4/wu40 : wu41",fontsize=10,color="white",style="solid",shape="box"];10 -> 32[label="",style="solid", color="burlywood", weight=9]; 32 -> 11[label="",style="solid", color="burlywood", weight=3]; 33[label="wu4/[]",fontsize=10,color="white",style="solid",shape="box"];10 -> 33[label="",style="solid", color="burlywood", weight=9]; 33 -> 12[label="",style="solid", color="burlywood", weight=3]; 11[label="Maybe.listToMaybe (foldr (++) [] (map (filter0 wu3) (wu40 : wu41)))",fontsize=16,color="black",shape="box"];11 -> 13[label="",style="solid", color="black", weight=3]; 12[label="Maybe.listToMaybe (foldr (++) [] (map (filter0 wu3) []))",fontsize=16,color="black",shape="box"];12 -> 14[label="",style="solid", color="black", weight=3]; 13[label="Maybe.listToMaybe (foldr (++) [] (filter0 wu3 wu40 : map (filter0 wu3) wu41))",fontsize=16,color="black",shape="box"];13 -> 15[label="",style="solid", color="black", weight=3]; 14[label="Maybe.listToMaybe (foldr (++) [] [])",fontsize=16,color="black",shape="box"];14 -> 16[label="",style="solid", color="black", weight=3]; 15[label="Maybe.listToMaybe ((++) filter0 wu3 wu40 foldr (++) [] (map (filter0 wu3) wu41))",fontsize=16,color="black",shape="box"];15 -> 17[label="",style="solid", color="black", weight=3]; 16[label="Maybe.listToMaybe []",fontsize=16,color="black",shape="box"];16 -> 18[label="",style="solid", color="black", weight=3]; 17[label="Maybe.listToMaybe ((++) filter00 wu3 wu40 foldr (++) [] (map (filter0 wu3) wu41))",fontsize=16,color="black",shape="box"];17 -> 19[label="",style="solid", color="black", weight=3]; 18[label="Nothing",fontsize=16,color="green",shape="box"];19 -> 20[label="",style="dashed", color="red", weight=0]; 19[label="Maybe.listToMaybe ((++) filter000 wu40 (wu3 wu40) foldr (++) [] (map (filter0 wu3) wu41))",fontsize=16,color="magenta"];19 -> 21[label="",style="dashed", color="magenta", weight=3]; 21[label="wu3 wu40",fontsize=16,color="green",shape="box"];21 -> 25[label="",style="dashed", color="green", weight=3]; 20[label="Maybe.listToMaybe ((++) filter000 wu40 wu5 foldr (++) [] (map (filter0 wu3) wu41))",fontsize=16,color="burlywood",shape="triangle"];34[label="wu5/False",fontsize=10,color="white",style="solid",shape="box"];20 -> 34[label="",style="solid", color="burlywood", weight=9]; 34 -> 23[label="",style="solid", color="burlywood", weight=3]; 35[label="wu5/True",fontsize=10,color="white",style="solid",shape="box"];20 -> 35[label="",style="solid", color="burlywood", weight=9]; 35 -> 24[label="",style="solid", color="burlywood", weight=3]; 25[label="wu40",fontsize=16,color="green",shape="box"];23[label="Maybe.listToMaybe ((++) filter000 wu40 False foldr (++) [] (map (filter0 wu3) wu41))",fontsize=16,color="black",shape="box"];23 -> 26[label="",style="solid", color="black", weight=3]; 24[label="Maybe.listToMaybe ((++) filter000 wu40 True foldr (++) [] (map (filter0 wu3) wu41))",fontsize=16,color="black",shape="box"];24 -> 27[label="",style="solid", color="black", weight=3]; 26[label="Maybe.listToMaybe ((++) [] foldr (++) [] (map (filter0 wu3) wu41))",fontsize=16,color="black",shape="box"];26 -> 28[label="",style="solid", color="black", weight=3]; 27[label="Maybe.listToMaybe ((++) (wu40 : []) foldr (++) [] (map (filter0 wu3) wu41))",fontsize=16,color="black",shape="box"];27 -> 29[label="",style="solid", color="black", weight=3]; 28 -> 10[label="",style="dashed", color="red", weight=0]; 28[label="Maybe.listToMaybe (foldr (++) [] (map (filter0 wu3) wu41))",fontsize=16,color="magenta"];28 -> 30[label="",style="dashed", color="magenta", weight=3]; 29[label="Maybe.listToMaybe (wu40 : [] ++ foldr (++) [] (map (filter0 wu3) wu41))",fontsize=16,color="black",shape="box"];29 -> 31[label="",style="solid", color="black", weight=3]; 30[label="wu41",fontsize=16,color="green",shape="box"];31[label="Just wu40",fontsize=16,color="green",shape="box"];} ---------------------------------------- (12) Obligation: Q DP problem: The TRS P consists of the following rules: new_listToMaybe0(wu3, :(wu40, wu41), ba) -> new_listToMaybe(wu40, wu3, wu41, ba) new_listToMaybe(wu40, wu3, wu41, ba) -> new_listToMaybe0(wu3, wu41, ba) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (13) 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_listToMaybe(wu40, wu3, wu41, ba) -> new_listToMaybe0(wu3, wu41, ba) The graph contains the following edges 2 >= 1, 3 >= 2, 4 >= 3 *new_listToMaybe0(wu3, :(wu40, wu41), ba) -> new_listToMaybe(wu40, wu3, wu41, ba) The graph contains the following edges 2 > 1, 1 >= 2, 2 > 3, 3 >= 4 ---------------------------------------- (14) YES