/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.hs /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.hs # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty H-Termination with start terms of the given HASKELL could be proven: (0) HASKELL (1) LR [EQUIVALENT, 0 ms] (2) HASKELL (3) IFR [EQUIVALENT, 0 ms] (4) HASKELL (5) BR [EQUIVALENT, 0 ms] (6) HASKELL (7) COR [EQUIVALENT, 0 ms] (8) HASKELL (9) Narrow [SOUND, 0 ms] (10) QDP (11) QDPSizeChangeProof [EQUIVALENT, 0 ms] (12) YES ---------------------------------------- (0) Obligation: mainModule Main module Maybe where { import qualified Main; import qualified Monad; import qualified Prelude; } module Main where { import qualified Maybe; import qualified Monad; import qualified Prelude; } module Monad where { import qualified Main; import qualified Maybe; import qualified Prelude; filterM :: Monad b => (a -> b Bool) -> [a] -> b [a]; filterM _ [] = return []; filterM p (x : xs) = p x >>= (\flg ->filterM p xs >>= (\ys ->return ( if flg then x : ys else ys))); } ---------------------------------------- (1) LR (EQUIVALENT) Lambda Reductions: The following Lambda expression "\ys->return (if flg then x : ys else ys)" is transformed to "filterM0 flg x ys = return (if flg then x : ys else ys); " The following Lambda expression "\flg->filterM p xs >>= filterM0 flg x" is transformed to "filterM1 p xs x flg = filterM p xs >>= filterM0 flg x; " ---------------------------------------- (2) Obligation: mainModule Main module Maybe where { import qualified Main; import qualified Monad; import qualified Prelude; } module Main where { import qualified Maybe; import qualified Monad; import qualified Prelude; } module Monad where { import qualified Main; import qualified Maybe; import qualified Prelude; filterM :: Monad b => (a -> b Bool) -> [a] -> b [a]; filterM _ [] = return []; filterM p (x : xs) = p x >>= filterM1 p xs x; filterM0 flg x ys = return ( if flg then x : ys else ys); filterM1 p xs x flg = filterM p xs >>= filterM0 flg x; } ---------------------------------------- (3) IFR (EQUIVALENT) If Reductions: The following If expression "if flg then x : ys else ys" is transformed to "filterM00 x ys True = x : ys; filterM00 x ys False = ys; " ---------------------------------------- (4) Obligation: mainModule Main module Maybe where { import qualified Main; import qualified Monad; import qualified Prelude; } module Main where { import qualified Maybe; import qualified Monad; import qualified Prelude; } module Monad where { import qualified Main; import qualified Maybe; import qualified Prelude; filterM :: Monad b => (a -> b Bool) -> [a] -> b [a]; filterM _ [] = return []; filterM p (x : xs) = p x >>= filterM1 p xs x; filterM0 flg x ys = return (filterM00 x ys flg); filterM00 x ys True = x : ys; filterM00 x ys False = ys; filterM1 p xs x flg = filterM p xs >>= filterM0 flg x; } ---------------------------------------- (5) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. ---------------------------------------- (6) Obligation: mainModule Main module Maybe where { import qualified Main; import qualified Monad; import qualified Prelude; } module Main where { import qualified Maybe; import qualified Monad; import qualified Prelude; } module Monad where { import qualified Main; import qualified Maybe; import qualified Prelude; filterM :: Monad b => (a -> b Bool) -> [a] -> b [a]; filterM vy [] = return []; filterM p (x : xs) = p x >>= filterM1 p xs x; filterM0 flg x ys = return (filterM00 x ys flg); filterM00 x ys True = x : ys; filterM00 x ys False = ys; filterM1 p xs x flg = filterM p xs >>= filterM0 flg x; } ---------------------------------------- (7) COR (EQUIVALENT) Cond Reductions: The following Function with conditions "undefined |Falseundefined; " is transformed to "undefined = undefined1; " "undefined0 True = undefined; " "undefined1 = undefined0 False; " ---------------------------------------- (8) Obligation: mainModule Main module Maybe where { import qualified Main; import qualified Monad; import qualified Prelude; } module Main where { import qualified Maybe; import qualified Monad; import qualified Prelude; } module Monad where { import qualified Main; import qualified Maybe; import qualified Prelude; filterM :: Monad a => (b -> a Bool) -> [b] -> a [b]; filterM vy [] = return []; filterM p (x : xs) = p x >>= filterM1 p xs x; filterM0 flg x ys = return (filterM00 x ys flg); filterM00 x ys True = x : ys; filterM00 x ys False = ys; filterM1 p xs x flg = filterM p xs >>= filterM0 flg x; } ---------------------------------------- (9) Narrow (SOUND) Haskell To QDPs digraph dp_graph { node [outthreshold=100, inthreshold=100];1[label="Monad.filterM",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="Monad.filterM vz3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 4[label="Monad.filterM vz3 vz4",fontsize=16,color="burlywood",shape="triangle"];45[label="vz4/vz40 : vz41",fontsize=10,color="white",style="solid",shape="box"];4 -> 45[label="",style="solid", color="burlywood", weight=9]; 45 -> 5[label="",style="solid", color="burlywood", weight=3]; 46[label="vz4/[]",fontsize=10,color="white",style="solid",shape="box"];4 -> 46[label="",style="solid", color="burlywood", weight=9]; 46 -> 6[label="",style="solid", color="burlywood", weight=3]; 5[label="Monad.filterM vz3 (vz40 : vz41)",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 6[label="Monad.filterM vz3 []",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 7[label="vz3 vz40 >>= Monad.filterM1 vz3 vz41 vz40",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 8[label="return []",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 9 -> 11[label="",style="dashed", color="red", weight=0]; 9[label="primbindIO (vz3 vz40) (Monad.filterM1 vz3 vz41 vz40)",fontsize=16,color="magenta"];9 -> 12[label="",style="dashed", color="magenta", weight=3]; 10[label="primretIO []",fontsize=16,color="black",shape="box"];10 -> 13[label="",style="solid", color="black", weight=3]; 12[label="vz3 vz40",fontsize=16,color="green",shape="box"];12 -> 19[label="",style="dashed", color="green", weight=3]; 11[label="primbindIO vz5 (Monad.filterM1 vz3 vz41 vz40)",fontsize=16,color="burlywood",shape="triangle"];47[label="vz5/IO vz50",fontsize=10,color="white",style="solid",shape="box"];11 -> 47[label="",style="solid", color="burlywood", weight=9]; 47 -> 15[label="",style="solid", color="burlywood", weight=3]; 48[label="vz5/AProVE_IO vz50",fontsize=10,color="white",style="solid",shape="box"];11 -> 48[label="",style="solid", color="burlywood", weight=9]; 48 -> 16[label="",style="solid", color="burlywood", weight=3]; 49[label="vz5/AProVE_Exception vz50",fontsize=10,color="white",style="solid",shape="box"];11 -> 49[label="",style="solid", color="burlywood", weight=9]; 49 -> 17[label="",style="solid", color="burlywood", weight=3]; 50[label="vz5/AProVE_Error vz50",fontsize=10,color="white",style="solid",shape="box"];11 -> 50[label="",style="solid", color="burlywood", weight=9]; 50 -> 18[label="",style="solid", color="burlywood", weight=3]; 13[label="AProVE_IO []",fontsize=16,color="green",shape="box"];19[label="vz40",fontsize=16,color="green",shape="box"];15[label="primbindIO (IO vz50) (Monad.filterM1 vz3 vz41 vz40)",fontsize=16,color="black",shape="box"];15 -> 20[label="",style="solid", color="black", weight=3]; 16[label="primbindIO (AProVE_IO vz50) (Monad.filterM1 vz3 vz41 vz40)",fontsize=16,color="black",shape="box"];16 -> 21[label="",style="solid", color="black", weight=3]; 17[label="primbindIO (AProVE_Exception vz50) (Monad.filterM1 vz3 vz41 vz40)",fontsize=16,color="black",shape="box"];17 -> 22[label="",style="solid", color="black", weight=3]; 18[label="primbindIO (AProVE_Error vz50) (Monad.filterM1 vz3 vz41 vz40)",fontsize=16,color="black",shape="box"];18 -> 23[label="",style="solid", color="black", weight=3]; 20[label="error []",fontsize=16,color="red",shape="box"];21[label="Monad.filterM1 vz3 vz41 vz40 vz50",fontsize=16,color="black",shape="box"];21 -> 24[label="",style="solid", color="black", weight=3]; 22[label="AProVE_Exception vz50",fontsize=16,color="green",shape="box"];23[label="AProVE_Error vz50",fontsize=16,color="green",shape="box"];24 -> 25[label="",style="dashed", color="red", weight=0]; 24[label="Monad.filterM vz3 vz41 >>= Monad.filterM0 vz50 vz40",fontsize=16,color="magenta"];24 -> 26[label="",style="dashed", color="magenta", weight=3]; 26 -> 4[label="",style="dashed", color="red", weight=0]; 26[label="Monad.filterM vz3 vz41",fontsize=16,color="magenta"];26 -> 27[label="",style="dashed", color="magenta", weight=3]; 25[label="vz6 >>= Monad.filterM0 vz50 vz40",fontsize=16,color="black",shape="triangle"];25 -> 28[label="",style="solid", color="black", weight=3]; 27[label="vz41",fontsize=16,color="green",shape="box"];28[label="primbindIO vz6 (Monad.filterM0 vz50 vz40)",fontsize=16,color="burlywood",shape="box"];51[label="vz6/IO vz60",fontsize=10,color="white",style="solid",shape="box"];28 -> 51[label="",style="solid", color="burlywood", weight=9]; 51 -> 29[label="",style="solid", color="burlywood", weight=3]; 52[label="vz6/AProVE_IO vz60",fontsize=10,color="white",style="solid",shape="box"];28 -> 52[label="",style="solid", color="burlywood", weight=9]; 52 -> 30[label="",style="solid", color="burlywood", weight=3]; 53[label="vz6/AProVE_Exception vz60",fontsize=10,color="white",style="solid",shape="box"];28 -> 53[label="",style="solid", color="burlywood", weight=9]; 53 -> 31[label="",style="solid", color="burlywood", weight=3]; 54[label="vz6/AProVE_Error vz60",fontsize=10,color="white",style="solid",shape="box"];28 -> 54[label="",style="solid", color="burlywood", weight=9]; 54 -> 32[label="",style="solid", color="burlywood", weight=3]; 29[label="primbindIO (IO vz60) (Monad.filterM0 vz50 vz40)",fontsize=16,color="black",shape="box"];29 -> 33[label="",style="solid", color="black", weight=3]; 30[label="primbindIO (AProVE_IO vz60) (Monad.filterM0 vz50 vz40)",fontsize=16,color="black",shape="box"];30 -> 34[label="",style="solid", color="black", weight=3]; 31[label="primbindIO (AProVE_Exception vz60) (Monad.filterM0 vz50 vz40)",fontsize=16,color="black",shape="box"];31 -> 35[label="",style="solid", color="black", weight=3]; 32[label="primbindIO (AProVE_Error vz60) (Monad.filterM0 vz50 vz40)",fontsize=16,color="black",shape="box"];32 -> 36[label="",style="solid", color="black", weight=3]; 33[label="error []",fontsize=16,color="red",shape="box"];34[label="Monad.filterM0 vz50 vz40 vz60",fontsize=16,color="black",shape="box"];34 -> 37[label="",style="solid", color="black", weight=3]; 35[label="AProVE_Exception vz60",fontsize=16,color="green",shape="box"];36[label="AProVE_Error vz60",fontsize=16,color="green",shape="box"];37[label="return (Monad.filterM00 vz40 vz60 vz50)",fontsize=16,color="black",shape="box"];37 -> 38[label="",style="solid", color="black", weight=3]; 38[label="primretIO (Monad.filterM00 vz40 vz60 vz50)",fontsize=16,color="black",shape="box"];38 -> 39[label="",style="solid", color="black", weight=3]; 39[label="AProVE_IO (Monad.filterM00 vz40 vz60 vz50)",fontsize=16,color="green",shape="box"];39 -> 40[label="",style="dashed", color="green", weight=3]; 40[label="Monad.filterM00 vz40 vz60 vz50",fontsize=16,color="burlywood",shape="box"];55[label="vz50/False",fontsize=10,color="white",style="solid",shape="box"];40 -> 55[label="",style="solid", color="burlywood", weight=9]; 55 -> 41[label="",style="solid", color="burlywood", weight=3]; 56[label="vz50/True",fontsize=10,color="white",style="solid",shape="box"];40 -> 56[label="",style="solid", color="burlywood", weight=9]; 56 -> 42[label="",style="solid", color="burlywood", weight=3]; 41[label="Monad.filterM00 vz40 vz60 False",fontsize=16,color="black",shape="box"];41 -> 43[label="",style="solid", color="black", weight=3]; 42[label="Monad.filterM00 vz40 vz60 True",fontsize=16,color="black",shape="box"];42 -> 44[label="",style="solid", color="black", weight=3]; 43[label="vz60",fontsize=16,color="green",shape="box"];44[label="vz40 : vz60",fontsize=16,color="green",shape="box"];} ---------------------------------------- (10) Obligation: Q DP problem: The TRS P consists of the following rules: new_filterM(vz3, :(vz40, vz41), h) -> new_primbindIO(vz3, vz41, vz40, h) new_primbindIO(vz3, vz41, vz40, h) -> new_filterM(vz3, vz41, h) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (11) QDPSizeChangeProof (EQUIVALENT) 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. From the DPs we obtained the following set of size-change graphs: *new_primbindIO(vz3, vz41, vz40, h) -> new_filterM(vz3, vz41, h) The graph contains the following edges 1 >= 1, 2 >= 2, 4 >= 3 *new_filterM(vz3, :(vz40, vz41), h) -> new_primbindIO(vz3, vz41, vz40, h) The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3, 3 >= 4 ---------------------------------------- (12) YES