/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, 24 ms] (4) HASKELL (5) LetRed [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; nub :: Eq a => [a] -> [a]; nub l = nub' l [] where { nub' [] _ = []; nub' (x : xs) ls | x `elem` ls = nub' xs ls | otherwise = x : nub' xs (x : ls); }; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (1) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. ---------------------------------------- (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; nub :: Eq a => [a] -> [a]; nub l = nub' l [] where { nub' [] vy = []; nub' (x : xs) ls | x `elem` ls = nub' xs ls | otherwise = x : nub' xs (x : ls); }; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (3) 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 "nub' [] vy = []; nub' (x : xs) ls|x `elem` lsnub' xs ls|otherwisex : nub' xs (x : ls); " is transformed to "nub' [] vy = nub'3 [] vy; nub' (x : xs) ls = nub'2 (x : xs) ls; " "nub'1 x xs ls True = nub' xs ls; nub'1 x xs ls False = nub'0 x xs ls otherwise; " "nub'0 x xs ls True = x : nub' xs (x : ls); " "nub'2 (x : xs) ls = nub'1 x xs ls (x `elem` ls); " "nub'3 [] vy = []; nub'3 wv ww = nub'2 wv ww; " ---------------------------------------- (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; nub :: Eq a => [a] -> [a]; nub l = nub' l [] where { nub' [] vy = nub'3 [] vy; nub' (x : xs) ls = nub'2 (x : xs) ls; nub'0 x xs ls True = x : nub' xs (x : ls); nub'1 x xs ls True = nub' xs ls; nub'1 x xs ls False = nub'0 x xs ls otherwise; nub'2 (x : xs) ls = nub'1 x xs ls (x `elem` ls); nub'3 [] vy = []; nub'3 wv ww = nub'2 wv ww; }; } module Main where { import qualified List; import qualified Maybe; import qualified Prelude; } ---------------------------------------- (5) LetRed (EQUIVALENT) Let/Where Reductions: The bindings of the following Let/Where expression "nub' l [] where { nub' [] vy = nub'3 [] vy; nub' (x : xs) ls = nub'2 (x : xs) ls; ; nub'0 x xs ls True = x : nub' xs (x : ls); ; nub'1 x xs ls True = nub' xs ls; nub'1 x xs ls False = nub'0 x xs ls otherwise; ; nub'2 (x : xs) ls = nub'1 x xs ls (x `elem` ls); ; nub'3 [] vy = []; nub'3 wv ww = nub'2 wv ww; } " are unpacked to the following functions on top level "nubNub'1 x xs ls True = nubNub' xs ls; nubNub'1 x xs ls False = nubNub'0 x xs ls otherwise; " "nubNub'0 x xs ls True = x : nubNub' xs (x : ls); " "nubNub'2 (x : xs) ls = nubNub'1 x xs ls (x `elem` ls); " "nubNub'3 [] vy = []; nubNub'3 wv ww = nubNub'2 wv ww; " "nubNub' [] vy = nubNub'3 [] vy; nubNub' (x : xs) ls = nubNub'2 (x : xs) ls; " ---------------------------------------- (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; nub :: Eq a => [a] -> [a]; nub l = nubNub' l []; nubNub' [] vy = nubNub'3 [] vy; nubNub' (x : xs) ls = nubNub'2 (x : xs) ls; nubNub'0 x xs ls True = x : nubNub' xs (x : ls); nubNub'1 x xs ls True = nubNub' xs ls; nubNub'1 x xs ls False = nubNub'0 x xs ls otherwise; nubNub'2 (x : xs) ls = nubNub'1 x xs ls (x `elem` ls); nubNub'3 [] vy = []; nubNub'3 wv ww = nubNub'2 wv ww; } 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.nub",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="List.nub wx3",fontsize=16,color="black",shape="triangle"];3 -> 4[label="",style="solid", color="black", weight=3]; 4[label="List.nubNub' wx3 []",fontsize=16,color="burlywood",shape="box"];42[label="wx3/wx30 : wx31",fontsize=10,color="white",style="solid",shape="box"];4 -> 42[label="",style="solid", color="burlywood", weight=9]; 42 -> 5[label="",style="solid", color="burlywood", weight=3]; 43[label="wx3/[]",fontsize=10,color="white",style="solid",shape="box"];4 -> 43[label="",style="solid", color="burlywood", weight=9]; 43 -> 6[label="",style="solid", color="burlywood", weight=3]; 5[label="List.nubNub' (wx30 : wx31) []",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 6[label="List.nubNub' [] []",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 7[label="List.nubNub'2 (wx30 : wx31) []",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 8[label="List.nubNub'3 [] []",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 9[label="List.nubNub'1 wx30 wx31 [] (wx30 `elem` [])",fontsize=16,color="black",shape="box"];9 -> 11[label="",style="solid", color="black", weight=3]; 10[label="[]",fontsize=16,color="green",shape="box"];11[label="List.nubNub'1 wx30 wx31 [] (any . (==))",fontsize=16,color="black",shape="box"];11 -> 12[label="",style="solid", color="black", weight=3]; 12[label="List.nubNub'1 wx30 wx31 [] (any ((==) wx30) [])",fontsize=16,color="black",shape="box"];12 -> 13[label="",style="solid", color="black", weight=3]; 13[label="List.nubNub'1 wx30 wx31 [] (or . map ((==) wx30))",fontsize=16,color="black",shape="box"];13 -> 14[label="",style="solid", color="black", weight=3]; 14[label="List.nubNub'1 wx30 wx31 [] (or (map ((==) wx30) []))",fontsize=16,color="black",shape="box"];14 -> 15[label="",style="solid", color="black", weight=3]; 15[label="List.nubNub'1 wx30 wx31 [] (foldr (||) False (map ((==) wx30) []))",fontsize=16,color="black",shape="box"];15 -> 16[label="",style="solid", color="black", weight=3]; 16[label="List.nubNub'1 wx30 wx31 [] (foldr (||) False [])",fontsize=16,color="black",shape="box"];16 -> 17[label="",style="solid", color="black", weight=3]; 17[label="List.nubNub'1 wx30 wx31 [] False",fontsize=16,color="black",shape="box"];17 -> 18[label="",style="solid", color="black", weight=3]; 18[label="List.nubNub'0 wx30 wx31 [] otherwise",fontsize=16,color="black",shape="box"];18 -> 19[label="",style="solid", color="black", weight=3]; 19[label="List.nubNub'0 wx30 wx31 [] True",fontsize=16,color="black",shape="box"];19 -> 20[label="",style="solid", color="black", weight=3]; 20[label="wx30 : List.nubNub' wx31 (wx30 : [])",fontsize=16,color="green",shape="box"];20 -> 21[label="",style="dashed", color="green", weight=3]; 21[label="List.nubNub' wx31 (wx30 : [])",fontsize=16,color="burlywood",shape="triangle"];44[label="wx31/wx310 : wx311",fontsize=10,color="white",style="solid",shape="box"];21 -> 44[label="",style="solid", color="burlywood", weight=9]; 44 -> 22[label="",style="solid", color="burlywood", weight=3]; 45[label="wx31/[]",fontsize=10,color="white",style="solid",shape="box"];21 -> 45[label="",style="solid", color="burlywood", weight=9]; 45 -> 23[label="",style="solid", color="burlywood", weight=3]; 22[label="List.nubNub' (wx310 : wx311) (wx30 : [])",fontsize=16,color="black",shape="box"];22 -> 24[label="",style="solid", color="black", weight=3]; 23[label="List.nubNub' [] (wx30 : [])",fontsize=16,color="black",shape="box"];23 -> 25[label="",style="solid", color="black", weight=3]; 24[label="List.nubNub'2 (wx310 : wx311) (wx30 : [])",fontsize=16,color="black",shape="box"];24 -> 26[label="",style="solid", color="black", weight=3]; 25[label="List.nubNub'3 [] (wx30 : [])",fontsize=16,color="black",shape="box"];25 -> 27[label="",style="solid", color="black", weight=3]; 26[label="List.nubNub'1 wx310 wx311 (wx30 : []) (wx310 `elem` wx30 : [])",fontsize=16,color="black",shape="box"];26 -> 28[label="",style="solid", color="black", weight=3]; 27[label="[]",fontsize=16,color="green",shape="box"];28[label="List.nubNub'1 wx310 wx311 (wx30 : []) (any . (==))",fontsize=16,color="black",shape="box"];28 -> 29[label="",style="solid", color="black", weight=3]; 29[label="List.nubNub'1 wx310 wx311 (wx30 : []) (any ((==) wx310) (wx30 : []))",fontsize=16,color="black",shape="box"];29 -> 30[label="",style="solid", color="black", weight=3]; 30[label="List.nubNub'1 wx310 wx311 (wx30 : []) (or . map ((==) wx310))",fontsize=16,color="black",shape="box"];30 -> 31[label="",style="solid", color="black", weight=3]; 31[label="List.nubNub'1 wx310 wx311 (wx30 : []) (or (map ((==) wx310) (wx30 : [])))",fontsize=16,color="black",shape="box"];31 -> 32[label="",style="solid", color="black", weight=3]; 32[label="List.nubNub'1 wx310 wx311 (wx30 : []) (foldr (||) False (map ((==) wx310) (wx30 : [])))",fontsize=16,color="black",shape="box"];32 -> 33[label="",style="solid", color="black", weight=3]; 33[label="List.nubNub'1 wx310 wx311 (wx30 : []) (foldr (||) False (((==) wx310 wx30) : map ((==) wx310) []))",fontsize=16,color="black",shape="box"];33 -> 34[label="",style="solid", color="black", weight=3]; 34[label="List.nubNub'1 wx310 wx311 (wx30 : []) ((||) (==) wx310 wx30 foldr (||) False (map ((==) wx310) []))",fontsize=16,color="burlywood",shape="box"];46[label="wx310/()",fontsize=10,color="white",style="solid",shape="box"];34 -> 46[label="",style="solid", color="burlywood", weight=9]; 46 -> 35[label="",style="solid", color="burlywood", weight=3]; 35[label="List.nubNub'1 () wx311 (wx30 : []) ((||) (==) () wx30 foldr (||) False (map ((==) ()) []))",fontsize=16,color="burlywood",shape="box"];47[label="wx30/()",fontsize=10,color="white",style="solid",shape="box"];35 -> 47[label="",style="solid", color="burlywood", weight=9]; 47 -> 36[label="",style="solid", color="burlywood", weight=3]; 36[label="List.nubNub'1 () wx311 (() : []) ((||) (==) () () foldr (||) False (map ((==) ()) []))",fontsize=16,color="black",shape="box"];36 -> 37[label="",style="solid", color="black", weight=3]; 37[label="List.nubNub'1 () wx311 (() : []) ((||) True foldr (||) False (map ((==) ()) []))",fontsize=16,color="black",shape="box"];37 -> 38[label="",style="solid", color="black", weight=3]; 38[label="List.nubNub'1 () wx311 (() : []) True",fontsize=16,color="black",shape="box"];38 -> 39[label="",style="solid", color="black", weight=3]; 39 -> 21[label="",style="dashed", color="red", weight=0]; 39[label="List.nubNub' wx311 (() : [])",fontsize=16,color="magenta"];39 -> 40[label="",style="dashed", color="magenta", weight=3]; 39 -> 41[label="",style="dashed", color="magenta", weight=3]; 40[label="wx311",fontsize=16,color="green",shape="box"];41[label="()",fontsize=16,color="green",shape="box"];} ---------------------------------------- (8) Obligation: Q DP problem: The TRS P consists of the following rules: new_nubNub'(:(@0, wx311), @0) -> new_nubNub'(wx311, @0) 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_nubNub'(:(@0, wx311), @0) -> new_nubNub'(wx311, @0) The graph contains the following edges 1 > 1, 1 > 2, 2 >= 2 ---------------------------------------- (10) YES