/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) AND (13) QDP (14) QDPSizeChangeProof [EQUIVALENT, 0 ms] (15) YES (16) QDP (17) QDPSizeChangeProof [EQUIVALENT, 0 ms] (18) YES ---------------------------------------- (0) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]; intersectBy eq xs ys = concatMap (\vv2 ->case vv2 of { x-> if any (eq x) ys then x : [] else []; _-> []; } ) xs; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (1) LR (EQUIVALENT) Lambda Reductions: The following Lambda expression "\vv2->case vv2 of { x -> if any (eq x) ys then x : [] else []; _ -> []} " is transformed to "intersectBy0 eq ys vv2 = case vv2 of { x -> if any (eq x) ys then x : [] else []; _ -> []} ; " ---------------------------------------- (2) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]; intersectBy eq xs ys = concatMap (intersectBy0 eq ys) xs; intersectBy0 eq ys vv2 = case vv2 of { x-> if any (eq x) ys then x : [] else []; _-> []; } ; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (3) CR (EQUIVALENT) Case Reductions: The following Case expression "case vv2 of { x -> if any (eq x) ys then x : [] else []; _ -> []} " is transformed to "intersectBy00 eq ys x = if any (eq x) ys then x : [] else []; intersectBy00 eq ys _ = []; " ---------------------------------------- (4) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]; intersectBy eq xs ys = concatMap (intersectBy0 eq ys) xs; intersectBy0 eq ys vv2 = intersectBy00 eq ys vv2; intersectBy00 eq ys x = if any (eq x) ys then x : [] else []; intersectBy00 eq ys _ = []; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (5) IFR (EQUIVALENT) If Reductions: The following If expression "if any (eq x) ys then x : [] else []" is transformed to "intersectBy000 x True = x : []; intersectBy000 x False = []; " ---------------------------------------- (6) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]; intersectBy eq xs ys = concatMap (intersectBy0 eq ys) xs; intersectBy0 eq ys vv2 = intersectBy00 eq ys vv2; intersectBy00 eq ys x = intersectBy000 x (any (eq x) ys); intersectBy00 eq ys _ = []; intersectBy000 x True = x : []; intersectBy000 x False = []; } 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; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]; intersectBy eq xs ys = concatMap (intersectBy0 eq ys) xs; intersectBy0 eq ys vv2 = intersectBy00 eq ys vv2; intersectBy00 eq ys x = intersectBy000 x (any (eq x) ys); intersectBy00 eq ys vy = []; intersectBy000 x True = x : []; intersectBy000 x False = []; } 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; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]; intersectBy eq xs ys = concatMap (intersectBy0 eq ys) xs; intersectBy0 eq ys vv2 = intersectBy00 eq ys vv2; intersectBy00 eq ys x = intersectBy000 x (any (eq x) ys); intersectBy00 eq ys vy = []; intersectBy000 x True = x : []; intersectBy000 x False = []; } 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.intersectBy",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="List.intersectBy vz3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 4[label="List.intersectBy vz3 vz4",fontsize=16,color="grey",shape="box"];4 -> 5[label="",style="dashed", color="grey", weight=3]; 5[label="List.intersectBy vz3 vz4 vz5",fontsize=16,color="black",shape="triangle"];5 -> 6[label="",style="solid", color="black", weight=3]; 6[label="concatMap (List.intersectBy0 vz3 vz5) vz4",fontsize=16,color="black",shape="box"];6 -> 7[label="",style="solid", color="black", weight=3]; 7[label="concat . map (List.intersectBy0 vz3 vz5)",fontsize=16,color="black",shape="box"];7 -> 8[label="",style="solid", color="black", weight=3]; 8[label="concat (map (List.intersectBy0 vz3 vz5) vz4)",fontsize=16,color="black",shape="box"];8 -> 9[label="",style="solid", color="black", weight=3]; 9[label="foldr (++) [] (map (List.intersectBy0 vz3 vz5) vz4)",fontsize=16,color="burlywood",shape="triangle"];46[label="vz4/vz40 : vz41",fontsize=10,color="white",style="solid",shape="box"];9 -> 46[label="",style="solid", color="burlywood", weight=9]; 46 -> 10[label="",style="solid", color="burlywood", weight=3]; 47[label="vz4/[]",fontsize=10,color="white",style="solid",shape="box"];9 -> 47[label="",style="solid", color="burlywood", weight=9]; 47 -> 11[label="",style="solid", color="burlywood", weight=3]; 10[label="foldr (++) [] (map (List.intersectBy0 vz3 vz5) (vz40 : vz41))",fontsize=16,color="black",shape="box"];10 -> 12[label="",style="solid", color="black", weight=3]; 11[label="foldr (++) [] (map (List.intersectBy0 vz3 vz5) [])",fontsize=16,color="black",shape="box"];11 -> 13[label="",style="solid", color="black", weight=3]; 12[label="foldr (++) [] (List.intersectBy0 vz3 vz5 vz40 : map (List.intersectBy0 vz3 vz5) vz41)",fontsize=16,color="black",shape="box"];12 -> 14[label="",style="solid", color="black", weight=3]; 13[label="foldr (++) [] []",fontsize=16,color="black",shape="box"];13 -> 15[label="",style="solid", color="black", weight=3]; 14 -> 16[label="",style="dashed", color="red", weight=0]; 14[label="(++) List.intersectBy0 vz3 vz5 vz40 foldr (++) [] (map (List.intersectBy0 vz3 vz5) vz41)",fontsize=16,color="magenta"];14 -> 17[label="",style="dashed", color="magenta", weight=3]; 15[label="[]",fontsize=16,color="green",shape="box"];17 -> 9[label="",style="dashed", color="red", weight=0]; 17[label="foldr (++) [] (map (List.intersectBy0 vz3 vz5) vz41)",fontsize=16,color="magenta"];17 -> 18[label="",style="dashed", color="magenta", weight=3]; 16[label="(++) List.intersectBy0 vz3 vz5 vz40 vz6",fontsize=16,color="black",shape="triangle"];16 -> 19[label="",style="solid", color="black", weight=3]; 18[label="vz41",fontsize=16,color="green",shape="box"];19[label="(++) List.intersectBy00 vz3 vz5 vz40 vz6",fontsize=16,color="black",shape="box"];19 -> 20[label="",style="solid", color="black", weight=3]; 20[label="(++) List.intersectBy000 vz40 (any (vz3 vz40) vz5) vz6",fontsize=16,color="black",shape="box"];20 -> 21[label="",style="solid", color="black", weight=3]; 21[label="(++) List.intersectBy000 vz40 (or . map (vz3 vz40)) vz6",fontsize=16,color="black",shape="box"];21 -> 22[label="",style="solid", color="black", weight=3]; 22[label="(++) List.intersectBy000 vz40 (or (map (vz3 vz40) vz5)) vz6",fontsize=16,color="black",shape="box"];22 -> 23[label="",style="solid", color="black", weight=3]; 23[label="(++) List.intersectBy000 vz40 (foldr (||) False (map (vz3 vz40) vz5)) vz6",fontsize=16,color="burlywood",shape="triangle"];48[label="vz5/vz50 : vz51",fontsize=10,color="white",style="solid",shape="box"];23 -> 48[label="",style="solid", color="burlywood", weight=9]; 48 -> 24[label="",style="solid", color="burlywood", weight=3]; 49[label="vz5/[]",fontsize=10,color="white",style="solid",shape="box"];23 -> 49[label="",style="solid", color="burlywood", weight=9]; 49 -> 25[label="",style="solid", color="burlywood", weight=3]; 24[label="(++) List.intersectBy000 vz40 (foldr (||) False (map (vz3 vz40) (vz50 : vz51))) vz6",fontsize=16,color="black",shape="box"];24 -> 26[label="",style="solid", color="black", weight=3]; 25[label="(++) List.intersectBy000 vz40 (foldr (||) False (map (vz3 vz40) [])) vz6",fontsize=16,color="black",shape="box"];25 -> 27[label="",style="solid", color="black", weight=3]; 26[label="(++) List.intersectBy000 vz40 (foldr (||) False (vz3 vz40 vz50 : map (vz3 vz40) vz51)) vz6",fontsize=16,color="black",shape="box"];26 -> 28[label="",style="solid", color="black", weight=3]; 27[label="(++) List.intersectBy000 vz40 (foldr (||) False []) vz6",fontsize=16,color="black",shape="box"];27 -> 29[label="",style="solid", color="black", weight=3]; 28 -> 30[label="",style="dashed", color="red", weight=0]; 28[label="(++) List.intersectBy000 vz40 ((||) vz3 vz40 vz50 foldr (||) False (map (vz3 vz40) vz51)) vz6",fontsize=16,color="magenta"];28 -> 31[label="",style="dashed", color="magenta", weight=3]; 29[label="(++) List.intersectBy000 vz40 False vz6",fontsize=16,color="black",shape="box"];29 -> 32[label="",style="solid", color="black", weight=3]; 31[label="vz3 vz40 vz50",fontsize=16,color="green",shape="box"];31 -> 37[label="",style="dashed", color="green", weight=3]; 31 -> 38[label="",style="dashed", color="green", weight=3]; 30[label="(++) List.intersectBy000 vz40 ((||) vz7 foldr (||) False (map (vz3 vz40) vz51)) vz6",fontsize=16,color="burlywood",shape="triangle"];50[label="vz7/False",fontsize=10,color="white",style="solid",shape="box"];30 -> 50[label="",style="solid", color="burlywood", weight=9]; 50 -> 35[label="",style="solid", color="burlywood", weight=3]; 51[label="vz7/True",fontsize=10,color="white",style="solid",shape="box"];30 -> 51[label="",style="solid", color="burlywood", weight=9]; 51 -> 36[label="",style="solid", color="burlywood", weight=3]; 32[label="(++) [] vz6",fontsize=16,color="black",shape="triangle"];32 -> 39[label="",style="solid", color="black", weight=3]; 37[label="vz40",fontsize=16,color="green",shape="box"];38[label="vz50",fontsize=16,color="green",shape="box"];35[label="(++) List.intersectBy000 vz40 ((||) False foldr (||) False (map (vz3 vz40) vz51)) vz6",fontsize=16,color="black",shape="box"];35 -> 40[label="",style="solid", color="black", weight=3]; 36[label="(++) List.intersectBy000 vz40 ((||) True foldr (||) False (map (vz3 vz40) vz51)) vz6",fontsize=16,color="black",shape="box"];36 -> 41[label="",style="solid", color="black", weight=3]; 39[label="vz6",fontsize=16,color="green",shape="box"];40 -> 23[label="",style="dashed", color="red", weight=0]; 40[label="(++) List.intersectBy000 vz40 (foldr (||) False (map (vz3 vz40) vz51)) vz6",fontsize=16,color="magenta"];40 -> 42[label="",style="dashed", color="magenta", weight=3]; 41[label="(++) List.intersectBy000 vz40 True vz6",fontsize=16,color="black",shape="box"];41 -> 43[label="",style="solid", color="black", weight=3]; 42[label="vz51",fontsize=16,color="green",shape="box"];43[label="(++) (vz40 : []) vz6",fontsize=16,color="black",shape="box"];43 -> 44[label="",style="solid", color="black", weight=3]; 44[label="vz40 : [] ++ vz6",fontsize=16,color="green",shape="box"];44 -> 45[label="",style="dashed", color="green", weight=3]; 45 -> 32[label="",style="dashed", color="red", weight=0]; 45[label="[] ++ vz6",fontsize=16,color="magenta"];} ---------------------------------------- (12) Complex Obligation (AND) ---------------------------------------- (13) Obligation: Q DP problem: The TRS P consists of the following rules: new_psPs0(vz40, vz3, :(vz50, vz51), vz6, ba) -> new_psPs(vz40, vz3, vz51, vz6, ba) new_psPs(vz40, vz3, vz51, vz6, ba) -> new_psPs0(vz40, vz3, vz51, vz6, ba) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (14) 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_psPs(vz40, vz3, vz51, vz6, ba) -> new_psPs0(vz40, vz3, vz51, vz6, ba) The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4, 5 >= 5 *new_psPs0(vz40, vz3, :(vz50, vz51), vz6, ba) -> new_psPs(vz40, vz3, vz51, vz6, ba) The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 3, 4 >= 4, 5 >= 5 ---------------------------------------- (15) YES ---------------------------------------- (16) Obligation: Q DP problem: The TRS P consists of the following rules: new_foldr(vz3, vz5, :(vz40, vz41), ba) -> new_foldr(vz3, vz5, vz41, ba) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (17) 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_foldr(vz3, vz5, :(vz40, vz41), ba) -> new_foldr(vz3, vz5, vz41, ba) The graph contains the following edges 1 >= 1, 2 >= 2, 3 > 3, 4 >= 4 ---------------------------------------- (18) YES