9.09/3.91 YES 10.84/4.41 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 10.84/4.41 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 10.84/4.41 10.84/4.41 10.84/4.41 H-Termination with start terms of the given HASKELL could be proven: 10.84/4.41 10.84/4.41 (0) HASKELL 10.84/4.41 (1) BR [EQUIVALENT, 0 ms] 10.84/4.41 (2) HASKELL 10.84/4.41 (3) COR [EQUIVALENT, 0 ms] 10.84/4.41 (4) HASKELL 10.84/4.41 (5) Narrow [SOUND, 0 ms] 10.84/4.41 (6) AND 10.84/4.41 (7) QDP 10.84/4.41 (8) DependencyGraphProof [EQUIVALENT, 0 ms] 10.84/4.41 (9) AND 10.84/4.41 (10) QDP 10.84/4.41 (11) QDPSizeChangeProof [EQUIVALENT, 0 ms] 10.84/4.41 (12) YES 10.84/4.41 (13) QDP 10.84/4.41 (14) QDPSizeChangeProof [EQUIVALENT, 0 ms] 10.84/4.41 (15) YES 10.84/4.41 (16) QDP 10.84/4.41 (17) QDPSizeChangeProof [EQUIVALENT, 0 ms] 10.84/4.41 (18) YES 10.84/4.41 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (0) 10.84/4.41 Obligation: 10.84/4.41 mainModule Main 10.84/4.41 module Maybe where { 10.84/4.41 import qualified Main; 10.84/4.41 import qualified Monad; 10.84/4.41 import qualified Prelude; 10.84/4.41 } 10.84/4.41 module Main where { 10.84/4.41 import qualified Maybe; 10.84/4.41 import qualified Monad; 10.84/4.41 import qualified Prelude; 10.84/4.41 } 10.84/4.41 module Monad where { 10.84/4.41 import qualified Main; 10.84/4.41 import qualified Maybe; 10.84/4.41 import qualified Prelude; 10.84/4.41 class Monad a => MonadPlus a where { 10.84/4.41 mplus :: MonadPlus a => a b -> a b -> a b; 10.84/4.41 mzero :: MonadPlus a => a b; 10.84/4.41 } 10.84/4.41 instance MonadPlus Maybe where { 10.84/4.41 mplus Nothing ys = ys; 10.84/4.41 mplus xs _ys = xs; 10.84/4.41 mzero = Nothing; 10.84/4.41 } 10.84/4.41 instance MonadPlus [] where { 10.84/4.41 mplus = (++); 10.84/4.41 mzero = []; 10.84/4.41 } 10.84/4.41 msum :: MonadPlus b => [b a] -> b a; 10.84/4.41 msum = foldr mplus mzero; 10.84/4.41 10.84/4.41 } 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (1) BR (EQUIVALENT) 10.84/4.41 Replaced joker patterns by fresh variables and removed binding patterns. 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (2) 10.84/4.41 Obligation: 10.84/4.41 mainModule Main 10.84/4.41 module Maybe where { 10.84/4.41 import qualified Main; 10.84/4.41 import qualified Monad; 10.84/4.41 import qualified Prelude; 10.84/4.41 } 10.84/4.41 module Main where { 10.84/4.41 import qualified Maybe; 10.84/4.41 import qualified Monad; 10.84/4.41 import qualified Prelude; 10.84/4.41 } 10.84/4.41 module Monad where { 10.84/4.41 import qualified Main; 10.84/4.41 import qualified Maybe; 10.84/4.41 import qualified Prelude; 10.84/4.41 class Monad a => MonadPlus a where { 10.84/4.41 mplus :: MonadPlus a => a b -> a b -> a b; 10.84/4.41 mzero :: MonadPlus a => a b; 10.84/4.41 } 10.84/4.41 instance MonadPlus Maybe where { 10.84/4.41 mplus Nothing ys = ys; 10.84/4.41 mplus xs _ys = xs; 10.84/4.41 mzero = Nothing; 10.84/4.41 } 10.84/4.41 instance MonadPlus [] where { 10.84/4.41 mplus = (++); 10.84/4.41 mzero = []; 10.84/4.41 } 10.84/4.41 msum :: MonadPlus b => [b a] -> b a; 10.84/4.41 msum = foldr mplus mzero; 10.84/4.41 10.84/4.41 } 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (3) COR (EQUIVALENT) 10.84/4.41 Cond Reductions: 10.84/4.41 The following Function with conditions 10.84/4.41 "undefined |Falseundefined; 10.84/4.41 " 10.84/4.41 is transformed to 10.84/4.41 "undefined = undefined1; 10.84/4.41 " 10.84/4.41 "undefined0 True = undefined; 10.84/4.41 " 10.84/4.41 "undefined1 = undefined0 False; 10.84/4.41 " 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (4) 10.84/4.41 Obligation: 10.84/4.41 mainModule Main 10.84/4.41 module Maybe where { 10.84/4.41 import qualified Main; 10.84/4.41 import qualified Monad; 10.84/4.41 import qualified Prelude; 10.84/4.41 } 10.84/4.41 module Main where { 10.84/4.41 import qualified Maybe; 10.84/4.41 import qualified Monad; 10.84/4.41 import qualified Prelude; 10.84/4.41 } 10.84/4.41 module Monad where { 10.84/4.41 import qualified Main; 10.84/4.41 import qualified Maybe; 10.84/4.41 import qualified Prelude; 10.84/4.41 class Monad a => MonadPlus a where { 10.84/4.41 mplus :: MonadPlus a => a b -> a b -> a b; 10.84/4.41 mzero :: MonadPlus a => a b; 10.84/4.41 } 10.84/4.41 instance MonadPlus Maybe where { 10.84/4.41 mplus Nothing ys = ys; 10.84/4.41 mplus xs _ys = xs; 10.84/4.41 mzero = Nothing; 10.84/4.41 } 10.84/4.41 instance MonadPlus [] where { 10.84/4.41 mplus = (++); 10.84/4.41 mzero = []; 10.84/4.41 } 10.84/4.41 msum :: MonadPlus a => [a b] -> a b; 10.84/4.41 msum = foldr mplus mzero; 10.84/4.41 10.84/4.41 } 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (5) Narrow (SOUND) 10.84/4.41 Haskell To QDPs 10.84/4.41 10.84/4.41 digraph dp_graph { 10.84/4.41 node [outthreshold=100, inthreshold=100];1[label="Monad.msum",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 10.84/4.41 3[label="Monad.msum vy3",fontsize=16,color="black",shape="triangle"];3 -> 4[label="",style="solid", color="black", weight=3]; 10.84/4.41 4[label="foldr Monad.mplus Monad.mzero vy3",fontsize=16,color="burlywood",shape="triangle"];35[label="vy3/vy30 : vy31",fontsize=10,color="white",style="solid",shape="box"];4 -> 35[label="",style="solid", color="burlywood", weight=9]; 10.84/4.41 35 -> 5[label="",style="solid", color="burlywood", weight=3]; 10.84/4.41 36[label="vy3/[]",fontsize=10,color="white",style="solid",shape="box"];4 -> 36[label="",style="solid", color="burlywood", weight=9]; 10.84/4.41 36 -> 6[label="",style="solid", color="burlywood", weight=3]; 10.84/4.41 5[label="foldr Monad.mplus Monad.mzero (vy30 : vy31)",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 10.84/4.41 6[label="foldr Monad.mplus Monad.mzero []",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 10.84/4.41 7[label="Monad.mplus vy30 (foldr Monad.mplus Monad.mzero vy31)",fontsize=16,color="blue",shape="box"];37[label="Monad.mplus :: ([] a) -> ([] a) -> [] a",fontsize=10,color="white",style="solid",shape="box"];7 -> 37[label="",style="solid", color="blue", weight=9]; 10.84/4.41 37 -> 18[label="",style="solid", color="blue", weight=3]; 10.84/4.41 38[label="Monad.mplus :: (Maybe a) -> (Maybe a) -> Maybe a",fontsize=10,color="white",style="solid",shape="box"];7 -> 38[label="",style="solid", color="blue", weight=9]; 10.84/4.41 38 -> 19[label="",style="solid", color="blue", weight=3]; 10.84/4.41 8[label="Monad.mzero",fontsize=16,color="blue",shape="box"];39[label="Monad.mzero :: [] a",fontsize=10,color="white",style="solid",shape="box"];8 -> 39[label="",style="solid", color="blue", weight=9]; 10.84/4.41 39 -> 11[label="",style="solid", color="blue", weight=3]; 10.84/4.41 40[label="Monad.mzero :: Maybe a",fontsize=10,color="white",style="solid",shape="box"];8 -> 40[label="",style="solid", color="blue", weight=9]; 10.84/4.41 40 -> 12[label="",style="solid", color="blue", weight=3]; 10.84/4.41 18 -> 14[label="",style="dashed", color="red", weight=0]; 10.84/4.41 18[label="Monad.mplus vy30 (foldr Monad.mplus Monad.mzero vy31)",fontsize=16,color="magenta"];18 -> 23[label="",style="dashed", color="magenta", weight=3]; 10.84/4.41 19 -> 15[label="",style="dashed", color="red", weight=0]; 10.84/4.41 19[label="Monad.mplus vy30 (foldr Monad.mplus Monad.mzero vy31)",fontsize=16,color="magenta"];19 -> 24[label="",style="dashed", color="magenta", weight=3]; 10.84/4.41 11[label="Monad.mzero",fontsize=16,color="black",shape="box"];11 -> 16[label="",style="solid", color="black", weight=3]; 10.84/4.41 12[label="Monad.mzero",fontsize=16,color="black",shape="box"];12 -> 17[label="",style="solid", color="black", weight=3]; 10.84/4.41 23 -> 4[label="",style="dashed", color="red", weight=0]; 10.84/4.41 23[label="foldr Monad.mplus Monad.mzero vy31",fontsize=16,color="magenta"];23 -> 29[label="",style="dashed", color="magenta", weight=3]; 10.84/4.41 14[label="Monad.mplus vy30 vy4",fontsize=16,color="black",shape="triangle"];14 -> 20[label="",style="solid", color="black", weight=3]; 10.84/4.41 24 -> 4[label="",style="dashed", color="red", weight=0]; 10.84/4.41 24[label="foldr Monad.mplus Monad.mzero vy31",fontsize=16,color="magenta"];24 -> 30[label="",style="dashed", color="magenta", weight=3]; 10.84/4.41 15[label="Monad.mplus vy30 vy4",fontsize=16,color="burlywood",shape="triangle"];41[label="vy30/Nothing",fontsize=10,color="white",style="solid",shape="box"];15 -> 41[label="",style="solid", color="burlywood", weight=9]; 10.84/4.41 41 -> 21[label="",style="solid", color="burlywood", weight=3]; 10.84/4.41 42[label="vy30/Just vy300",fontsize=10,color="white",style="solid",shape="box"];15 -> 42[label="",style="solid", color="burlywood", weight=9]; 10.84/4.41 42 -> 22[label="",style="solid", color="burlywood", weight=3]; 10.84/4.41 16[label="[]",fontsize=16,color="green",shape="box"];17[label="Nothing",fontsize=16,color="green",shape="box"];29[label="vy31",fontsize=16,color="green",shape="box"];20[label="(++) vy30 vy4",fontsize=16,color="burlywood",shape="triangle"];43[label="vy30/vy300 : vy301",fontsize=10,color="white",style="solid",shape="box"];20 -> 43[label="",style="solid", color="burlywood", weight=9]; 10.84/4.41 43 -> 25[label="",style="solid", color="burlywood", weight=3]; 10.84/4.41 44[label="vy30/[]",fontsize=10,color="white",style="solid",shape="box"];20 -> 44[label="",style="solid", color="burlywood", weight=9]; 10.84/4.41 44 -> 26[label="",style="solid", color="burlywood", weight=3]; 10.84/4.41 30[label="vy31",fontsize=16,color="green",shape="box"];21[label="Monad.mplus Nothing vy4",fontsize=16,color="black",shape="box"];21 -> 27[label="",style="solid", color="black", weight=3]; 10.84/4.41 22[label="Monad.mplus (Just vy300) vy4",fontsize=16,color="black",shape="box"];22 -> 28[label="",style="solid", color="black", weight=3]; 10.84/4.41 25[label="(++) (vy300 : vy301) vy4",fontsize=16,color="black",shape="box"];25 -> 31[label="",style="solid", color="black", weight=3]; 10.84/4.41 26[label="(++) [] vy4",fontsize=16,color="black",shape="box"];26 -> 32[label="",style="solid", color="black", weight=3]; 10.84/4.41 27[label="vy4",fontsize=16,color="green",shape="box"];28[label="Just vy300",fontsize=16,color="green",shape="box"];31[label="vy300 : vy301 ++ vy4",fontsize=16,color="green",shape="box"];31 -> 33[label="",style="dashed", color="green", weight=3]; 10.84/4.41 32[label="vy4",fontsize=16,color="green",shape="box"];33 -> 20[label="",style="dashed", color="red", weight=0]; 10.84/4.41 33[label="vy301 ++ vy4",fontsize=16,color="magenta"];33 -> 34[label="",style="dashed", color="magenta", weight=3]; 10.84/4.41 34[label="vy301",fontsize=16,color="green",shape="box"];} 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (6) 10.84/4.41 Complex Obligation (AND) 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (7) 10.84/4.41 Obligation: 10.84/4.41 Q DP problem: 10.84/4.41 The TRS P consists of the following rules: 10.84/4.41 10.84/4.41 new_foldr(:(vy30, vy31), ty_[], h) -> new_foldr(vy31, ty_[], h) 10.84/4.41 new_foldr(:(vy30, vy31), ty_Maybe, h) -> new_foldr(vy31, ty_Maybe, h) 10.84/4.41 10.84/4.41 R is empty. 10.84/4.41 Q is empty. 10.84/4.41 We have to consider all minimal (P,Q,R)-chains. 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (8) DependencyGraphProof (EQUIVALENT) 10.84/4.41 The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs. 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (9) 10.84/4.41 Complex Obligation (AND) 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (10) 10.84/4.41 Obligation: 10.84/4.41 Q DP problem: 10.84/4.41 The TRS P consists of the following rules: 10.84/4.41 10.84/4.41 new_foldr(:(vy30, vy31), ty_Maybe, h) -> new_foldr(vy31, ty_Maybe, h) 10.84/4.41 10.84/4.41 R is empty. 10.84/4.41 Q is empty. 10.84/4.41 We have to consider all minimal (P,Q,R)-chains. 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (11) QDPSizeChangeProof (EQUIVALENT) 10.84/4.41 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. 10.84/4.41 10.84/4.41 From the DPs we obtained the following set of size-change graphs: 10.84/4.41 *new_foldr(:(vy30, vy31), ty_Maybe, h) -> new_foldr(vy31, ty_Maybe, h) 10.84/4.41 The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3 10.84/4.41 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (12) 10.84/4.41 YES 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (13) 10.84/4.41 Obligation: 10.84/4.41 Q DP problem: 10.84/4.41 The TRS P consists of the following rules: 10.84/4.41 10.84/4.41 new_foldr(:(vy30, vy31), ty_[], h) -> new_foldr(vy31, ty_[], h) 10.84/4.41 10.84/4.41 R is empty. 10.84/4.41 Q is empty. 10.84/4.41 We have to consider all minimal (P,Q,R)-chains. 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (14) QDPSizeChangeProof (EQUIVALENT) 10.84/4.41 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. 10.84/4.41 10.84/4.41 From the DPs we obtained the following set of size-change graphs: 10.84/4.41 *new_foldr(:(vy30, vy31), ty_[], h) -> new_foldr(vy31, ty_[], h) 10.84/4.41 The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3 10.84/4.41 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (15) 10.84/4.41 YES 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (16) 10.84/4.41 Obligation: 10.84/4.41 Q DP problem: 10.84/4.41 The TRS P consists of the following rules: 10.84/4.41 10.84/4.41 new_psPs(:(vy300, vy301), vy4, h) -> new_psPs(vy301, vy4, h) 10.84/4.41 10.84/4.41 R is empty. 10.84/4.41 Q is empty. 10.84/4.41 We have to consider all minimal (P,Q,R)-chains. 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (17) QDPSizeChangeProof (EQUIVALENT) 10.84/4.41 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. 10.84/4.41 10.84/4.41 From the DPs we obtained the following set of size-change graphs: 10.84/4.41 *new_psPs(:(vy300, vy301), vy4, h) -> new_psPs(vy301, vy4, h) 10.84/4.41 The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3 10.84/4.41 10.84/4.41 10.84/4.41 ---------------------------------------- 10.84/4.41 10.84/4.41 (18) 10.84/4.41 YES 11.11/4.44 EOF