/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.hs /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox/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) 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, 10 ms] (10) HASKELL (11) NumRed [SOUND, 0 ms] (12) HASKELL (13) Narrow [EQUIVALENT, 18 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; elemIndex :: Eq a => a -> [a] -> Maybe Int; elemIndex x = findIndex (== x); findIndex :: (a -> Bool) -> [a] -> Maybe Int; findIndex p = Maybe.listToMaybe . findIndices p; findIndices :: (a -> Bool) -> [a] -> [Int]; findIndices p xs = concatMap (\vv1 ->case vv1 of { (x,i)-> if p x then i : [] else []; _-> []; } ) (zip xs (enumFrom 0)); } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (1) LR (EQUIVALENT) Lambda Reductions: The following Lambda expression "\ab->(a,b)" is transformed to "zip0 a b = (a,b); " The following Lambda expression "\vv1->case vv1 of { (x,i) -> if p x then i : [] else []; _ -> []} " is transformed to "findIndices0 p vv1 = case vv1 of { (x,i) -> if p x then i : [] 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; elemIndex :: Eq a => a -> [a] -> Maybe Int; elemIndex x = findIndex (== x); findIndex :: (a -> Bool) -> [a] -> Maybe Int; findIndex p = Maybe.listToMaybe . findIndices p; findIndices :: (a -> Bool) -> [a] -> [Int]; findIndices p xs = concatMap (findIndices0 p) (zip xs (enumFrom 0)); findIndices0 p vv1 = case vv1 of { (x,i)-> if p x then i : [] else []; _-> []; } ; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (3) CR (EQUIVALENT) Case Reductions: The following Case expression "case vv1 of { (x,i) -> if p x then i : [] else []; _ -> []} " is transformed to "findIndices00 p (x,i) = if p x then i : [] else []; findIndices00 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; elemIndex :: Eq a => a -> [a] -> Maybe Int; elemIndex x = findIndex (== x); findIndex :: (a -> Bool) -> [a] -> Maybe Int; findIndex p = Maybe.listToMaybe . findIndices p; findIndices :: (a -> Bool) -> [a] -> [Int]; findIndices p xs = concatMap (findIndices0 p) (zip xs (enumFrom 0)); findIndices0 p vv1 = findIndices00 p vv1; findIndices00 p (x,i) = if p x then i : [] else []; findIndices00 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 i : [] else []" is transformed to "findIndices000 i True = i : []; findIndices000 i 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; elemIndex :: Eq a => a -> [a] -> Maybe Int; elemIndex x = findIndex (== x); findIndex :: (a -> Bool) -> [a] -> Maybe Int; findIndex p = Maybe.listToMaybe . findIndices p; findIndices :: (a -> Bool) -> [a] -> [Int]; findIndices p xs = concatMap (findIndices0 p) (zip xs (enumFrom 0)); findIndices0 p vv1 = findIndices00 p vv1; findIndices00 p (x,i) = findIndices000 i (p x); findIndices00 p _ = []; findIndices000 i True = i : []; findIndices000 i 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; listToMaybe :: [a] -> Maybe a; listToMaybe [] = Nothing; listToMaybe (a : wv) = Just a; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; elemIndex :: Eq a => a -> [a] -> Maybe Int; elemIndex x = findIndex (== x); findIndex :: (a -> Bool) -> [a] -> Maybe Int; findIndex p = Maybe.listToMaybe . findIndices p; findIndices :: (a -> Bool) -> [a] -> [Int]; findIndices p xs = concatMap (findIndices0 p) (zip xs (enumFrom 0)); findIndices0 p vv1 = findIndices00 p vv1; findIndices00 p (x,i) = findIndices000 i (p x); findIndices00 p ww = []; findIndices000 i True = i : []; findIndices000 i 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; listToMaybe :: [a] -> Maybe a; listToMaybe [] = Nothing; listToMaybe (a : wv) = Just a; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; elemIndex :: Eq a => a -> [a] -> Maybe Int; elemIndex x = findIndex (== x); findIndex :: (a -> Bool) -> [a] -> Maybe Int; findIndex p = Maybe.listToMaybe . findIndices p; findIndices :: (a -> Bool) -> [a] -> [Int]; findIndices p xs = concatMap (findIndices0 p) (zip xs (enumFrom 0)); findIndices0 p vv1 = findIndices00 p vv1; findIndices00 p (x,i) = findIndices000 i (p x); findIndices00 p ww = []; findIndices000 i True = i : []; findIndices000 i False = []; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (11) NumRed (SOUND) Num Reduction:All numbers are transformed to their corresponding representation with Succ, Pred and Zero. ---------------------------------------- (12) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; listToMaybe :: [a] -> Maybe a; listToMaybe [] = Nothing; listToMaybe (a : wv) = Just a; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; elemIndex :: Eq a => a -> [a] -> Maybe Int; elemIndex x = findIndex (== x); findIndex :: (a -> Bool) -> [a] -> Maybe Int; findIndex p = Maybe.listToMaybe . findIndices p; findIndices :: (a -> Bool) -> [a] -> [Int]; findIndices p xs = concatMap (findIndices0 p) (zip xs (enumFrom (Pos Zero))); findIndices0 p vv1 = findIndices00 p vv1; findIndices00 p (x,i) = findIndices000 i (p x); findIndices00 p ww = []; findIndices000 i True = i : []; findIndices000 i False = []; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (13) Narrow (EQUIVALENT) Haskell To QDPs digraph dp_graph { node [outthreshold=100, inthreshold=100];1[label="List.elemIndex",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="List.elemIndex wx3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 4[label="List.elemIndex wx3 wx4",fontsize=16,color="black",shape="triangle"];4 -> 5[label="",style="solid", color="black", weight=3]; 5[label="List.findIndex (wx3 ==) wx4",fontsize=16,color="black",shape="box"];5 -> 6[label="",style="solid", color="black", weight=3]; 6[label="Maybe.listToMaybe . List.findIndices (wx3 ==)",fontsize=16,color="black",shape="box"];6 -> 7[label="",style="solid", color="black", weight=3]; 7[label="Maybe.listToMaybe (List.findIndices (wx3 ==) wx4)",fontsize=16,color="black",shape="box"];7 -> 8[label="",style="solid", color="black", weight=3]; 8[label="Maybe.listToMaybe (concatMap (List.findIndices0 (wx3 ==)) (zip wx4 (enumFrom (Pos Zero))))",fontsize=16,color="black",shape="box"];8 -> 9[label="",style="solid", color="black", weight=3]; 9[label="Maybe.listToMaybe (concat . map (List.findIndices0 (wx3 ==)))",fontsize=16,color="black",shape="box"];9 -> 10[label="",style="solid", color="black", weight=3]; 10[label="Maybe.listToMaybe (concat (map (List.findIndices0 (wx3 ==)) (zip wx4 (enumFrom (Pos Zero)))))",fontsize=16,color="black",shape="box"];10 -> 11[label="",style="solid", color="black", weight=3]; 11[label="Maybe.listToMaybe (foldr (++) [] (map (List.findIndices0 (wx3 ==)) (zip wx4 (enumFrom (Pos Zero)))))",fontsize=16,color="black",shape="box"];11 -> 12[label="",style="solid", color="black", weight=3]; 12[label="Maybe.listToMaybe (foldr (++) [] (map (List.findIndices0 (wx3 ==)) (zipWith zip0 wx4 (enumFrom (Pos Zero)))))",fontsize=16,color="burlywood",shape="box"];33[label="wx4/wx40 : wx41",fontsize=10,color="white",style="solid",shape="box"];12 -> 33[label="",style="solid", color="burlywood", weight=9]; 33 -> 13[label="",style="solid", color="burlywood", weight=3]; 34[label="wx4/[]",fontsize=10,color="white",style="solid",shape="box"];12 -> 34[label="",style="solid", color="burlywood", weight=9]; 34 -> 14[label="",style="solid", color="burlywood", weight=3]; 13[label="Maybe.listToMaybe (foldr (++) [] (map (List.findIndices0 (wx3 ==)) (zipWith zip0 (wx40 : wx41) (enumFrom (Pos Zero)))))",fontsize=16,color="black",shape="box"];13 -> 15[label="",style="solid", color="black", weight=3]; 14[label="Maybe.listToMaybe (foldr (++) [] (map (List.findIndices0 (wx3 ==)) (zipWith zip0 [] (enumFrom (Pos Zero)))))",fontsize=16,color="black",shape="box"];14 -> 16[label="",style="solid", color="black", weight=3]; 15[label="Maybe.listToMaybe (foldr (++) [] (map (List.findIndices0 (wx3 ==)) (zipWith zip0 (wx40 : wx41) (numericEnumFrom (Pos Zero)))))",fontsize=16,color="black",shape="box"];15 -> 17[label="",style="solid", color="black", weight=3]; 16[label="Maybe.listToMaybe (foldr (++) [] (map (List.findIndices0 (wx3 ==)) []))",fontsize=16,color="black",shape="box"];16 -> 18[label="",style="solid", color="black", weight=3]; 17[label="Maybe.listToMaybe (foldr (++) [] (map (List.findIndices0 (wx3 ==)) (zipWith zip0 (wx40 : wx41) (Pos Zero : (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero)))))))",fontsize=16,color="black",shape="box"];17 -> 19[label="",style="solid", color="black", weight=3]; 18[label="Maybe.listToMaybe (foldr (++) [] [])",fontsize=16,color="black",shape="box"];18 -> 20[label="",style="solid", color="black", weight=3]; 19[label="Maybe.listToMaybe (foldr (++) [] (map (List.findIndices0 (wx3 ==)) (zip0 wx40 (Pos Zero) : zipWith zip0 wx41 (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero))))))",fontsize=16,color="black",shape="box"];19 -> 21[label="",style="solid", color="black", weight=3]; 20[label="Maybe.listToMaybe []",fontsize=16,color="black",shape="box"];20 -> 22[label="",style="solid", color="black", weight=3]; 21[label="Maybe.listToMaybe (foldr (++) [] (List.findIndices0 (wx3 ==) (zip0 wx40 (Pos Zero)) : map (List.findIndices0 (wx3 ==)) (zipWith zip0 wx41 (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero))))))",fontsize=16,color="black",shape="box"];21 -> 23[label="",style="solid", color="black", weight=3]; 22[label="Nothing",fontsize=16,color="green",shape="box"];23[label="Maybe.listToMaybe ((++) List.findIndices0 (wx3 ==) (zip0 wx40 (Pos Zero)) foldr (++) [] (map (List.findIndices0 (wx3 ==)) (zipWith zip0 wx41 (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero))))))",fontsize=16,color="black",shape="box"];23 -> 24[label="",style="solid", color="black", weight=3]; 24[label="Maybe.listToMaybe ((++) List.findIndices00 (wx3 ==) (zip0 wx40 (Pos Zero)) foldr (++) [] (map (List.findIndices0 (wx3 ==)) (zipWith zip0 wx41 (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero))))))",fontsize=16,color="black",shape="box"];24 -> 25[label="",style="solid", color="black", weight=3]; 25[label="Maybe.listToMaybe ((++) List.findIndices00 (wx3 ==) (wx40,Pos Zero) foldr (++) [] (map (List.findIndices0 (wx3 ==)) (zipWith zip0 wx41 (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero))))))",fontsize=16,color="black",shape="box"];25 -> 26[label="",style="solid", color="black", weight=3]; 26[label="Maybe.listToMaybe ((++) List.findIndices000 (Pos Zero) (wx3 == wx40) foldr (++) [] (map (List.findIndices0 (wx3 ==)) (zipWith zip0 wx41 (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero))))))",fontsize=16,color="burlywood",shape="box"];35[label="wx3/()",fontsize=10,color="white",style="solid",shape="box"];26 -> 35[label="",style="solid", color="burlywood", weight=9]; 35 -> 27[label="",style="solid", color="burlywood", weight=3]; 27[label="Maybe.listToMaybe ((++) List.findIndices000 (Pos Zero) (() == wx40) foldr (++) [] (map (List.findIndices0 (() ==)) (zipWith zip0 wx41 (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero))))))",fontsize=16,color="burlywood",shape="box"];36[label="wx40/()",fontsize=10,color="white",style="solid",shape="box"];27 -> 36[label="",style="solid", color="burlywood", weight=9]; 36 -> 28[label="",style="solid", color="burlywood", weight=3]; 28[label="Maybe.listToMaybe ((++) List.findIndices000 (Pos Zero) (() == ()) foldr (++) [] (map (List.findIndices0 (() ==)) (zipWith zip0 wx41 (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero))))))",fontsize=16,color="black",shape="box"];28 -> 29[label="",style="solid", color="black", weight=3]; 29[label="Maybe.listToMaybe ((++) List.findIndices000 (Pos Zero) True foldr (++) [] (map (List.findIndices0 (() ==)) (zipWith zip0 wx41 (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero))))))",fontsize=16,color="black",shape="box"];29 -> 30[label="",style="solid", color="black", weight=3]; 30[label="Maybe.listToMaybe ((++) (Pos Zero : []) foldr (++) [] (map (List.findIndices0 (() ==)) (zipWith zip0 wx41 (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero))))))",fontsize=16,color="black",shape="box"];30 -> 31[label="",style="solid", color="black", weight=3]; 31[label="Maybe.listToMaybe (Pos Zero : [] ++ foldr (++) [] (map (List.findIndices0 (() ==)) (zipWith zip0 wx41 (numericEnumFrom $! Pos Zero + fromInt (Pos (Succ Zero))))))",fontsize=16,color="black",shape="box"];31 -> 32[label="",style="solid", color="black", weight=3]; 32[label="Just (Pos Zero)",fontsize=16,color="green",shape="box"];} ---------------------------------------- (14) YES