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