7.64/3.66 YES 9.49/4.16 proof of /export/starexec/sandbox2/benchmark/theBenchmark.hs 9.49/4.16 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 9.49/4.16 9.49/4.16 9.49/4.16 H-Termination with start terms of the given HASKELL could be proven: 9.49/4.16 9.49/4.16 (0) HASKELL 9.49/4.16 (1) BR [EQUIVALENT, 0 ms] 9.49/4.16 (2) HASKELL 9.49/4.16 (3) COR [EQUIVALENT, 0 ms] 9.49/4.16 (4) HASKELL 9.49/4.16 (5) Narrow [SOUND, 0 ms] 9.49/4.16 (6) QDP 9.49/4.16 (7) QDPSizeChangeProof [EQUIVALENT, 0 ms] 9.49/4.16 (8) YES 9.49/4.16 9.49/4.16 9.49/4.16 ---------------------------------------- 9.49/4.16 9.49/4.16 (0) 9.49/4.16 Obligation: 9.49/4.16 mainModule Main 9.49/4.16 module Main where { 9.49/4.16 import qualified Prelude; 9.49/4.16 import qualified Queue; 9.49/4.16 } 9.49/4.16 module Queue where { 9.49/4.16 import qualified Main; 9.49/4.16 import qualified Prelude; 9.49/4.16 data Queue a = Q [a] [a] [a] ; 9.49/4.16 9.49/4.16 addToQueue :: Queue a -> a -> Queue a; 9.49/4.16 addToQueue (Q xs ys xs') y = makeQ xs (y : ys) xs'; 9.49/4.16 9.49/4.16 listToQueue :: [a] -> Queue a; 9.49/4.16 listToQueue xs = Q xs [] xs; 9.49/4.16 9.49/4.16 makeQ :: [a] -> [a] -> [a] -> Queue a; 9.49/4.16 makeQ xs ys [] = listToQueue (rotate xs ys []); 9.49/4.16 makeQ xs ys (_ : xs') = Q xs ys xs'; 9.49/4.16 9.49/4.16 rotate :: [a] -> [a] -> [a] -> [a]; 9.49/4.16 rotate [] (y : _) zs = y : zs; 9.49/4.16 rotate (x : xs) (y : ys) zs = x : rotate xs ys (y : zs); 9.49/4.16 9.49/4.16 } 9.49/4.16 9.49/4.16 ---------------------------------------- 9.49/4.16 9.49/4.16 (1) BR (EQUIVALENT) 9.49/4.16 Replaced joker patterns by fresh variables and removed binding patterns. 9.49/4.16 ---------------------------------------- 9.49/4.16 9.49/4.16 (2) 9.49/4.16 Obligation: 9.49/4.16 mainModule Main 9.49/4.16 module Main where { 9.49/4.16 import qualified Prelude; 9.49/4.16 import qualified Queue; 9.49/4.16 } 9.49/4.16 module Queue where { 9.49/4.16 import qualified Main; 9.49/4.16 import qualified Prelude; 9.49/4.16 data Queue a = Q [a] [a] [a] ; 9.49/4.16 9.49/4.16 addToQueue :: Queue a -> a -> Queue a; 9.49/4.16 addToQueue (Q xs ys xs') y = makeQ xs (y : ys) xs'; 9.49/4.16 9.49/4.16 listToQueue :: [a] -> Queue a; 9.49/4.16 listToQueue xs = Q xs [] xs; 9.49/4.16 9.49/4.16 makeQ :: [a] -> [a] -> [a] -> Queue a; 9.49/4.16 makeQ xs ys [] = listToQueue (rotate xs ys []); 9.49/4.16 makeQ xs ys (vy : xs') = Q xs ys xs'; 9.49/4.16 9.49/4.16 rotate :: [a] -> [a] -> [a] -> [a]; 9.49/4.16 rotate [] (y : vx) zs = y : zs; 9.49/4.16 rotate (x : xs) (y : ys) zs = x : rotate xs ys (y : zs); 9.49/4.16 9.49/4.16 } 9.49/4.16 9.49/4.16 ---------------------------------------- 9.49/4.16 9.49/4.16 (3) COR (EQUIVALENT) 9.49/4.16 Cond Reductions: 9.49/4.16 The following Function with conditions 9.49/4.16 "undefined |Falseundefined; 9.49/4.16 " 9.49/4.16 is transformed to 9.49/4.16 "undefined = undefined1; 9.49/4.16 " 9.49/4.16 "undefined0 True = undefined; 9.49/4.16 " 9.49/4.16 "undefined1 = undefined0 False; 9.49/4.16 " 9.49/4.16 9.49/4.16 ---------------------------------------- 9.49/4.16 9.49/4.16 (4) 9.49/4.16 Obligation: 9.49/4.16 mainModule Main 9.49/4.16 module Main where { 9.49/4.16 import qualified Prelude; 9.49/4.16 import qualified Queue; 9.49/4.16 } 9.49/4.16 module Queue where { 9.49/4.16 import qualified Main; 9.49/4.16 import qualified Prelude; 9.49/4.16 data Queue a = Q [a] [a] [a] ; 9.49/4.16 9.49/4.16 addToQueue :: Queue a -> a -> Queue a; 9.49/4.16 addToQueue (Q xs ys xs') y = makeQ xs (y : ys) xs'; 9.49/4.16 9.49/4.16 listToQueue :: [a] -> Queue a; 9.49/4.16 listToQueue xs = Q xs [] xs; 9.49/4.16 9.49/4.16 makeQ :: [a] -> [a] -> [a] -> Queue a; 9.49/4.16 makeQ xs ys [] = listToQueue (rotate xs ys []); 9.49/4.16 makeQ xs ys (vy : xs') = Q xs ys xs'; 9.49/4.16 9.49/4.16 rotate :: [a] -> [a] -> [a] -> [a]; 9.49/4.16 rotate [] (y : vx) zs = y : zs; 9.49/4.16 rotate (x : xs) (y : ys) zs = x : rotate xs ys (y : zs); 9.49/4.16 9.49/4.16 } 9.49/4.16 9.49/4.16 ---------------------------------------- 9.49/4.16 9.49/4.16 (5) Narrow (SOUND) 9.49/4.16 Haskell To QDPs 9.49/4.16 9.49/4.16 digraph dp_graph { 9.49/4.16 node [outthreshold=100, inthreshold=100];1[label="Queue.addToQueue",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 9.49/4.16 3[label="Queue.addToQueue vz3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 9.49/4.16 4[label="Queue.addToQueue vz3 vz4",fontsize=16,color="burlywood",shape="triangle"];159[label="vz3/Queue.Q vz30 vz31 vz32",fontsize=10,color="white",style="solid",shape="box"];4 -> 159[label="",style="solid", color="burlywood", weight=9]; 9.49/4.16 159 -> 5[label="",style="solid", color="burlywood", weight=3]; 9.49/4.16 5[label="Queue.addToQueue (Queue.Q vz30 vz31 vz32) vz4",fontsize=16,color="black",shape="box"];5 -> 6[label="",style="solid", color="black", weight=3]; 9.49/4.16 6[label="Queue.makeQ vz30 (vz4 : vz31) vz32",fontsize=16,color="burlywood",shape="box"];160[label="vz32/vz320 : vz321",fontsize=10,color="white",style="solid",shape="box"];6 -> 160[label="",style="solid", color="burlywood", weight=9]; 9.49/4.16 160 -> 7[label="",style="solid", color="burlywood", weight=3]; 9.49/4.16 161[label="vz32/[]",fontsize=10,color="white",style="solid",shape="box"];6 -> 161[label="",style="solid", color="burlywood", weight=9]; 9.49/4.16 161 -> 8[label="",style="solid", color="burlywood", weight=3]; 9.49/4.16 7[label="Queue.makeQ vz30 (vz4 : vz31) (vz320 : vz321)",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 9.49/4.16 8[label="Queue.makeQ vz30 (vz4 : vz31) []",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 9.49/4.16 9[label="Queue.Q vz30 (vz4 : vz31) vz321",fontsize=16,color="green",shape="box"];10[label="Queue.listToQueue (Queue.rotate vz30 (vz4 : vz31) [])",fontsize=16,color="black",shape="box"];10 -> 11[label="",style="solid", color="black", weight=3]; 9.49/4.16 11[label="Queue.Q (Queue.rotate vz30 (vz4 : vz31) []) [] (Queue.rotate vz30 (vz4 : vz31) [])",fontsize=16,color="green",shape="box"];11 -> 12[label="",style="dashed", color="green", weight=3]; 9.49/4.16 11 -> 13[label="",style="dashed", color="green", weight=3]; 9.49/4.16 12[label="Queue.rotate vz30 (vz4 : vz31) []",fontsize=16,color="burlywood",shape="triangle"];162[label="vz30/vz300 : vz301",fontsize=10,color="white",style="solid",shape="box"];12 -> 162[label="",style="solid", color="burlywood", weight=9]; 9.49/4.16 162 -> 14[label="",style="solid", color="burlywood", weight=3]; 9.49/4.16 163[label="vz30/[]",fontsize=10,color="white",style="solid",shape="box"];12 -> 163[label="",style="solid", color="burlywood", weight=9]; 9.49/4.16 163 -> 15[label="",style="solid", color="burlywood", weight=3]; 9.49/4.16 13 -> 12[label="",style="dashed", color="red", weight=0]; 9.49/4.16 13[label="Queue.rotate vz30 (vz4 : vz31) []",fontsize=16,color="magenta"];14[label="Queue.rotate (vz300 : vz301) (vz4 : vz31) []",fontsize=16,color="black",shape="box"];14 -> 16[label="",style="solid", color="black", weight=3]; 9.49/4.16 15[label="Queue.rotate [] (vz4 : vz31) []",fontsize=16,color="black",shape="box"];15 -> 17[label="",style="solid", color="black", weight=3]; 9.49/4.16 16[label="vz300 : Queue.rotate vz301 vz31 (vz4 : [])",fontsize=16,color="green",shape="box"];16 -> 18[label="",style="dashed", color="green", weight=3]; 9.49/4.16 17[label="vz4 : []",fontsize=16,color="green",shape="box"];18 -> 107[label="",style="dashed", color="red", weight=0]; 9.49/4.16 18[label="Queue.rotate vz301 vz31 (vz4 : [])",fontsize=16,color="magenta"];18 -> 108[label="",style="dashed", color="magenta", weight=3]; 9.49/4.16 18 -> 109[label="",style="dashed", color="magenta", weight=3]; 9.49/4.16 18 -> 110[label="",style="dashed", color="magenta", weight=3]; 9.49/4.16 18 -> 111[label="",style="dashed", color="magenta", weight=3]; 9.49/4.16 108[label="vz301",fontsize=16,color="green",shape="box"];109[label="vz4",fontsize=16,color="green",shape="box"];110[label="[]",fontsize=16,color="green",shape="box"];111[label="vz31",fontsize=16,color="green",shape="box"];107[label="Queue.rotate vz6 vz7 (vz8 : vz9)",fontsize=16,color="burlywood",shape="triangle"];164[label="vz6/vz60 : vz61",fontsize=10,color="white",style="solid",shape="box"];107 -> 164[label="",style="solid", color="burlywood", weight=9]; 9.49/4.16 164 -> 144[label="",style="solid", color="burlywood", weight=3]; 9.49/4.16 165[label="vz6/[]",fontsize=10,color="white",style="solid",shape="box"];107 -> 165[label="",style="solid", color="burlywood", weight=9]; 9.49/4.16 165 -> 145[label="",style="solid", color="burlywood", weight=3]; 9.49/4.16 144[label="Queue.rotate (vz60 : vz61) vz7 (vz8 : vz9)",fontsize=16,color="burlywood",shape="box"];166[label="vz7/vz70 : vz71",fontsize=10,color="white",style="solid",shape="box"];144 -> 166[label="",style="solid", color="burlywood", weight=9]; 9.49/4.16 166 -> 146[label="",style="solid", color="burlywood", weight=3]; 9.49/4.16 167[label="vz7/[]",fontsize=10,color="white",style="solid",shape="box"];144 -> 167[label="",style="solid", color="burlywood", weight=9]; 9.49/4.16 167 -> 147[label="",style="solid", color="burlywood", weight=3]; 9.49/4.16 145[label="Queue.rotate [] vz7 (vz8 : vz9)",fontsize=16,color="burlywood",shape="box"];168[label="vz7/vz70 : vz71",fontsize=10,color="white",style="solid",shape="box"];145 -> 168[label="",style="solid", color="burlywood", weight=9]; 9.49/4.16 168 -> 148[label="",style="solid", color="burlywood", weight=3]; 9.49/4.16 169[label="vz7/[]",fontsize=10,color="white",style="solid",shape="box"];145 -> 169[label="",style="solid", color="burlywood", weight=9]; 9.49/4.16 169 -> 149[label="",style="solid", color="burlywood", weight=3]; 9.49/4.16 146[label="Queue.rotate (vz60 : vz61) (vz70 : vz71) (vz8 : vz9)",fontsize=16,color="black",shape="box"];146 -> 150[label="",style="solid", color="black", weight=3]; 9.49/4.16 147[label="Queue.rotate (vz60 : vz61) [] (vz8 : vz9)",fontsize=16,color="black",shape="box"];147 -> 151[label="",style="solid", color="black", weight=3]; 9.49/4.16 148[label="Queue.rotate [] (vz70 : vz71) (vz8 : vz9)",fontsize=16,color="black",shape="box"];148 -> 152[label="",style="solid", color="black", weight=3]; 9.49/4.16 149[label="Queue.rotate [] [] (vz8 : vz9)",fontsize=16,color="black",shape="box"];149 -> 153[label="",style="solid", color="black", weight=3]; 9.49/4.16 150[label="vz60 : Queue.rotate vz61 vz71 (vz70 : vz8 : vz9)",fontsize=16,color="green",shape="box"];150 -> 154[label="",style="dashed", color="green", weight=3]; 9.49/4.16 151[label="error []",fontsize=16,color="red",shape="box"];152[label="vz70 : vz8 : vz9",fontsize=16,color="green",shape="box"];153[label="error []",fontsize=16,color="red",shape="box"];154 -> 107[label="",style="dashed", color="red", weight=0]; 9.49/4.16 154[label="Queue.rotate vz61 vz71 (vz70 : vz8 : vz9)",fontsize=16,color="magenta"];154 -> 155[label="",style="dashed", color="magenta", weight=3]; 9.49/4.16 154 -> 156[label="",style="dashed", color="magenta", weight=3]; 9.49/4.16 154 -> 157[label="",style="dashed", color="magenta", weight=3]; 9.49/4.16 154 -> 158[label="",style="dashed", color="magenta", weight=3]; 9.49/4.16 155[label="vz61",fontsize=16,color="green",shape="box"];156[label="vz70",fontsize=16,color="green",shape="box"];157[label="vz8 : vz9",fontsize=16,color="green",shape="box"];158[label="vz71",fontsize=16,color="green",shape="box"];} 9.49/4.16 9.49/4.16 ---------------------------------------- 9.49/4.16 9.49/4.16 (6) 9.49/4.16 Obligation: 9.49/4.16 Q DP problem: 9.49/4.16 The TRS P consists of the following rules: 9.49/4.16 9.49/4.16 new_rotate(:(vz60, vz61), :(vz70, vz71), vz8, vz9, h) -> new_rotate(vz61, vz71, vz70, :(vz8, vz9), h) 9.49/4.16 9.49/4.16 R is empty. 9.49/4.16 Q is empty. 9.49/4.16 We have to consider all minimal (P,Q,R)-chains. 9.49/4.16 ---------------------------------------- 9.49/4.16 9.49/4.16 (7) QDPSizeChangeProof (EQUIVALENT) 9.49/4.16 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. 9.49/4.16 9.49/4.16 From the DPs we obtained the following set of size-change graphs: 9.49/4.16 *new_rotate(:(vz60, vz61), :(vz70, vz71), vz8, vz9, h) -> new_rotate(vz61, vz71, vz70, :(vz8, vz9), h) 9.49/4.16 The graph contains the following edges 1 > 1, 2 > 2, 2 > 3, 5 >= 5 9.49/4.16 9.49/4.16 9.49/4.16 ---------------------------------------- 9.49/4.16 9.49/4.16 (8) 9.49/4.16 YES 9.70/4.27 EOF