/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: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 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 [EQUIVALENT, 0 ms] (6) YES ---------------------------------------- (0) Obligation: mainModule Main module FiniteMap where { import qualified Main; import qualified Maybe; import qualified Prelude; data FiniteMap b a = EmptyFM | Branch b a Int (FiniteMap b a) (FiniteMap b a) ; instance (Eq a, Eq b) => Eq FiniteMap b a where { } lookupFM :: Ord a => FiniteMap a b -> a -> Maybe b; lookupFM EmptyFM key = Nothing; lookupFM (Branch key elt _ fm_l fm_r) key_to_find | key_to_find < key = lookupFM fm_l key_to_find | key_to_find > key = lookupFM fm_r key_to_find | otherwise = Just elt; } module Maybe where { import qualified FiniteMap; import qualified Main; import qualified Prelude; } module Main where { import qualified FiniteMap; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (1) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. ---------------------------------------- (2) Obligation: mainModule Main module FiniteMap where { import qualified Main; import qualified Maybe; import qualified Prelude; data FiniteMap b a = EmptyFM | Branch b a Int (FiniteMap b a) (FiniteMap b a) ; instance (Eq a, Eq b) => Eq FiniteMap b a where { } lookupFM :: Ord a => FiniteMap a b -> a -> Maybe b; lookupFM EmptyFM key = Nothing; lookupFM (Branch key elt vy fm_l fm_r) key_to_find | key_to_find < key = lookupFM fm_l key_to_find | key_to_find > key = lookupFM fm_r key_to_find | otherwise = Just elt; } module Maybe where { import qualified FiniteMap; import qualified Main; import qualified Prelude; } module Main where { import qualified FiniteMap; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (3) COR (EQUIVALENT) Cond Reductions: The following Function with conditions "undefined |Falseundefined; " is transformed to "undefined = undefined1; " "undefined0 True = undefined; " "undefined1 = undefined0 False; " The following Function with conditions "lookupFM EmptyFM key = Nothing; lookupFM (Branch key elt vy fm_l fm_r) key_to_find|key_to_find < keylookupFM fm_l key_to_find|key_to_find > keylookupFM fm_r key_to_find|otherwiseJust elt; " is transformed to "lookupFM EmptyFM key = lookupFM4 EmptyFM key; lookupFM (Branch key elt vy fm_l fm_r) key_to_find = lookupFM3 (Branch key elt vy fm_l fm_r) key_to_find; " "lookupFM1 key elt vy fm_l fm_r key_to_find True = lookupFM fm_r key_to_find; lookupFM1 key elt vy fm_l fm_r key_to_find False = lookupFM0 key elt vy fm_l fm_r key_to_find otherwise; " "lookupFM0 key elt vy fm_l fm_r key_to_find True = Just elt; " "lookupFM2 key elt vy fm_l fm_r key_to_find True = lookupFM fm_l key_to_find; lookupFM2 key elt vy fm_l fm_r key_to_find False = lookupFM1 key elt vy fm_l fm_r key_to_find (key_to_find > key); " "lookupFM3 (Branch key elt vy fm_l fm_r) key_to_find = lookupFM2 key elt vy fm_l fm_r key_to_find (key_to_find < key); " "lookupFM4 EmptyFM key = Nothing; lookupFM4 wv ww = lookupFM3 wv ww; " ---------------------------------------- (4) Obligation: mainModule Main module FiniteMap where { import qualified Main; import qualified Maybe; import qualified Prelude; data FiniteMap b a = EmptyFM | Branch b a Int (FiniteMap b a) (FiniteMap b a) ; instance (Eq a, Eq b) => Eq FiniteMap b a where { } lookupFM :: Ord b => FiniteMap b a -> b -> Maybe a; lookupFM EmptyFM key = lookupFM4 EmptyFM key; lookupFM (Branch key elt vy fm_l fm_r) key_to_find = lookupFM3 (Branch key elt vy fm_l fm_r) key_to_find; lookupFM0 key elt vy fm_l fm_r key_to_find True = Just elt; lookupFM1 key elt vy fm_l fm_r key_to_find True = lookupFM fm_r key_to_find; lookupFM1 key elt vy fm_l fm_r key_to_find False = lookupFM0 key elt vy fm_l fm_r key_to_find otherwise; lookupFM2 key elt vy fm_l fm_r key_to_find True = lookupFM fm_l key_to_find; lookupFM2 key elt vy fm_l fm_r key_to_find False = lookupFM1 key elt vy fm_l fm_r key_to_find (key_to_find > key); lookupFM3 (Branch key elt vy fm_l fm_r) key_to_find = lookupFM2 key elt vy fm_l fm_r key_to_find (key_to_find < key); lookupFM4 EmptyFM key = Nothing; lookupFM4 wv ww = lookupFM3 wv ww; } module Maybe where { import qualified FiniteMap; import qualified Main; import qualified Prelude; } module Main where { import qualified FiniteMap; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (5) Narrow (EQUIVALENT) Haskell To QDPs digraph dp_graph { node [outthreshold=100, inthreshold=100];1[label="FiniteMap.lookupFM",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="FiniteMap.lookupFM wx3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 4[label="FiniteMap.lookupFM wx3 wx4",fontsize=16,color="burlywood",shape="triangle"];23[label="wx3/FiniteMap.EmptyFM",fontsize=10,color="white",style="solid",shape="box"];4 -> 23[label="",style="solid", color="burlywood", weight=9]; 23 -> 5[label="",style="solid", color="burlywood", weight=3]; 24[label="wx3/FiniteMap.Branch wx30 wx31 wx32 wx33 wx34",fontsize=10,color="white",style="solid",shape="box"];4 -> 24[label="",style="solid", color="burlywood", weight=9]; 24 -> 6[label="",style="solid", color="burlywood", weight=3]; 5[label="FiniteMap.lookupFM FiniteMap.EmptyFM wx4",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 6[label="FiniteMap.lookupFM (FiniteMap.Branch wx30 wx31 wx32 wx33 wx34) wx4",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 7[label="FiniteMap.lookupFM4 FiniteMap.EmptyFM wx4",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 8[label="FiniteMap.lookupFM3 (FiniteMap.Branch wx30 wx31 wx32 wx33 wx34) wx4",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 9[label="Nothing",fontsize=16,color="green",shape="box"];10[label="FiniteMap.lookupFM2 wx30 wx31 wx32 wx33 wx34 wx4 (wx4 < wx30)",fontsize=16,color="black",shape="box"];10 -> 11[label="",style="solid", color="black", weight=3]; 11[label="FiniteMap.lookupFM2 wx30 wx31 wx32 wx33 wx34 wx4 (compare wx4 wx30 == LT)",fontsize=16,color="burlywood",shape="box"];25[label="wx4/()",fontsize=10,color="white",style="solid",shape="box"];11 -> 25[label="",style="solid", color="burlywood", weight=9]; 25 -> 12[label="",style="solid", color="burlywood", weight=3]; 12[label="FiniteMap.lookupFM2 wx30 wx31 wx32 wx33 wx34 () (compare () wx30 == LT)",fontsize=16,color="burlywood",shape="box"];26[label="wx30/()",fontsize=10,color="white",style="solid",shape="box"];12 -> 26[label="",style="solid", color="burlywood", weight=9]; 26 -> 13[label="",style="solid", color="burlywood", weight=3]; 13[label="FiniteMap.lookupFM2 () wx31 wx32 wx33 wx34 () (compare () () == LT)",fontsize=16,color="black",shape="box"];13 -> 14[label="",style="solid", color="black", weight=3]; 14[label="FiniteMap.lookupFM2 () wx31 wx32 wx33 wx34 () (EQ == LT)",fontsize=16,color="black",shape="box"];14 -> 15[label="",style="solid", color="black", weight=3]; 15[label="FiniteMap.lookupFM2 () wx31 wx32 wx33 wx34 () False",fontsize=16,color="black",shape="box"];15 -> 16[label="",style="solid", color="black", weight=3]; 16[label="FiniteMap.lookupFM1 () wx31 wx32 wx33 wx34 () (() > ())",fontsize=16,color="black",shape="box"];16 -> 17[label="",style="solid", color="black", weight=3]; 17[label="FiniteMap.lookupFM1 () wx31 wx32 wx33 wx34 () (compare () () == GT)",fontsize=16,color="black",shape="box"];17 -> 18[label="",style="solid", color="black", weight=3]; 18[label="FiniteMap.lookupFM1 () wx31 wx32 wx33 wx34 () (EQ == GT)",fontsize=16,color="black",shape="box"];18 -> 19[label="",style="solid", color="black", weight=3]; 19[label="FiniteMap.lookupFM1 () wx31 wx32 wx33 wx34 () False",fontsize=16,color="black",shape="box"];19 -> 20[label="",style="solid", color="black", weight=3]; 20[label="FiniteMap.lookupFM0 () wx31 wx32 wx33 wx34 () otherwise",fontsize=16,color="black",shape="box"];20 -> 21[label="",style="solid", color="black", weight=3]; 21[label="FiniteMap.lookupFM0 () wx31 wx32 wx33 wx34 () True",fontsize=16,color="black",shape="box"];21 -> 22[label="",style="solid", color="black", weight=3]; 22[label="Just wx31",fontsize=16,color="green",shape="box"];} ---------------------------------------- (6) YES