9.00/3.89 YES 10.93/4.38 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 10.93/4.38 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 10.93/4.38 10.93/4.38 10.93/4.38 H-Termination with start terms of the given HASKELL could be proven: 10.93/4.38 10.93/4.38 (0) HASKELL 10.93/4.38 (1) BR [EQUIVALENT, 0 ms] 10.93/4.38 (2) HASKELL 10.93/4.38 (3) COR [EQUIVALENT, 0 ms] 10.93/4.38 (4) HASKELL 10.93/4.38 (5) Narrow [SOUND, 0 ms] 10.93/4.38 (6) AND 10.93/4.38 (7) QDP 10.93/4.38 (8) QDPSizeChangeProof [EQUIVALENT, 0 ms] 10.93/4.38 (9) YES 10.93/4.38 (10) QDP 10.93/4.38 (11) QDPSizeChangeProof [EQUIVALENT, 0 ms] 10.93/4.38 (12) YES 10.93/4.38 10.93/4.38 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (0) 10.93/4.38 Obligation: 10.93/4.38 mainModule Main 10.93/4.38 module Maybe where { 10.93/4.38 import qualified Main; 10.93/4.38 import qualified Monad; 10.93/4.38 import qualified Prelude; 10.93/4.38 } 10.93/4.38 module Main where { 10.93/4.38 import qualified Maybe; 10.93/4.38 import qualified Monad; 10.93/4.38 import qualified Prelude; 10.93/4.38 } 10.93/4.38 module Monad where { 10.93/4.38 import qualified Main; 10.93/4.38 import qualified Maybe; 10.93/4.38 import qualified Prelude; 10.93/4.38 class Monad a => MonadPlus a where { 10.93/4.38 mplus :: MonadPlus a => a b -> a b -> a b; 10.93/4.38 mzero :: MonadPlus a => a b; 10.93/4.38 } 10.93/4.38 instance MonadPlus Maybe where { 10.93/4.38 } 10.93/4.38 instance MonadPlus [] where { 10.93/4.38 mplus = (++); 10.93/4.38 mzero = []; 10.93/4.38 } 10.93/4.38 msum :: MonadPlus a => [a b] -> a b; 10.93/4.38 msum = foldr mplus mzero; 10.93/4.38 10.93/4.38 } 10.93/4.38 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (1) BR (EQUIVALENT) 10.93/4.38 Replaced joker patterns by fresh variables and removed binding patterns. 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (2) 10.93/4.38 Obligation: 10.93/4.38 mainModule Main 10.93/4.38 module Maybe where { 10.93/4.38 import qualified Main; 10.93/4.38 import qualified Monad; 10.93/4.38 import qualified Prelude; 10.93/4.38 } 10.93/4.38 module Main where { 10.93/4.38 import qualified Maybe; 10.93/4.38 import qualified Monad; 10.93/4.38 import qualified Prelude; 10.93/4.38 } 10.93/4.38 module Monad where { 10.93/4.38 import qualified Main; 10.93/4.38 import qualified Maybe; 10.93/4.38 import qualified Prelude; 10.93/4.38 class Monad a => MonadPlus a where { 10.93/4.38 mplus :: MonadPlus a => a b -> a b -> a b; 10.93/4.38 mzero :: MonadPlus a => a b; 10.93/4.38 } 10.93/4.38 instance MonadPlus Maybe where { 10.93/4.38 } 10.93/4.38 instance MonadPlus [] where { 10.93/4.38 mplus = (++); 10.93/4.38 mzero = []; 10.93/4.38 } 10.93/4.38 msum :: MonadPlus b => [b a] -> b a; 10.93/4.38 msum = foldr mplus mzero; 10.93/4.38 10.93/4.38 } 10.93/4.38 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (3) COR (EQUIVALENT) 10.93/4.38 Cond Reductions: 10.93/4.38 The following Function with conditions 10.93/4.38 "undefined |Falseundefined; 10.93/4.38 " 10.93/4.38 is transformed to 10.93/4.38 "undefined = undefined1; 10.93/4.38 " 10.93/4.38 "undefined0 True = undefined; 10.93/4.38 " 10.93/4.38 "undefined1 = undefined0 False; 10.93/4.38 " 10.93/4.38 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (4) 10.93/4.38 Obligation: 10.93/4.38 mainModule Main 10.93/4.38 module Maybe where { 10.93/4.38 import qualified Main; 10.93/4.38 import qualified Monad; 10.93/4.38 import qualified Prelude; 10.93/4.38 } 10.93/4.38 module Main where { 10.93/4.38 import qualified Maybe; 10.93/4.38 import qualified Monad; 10.93/4.38 import qualified Prelude; 10.93/4.38 } 10.93/4.38 module Monad where { 10.93/4.38 import qualified Main; 10.93/4.38 import qualified Maybe; 10.93/4.38 import qualified Prelude; 10.93/4.38 class Monad a => MonadPlus a where { 10.93/4.38 mplus :: MonadPlus a => a b -> a b -> a b; 10.93/4.38 mzero :: MonadPlus a => a b; 10.93/4.38 } 10.93/4.38 instance MonadPlus Maybe where { 10.93/4.38 } 10.93/4.38 instance MonadPlus [] where { 10.93/4.38 mplus = (++); 10.93/4.38 mzero = []; 10.93/4.38 } 10.93/4.38 msum :: MonadPlus b => [b a] -> b a; 10.93/4.38 msum = foldr mplus mzero; 10.93/4.38 10.93/4.38 } 10.93/4.38 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (5) Narrow (SOUND) 10.93/4.38 Haskell To QDPs 10.93/4.38 10.93/4.38 digraph dp_graph { 10.93/4.38 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.93/4.38 3[label="Monad.msum vy3",fontsize=16,color="black",shape="triangle"];3 -> 4[label="",style="solid", color="black", weight=3]; 10.93/4.38 4[label="foldr Monad.mplus Monad.mzero vy3",fontsize=16,color="burlywood",shape="triangle"];20[label="vy3/vy30 : vy31",fontsize=10,color="white",style="solid",shape="box"];4 -> 20[label="",style="solid", color="burlywood", weight=9]; 10.93/4.38 20 -> 5[label="",style="solid", color="burlywood", weight=3]; 10.93/4.38 21[label="vy3/[]",fontsize=10,color="white",style="solid",shape="box"];4 -> 21[label="",style="solid", color="burlywood", weight=9]; 10.93/4.38 21 -> 6[label="",style="solid", color="burlywood", weight=3]; 10.93/4.38 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.93/4.38 6[label="foldr Monad.mplus Monad.mzero []",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 10.93/4.38 7 -> 9[label="",style="dashed", color="red", weight=0]; 10.93/4.38 7[label="Monad.mplus vy30 (foldr Monad.mplus Monad.mzero vy31)",fontsize=16,color="magenta"];7 -> 10[label="",style="dashed", color="magenta", weight=3]; 10.93/4.38 8[label="Monad.mzero",fontsize=16,color="black",shape="box"];8 -> 11[label="",style="solid", color="black", weight=3]; 10.93/4.38 10 -> 4[label="",style="dashed", color="red", weight=0]; 10.93/4.38 10[label="foldr Monad.mplus Monad.mzero vy31",fontsize=16,color="magenta"];10 -> 12[label="",style="dashed", color="magenta", weight=3]; 10.93/4.38 9[label="Monad.mplus vy30 vy4",fontsize=16,color="black",shape="triangle"];9 -> 13[label="",style="solid", color="black", weight=3]; 10.93/4.38 11[label="[]",fontsize=16,color="green",shape="box"];12[label="vy31",fontsize=16,color="green",shape="box"];13[label="(++) vy30 vy4",fontsize=16,color="burlywood",shape="triangle"];22[label="vy30/vy300 : vy301",fontsize=10,color="white",style="solid",shape="box"];13 -> 22[label="",style="solid", color="burlywood", weight=9]; 10.93/4.38 22 -> 14[label="",style="solid", color="burlywood", weight=3]; 10.93/4.38 23[label="vy30/[]",fontsize=10,color="white",style="solid",shape="box"];13 -> 23[label="",style="solid", color="burlywood", weight=9]; 10.93/4.38 23 -> 15[label="",style="solid", color="burlywood", weight=3]; 10.93/4.38 14[label="(++) (vy300 : vy301) vy4",fontsize=16,color="black",shape="box"];14 -> 16[label="",style="solid", color="black", weight=3]; 10.93/4.38 15[label="(++) [] vy4",fontsize=16,color="black",shape="box"];15 -> 17[label="",style="solid", color="black", weight=3]; 10.93/4.38 16[label="vy300 : vy301 ++ vy4",fontsize=16,color="green",shape="box"];16 -> 18[label="",style="dashed", color="green", weight=3]; 10.93/4.38 17[label="vy4",fontsize=16,color="green",shape="box"];18 -> 13[label="",style="dashed", color="red", weight=0]; 10.93/4.38 18[label="vy301 ++ vy4",fontsize=16,color="magenta"];18 -> 19[label="",style="dashed", color="magenta", weight=3]; 10.93/4.38 19[label="vy301",fontsize=16,color="green",shape="box"];} 10.93/4.38 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (6) 10.93/4.38 Complex Obligation (AND) 10.93/4.38 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (7) 10.93/4.38 Obligation: 10.93/4.38 Q DP problem: 10.93/4.38 The TRS P consists of the following rules: 10.93/4.38 10.93/4.38 new_psPs(:(vy300, vy301), vy4, h) -> new_psPs(vy301, vy4, h) 10.93/4.38 10.93/4.38 R is empty. 10.93/4.38 Q is empty. 10.93/4.38 We have to consider all minimal (P,Q,R)-chains. 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (8) QDPSizeChangeProof (EQUIVALENT) 10.93/4.38 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.93/4.38 10.93/4.38 From the DPs we obtained the following set of size-change graphs: 10.93/4.38 *new_psPs(:(vy300, vy301), vy4, h) -> new_psPs(vy301, vy4, h) 10.93/4.38 The graph contains the following edges 1 > 1, 2 >= 2, 3 >= 3 10.93/4.38 10.93/4.38 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (9) 10.93/4.38 YES 10.93/4.38 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (10) 10.93/4.38 Obligation: 10.93/4.38 Q DP problem: 10.93/4.38 The TRS P consists of the following rules: 10.93/4.38 10.93/4.38 new_foldr(:(vy30, vy31), h) -> new_foldr(vy31, h) 10.93/4.38 10.93/4.38 R is empty. 10.93/4.38 Q is empty. 10.93/4.38 We have to consider all minimal (P,Q,R)-chains. 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (11) QDPSizeChangeProof (EQUIVALENT) 10.93/4.38 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.93/4.38 10.93/4.38 From the DPs we obtained the following set of size-change graphs: 10.93/4.38 *new_foldr(:(vy30, vy31), h) -> new_foldr(vy31, h) 10.93/4.38 The graph contains the following edges 1 > 1, 2 >= 2 10.93/4.38 10.93/4.38 10.93/4.38 ---------------------------------------- 10.93/4.38 10.93/4.38 (12) 10.93/4.38 YES 11.05/4.47 EOF