/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) IPR [EQUIVALENT, 0 ms] (2) HASKELL (3) BR [EQUIVALENT, 0 ms] (4) HASKELL (5) COR [EQUIVALENT, 0 ms] (6) HASKELL (7) Narrow [SOUND, 0 ms] (8) QDP (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] (10) YES ---------------------------------------- (0) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; partition :: (a -> Bool) -> [a] -> ([a],[a]); partition p xs = foldr (select p) ([],[]) xs; select p x ~((ts,fs)) | p x = (x : ts,fs) | otherwise = (ts,x : fs); } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (1) IPR (EQUIVALENT) IrrPat Reductions: The variables of the following irrefutable Pattern "~(ts,fs)" are replaced by calls to these functions "select0 (ts,fs) = ts; " "select1 (ts,fs) = fs; " ---------------------------------------- (2) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; partition :: (a -> Bool) -> [a] -> ([a],[a]); partition p xs = foldr (select p) ([],[]) xs; select p x vw | p x = (x : select0 vw,select1 vw) | otherwise = (select0 vw,x : select1 vw); select0 (ts,fs) = ts; select1 (ts,fs) = fs; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (3) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. ---------------------------------------- (4) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; partition :: (a -> Bool) -> [a] -> ([a],[a]); partition p xs = foldr (select p) ([],[]) xs; select p x vw | p x = (x : select0 vw,select1 vw) | otherwise = (select0 vw,x : select1 vw); select0 (ts,fs) = ts; select1 (ts,fs) = fs; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (5) COR (EQUIVALENT) Cond Reductions: The following Function with conditions "undefined |Falseundefined; " is transformed to "undefined = undefined1; " "undefined0 True = undefined; " "undefined1 = undefined0 False; " The following Function with conditions "select p x vw|p x(x : select0 vw,select1 vw)|otherwise(select0 vw,x : select1 vw); " is transformed to "select p x vw = select4 p x vw; " "select3 p x vw True = (x : select0 vw,select1 vw); select3 p x vw False = select2 p x vw otherwise; " "select2 p x vw True = (select0 vw,x : select1 vw); " "select4 p x vw = select3 p x vw (p x); " ---------------------------------------- (6) Obligation: mainModule Main module Maybe where { import qualified List; import qualified Main; import qualified Prelude; } module List where { import qualified Main; import qualified Maybe; import qualified Prelude; partition :: (a -> Bool) -> [a] -> ([a],[a]); partition p xs = foldr (select p) ([],[]) xs; select p x vw = select4 p x vw; select0 (ts,fs) = ts; select1 (ts,fs) = fs; select2 p x vw True = (select0 vw,x : select1 vw); select3 p x vw True = (x : select0 vw,select1 vw); select3 p x vw False = select2 p x vw otherwise; select4 p x vw = select3 p x vw (p x); } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (7) Narrow (SOUND) Haskell To QDPs digraph dp_graph { node [outthreshold=100, inthreshold=100];1[label="List.partition",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="List.partition vz3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 4[label="List.partition vz3 vz4",fontsize=16,color="black",shape="triangle"];4 -> 5[label="",style="solid", color="black", weight=3]; 5[label="foldr (List.select vz3) ([],[]) vz4",fontsize=16,color="burlywood",shape="triangle"];33[label="vz4/vz40 : vz41",fontsize=10,color="white",style="solid",shape="box"];5 -> 33[label="",style="solid", color="burlywood", weight=9]; 33 -> 6[label="",style="solid", color="burlywood", weight=3]; 34[label="vz4/[]",fontsize=10,color="white",style="solid",shape="box"];5 -> 34[label="",style="solid", color="burlywood", weight=9]; 34 -> 7[label="",style="solid", color="burlywood", weight=3]; 6[label="foldr (List.select vz3) ([],[]) (vz40 : vz41)",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 7[label="foldr (List.select vz3) ([],[]) []",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 8 -> 10[label="",style="dashed", color="red", weight=0]; 8[label="List.select vz3 vz40 (foldr (List.select vz3) ([],[]) vz41)",fontsize=16,color="magenta"];8 -> 11[label="",style="dashed", color="magenta", weight=3]; 9[label="([],[])",fontsize=16,color="green",shape="box"];11 -> 5[label="",style="dashed", color="red", weight=0]; 11[label="foldr (List.select vz3) ([],[]) vz41",fontsize=16,color="magenta"];11 -> 12[label="",style="dashed", color="magenta", weight=3]; 10[label="List.select vz3 vz40 vz5",fontsize=16,color="black",shape="triangle"];10 -> 13[label="",style="solid", color="black", weight=3]; 12[label="vz41",fontsize=16,color="green",shape="box"];13[label="List.select4 vz3 vz40 vz5",fontsize=16,color="black",shape="box"];13 -> 14[label="",style="solid", color="black", weight=3]; 14 -> 15[label="",style="dashed", color="red", weight=0]; 14[label="List.select3 vz3 vz40 vz5 (vz3 vz40)",fontsize=16,color="magenta"];14 -> 16[label="",style="dashed", color="magenta", weight=3]; 16[label="vz3 vz40",fontsize=16,color="green",shape="box"];16 -> 20[label="",style="dashed", color="green", weight=3]; 15[label="List.select3 vz3 vz40 vz5 vz6",fontsize=16,color="burlywood",shape="triangle"];35[label="vz6/False",fontsize=10,color="white",style="solid",shape="box"];15 -> 35[label="",style="solid", color="burlywood", weight=9]; 35 -> 18[label="",style="solid", color="burlywood", weight=3]; 36[label="vz6/True",fontsize=10,color="white",style="solid",shape="box"];15 -> 36[label="",style="solid", color="burlywood", weight=9]; 36 -> 19[label="",style="solid", color="burlywood", weight=3]; 20[label="vz40",fontsize=16,color="green",shape="box"];18[label="List.select3 vz3 vz40 vz5 False",fontsize=16,color="black",shape="box"];18 -> 21[label="",style="solid", color="black", weight=3]; 19[label="List.select3 vz3 vz40 vz5 True",fontsize=16,color="black",shape="box"];19 -> 22[label="",style="solid", color="black", weight=3]; 21[label="List.select2 vz3 vz40 vz5 otherwise",fontsize=16,color="black",shape="box"];21 -> 23[label="",style="solid", color="black", weight=3]; 22[label="(vz40 : List.select0 vz5,List.select1 vz5)",fontsize=16,color="green",shape="box"];22 -> 24[label="",style="dashed", color="green", weight=3]; 22 -> 25[label="",style="dashed", color="green", weight=3]; 23[label="List.select2 vz3 vz40 vz5 True",fontsize=16,color="black",shape="box"];23 -> 26[label="",style="solid", color="black", weight=3]; 24[label="List.select0 vz5",fontsize=16,color="burlywood",shape="triangle"];37[label="vz5/(vz50,vz51)",fontsize=10,color="white",style="solid",shape="box"];24 -> 37[label="",style="solid", color="burlywood", weight=9]; 37 -> 27[label="",style="solid", color="burlywood", weight=3]; 25[label="List.select1 vz5",fontsize=16,color="burlywood",shape="triangle"];38[label="vz5/(vz50,vz51)",fontsize=10,color="white",style="solid",shape="box"];25 -> 38[label="",style="solid", color="burlywood", weight=9]; 38 -> 28[label="",style="solid", color="burlywood", weight=3]; 26[label="(List.select0 vz5,vz40 : List.select1 vz5)",fontsize=16,color="green",shape="box"];26 -> 29[label="",style="dashed", color="green", weight=3]; 26 -> 30[label="",style="dashed", color="green", weight=3]; 27[label="List.select0 (vz50,vz51)",fontsize=16,color="black",shape="box"];27 -> 31[label="",style="solid", color="black", weight=3]; 28[label="List.select1 (vz50,vz51)",fontsize=16,color="black",shape="box"];28 -> 32[label="",style="solid", color="black", weight=3]; 29 -> 24[label="",style="dashed", color="red", weight=0]; 29[label="List.select0 vz5",fontsize=16,color="magenta"];30 -> 25[label="",style="dashed", color="red", weight=0]; 30[label="List.select1 vz5",fontsize=16,color="magenta"];31[label="vz50",fontsize=16,color="green",shape="box"];32[label="vz51",fontsize=16,color="green",shape="box"];} ---------------------------------------- (8) Obligation: Q DP problem: The TRS P consists of the following rules: new_foldr(vz3, :(vz40, vz41), ba) -> new_foldr(vz3, vz41, ba) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (9) 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_foldr(vz3, :(vz40, vz41), ba) -> new_foldr(vz3, vz41, ba) The graph contains the following edges 1 >= 1, 2 > 2, 3 >= 3 ---------------------------------------- (10) YES