/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: 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) BR [EQUIVALENT, 0 ms] (4) HASKELL (5) COR [EQUIVALENT, 0 ms] (6) HASKELL (7) Narrow [SOUND, 0 ms] (8) AND (9) QDP (10) QDPSizeChangeProof [EQUIVALENT, 0 ms] (11) YES (12) QDP (13) QDPSizeChangeProof [EQUIVALENT, 0 ms] (14) 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) ; fmToList :: FiniteMap b a -> [(b,a)]; fmToList fm = foldFM (\key elt rest ->(key,elt) : rest) [] fm; foldFM :: (c -> b -> a -> a) -> a -> FiniteMap c b -> a; foldFM k z EmptyFM = z; foldFM k z (Branch key elt _ fm_l fm_r) = foldFM k (k key elt (foldFM k z fm_r)) fm_l; } 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) LR (EQUIVALENT) Lambda Reductions: The following Lambda expression "\keyeltrest->(key,elt) : rest" is transformed to "fmToList0 key elt rest = (key,elt) : rest; " ---------------------------------------- (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) ; fmToList :: FiniteMap b a -> [(b,a)]; fmToList fm = foldFM fmToList0 [] fm; fmToList0 key elt rest = (key,elt) : rest; foldFM :: (b -> a -> c -> c) -> c -> FiniteMap b a -> c; foldFM k z EmptyFM = z; foldFM k z (Branch key elt _ fm_l fm_r) = foldFM k (k key elt (foldFM k z fm_r)) fm_l; } 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) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. ---------------------------------------- (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) ; fmToList :: FiniteMap b a -> [(b,a)]; fmToList fm = foldFM fmToList0 [] fm; fmToList0 key elt rest = (key,elt) : rest; foldFM :: (c -> b -> a -> a) -> a -> FiniteMap c b -> a; foldFM k z EmptyFM = z; foldFM k z (Branch key elt vy fm_l fm_r) = foldFM k (k key elt (foldFM k z fm_r)) fm_l; } 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) COR (EQUIVALENT) Cond Reductions: The following Function with conditions "undefined |Falseundefined; " is transformed to "undefined = undefined1; " "undefined0 True = undefined; " "undefined1 = undefined0 False; " ---------------------------------------- (6) 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) ; fmToList :: FiniteMap b a -> [(b,a)]; fmToList fm = foldFM fmToList0 [] fm; fmToList0 key elt rest = (key,elt) : rest; foldFM :: (a -> b -> c -> c) -> c -> FiniteMap a b -> c; foldFM k z EmptyFM = z; foldFM k z (Branch key elt vy fm_l fm_r) = foldFM k (k key elt (foldFM k z fm_r)) fm_l; } module Maybe where { import qualified FiniteMap; import qualified Main; import qualified Prelude; } module Main where { import qualified FiniteMap; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (7) Narrow (SOUND) Haskell To QDPs digraph dp_graph { node [outthreshold=100, inthreshold=100];1[label="FiniteMap.fmToList",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="FiniteMap.fmToList vz3",fontsize=16,color="black",shape="triangle"];3 -> 4[label="",style="solid", color="black", weight=3]; 4[label="FiniteMap.foldFM FiniteMap.fmToList0 [] vz3",fontsize=16,color="burlywood",shape="triangle"];22[label="vz3/FiniteMap.EmptyFM",fontsize=10,color="white",style="solid",shape="box"];4 -> 22[label="",style="solid", color="burlywood", weight=9]; 22 -> 5[label="",style="solid", color="burlywood", weight=3]; 23[label="vz3/FiniteMap.Branch vz30 vz31 vz32 vz33 vz34",fontsize=10,color="white",style="solid",shape="box"];4 -> 23[label="",style="solid", color="burlywood", weight=9]; 23 -> 6[label="",style="solid", color="burlywood", weight=3]; 5[label="FiniteMap.foldFM FiniteMap.fmToList0 [] FiniteMap.EmptyFM",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 6[label="FiniteMap.foldFM FiniteMap.fmToList0 [] (FiniteMap.Branch vz30 vz31 vz32 vz33 vz34)",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 7[label="[]",fontsize=16,color="green",shape="box"];8 -> 9[label="",style="dashed", color="red", weight=0]; 8[label="FiniteMap.foldFM FiniteMap.fmToList0 (FiniteMap.fmToList0 vz30 vz31 (FiniteMap.foldFM FiniteMap.fmToList0 [] vz34)) vz33",fontsize=16,color="magenta"];8 -> 10[label="",style="dashed", color="magenta", weight=3]; 10 -> 4[label="",style="dashed", color="red", weight=0]; 10[label="FiniteMap.foldFM FiniteMap.fmToList0 [] vz34",fontsize=16,color="magenta"];10 -> 11[label="",style="dashed", color="magenta", weight=3]; 9[label="FiniteMap.foldFM FiniteMap.fmToList0 (FiniteMap.fmToList0 vz30 vz31 vz4) vz33",fontsize=16,color="burlywood",shape="triangle"];24[label="vz33/FiniteMap.EmptyFM",fontsize=10,color="white",style="solid",shape="box"];9 -> 24[label="",style="solid", color="burlywood", weight=9]; 24 -> 12[label="",style="solid", color="burlywood", weight=3]; 25[label="vz33/FiniteMap.Branch vz330 vz331 vz332 vz333 vz334",fontsize=10,color="white",style="solid",shape="box"];9 -> 25[label="",style="solid", color="burlywood", weight=9]; 25 -> 13[label="",style="solid", color="burlywood", weight=3]; 11[label="vz34",fontsize=16,color="green",shape="box"];12[label="FiniteMap.foldFM FiniteMap.fmToList0 (FiniteMap.fmToList0 vz30 vz31 vz4) FiniteMap.EmptyFM",fontsize=16,color="black",shape="box"];12 -> 14[label="",style="solid", color="black", weight=3]; 13[label="FiniteMap.foldFM FiniteMap.fmToList0 (FiniteMap.fmToList0 vz30 vz31 vz4) (FiniteMap.Branch vz330 vz331 vz332 vz333 vz334)",fontsize=16,color="black",shape="box"];13 -> 15[label="",style="solid", color="black", weight=3]; 14[label="FiniteMap.fmToList0 vz30 vz31 vz4",fontsize=16,color="black",shape="box"];14 -> 16[label="",style="solid", color="black", weight=3]; 15 -> 9[label="",style="dashed", color="red", weight=0]; 15[label="FiniteMap.foldFM FiniteMap.fmToList0 (FiniteMap.fmToList0 vz330 vz331 (FiniteMap.foldFM FiniteMap.fmToList0 (FiniteMap.fmToList0 vz30 vz31 vz4) vz334)) vz333",fontsize=16,color="magenta"];15 -> 17[label="",style="dashed", color="magenta", weight=3]; 15 -> 18[label="",style="dashed", color="magenta", weight=3]; 15 -> 19[label="",style="dashed", color="magenta", weight=3]; 15 -> 20[label="",style="dashed", color="magenta", weight=3]; 16[label="(vz30,vz31) : vz4",fontsize=16,color="green",shape="box"];17[label="vz330",fontsize=16,color="green",shape="box"];18 -> 9[label="",style="dashed", color="red", weight=0]; 18[label="FiniteMap.foldFM FiniteMap.fmToList0 (FiniteMap.fmToList0 vz30 vz31 vz4) vz334",fontsize=16,color="magenta"];18 -> 21[label="",style="dashed", color="magenta", weight=3]; 19[label="vz331",fontsize=16,color="green",shape="box"];20[label="vz333",fontsize=16,color="green",shape="box"];21[label="vz334",fontsize=16,color="green",shape="box"];} ---------------------------------------- (8) Complex Obligation (AND) ---------------------------------------- (9) Obligation: Q DP problem: The TRS P consists of the following rules: new_foldFM1(Branch(vz30, vz31, vz32, vz33, vz34), h, ba) -> new_foldFM1(vz34, h, ba) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (10) 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_foldFM1(Branch(vz30, vz31, vz32, vz33, vz34), h, ba) -> new_foldFM1(vz34, h, ba) The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3 ---------------------------------------- (11) YES ---------------------------------------- (12) Obligation: Q DP problem: The TRS P consists of the following rules: new_foldFM(vz30, vz31, vz4, Branch(vz330, vz331, vz332, vz333, vz334), h, ba) -> new_foldFM(vz30, vz31, vz4, vz334, h, ba) new_foldFM(vz30, vz31, vz4, Branch(vz330, vz331, vz332, vz333, vz334), h, ba) -> new_foldFM(vz330, vz331, new_foldFM0(vz30, vz31, vz4, vz334, h, ba), vz333, h, ba) The TRS R consists of the following rules: new_foldFM0(vz30, vz31, vz4, Branch(vz330, vz331, vz332, vz333, vz334), h, ba) -> new_foldFM0(vz330, vz331, new_foldFM0(vz30, vz31, vz4, vz334, h, ba), vz333, h, ba) new_foldFM0(vz30, vz31, vz4, EmptyFM, h, ba) -> :(@2(vz30, vz31), vz4) The set Q consists of the following terms: new_foldFM0(x0, x1, x2, Branch(x3, x4, x5, x6, x7), x8, x9) new_foldFM0(x0, x1, x2, EmptyFM, x3, x4) 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_foldFM(vz30, vz31, vz4, Branch(vz330, vz331, vz332, vz333, vz334), h, ba) -> new_foldFM(vz30, vz31, vz4, vz334, h, ba) The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 > 4, 5 >= 5, 6 >= 6 *new_foldFM(vz30, vz31, vz4, Branch(vz330, vz331, vz332, vz333, vz334), h, ba) -> new_foldFM(vz330, vz331, new_foldFM0(vz30, vz31, vz4, vz334, h, ba), vz333, h, ba) The graph contains the following edges 4 > 1, 4 > 2, 4 > 4, 5 >= 5, 6 >= 6 ---------------------------------------- (14) YES