10.08/5.24 YES 12.26/5.81 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 12.26/5.81 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 12.26/5.81 12.26/5.81 12.26/5.81 H-Termination with start terms of the given HASKELL could be proven: 12.26/5.81 12.26/5.81 (0) HASKELL 12.26/5.81 (1) BR [EQUIVALENT, 0 ms] 12.26/5.81 (2) HASKELL 12.26/5.81 (3) COR [EQUIVALENT, 21 ms] 12.26/5.81 (4) HASKELL 12.26/5.81 (5) LetRed [EQUIVALENT, 0 ms] 12.26/5.81 (6) HASKELL 12.26/5.81 (7) Narrow [SOUND, 0 ms] 12.26/5.81 (8) QDP 12.26/5.81 (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] 12.26/5.81 (10) YES 12.26/5.81 12.26/5.81 12.26/5.81 ---------------------------------------- 12.26/5.81 12.26/5.81 (0) 12.26/5.81 Obligation: 12.26/5.81 mainModule Main 12.26/5.81 module Maybe where { 12.26/5.81 import qualified List; 12.26/5.81 import qualified Main; 12.26/5.81 import qualified Prelude; 12.26/5.81 } 12.26/5.81 module List where { 12.26/5.81 import qualified Main; 12.26/5.81 import qualified Maybe; 12.26/5.81 import qualified Prelude; 12.26/5.81 nub :: Eq a => [a] -> [a]; 12.26/5.81 nub l = nub' l [] where { 12.26/5.81 nub' [] _ = []; 12.26/5.81 nub' (x : xs) ls | x `elem` ls = nub' xs ls 12.26/5.81 | otherwise = x : nub' xs (x : ls); 12.26/5.81 }; 12.26/5.81 12.26/5.81 } 12.26/5.81 module Main where { 12.26/5.81 import qualified List; 12.26/5.81 import qualified Maybe; 12.26/5.81 import qualified Prelude; 12.26/5.81 } 12.26/5.81 12.26/5.81 ---------------------------------------- 12.26/5.81 12.26/5.81 (1) BR (EQUIVALENT) 12.26/5.81 Replaced joker patterns by fresh variables and removed binding patterns. 12.26/5.81 ---------------------------------------- 12.26/5.81 12.26/5.81 (2) 12.26/5.81 Obligation: 12.26/5.81 mainModule Main 12.26/5.81 module Maybe where { 12.26/5.81 import qualified List; 12.26/5.81 import qualified Main; 12.26/5.81 import qualified Prelude; 12.26/5.81 } 12.26/5.81 module List where { 12.26/5.81 import qualified Main; 12.26/5.81 import qualified Maybe; 12.26/5.81 import qualified Prelude; 12.26/5.81 nub :: Eq a => [a] -> [a]; 12.26/5.81 nub l = nub' l [] where { 12.26/5.81 nub' [] vy = []; 12.26/5.81 nub' (x : xs) ls | x `elem` ls = nub' xs ls 12.26/5.81 | otherwise = x : nub' xs (x : ls); 12.26/5.81 }; 12.26/5.81 12.26/5.81 } 12.26/5.81 module Main where { 12.26/5.81 import qualified List; 12.26/5.81 import qualified Maybe; 12.26/5.81 import qualified Prelude; 12.26/5.81 } 12.26/5.81 12.26/5.81 ---------------------------------------- 12.26/5.81 12.26/5.81 (3) COR (EQUIVALENT) 12.26/5.81 Cond Reductions: 12.26/5.81 The following Function with conditions 12.26/5.81 "undefined |Falseundefined; 12.26/5.81 " 12.26/5.81 is transformed to 12.26/5.81 "undefined = undefined1; 12.26/5.81 " 12.26/5.81 "undefined0 True = undefined; 12.26/5.81 " 12.26/5.81 "undefined1 = undefined0 False; 12.26/5.81 " 12.26/5.81 The following Function with conditions 12.26/5.81 "nub' [] vy = []; 12.26/5.81 nub' (x : xs) ls|x `elem` lsnub' xs ls|otherwisex : nub' xs (x : ls); 12.26/5.81 " 12.26/5.81 is transformed to 12.26/5.81 "nub' [] vy = nub'3 [] vy; 12.26/5.81 nub' (x : xs) ls = nub'2 (x : xs) ls; 12.26/5.81 " 12.26/5.81 "nub'0 x xs ls True = x : nub' xs (x : ls); 12.26/5.81 " 12.26/5.81 "nub'1 x xs ls True = nub' xs ls; 12.26/5.81 nub'1 x xs ls False = nub'0 x xs ls otherwise; 12.26/5.81 " 12.26/5.81 "nub'2 (x : xs) ls = nub'1 x xs ls (x `elem` ls); 12.26/5.81 " 12.26/5.81 "nub'3 [] vy = []; 12.26/5.81 nub'3 wv ww = nub'2 wv ww; 12.26/5.81 " 12.26/5.81 12.26/5.81 ---------------------------------------- 12.26/5.81 12.26/5.81 (4) 12.26/5.81 Obligation: 12.26/5.81 mainModule Main 12.26/5.81 module Maybe where { 12.26/5.81 import qualified List; 12.26/5.81 import qualified Main; 12.26/5.81 import qualified Prelude; 12.26/5.81 } 12.26/5.81 module List where { 12.26/5.81 import qualified Main; 12.26/5.81 import qualified Maybe; 12.26/5.81 import qualified Prelude; 12.26/5.81 nub :: Eq a => [a] -> [a]; 12.26/5.81 nub l = nub' l [] where { 12.26/5.81 nub' [] vy = nub'3 [] vy; 12.26/5.81 nub' (x : xs) ls = nub'2 (x : xs) ls; 12.26/5.81 nub'0 x xs ls True = x : nub' xs (x : ls); 12.26/5.81 nub'1 x xs ls True = nub' xs ls; 12.26/5.81 nub'1 x xs ls False = nub'0 x xs ls otherwise; 12.26/5.81 nub'2 (x : xs) ls = nub'1 x xs ls (x `elem` ls); 12.26/5.81 nub'3 [] vy = []; 12.26/5.81 nub'3 wv ww = nub'2 wv ww; 12.26/5.81 }; 12.26/5.81 12.26/5.81 } 12.26/5.81 module Main where { 12.26/5.81 import qualified List; 12.26/5.81 import qualified Maybe; 12.26/5.81 import qualified Prelude; 12.26/5.81 } 12.26/5.81 12.26/5.81 ---------------------------------------- 12.26/5.81 12.26/5.81 (5) LetRed (EQUIVALENT) 12.26/5.81 Let/Where Reductions: 12.26/5.81 The bindings of the following Let/Where expression 12.26/5.81 "nub' l [] where { 12.26/5.81 nub' [] vy = nub'3 [] vy; 12.26/5.81 nub' (x : xs) ls = nub'2 (x : xs) ls; 12.26/5.81 ; 12.26/5.81 nub'0 x xs ls True = x : nub' xs (x : ls); 12.26/5.81 ; 12.26/5.81 nub'1 x xs ls True = nub' xs ls; 12.26/5.81 nub'1 x xs ls False = nub'0 x xs ls otherwise; 12.26/5.81 ; 12.26/5.81 nub'2 (x : xs) ls = nub'1 x xs ls (x `elem` ls); 12.26/5.81 ; 12.26/5.81 nub'3 [] vy = []; 12.26/5.81 nub'3 wv ww = nub'2 wv ww; 12.26/5.81 } 12.26/5.81 " 12.26/5.81 are unpacked to the following functions on top level 12.26/5.81 "nubNub' [] vy = nubNub'3 [] vy; 12.26/5.81 nubNub' (x : xs) ls = nubNub'2 (x : xs) ls; 12.26/5.81 " 12.26/5.81 "nubNub'2 (x : xs) ls = nubNub'1 x xs ls (x `elem` ls); 12.26/5.81 " 12.26/5.81 "nubNub'0 x xs ls True = x : nubNub' xs (x : ls); 12.26/5.81 " 12.26/5.81 "nubNub'1 x xs ls True = nubNub' xs ls; 12.26/5.81 nubNub'1 x xs ls False = nubNub'0 x xs ls otherwise; 12.26/5.81 " 12.26/5.81 "nubNub'3 [] vy = []; 12.26/5.81 nubNub'3 wv ww = nubNub'2 wv ww; 12.26/5.81 " 12.26/5.81 12.26/5.81 ---------------------------------------- 12.26/5.81 12.26/5.81 (6) 12.26/5.81 Obligation: 12.26/5.81 mainModule Main 12.26/5.81 module Maybe where { 12.26/5.81 import qualified List; 12.26/5.81 import qualified Main; 12.26/5.81 import qualified Prelude; 12.26/5.81 } 12.26/5.81 module List where { 12.26/5.81 import qualified Main; 12.26/5.81 import qualified Maybe; 12.26/5.81 import qualified Prelude; 12.26/5.81 nub :: Eq a => [a] -> [a]; 12.26/5.81 nub l = nubNub' l []; 12.26/5.81 12.26/5.81 nubNub' [] vy = nubNub'3 [] vy; 12.26/5.81 nubNub' (x : xs) ls = nubNub'2 (x : xs) ls; 12.26/5.81 12.26/5.81 nubNub'0 x xs ls True = x : nubNub' xs (x : ls); 12.26/5.81 12.26/5.81 nubNub'1 x xs ls True = nubNub' xs ls; 12.26/5.81 nubNub'1 x xs ls False = nubNub'0 x xs ls otherwise; 12.26/5.81 12.26/5.81 nubNub'2 (x : xs) ls = nubNub'1 x xs ls (x `elem` ls); 12.26/5.81 12.26/5.81 nubNub'3 [] vy = []; 12.26/5.81 nubNub'3 wv ww = nubNub'2 wv ww; 12.26/5.81 12.26/5.81 } 12.26/5.81 module Main where { 12.26/5.81 import qualified List; 12.26/5.81 import qualified Maybe; 12.26/5.81 import qualified Prelude; 12.26/5.81 } 12.26/5.81 12.26/5.81 ---------------------------------------- 12.26/5.81 12.26/5.81 (7) Narrow (SOUND) 12.26/5.81 Haskell To QDPs 12.26/5.81 12.26/5.81 digraph dp_graph { 12.26/5.81 node [outthreshold=100, inthreshold=100];1[label="List.nub",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 12.26/5.81 3[label="List.nub wx3",fontsize=16,color="black",shape="triangle"];3 -> 4[label="",style="solid", color="black", weight=3]; 12.26/5.81 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]; 12.26/5.81 42 -> 5[label="",style="solid", color="burlywood", weight=3]; 12.26/5.81 43[label="wx3/[]",fontsize=10,color="white",style="solid",shape="box"];4 -> 43[label="",style="solid", color="burlywood", weight=9]; 12.26/5.81 43 -> 6[label="",style="solid", color="burlywood", weight=3]; 12.26/5.81 5[label="List.nubNub' (wx30 : wx31) []",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 12.26/5.81 6[label="List.nubNub' [] []",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 12.26/5.81 7[label="List.nubNub'2 (wx30 : wx31) []",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 12.26/5.81 8[label="List.nubNub'3 [] []",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 12.26/5.81 9[label="List.nubNub'1 wx30 wx31 [] (wx30 `elem` [])",fontsize=16,color="black",shape="box"];9 -> 11[label="",style="solid", color="black", weight=3]; 12.26/5.81 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.26/5.81 12[label="List.nubNub'1 wx30 wx31 [] (any ((==) wx30) [])",fontsize=16,color="black",shape="box"];12 -> 13[label="",style="solid", color="black", weight=3]; 12.26/5.81 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]; 12.26/5.81 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]; 12.26/5.81 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]; 12.26/5.81 16[label="List.nubNub'1 wx30 wx31 [] (foldr (||) False [])",fontsize=16,color="black",shape="box"];16 -> 17[label="",style="solid", color="black", weight=3]; 12.26/5.81 17[label="List.nubNub'1 wx30 wx31 [] False",fontsize=16,color="black",shape="box"];17 -> 18[label="",style="solid", color="black", weight=3]; 12.26/5.81 18[label="List.nubNub'0 wx30 wx31 [] otherwise",fontsize=16,color="black",shape="box"];18 -> 19[label="",style="solid", color="black", weight=3]; 12.26/5.81 19[label="List.nubNub'0 wx30 wx31 [] True",fontsize=16,color="black",shape="box"];19 -> 20[label="",style="solid", color="black", weight=3]; 12.26/5.81 20[label="wx30 : List.nubNub' wx31 (wx30 : [])",fontsize=16,color="green",shape="box"];20 -> 21[label="",style="dashed", color="green", weight=3]; 12.26/5.81 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]; 12.26/5.81 44 -> 22[label="",style="solid", color="burlywood", weight=3]; 12.26/5.81 45[label="wx31/[]",fontsize=10,color="white",style="solid",shape="box"];21 -> 45[label="",style="solid", color="burlywood", weight=9]; 12.26/5.81 45 -> 23[label="",style="solid", color="burlywood", weight=3]; 12.26/5.81 22[label="List.nubNub' (wx310 : wx311) (wx30 : [])",fontsize=16,color="black",shape="box"];22 -> 24[label="",style="solid", color="black", weight=3]; 12.26/5.81 23[label="List.nubNub' [] (wx30 : [])",fontsize=16,color="black",shape="box"];23 -> 25[label="",style="solid", color="black", weight=3]; 12.26/5.81 24[label="List.nubNub'2 (wx310 : wx311) (wx30 : [])",fontsize=16,color="black",shape="box"];24 -> 26[label="",style="solid", color="black", weight=3]; 12.26/5.81 25[label="List.nubNub'3 [] (wx30 : [])",fontsize=16,color="black",shape="box"];25 -> 27[label="",style="solid", color="black", weight=3]; 12.26/5.81 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]; 12.26/5.81 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]; 12.26/5.81 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]; 12.26/5.81 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]; 12.26/5.81 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]; 12.26/5.81 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]; 12.26/5.81 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]; 12.26/5.81 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]; 12.26/5.81 46 -> 35[label="",style="solid", color="burlywood", weight=3]; 12.26/5.81 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]; 12.26/5.81 47 -> 36[label="",style="solid", color="burlywood", weight=3]; 12.26/5.81 36[label="List.nubNub'1 () wx311 (() : []) ((||) (==) () () foldr (||) False (map ((==) ()) []))",fontsize=16,color="black",shape="box"];36 -> 37[label="",style="solid", color="black", weight=3]; 12.26/5.81 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]; 12.26/5.81 38[label="List.nubNub'1 () wx311 (() : []) True",fontsize=16,color="black",shape="box"];38 -> 39[label="",style="solid", color="black", weight=3]; 12.26/5.81 39 -> 21[label="",style="dashed", color="red", weight=0]; 12.26/5.81 39[label="List.nubNub' wx311 (() : [])",fontsize=16,color="magenta"];39 -> 40[label="",style="dashed", color="magenta", weight=3]; 12.26/5.81 39 -> 41[label="",style="dashed", color="magenta", weight=3]; 12.26/5.81 40[label="()",fontsize=16,color="green",shape="box"];41[label="wx311",fontsize=16,color="green",shape="box"];} 12.26/5.81 12.26/5.81 ---------------------------------------- 12.26/5.81 12.26/5.81 (8) 12.26/5.81 Obligation: 12.26/5.81 Q DP problem: 12.26/5.81 The TRS P consists of the following rules: 12.26/5.81 12.26/5.81 new_nubNub'(:(@0, wx311), @0) -> new_nubNub'(wx311, @0) 12.26/5.81 12.26/5.81 R is empty. 12.26/5.81 Q is empty. 12.26/5.81 We have to consider all minimal (P,Q,R)-chains. 12.26/5.81 ---------------------------------------- 12.26/5.81 12.26/5.81 (9) QDPSizeChangeProof (EQUIVALENT) 12.26/5.81 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. 12.26/5.81 12.26/5.81 From the DPs we obtained the following set of size-change graphs: 12.26/5.81 *new_nubNub'(:(@0, wx311), @0) -> new_nubNub'(wx311, @0) 12.26/5.81 The graph contains the following edges 1 > 1, 1 > 2, 2 >= 2 12.26/5.81 12.26/5.81 12.26/5.81 ---------------------------------------- 12.26/5.81 12.26/5.81 (10) 12.26/5.81 YES 12.40/5.85 EOF