9.47/3.92 YES 11.34/4.47 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 11.34/4.47 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 11.34/4.47 11.34/4.47 11.34/4.47 H-Termination with start terms of the given HASKELL could be proven: 11.34/4.47 11.34/4.47 (0) HASKELL 11.34/4.47 (1) LR [EQUIVALENT, 0 ms] 11.34/4.47 (2) HASKELL 11.34/4.47 (3) BR [EQUIVALENT, 0 ms] 11.34/4.47 (4) HASKELL 11.34/4.47 (5) COR [EQUIVALENT, 0 ms] 11.34/4.47 (6) HASKELL 11.34/4.47 (7) Narrow [SOUND, 0 ms] 11.34/4.47 (8) QDP 11.34/4.47 (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] 11.34/4.47 (10) YES 11.34/4.47 11.34/4.47 11.34/4.47 ---------------------------------------- 11.34/4.47 11.34/4.47 (0) 11.34/4.47 Obligation: 11.34/4.47 mainModule Main 11.34/4.47 module Maybe where { 11.34/4.47 import qualified Main; 11.34/4.47 import qualified Monad; 11.34/4.47 import qualified Prelude; 11.34/4.47 } 11.34/4.47 module Main where { 11.34/4.47 import qualified Maybe; 11.34/4.47 import qualified Monad; 11.34/4.47 import qualified Prelude; 11.34/4.47 } 11.34/4.47 module Monad where { 11.34/4.47 import qualified Main; 11.34/4.47 import qualified Maybe; 11.34/4.47 import qualified Prelude; 11.34/4.47 foldM :: Monad b => (c -> a -> b c) -> c -> [a] -> b c; 11.34/4.47 foldM _ a [] = return a; 11.34/4.47 foldM f a (x : xs) = f a x >>= (\fax ->foldM f fax xs); 11.34/4.47 11.34/4.47 } 11.34/4.47 11.34/4.47 ---------------------------------------- 11.34/4.47 11.34/4.47 (1) LR (EQUIVALENT) 11.34/4.47 Lambda Reductions: 11.34/4.47 The following Lambda expression 11.34/4.47 "\fax->foldM f fax xs" 11.34/4.47 is transformed to 11.34/4.47 "foldM0 f xs fax = foldM f fax xs; 11.34/4.47 " 11.34/4.47 11.34/4.47 ---------------------------------------- 11.34/4.47 11.34/4.47 (2) 11.34/4.47 Obligation: 11.34/4.47 mainModule Main 11.34/4.47 module Maybe where { 11.34/4.47 import qualified Main; 11.34/4.47 import qualified Monad; 11.34/4.47 import qualified Prelude; 11.34/4.47 } 11.34/4.47 module Main where { 11.34/4.47 import qualified Maybe; 11.34/4.47 import qualified Monad; 11.34/4.47 import qualified Prelude; 11.34/4.47 } 11.34/4.47 module Monad where { 11.34/4.47 import qualified Main; 11.34/4.47 import qualified Maybe; 11.34/4.47 import qualified Prelude; 11.34/4.47 foldM :: Monad b => (a -> c -> b a) -> a -> [c] -> b a; 11.34/4.47 foldM _ a [] = return a; 11.34/4.47 foldM f a (x : xs) = f a x >>= foldM0 f xs; 11.34/4.47 11.34/4.47 foldM0 f xs fax = foldM f fax xs; 11.34/4.47 11.34/4.47 } 11.34/4.47 11.34/4.47 ---------------------------------------- 11.34/4.47 11.34/4.47 (3) BR (EQUIVALENT) 11.34/4.47 Replaced joker patterns by fresh variables and removed binding patterns. 11.34/4.47 ---------------------------------------- 11.34/4.47 11.34/4.47 (4) 11.34/4.47 Obligation: 11.34/4.47 mainModule Main 11.34/4.47 module Maybe where { 11.34/4.47 import qualified Main; 11.34/4.47 import qualified Monad; 11.34/4.47 import qualified Prelude; 11.34/4.47 } 11.34/4.47 module Main where { 11.34/4.47 import qualified Maybe; 11.34/4.47 import qualified Monad; 11.34/4.47 import qualified Prelude; 11.34/4.47 } 11.34/4.47 module Monad where { 11.34/4.47 import qualified Main; 11.34/4.47 import qualified Maybe; 11.34/4.47 import qualified Prelude; 11.34/4.47 foldM :: Monad a => (c -> b -> a c) -> c -> [b] -> a c; 11.34/4.47 foldM vy a [] = return a; 11.34/4.47 foldM f a (x : xs) = f a x >>= foldM0 f xs; 11.34/4.47 11.34/4.47 foldM0 f xs fax = foldM f fax xs; 11.34/4.47 11.34/4.47 } 11.34/4.47 11.34/4.47 ---------------------------------------- 11.34/4.47 11.34/4.47 (5) COR (EQUIVALENT) 11.34/4.47 Cond Reductions: 11.34/4.47 The following Function with conditions 11.34/4.47 "undefined |Falseundefined; 11.34/4.47 " 11.34/4.47 is transformed to 11.34/4.47 "undefined = undefined1; 11.34/4.47 " 11.34/4.47 "undefined0 True = undefined; 11.34/4.47 " 11.34/4.47 "undefined1 = undefined0 False; 11.34/4.47 " 11.34/4.47 11.34/4.47 ---------------------------------------- 11.34/4.47 11.34/4.47 (6) 11.34/4.47 Obligation: 11.34/4.47 mainModule Main 11.34/4.47 module Maybe where { 11.34/4.47 import qualified Main; 11.34/4.47 import qualified Monad; 11.34/4.47 import qualified Prelude; 11.34/4.47 } 11.34/4.47 module Main where { 11.34/4.47 import qualified Maybe; 11.34/4.47 import qualified Monad; 11.34/4.47 import qualified Prelude; 11.34/4.47 } 11.34/4.47 module Monad where { 11.34/4.47 import qualified Main; 11.34/4.47 import qualified Maybe; 11.34/4.47 import qualified Prelude; 11.34/4.47 foldM :: Monad c => (b -> a -> c b) -> b -> [a] -> c b; 11.34/4.47 foldM vy a [] = return a; 11.34/4.47 foldM f a (x : xs) = f a x >>= foldM0 f xs; 11.34/4.47 11.34/4.47 foldM0 f xs fax = foldM f fax xs; 11.34/4.47 11.34/4.47 } 11.34/4.47 11.34/4.47 ---------------------------------------- 11.34/4.47 11.34/4.47 (7) Narrow (SOUND) 11.34/4.47 Haskell To QDPs 11.34/4.47 11.34/4.47 digraph dp_graph { 11.34/4.47 node [outthreshold=100, inthreshold=100];1[label="Monad.foldM",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 11.34/4.47 3[label="Monad.foldM vz3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 11.34/4.47 4[label="Monad.foldM vz3 vz4",fontsize=16,color="grey",shape="box"];4 -> 5[label="",style="dashed", color="grey", weight=3]; 11.34/4.47 5[label="Monad.foldM vz3 vz4 vz5",fontsize=16,color="burlywood",shape="triangle"];24[label="vz5/vz50 : vz51",fontsize=10,color="white",style="solid",shape="box"];5 -> 24[label="",style="solid", color="burlywood", weight=9]; 11.34/4.47 24 -> 6[label="",style="solid", color="burlywood", weight=3]; 11.34/4.47 25[label="vz5/[]",fontsize=10,color="white",style="solid",shape="box"];5 -> 25[label="",style="solid", color="burlywood", weight=9]; 11.34/4.47 25 -> 7[label="",style="solid", color="burlywood", weight=3]; 11.34/4.47 6[label="Monad.foldM vz3 vz4 (vz50 : vz51)",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 11.34/4.47 7[label="Monad.foldM vz3 vz4 []",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 11.34/4.47 8 -> 10[label="",style="dashed", color="red", weight=0]; 11.34/4.47 8[label="vz3 vz4 vz50 >>= Monad.foldM0 vz3 vz51",fontsize=16,color="magenta"];8 -> 11[label="",style="dashed", color="magenta", weight=3]; 11.34/4.47 9[label="return vz4",fontsize=16,color="black",shape="box"];9 -> 12[label="",style="solid", color="black", weight=3]; 11.34/4.47 11[label="vz3 vz4 vz50",fontsize=16,color="green",shape="box"];11 -> 17[label="",style="dashed", color="green", weight=3]; 11.34/4.47 11 -> 18[label="",style="dashed", color="green", weight=3]; 11.34/4.47 10[label="vz6 >>= Monad.foldM0 vz3 vz51",fontsize=16,color="burlywood",shape="triangle"];26[label="vz6/Nothing",fontsize=10,color="white",style="solid",shape="box"];10 -> 26[label="",style="solid", color="burlywood", weight=9]; 11.34/4.47 26 -> 15[label="",style="solid", color="burlywood", weight=3]; 11.34/4.47 27[label="vz6/Just vz60",fontsize=10,color="white",style="solid",shape="box"];10 -> 27[label="",style="solid", color="burlywood", weight=9]; 11.34/4.47 27 -> 16[label="",style="solid", color="burlywood", weight=3]; 11.34/4.47 12[label="Just vz4",fontsize=16,color="green",shape="box"];17[label="vz4",fontsize=16,color="green",shape="box"];18[label="vz50",fontsize=16,color="green",shape="box"];15[label="Nothing >>= Monad.foldM0 vz3 vz51",fontsize=16,color="black",shape="box"];15 -> 19[label="",style="solid", color="black", weight=3]; 11.34/4.47 16[label="Just vz60 >>= Monad.foldM0 vz3 vz51",fontsize=16,color="black",shape="box"];16 -> 20[label="",style="solid", color="black", weight=3]; 11.34/4.47 19[label="Nothing",fontsize=16,color="green",shape="box"];20[label="Monad.foldM0 vz3 vz51 vz60",fontsize=16,color="black",shape="box"];20 -> 21[label="",style="solid", color="black", weight=3]; 11.34/4.47 21 -> 5[label="",style="dashed", color="red", weight=0]; 11.34/4.47 21[label="Monad.foldM vz3 vz60 vz51",fontsize=16,color="magenta"];21 -> 22[label="",style="dashed", color="magenta", weight=3]; 11.34/4.47 21 -> 23[label="",style="dashed", color="magenta", weight=3]; 11.34/4.47 22[label="vz60",fontsize=16,color="green",shape="box"];23[label="vz51",fontsize=16,color="green",shape="box"];} 11.34/4.47 11.34/4.47 ---------------------------------------- 11.34/4.47 11.34/4.47 (8) 11.34/4.47 Obligation: 11.34/4.47 Q DP problem: 11.34/4.47 The TRS P consists of the following rules: 11.34/4.47 11.34/4.47 new_foldM(vz3, :(vz50, vz51), h, ba) -> new_gtGtEs(vz3, vz51, h, ba) 11.34/4.47 new_gtGtEs(vz3, vz51, h, ba) -> new_foldM(vz3, vz51, h, ba) 11.34/4.47 11.34/4.47 R is empty. 11.34/4.47 Q is empty. 11.34/4.47 We have to consider all minimal (P,Q,R)-chains. 11.34/4.47 ---------------------------------------- 11.34/4.47 11.34/4.47 (9) QDPSizeChangeProof (EQUIVALENT) 11.34/4.47 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.34/4.47 11.34/4.47 From the DPs we obtained the following set of size-change graphs: 11.34/4.47 *new_gtGtEs(vz3, vz51, h, ba) -> new_foldM(vz3, vz51, h, ba) 11.34/4.47 The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4 11.34/4.47 11.34/4.47 11.34/4.47 *new_foldM(vz3, :(vz50, vz51), h, ba) -> new_gtGtEs(vz3, vz51, h, ba) 11.34/4.47 The graph contains the following edges 1 >= 1, 2 > 2, 3 >= 3, 4 >= 4 11.34/4.47 11.34/4.47 11.34/4.47 ---------------------------------------- 11.34/4.47 11.34/4.47 (10) 11.34/4.47 YES 11.34/4.51 EOF