10.01/4.54 YES 12.25/5.12 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 12.25/5.12 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 12.25/5.12 12.25/5.12 12.25/5.12 H-Termination with start terms of the given HASKELL could be proven: 12.25/5.12 12.25/5.12 (0) HASKELL 12.25/5.12 (1) CR [EQUIVALENT, 0 ms] 12.25/5.12 (2) HASKELL 12.25/5.12 (3) BR [EQUIVALENT, 0 ms] 12.25/5.12 (4) HASKELL 12.25/5.12 (5) COR [EQUIVALENT, 0 ms] 12.25/5.12 (6) HASKELL 12.25/5.12 (7) Narrow [SOUND, 0 ms] 12.25/5.12 (8) QDP 12.25/5.12 (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] 12.25/5.12 (10) YES 12.25/5.12 12.25/5.12 12.25/5.12 ---------------------------------------- 12.25/5.12 12.25/5.12 (0) 12.25/5.12 Obligation: 12.25/5.12 mainModule Main 12.25/5.12 module FiniteMap where { 12.25/5.12 import qualified Main; 12.25/5.12 import qualified Maybe; 12.25/5.12 import qualified Prelude; 12.25/5.12 data FiniteMap b a = EmptyFM | Branch b a Int (FiniteMap b a) (FiniteMap b a) ; 12.25/5.12 12.25/5.12 minFM :: Ord a => FiniteMap a b -> Maybe a; 12.25/5.12 minFM EmptyFM = Nothing; 12.25/5.12 minFM (Branch key _ _ fm_l _) = case minFM fm_l of { 12.25/5.12 Nothing-> Just key; 12.25/5.12 Just key1-> Just key1; 12.25/5.12 } ; 12.25/5.12 12.25/5.12 } 12.25/5.12 module Maybe where { 12.25/5.12 import qualified FiniteMap; 12.25/5.12 import qualified Main; 12.25/5.12 import qualified Prelude; 12.25/5.12 } 12.25/5.12 module Main where { 12.25/5.12 import qualified FiniteMap; 12.25/5.12 import qualified Maybe; 12.25/5.12 import qualified Prelude; 12.25/5.12 } 12.25/5.12 12.25/5.12 ---------------------------------------- 12.25/5.12 12.25/5.12 (1) CR (EQUIVALENT) 12.25/5.12 Case Reductions: 12.25/5.12 The following Case expression 12.25/5.12 "case minFM fm_l of { 12.25/5.12 Nothing -> Just key; 12.25/5.12 Just key1 -> Just key1} 12.25/5.12 " 12.25/5.12 is transformed to 12.25/5.12 "minFM0 key Nothing = Just key; 12.25/5.12 minFM0 key (Just key1) = Just key1; 12.25/5.12 " 12.25/5.12 12.25/5.12 ---------------------------------------- 12.25/5.12 12.25/5.12 (2) 12.25/5.12 Obligation: 12.25/5.12 mainModule Main 12.25/5.12 module FiniteMap where { 12.25/5.12 import qualified Main; 12.25/5.12 import qualified Maybe; 12.25/5.12 import qualified Prelude; 12.25/5.12 data FiniteMap b a = EmptyFM | Branch b a Int (FiniteMap b a) (FiniteMap b a) ; 12.25/5.12 12.25/5.12 minFM :: Ord b => FiniteMap b a -> Maybe b; 12.25/5.12 minFM EmptyFM = Nothing; 12.25/5.12 minFM (Branch key _ _ fm_l _) = minFM0 key (minFM fm_l); 12.25/5.12 12.25/5.12 minFM0 key Nothing = Just key; 12.25/5.12 minFM0 key (Just key1) = Just key1; 12.25/5.12 12.25/5.12 } 12.25/5.12 module Maybe where { 12.25/5.12 import qualified FiniteMap; 12.25/5.12 import qualified Main; 12.25/5.12 import qualified Prelude; 12.25/5.12 } 12.25/5.12 module Main where { 12.25/5.12 import qualified FiniteMap; 12.25/5.12 import qualified Maybe; 12.25/5.12 import qualified Prelude; 12.25/5.12 } 12.25/5.12 12.25/5.12 ---------------------------------------- 12.25/5.12 12.25/5.12 (3) BR (EQUIVALENT) 12.25/5.12 Replaced joker patterns by fresh variables and removed binding patterns. 12.25/5.12 ---------------------------------------- 12.25/5.12 12.25/5.12 (4) 12.25/5.12 Obligation: 12.25/5.12 mainModule Main 12.25/5.12 module FiniteMap where { 12.25/5.12 import qualified Main; 12.25/5.12 import qualified Maybe; 12.25/5.12 import qualified Prelude; 12.25/5.12 data FiniteMap b a = EmptyFM | Branch b a Int (FiniteMap b a) (FiniteMap b a) ; 12.25/5.12 12.25/5.12 minFM :: Ord b => FiniteMap b a -> Maybe b; 12.25/5.12 minFM EmptyFM = Nothing; 12.25/5.12 minFM (Branch key vy vz fm_l wu) = minFM0 key (minFM fm_l); 12.25/5.12 12.25/5.12 minFM0 key Nothing = Just key; 12.25/5.12 minFM0 key (Just key1) = Just key1; 12.25/5.12 12.25/5.12 } 12.25/5.12 module Maybe where { 12.25/5.12 import qualified FiniteMap; 12.25/5.12 import qualified Main; 12.25/5.12 import qualified Prelude; 12.25/5.12 } 12.25/5.12 module Main where { 12.25/5.12 import qualified FiniteMap; 12.25/5.12 import qualified Maybe; 12.25/5.12 import qualified Prelude; 12.25/5.12 } 12.25/5.12 12.25/5.12 ---------------------------------------- 12.25/5.12 12.25/5.12 (5) COR (EQUIVALENT) 12.25/5.12 Cond Reductions: 12.25/5.12 The following Function with conditions 12.25/5.12 "undefined |Falseundefined; 12.25/5.12 " 12.25/5.12 is transformed to 12.25/5.12 "undefined = undefined1; 12.25/5.12 " 12.25/5.12 "undefined0 True = undefined; 12.25/5.12 " 12.25/5.12 "undefined1 = undefined0 False; 12.25/5.12 " 12.25/5.12 12.25/5.12 ---------------------------------------- 12.25/5.12 12.25/5.12 (6) 12.25/5.12 Obligation: 12.25/5.12 mainModule Main 12.25/5.12 module FiniteMap where { 12.25/5.12 import qualified Main; 12.25/5.12 import qualified Maybe; 12.25/5.12 import qualified Prelude; 12.25/5.12 data FiniteMap a b = EmptyFM | Branch a b Int (FiniteMap a b) (FiniteMap a b) ; 12.25/5.12 12.25/5.12 minFM :: Ord a => FiniteMap a b -> Maybe a; 12.25/5.12 minFM EmptyFM = Nothing; 12.25/5.12 minFM (Branch key vy vz fm_l wu) = minFM0 key (minFM fm_l); 12.25/5.12 12.25/5.12 minFM0 key Nothing = Just key; 12.25/5.12 minFM0 key (Just key1) = Just key1; 12.25/5.12 12.25/5.12 } 12.25/5.12 module Maybe where { 12.25/5.12 import qualified FiniteMap; 12.25/5.12 import qualified Main; 12.25/5.12 import qualified Prelude; 12.25/5.12 } 12.25/5.12 module Main where { 12.25/5.12 import qualified FiniteMap; 12.25/5.12 import qualified Maybe; 12.25/5.12 import qualified Prelude; 12.25/5.12 } 12.25/5.12 12.25/5.12 ---------------------------------------- 12.25/5.12 12.25/5.12 (7) Narrow (SOUND) 12.25/5.12 Haskell To QDPs 12.25/5.12 12.25/5.12 digraph dp_graph { 12.25/5.12 node [outthreshold=100, inthreshold=100];1[label="FiniteMap.minFM",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 12.25/5.12 3[label="FiniteMap.minFM wv3",fontsize=16,color="burlywood",shape="triangle"];15[label="wv3/FiniteMap.EmptyFM",fontsize=10,color="white",style="solid",shape="box"];3 -> 15[label="",style="solid", color="burlywood", weight=9]; 12.25/5.12 15 -> 4[label="",style="solid", color="burlywood", weight=3]; 12.25/5.12 16[label="wv3/FiniteMap.Branch wv30 wv31 wv32 wv33 wv34",fontsize=10,color="white",style="solid",shape="box"];3 -> 16[label="",style="solid", color="burlywood", weight=9]; 12.25/5.12 16 -> 5[label="",style="solid", color="burlywood", weight=3]; 12.25/5.12 4[label="FiniteMap.minFM FiniteMap.EmptyFM",fontsize=16,color="black",shape="box"];4 -> 6[label="",style="solid", color="black", weight=3]; 12.25/5.12 5[label="FiniteMap.minFM (FiniteMap.Branch wv30 wv31 wv32 wv33 wv34)",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 12.25/5.12 6[label="Nothing",fontsize=16,color="green",shape="box"];7 -> 8[label="",style="dashed", color="red", weight=0]; 12.25/5.12 7[label="FiniteMap.minFM0 wv30 (FiniteMap.minFM wv33)",fontsize=16,color="magenta"];7 -> 9[label="",style="dashed", color="magenta", weight=3]; 12.25/5.12 9 -> 3[label="",style="dashed", color="red", weight=0]; 12.25/5.12 9[label="FiniteMap.minFM wv33",fontsize=16,color="magenta"];9 -> 10[label="",style="dashed", color="magenta", weight=3]; 12.25/5.12 8[label="FiniteMap.minFM0 wv30 wv4",fontsize=16,color="burlywood",shape="triangle"];17[label="wv4/Nothing",fontsize=10,color="white",style="solid",shape="box"];8 -> 17[label="",style="solid", color="burlywood", weight=9]; 12.25/5.12 17 -> 11[label="",style="solid", color="burlywood", weight=3]; 12.25/5.12 18[label="wv4/Just wv40",fontsize=10,color="white",style="solid",shape="box"];8 -> 18[label="",style="solid", color="burlywood", weight=9]; 12.25/5.12 18 -> 12[label="",style="solid", color="burlywood", weight=3]; 12.25/5.12 10[label="wv33",fontsize=16,color="green",shape="box"];11[label="FiniteMap.minFM0 wv30 Nothing",fontsize=16,color="black",shape="box"];11 -> 13[label="",style="solid", color="black", weight=3]; 12.25/5.12 12[label="FiniteMap.minFM0 wv30 (Just wv40)",fontsize=16,color="black",shape="box"];12 -> 14[label="",style="solid", color="black", weight=3]; 12.25/5.12 13[label="Just wv30",fontsize=16,color="green",shape="box"];14[label="Just wv40",fontsize=16,color="green",shape="box"];} 12.25/5.12 12.25/5.12 ---------------------------------------- 12.25/5.12 12.25/5.12 (8) 12.25/5.12 Obligation: 12.25/5.12 Q DP problem: 12.25/5.12 The TRS P consists of the following rules: 12.25/5.12 12.25/5.12 new_minFM(Branch(wv30, wv31, wv32, wv33, wv34), h, ba, bb) -> new_minFM(wv33, h, ba, bb) 12.25/5.12 12.25/5.12 R is empty. 12.25/5.12 Q is empty. 12.25/5.12 We have to consider all minimal (P,Q,R)-chains. 12.25/5.12 ---------------------------------------- 12.25/5.12 12.25/5.12 (9) QDPSizeChangeProof (EQUIVALENT) 12.25/5.12 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.25/5.12 12.25/5.12 From the DPs we obtained the following set of size-change graphs: 12.25/5.12 *new_minFM(Branch(wv30, wv31, wv32, wv33, wv34), h, ba, bb) -> new_minFM(wv33, h, ba, bb) 12.25/5.12 The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3, 4 >= 4 12.25/5.12 12.25/5.12 12.25/5.12 ---------------------------------------- 12.25/5.12 12.25/5.12 (10) 12.25/5.12 YES 12.25/5.17 EOF