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