/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.hs /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox/benchmark/theBenchmark.hs # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty H-Termination with start terms of the given HASKELL could be proven: (0) HASKELL (1) BR [EQUIVALENT, 0 ms] (2) HASKELL (3) COR [EQUIVALENT, 0 ms] (4) HASKELL (5) Narrow [SOUND, 0 ms] (6) QDP (7) QDPSizeChangeProof [EQUIVALENT, 0 ms] (8) YES ---------------------------------------- (0) Obligation: mainModule Main module Main where { import qualified Prelude; import qualified Queue; } module Queue where { import qualified Main; import qualified Prelude; data Queue a = Q [a] [a] [a] ; deQueue :: Queue a -> Maybe (a,Queue a); deQueue (Q [] _ _) = Nothing; deQueue (Q (x : xs) ys xs') = Just (x,makeQ xs ys xs'); listToQueue :: [a] -> Queue a; listToQueue xs = Q xs [] xs; makeQ :: [a] -> [a] -> [a] -> Queue a; makeQ xs ys [] = listToQueue (rotate xs ys []); makeQ xs ys (_ : xs') = Q xs ys xs'; rotate :: [a] -> [a] -> [a] -> [a]; rotate [] (y : _) zs = y : zs; rotate (x : xs) (y : ys) zs = x : rotate xs ys (y : zs); } ---------------------------------------- (1) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. ---------------------------------------- (2) Obligation: mainModule Main module Main where { import qualified Prelude; import qualified Queue; } module Queue where { import qualified Main; import qualified Prelude; data Queue a = Q [a] [a] [a] ; deQueue :: Queue a -> Maybe (a,Queue a); deQueue (Q [] vy vz) = Nothing; deQueue (Q (x : xs) ys xs') = Just (x,makeQ xs ys xs'); listToQueue :: [a] -> Queue a; listToQueue xs = Q xs [] xs; makeQ :: [a] -> [a] -> [a] -> Queue a; makeQ xs ys [] = listToQueue (rotate xs ys []); makeQ xs ys (wu : xs') = Q xs ys xs'; rotate :: [a] -> [a] -> [a] -> [a]; rotate [] (y : vx) zs = y : zs; rotate (x : xs) (y : ys) zs = x : rotate xs ys (y : zs); } ---------------------------------------- (3) COR (EQUIVALENT) Cond Reductions: The following Function with conditions "undefined |Falseundefined; " is transformed to "undefined = undefined1; " "undefined0 True = undefined; " "undefined1 = undefined0 False; " ---------------------------------------- (4) Obligation: mainModule Main module Main where { import qualified Prelude; import qualified Queue; } module Queue where { import qualified Main; import qualified Prelude; data Queue a = Q [a] [a] [a] ; deQueue :: Queue a -> Maybe (a,Queue a); deQueue (Q [] vy vz) = Nothing; deQueue (Q (x : xs) ys xs') = Just (x,makeQ xs ys xs'); listToQueue :: [a] -> Queue a; listToQueue xs = Q xs [] xs; makeQ :: [a] -> [a] -> [a] -> Queue a; makeQ xs ys [] = listToQueue (rotate xs ys []); makeQ xs ys (wu : xs') = Q xs ys xs'; rotate :: [a] -> [a] -> [a] -> [a]; rotate [] (y : vx) zs = y : zs; rotate (x : xs) (y : ys) zs = x : rotate xs ys (y : zs); } ---------------------------------------- (5) Narrow (SOUND) Haskell To QDPs digraph dp_graph { node [outthreshold=100, inthreshold=100];1[label="Queue.deQueue",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="Queue.deQueue wv3",fontsize=16,color="burlywood",shape="triangle"];168[label="wv3/Queue.Q wv30 wv31 wv32",fontsize=10,color="white",style="solid",shape="box"];3 -> 168[label="",style="solid", color="burlywood", weight=9]; 168 -> 4[label="",style="solid", color="burlywood", weight=3]; 4[label="Queue.deQueue (Queue.Q wv30 wv31 wv32)",fontsize=16,color="burlywood",shape="box"];169[label="wv30/wv300 : wv301",fontsize=10,color="white",style="solid",shape="box"];4 -> 169[label="",style="solid", color="burlywood", weight=9]; 169 -> 5[label="",style="solid", color="burlywood", weight=3]; 170[label="wv30/[]",fontsize=10,color="white",style="solid",shape="box"];4 -> 170[label="",style="solid", color="burlywood", weight=9]; 170 -> 6[label="",style="solid", color="burlywood", weight=3]; 5[label="Queue.deQueue (Queue.Q (wv300 : wv301) wv31 wv32)",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 6[label="Queue.deQueue (Queue.Q [] wv31 wv32)",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 7[label="Just (wv300,Queue.makeQ wv301 wv31 wv32)",fontsize=16,color="green",shape="box"];7 -> 9[label="",style="dashed", color="green", weight=3]; 8[label="Nothing",fontsize=16,color="green",shape="box"];9[label="Queue.makeQ wv301 wv31 wv32",fontsize=16,color="burlywood",shape="box"];171[label="wv32/wv320 : wv321",fontsize=10,color="white",style="solid",shape="box"];9 -> 171[label="",style="solid", color="burlywood", weight=9]; 171 -> 10[label="",style="solid", color="burlywood", weight=3]; 172[label="wv32/[]",fontsize=10,color="white",style="solid",shape="box"];9 -> 172[label="",style="solid", color="burlywood", weight=9]; 172 -> 11[label="",style="solid", color="burlywood", weight=3]; 10[label="Queue.makeQ wv301 wv31 (wv320 : wv321)",fontsize=16,color="black",shape="box"];10 -> 12[label="",style="solid", color="black", weight=3]; 11[label="Queue.makeQ wv301 wv31 []",fontsize=16,color="black",shape="box"];11 -> 13[label="",style="solid", color="black", weight=3]; 12[label="Queue.Q wv301 wv31 wv321",fontsize=16,color="green",shape="box"];13[label="Queue.listToQueue (Queue.rotate wv301 wv31 [])",fontsize=16,color="black",shape="box"];13 -> 14[label="",style="solid", color="black", weight=3]; 14[label="Queue.Q (Queue.rotate wv301 wv31 []) [] (Queue.rotate wv301 wv31 [])",fontsize=16,color="green",shape="box"];14 -> 15[label="",style="dashed", color="green", weight=3]; 14 -> 16[label="",style="dashed", color="green", weight=3]; 15[label="Queue.rotate wv301 wv31 []",fontsize=16,color="burlywood",shape="triangle"];173[label="wv301/wv3010 : wv3011",fontsize=10,color="white",style="solid",shape="box"];15 -> 173[label="",style="solid", color="burlywood", weight=9]; 173 -> 17[label="",style="solid", color="burlywood", weight=3]; 174[label="wv301/[]",fontsize=10,color="white",style="solid",shape="box"];15 -> 174[label="",style="solid", color="burlywood", weight=9]; 174 -> 18[label="",style="solid", color="burlywood", weight=3]; 16 -> 15[label="",style="dashed", color="red", weight=0]; 16[label="Queue.rotate wv301 wv31 []",fontsize=16,color="magenta"];17[label="Queue.rotate (wv3010 : wv3011) wv31 []",fontsize=16,color="burlywood",shape="box"];175[label="wv31/wv310 : wv311",fontsize=10,color="white",style="solid",shape="box"];17 -> 175[label="",style="solid", color="burlywood", weight=9]; 175 -> 19[label="",style="solid", color="burlywood", weight=3]; 176[label="wv31/[]",fontsize=10,color="white",style="solid",shape="box"];17 -> 176[label="",style="solid", color="burlywood", weight=9]; 176 -> 20[label="",style="solid", color="burlywood", weight=3]; 18[label="Queue.rotate [] wv31 []",fontsize=16,color="burlywood",shape="box"];177[label="wv31/wv310 : wv311",fontsize=10,color="white",style="solid",shape="box"];18 -> 177[label="",style="solid", color="burlywood", weight=9]; 177 -> 21[label="",style="solid", color="burlywood", weight=3]; 178[label="wv31/[]",fontsize=10,color="white",style="solid",shape="box"];18 -> 178[label="",style="solid", color="burlywood", weight=9]; 178 -> 22[label="",style="solid", color="burlywood", weight=3]; 19[label="Queue.rotate (wv3010 : wv3011) (wv310 : wv311) []",fontsize=16,color="black",shape="box"];19 -> 23[label="",style="solid", color="black", weight=3]; 20[label="Queue.rotate (wv3010 : wv3011) [] []",fontsize=16,color="black",shape="box"];20 -> 24[label="",style="solid", color="black", weight=3]; 21[label="Queue.rotate [] (wv310 : wv311) []",fontsize=16,color="black",shape="box"];21 -> 25[label="",style="solid", color="black", weight=3]; 22[label="Queue.rotate [] [] []",fontsize=16,color="black",shape="box"];22 -> 26[label="",style="solid", color="black", weight=3]; 23[label="wv3010 : Queue.rotate wv3011 wv311 (wv310 : [])",fontsize=16,color="green",shape="box"];23 -> 27[label="",style="dashed", color="green", weight=3]; 24[label="error []",fontsize=16,color="red",shape="box"];25[label="wv310 : []",fontsize=16,color="green",shape="box"];26[label="error []",fontsize=16,color="red",shape="box"];27 -> 116[label="",style="dashed", color="red", weight=0]; 27[label="Queue.rotate wv3011 wv311 (wv310 : [])",fontsize=16,color="magenta"];27 -> 117[label="",style="dashed", color="magenta", weight=3]; 27 -> 118[label="",style="dashed", color="magenta", weight=3]; 27 -> 119[label="",style="dashed", color="magenta", weight=3]; 27 -> 120[label="",style="dashed", color="magenta", weight=3]; 117[label="wv3011",fontsize=16,color="green",shape="box"];118[label="wv310",fontsize=16,color="green",shape="box"];119[label="[]",fontsize=16,color="green",shape="box"];120[label="wv311",fontsize=16,color="green",shape="box"];116[label="Queue.rotate wv5 wv6 (wv7 : wv8)",fontsize=16,color="burlywood",shape="triangle"];179[label="wv5/wv50 : wv51",fontsize=10,color="white",style="solid",shape="box"];116 -> 179[label="",style="solid", color="burlywood", weight=9]; 179 -> 153[label="",style="solid", color="burlywood", weight=3]; 180[label="wv5/[]",fontsize=10,color="white",style="solid",shape="box"];116 -> 180[label="",style="solid", color="burlywood", weight=9]; 180 -> 154[label="",style="solid", color="burlywood", weight=3]; 153[label="Queue.rotate (wv50 : wv51) wv6 (wv7 : wv8)",fontsize=16,color="burlywood",shape="box"];181[label="wv6/wv60 : wv61",fontsize=10,color="white",style="solid",shape="box"];153 -> 181[label="",style="solid", color="burlywood", weight=9]; 181 -> 155[label="",style="solid", color="burlywood", weight=3]; 182[label="wv6/[]",fontsize=10,color="white",style="solid",shape="box"];153 -> 182[label="",style="solid", color="burlywood", weight=9]; 182 -> 156[label="",style="solid", color="burlywood", weight=3]; 154[label="Queue.rotate [] wv6 (wv7 : wv8)",fontsize=16,color="burlywood",shape="box"];183[label="wv6/wv60 : wv61",fontsize=10,color="white",style="solid",shape="box"];154 -> 183[label="",style="solid", color="burlywood", weight=9]; 183 -> 157[label="",style="solid", color="burlywood", weight=3]; 184[label="wv6/[]",fontsize=10,color="white",style="solid",shape="box"];154 -> 184[label="",style="solid", color="burlywood", weight=9]; 184 -> 158[label="",style="solid", color="burlywood", weight=3]; 155[label="Queue.rotate (wv50 : wv51) (wv60 : wv61) (wv7 : wv8)",fontsize=16,color="black",shape="box"];155 -> 159[label="",style="solid", color="black", weight=3]; 156[label="Queue.rotate (wv50 : wv51) [] (wv7 : wv8)",fontsize=16,color="black",shape="box"];156 -> 160[label="",style="solid", color="black", weight=3]; 157[label="Queue.rotate [] (wv60 : wv61) (wv7 : wv8)",fontsize=16,color="black",shape="box"];157 -> 161[label="",style="solid", color="black", weight=3]; 158[label="Queue.rotate [] [] (wv7 : wv8)",fontsize=16,color="black",shape="box"];158 -> 162[label="",style="solid", color="black", weight=3]; 159[label="wv50 : Queue.rotate wv51 wv61 (wv60 : wv7 : wv8)",fontsize=16,color="green",shape="box"];159 -> 163[label="",style="dashed", color="green", weight=3]; 160[label="error []",fontsize=16,color="red",shape="box"];161[label="wv60 : wv7 : wv8",fontsize=16,color="green",shape="box"];162[label="error []",fontsize=16,color="red",shape="box"];163 -> 116[label="",style="dashed", color="red", weight=0]; 163[label="Queue.rotate wv51 wv61 (wv60 : wv7 : wv8)",fontsize=16,color="magenta"];163 -> 164[label="",style="dashed", color="magenta", weight=3]; 163 -> 165[label="",style="dashed", color="magenta", weight=3]; 163 -> 166[label="",style="dashed", color="magenta", weight=3]; 163 -> 167[label="",style="dashed", color="magenta", weight=3]; 164[label="wv51",fontsize=16,color="green",shape="box"];165[label="wv60",fontsize=16,color="green",shape="box"];166[label="wv7 : wv8",fontsize=16,color="green",shape="box"];167[label="wv61",fontsize=16,color="green",shape="box"];} ---------------------------------------- (6) Obligation: Q DP problem: The TRS P consists of the following rules: new_rotate(:(wv50, wv51), :(wv60, wv61), wv7, wv8, h) -> new_rotate(wv51, wv61, wv60, :(wv7, wv8), h) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (7) 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_rotate(:(wv50, wv51), :(wv60, wv61), wv7, wv8, h) -> new_rotate(wv51, wv61, wv60, :(wv7, wv8), h) The graph contains the following edges 1 > 1, 2 > 2, 2 > 3, 5 >= 5 ---------------------------------------- (8) YES