/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: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 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] ; addToQueue :: Queue a -> a -> Queue a; addToQueue (Q xs ys xs') y = makeQ xs (y : 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] ; addToQueue :: Queue a -> a -> Queue a; addToQueue (Q xs ys xs') y = makeQ xs (y : 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 (vy : 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] ; addToQueue :: Queue a -> a -> Queue a; addToQueue (Q xs ys xs') y = makeQ xs (y : 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 (vy : 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.addToQueue",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="Queue.addToQueue vz3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 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]; 159 -> 5[label="",style="solid", color="burlywood", weight=3]; 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]; 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]; 160 -> 7[label="",style="solid", color="burlywood", weight=3]; 161[label="vz32/[]",fontsize=10,color="white",style="solid",shape="box"];6 -> 161[label="",style="solid", color="burlywood", weight=9]; 161 -> 8[label="",style="solid", color="burlywood", weight=3]; 7[label="Queue.makeQ vz30 (vz4 : vz31) (vz320 : vz321)",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 8[label="Queue.makeQ vz30 (vz4 : vz31) []",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 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]; 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]; 11 -> 13[label="",style="dashed", color="green", weight=3]; 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]; 162 -> 14[label="",style="solid", color="burlywood", weight=3]; 163[label="vz30/[]",fontsize=10,color="white",style="solid",shape="box"];12 -> 163[label="",style="solid", color="burlywood", weight=9]; 163 -> 15[label="",style="solid", color="burlywood", weight=3]; 13 -> 12[label="",style="dashed", color="red", weight=0]; 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]; 15[label="Queue.rotate [] (vz4 : vz31) []",fontsize=16,color="black",shape="box"];15 -> 17[label="",style="solid", color="black", weight=3]; 16[label="vz300 : Queue.rotate vz301 vz31 (vz4 : [])",fontsize=16,color="green",shape="box"];16 -> 18[label="",style="dashed", color="green", weight=3]; 17[label="vz4 : []",fontsize=16,color="green",shape="box"];18 -> 107[label="",style="dashed", color="red", weight=0]; 18[label="Queue.rotate vz301 vz31 (vz4 : [])",fontsize=16,color="magenta"];18 -> 108[label="",style="dashed", color="magenta", weight=3]; 18 -> 109[label="",style="dashed", color="magenta", weight=3]; 18 -> 110[label="",style="dashed", color="magenta", weight=3]; 18 -> 111[label="",style="dashed", color="magenta", weight=3]; 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]; 164 -> 144[label="",style="solid", color="burlywood", weight=3]; 165[label="vz6/[]",fontsize=10,color="white",style="solid",shape="box"];107 -> 165[label="",style="solid", color="burlywood", weight=9]; 165 -> 145[label="",style="solid", color="burlywood", weight=3]; 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]; 166 -> 146[label="",style="solid", color="burlywood", weight=3]; 167[label="vz7/[]",fontsize=10,color="white",style="solid",shape="box"];144 -> 167[label="",style="solid", color="burlywood", weight=9]; 167 -> 147[label="",style="solid", color="burlywood", weight=3]; 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]; 168 -> 148[label="",style="solid", color="burlywood", weight=3]; 169[label="vz7/[]",fontsize=10,color="white",style="solid",shape="box"];145 -> 169[label="",style="solid", color="burlywood", weight=9]; 169 -> 149[label="",style="solid", color="burlywood", weight=3]; 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]; 147[label="Queue.rotate (vz60 : vz61) [] (vz8 : vz9)",fontsize=16,color="black",shape="box"];147 -> 151[label="",style="solid", color="black", weight=3]; 148[label="Queue.rotate [] (vz70 : vz71) (vz8 : vz9)",fontsize=16,color="black",shape="box"];148 -> 152[label="",style="solid", color="black", weight=3]; 149[label="Queue.rotate [] [] (vz8 : vz9)",fontsize=16,color="black",shape="box"];149 -> 153[label="",style="solid", color="black", weight=3]; 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]; 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]; 154[label="Queue.rotate vz61 vz71 (vz70 : vz8 : vz9)",fontsize=16,color="magenta"];154 -> 155[label="",style="dashed", color="magenta", weight=3]; 154 -> 156[label="",style="dashed", color="magenta", weight=3]; 154 -> 157[label="",style="dashed", color="magenta", weight=3]; 154 -> 158[label="",style="dashed", color="magenta", weight=3]; 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"];} ---------------------------------------- (6) Obligation: Q DP problem: The TRS P consists of the following rules: new_rotate(:(vz60, vz61), :(vz70, vz71), vz8, vz9, h) -> new_rotate(vz61, vz71, vz70, :(vz8, vz9), 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(:(vz60, vz61), :(vz70, vz71), vz8, vz9, h) -> new_rotate(vz61, vz71, vz70, :(vz8, vz9), h) The graph contains the following edges 1 > 1, 2 > 2, 2 > 3, 5 >= 5 ---------------------------------------- (8) YES