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