/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) DependencyGraphProof [EQUIVALENT, 0 ms] (8) AND (9) QDP (10) QDPSizeChangeProof [EQUIVALENT, 0 ms] (11) YES (12) QDP (13) QDPSizeChangeProof [EQUIVALENT, 0 ms] (14) YES ---------------------------------------- (0) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (1) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. ---------------------------------------- (2) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (3) COR (EQUIVALENT) Cond Reductions: The following Function with conditions "lookup k [] = Nothing; lookup k ((x,y) : xys)|k == xJust y|otherwiselookup k xys; " is transformed to "lookup k [] = lookup3 k []; lookup k ((x,y) : xys) = lookup2 k ((x,y) : xys); " "lookup1 k x y xys True = Just y; lookup1 k x y xys False = lookup0 k x y xys otherwise; " "lookup0 k x y xys True = lookup k xys; " "lookup2 k ((x,y) : xys) = lookup1 k x y xys (k == x); " "lookup3 k [] = Nothing; lookup3 wu wv = lookup2 wu wv; " 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; } ---------------------------------------- (5) Narrow (SOUND) Haskell To QDPs digraph dp_graph { node [outthreshold=100, inthreshold=100];1[label="lookup",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="lookup ww3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 4[label="lookup ww3 ww4",fontsize=16,color="burlywood",shape="triangle"];365[label="ww4/ww40 : ww41",fontsize=10,color="white",style="solid",shape="box"];4 -> 365[label="",style="solid", color="burlywood", weight=9]; 365 -> 5[label="",style="solid", color="burlywood", weight=3]; 366[label="ww4/[]",fontsize=10,color="white",style="solid",shape="box"];4 -> 366[label="",style="solid", color="burlywood", weight=9]; 366 -> 6[label="",style="solid", color="burlywood", weight=3]; 5[label="lookup ww3 (ww40 : ww41)",fontsize=16,color="burlywood",shape="box"];367[label="ww40/(ww400,ww401)",fontsize=10,color="white",style="solid",shape="box"];5 -> 367[label="",style="solid", color="burlywood", weight=9]; 367 -> 7[label="",style="solid", color="burlywood", weight=3]; 6[label="lookup ww3 []",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 7[label="lookup ww3 ((ww400,ww401) : ww41)",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 8[label="lookup3 ww3 []",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 9[label="lookup2 ww3 ((ww400,ww401) : ww41)",fontsize=16,color="black",shape="box"];9 -> 11[label="",style="solid", color="black", weight=3]; 10[label="Nothing",fontsize=16,color="green",shape="box"];11[label="lookup1 ww3 ww400 ww401 ww41 (ww3 == ww400)",fontsize=16,color="black",shape="box"];11 -> 12[label="",style="solid", color="black", weight=3]; 12[label="lookup1 ww3 ww400 ww401 ww41 (primEqChar ww3 ww400)",fontsize=16,color="burlywood",shape="box"];368[label="ww3/Char ww30",fontsize=10,color="white",style="solid",shape="box"];12 -> 368[label="",style="solid", color="burlywood", weight=9]; 368 -> 13[label="",style="solid", color="burlywood", weight=3]; 13[label="lookup1 (Char ww30) ww400 ww401 ww41 (primEqChar (Char ww30) ww400)",fontsize=16,color="burlywood",shape="box"];369[label="ww400/Char ww4000",fontsize=10,color="white",style="solid",shape="box"];13 -> 369[label="",style="solid", color="burlywood", weight=9]; 369 -> 14[label="",style="solid", color="burlywood", weight=3]; 14[label="lookup1 (Char ww30) (Char ww4000) ww401 ww41 (primEqChar (Char ww30) (Char ww4000))",fontsize=16,color="black",shape="box"];14 -> 15[label="",style="solid", color="black", weight=3]; 15[label="lookup1 (Char ww30) (Char ww4000) ww401 ww41 (primEqNat ww30 ww4000)",fontsize=16,color="burlywood",shape="box"];370[label="ww30/Succ ww300",fontsize=10,color="white",style="solid",shape="box"];15 -> 370[label="",style="solid", color="burlywood", weight=9]; 370 -> 16[label="",style="solid", color="burlywood", weight=3]; 371[label="ww30/Zero",fontsize=10,color="white",style="solid",shape="box"];15 -> 371[label="",style="solid", color="burlywood", weight=9]; 371 -> 17[label="",style="solid", color="burlywood", weight=3]; 16[label="lookup1 (Char (Succ ww300)) (Char ww4000) ww401 ww41 (primEqNat (Succ ww300) ww4000)",fontsize=16,color="burlywood",shape="box"];372[label="ww4000/Succ ww40000",fontsize=10,color="white",style="solid",shape="box"];16 -> 372[label="",style="solid", color="burlywood", weight=9]; 372 -> 18[label="",style="solid", color="burlywood", weight=3]; 373[label="ww4000/Zero",fontsize=10,color="white",style="solid",shape="box"];16 -> 373[label="",style="solid", color="burlywood", weight=9]; 373 -> 19[label="",style="solid", color="burlywood", weight=3]; 17[label="lookup1 (Char Zero) (Char ww4000) ww401 ww41 (primEqNat Zero ww4000)",fontsize=16,color="burlywood",shape="box"];374[label="ww4000/Succ ww40000",fontsize=10,color="white",style="solid",shape="box"];17 -> 374[label="",style="solid", color="burlywood", weight=9]; 374 -> 20[label="",style="solid", color="burlywood", weight=3]; 375[label="ww4000/Zero",fontsize=10,color="white",style="solid",shape="box"];17 -> 375[label="",style="solid", color="burlywood", weight=9]; 375 -> 21[label="",style="solid", color="burlywood", weight=3]; 18[label="lookup1 (Char (Succ ww300)) (Char (Succ ww40000)) ww401 ww41 (primEqNat (Succ ww300) (Succ ww40000))",fontsize=16,color="black",shape="box"];18 -> 22[label="",style="solid", color="black", weight=3]; 19[label="lookup1 (Char (Succ ww300)) (Char Zero) ww401 ww41 (primEqNat (Succ ww300) Zero)",fontsize=16,color="black",shape="box"];19 -> 23[label="",style="solid", color="black", weight=3]; 20[label="lookup1 (Char Zero) (Char (Succ ww40000)) ww401 ww41 (primEqNat Zero (Succ ww40000))",fontsize=16,color="black",shape="box"];20 -> 24[label="",style="solid", color="black", weight=3]; 21[label="lookup1 (Char Zero) (Char Zero) ww401 ww41 (primEqNat Zero Zero)",fontsize=16,color="black",shape="box"];21 -> 25[label="",style="solid", color="black", weight=3]; 22 -> 286[label="",style="dashed", color="red", weight=0]; 22[label="lookup1 (Char (Succ ww300)) (Char (Succ ww40000)) ww401 ww41 (primEqNat ww300 ww40000)",fontsize=16,color="magenta"];22 -> 287[label="",style="dashed", color="magenta", weight=3]; 22 -> 288[label="",style="dashed", color="magenta", weight=3]; 22 -> 289[label="",style="dashed", color="magenta", weight=3]; 22 -> 290[label="",style="dashed", color="magenta", weight=3]; 22 -> 291[label="",style="dashed", color="magenta", weight=3]; 22 -> 292[label="",style="dashed", color="magenta", weight=3]; 23[label="lookup1 (Char (Succ ww300)) (Char Zero) ww401 ww41 False",fontsize=16,color="black",shape="box"];23 -> 28[label="",style="solid", color="black", weight=3]; 24[label="lookup1 (Char Zero) (Char (Succ ww40000)) ww401 ww41 False",fontsize=16,color="black",shape="box"];24 -> 29[label="",style="solid", color="black", weight=3]; 25[label="lookup1 (Char Zero) (Char Zero) ww401 ww41 True",fontsize=16,color="black",shape="box"];25 -> 30[label="",style="solid", color="black", weight=3]; 287[label="ww41",fontsize=16,color="green",shape="box"];288[label="ww300",fontsize=16,color="green",shape="box"];289[label="ww40000",fontsize=16,color="green",shape="box"];290[label="ww40000",fontsize=16,color="green",shape="box"];291[label="ww401",fontsize=16,color="green",shape="box"];292[label="ww300",fontsize=16,color="green",shape="box"];286[label="lookup1 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 (primEqNat ww40 ww41)",fontsize=16,color="burlywood",shape="triangle"];376[label="ww40/Succ ww400",fontsize=10,color="white",style="solid",shape="box"];286 -> 376[label="",style="solid", color="burlywood", weight=9]; 376 -> 347[label="",style="solid", color="burlywood", weight=3]; 377[label="ww40/Zero",fontsize=10,color="white",style="solid",shape="box"];286 -> 377[label="",style="solid", color="burlywood", weight=9]; 377 -> 348[label="",style="solid", color="burlywood", weight=3]; 28[label="lookup0 (Char (Succ ww300)) (Char Zero) ww401 ww41 otherwise",fontsize=16,color="black",shape="box"];28 -> 35[label="",style="solid", color="black", weight=3]; 29[label="lookup0 (Char Zero) (Char (Succ ww40000)) ww401 ww41 otherwise",fontsize=16,color="black",shape="box"];29 -> 36[label="",style="solid", color="black", weight=3]; 30[label="Just ww401",fontsize=16,color="green",shape="box"];347[label="lookup1 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 (primEqNat (Succ ww400) ww41)",fontsize=16,color="burlywood",shape="box"];378[label="ww41/Succ ww410",fontsize=10,color="white",style="solid",shape="box"];347 -> 378[label="",style="solid", color="burlywood", weight=9]; 378 -> 349[label="",style="solid", color="burlywood", weight=3]; 379[label="ww41/Zero",fontsize=10,color="white",style="solid",shape="box"];347 -> 379[label="",style="solid", color="burlywood", weight=9]; 379 -> 350[label="",style="solid", color="burlywood", weight=3]; 348[label="lookup1 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 (primEqNat Zero ww41)",fontsize=16,color="burlywood",shape="box"];380[label="ww41/Succ ww410",fontsize=10,color="white",style="solid",shape="box"];348 -> 380[label="",style="solid", color="burlywood", weight=9]; 380 -> 351[label="",style="solid", color="burlywood", weight=3]; 381[label="ww41/Zero",fontsize=10,color="white",style="solid",shape="box"];348 -> 381[label="",style="solid", color="burlywood", weight=9]; 381 -> 352[label="",style="solid", color="burlywood", weight=3]; 35[label="lookup0 (Char (Succ ww300)) (Char Zero) ww401 ww41 True",fontsize=16,color="black",shape="box"];35 -> 41[label="",style="solid", color="black", weight=3]; 36[label="lookup0 (Char Zero) (Char (Succ ww40000)) ww401 ww41 True",fontsize=16,color="black",shape="box"];36 -> 42[label="",style="solid", color="black", weight=3]; 349[label="lookup1 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 (primEqNat (Succ ww400) (Succ ww410))",fontsize=16,color="black",shape="box"];349 -> 353[label="",style="solid", color="black", weight=3]; 350[label="lookup1 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 (primEqNat (Succ ww400) Zero)",fontsize=16,color="black",shape="box"];350 -> 354[label="",style="solid", color="black", weight=3]; 351[label="lookup1 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 (primEqNat Zero (Succ ww410))",fontsize=16,color="black",shape="box"];351 -> 355[label="",style="solid", color="black", weight=3]; 352[label="lookup1 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 (primEqNat Zero Zero)",fontsize=16,color="black",shape="box"];352 -> 356[label="",style="solid", color="black", weight=3]; 41 -> 4[label="",style="dashed", color="red", weight=0]; 41[label="lookup (Char (Succ ww300)) ww41",fontsize=16,color="magenta"];41 -> 48[label="",style="dashed", color="magenta", weight=3]; 41 -> 49[label="",style="dashed", color="magenta", weight=3]; 42 -> 4[label="",style="dashed", color="red", weight=0]; 42[label="lookup (Char Zero) ww41",fontsize=16,color="magenta"];42 -> 50[label="",style="dashed", color="magenta", weight=3]; 42 -> 51[label="",style="dashed", color="magenta", weight=3]; 353 -> 286[label="",style="dashed", color="red", weight=0]; 353[label="lookup1 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 (primEqNat ww400 ww410)",fontsize=16,color="magenta"];353 -> 357[label="",style="dashed", color="magenta", weight=3]; 353 -> 358[label="",style="dashed", color="magenta", weight=3]; 354[label="lookup1 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 False",fontsize=16,color="black",shape="triangle"];354 -> 359[label="",style="solid", color="black", weight=3]; 355 -> 354[label="",style="dashed", color="red", weight=0]; 355[label="lookup1 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 False",fontsize=16,color="magenta"];356[label="lookup1 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 True",fontsize=16,color="black",shape="box"];356 -> 360[label="",style="solid", color="black", weight=3]; 48[label="ww41",fontsize=16,color="green",shape="box"];49[label="Char (Succ ww300)",fontsize=16,color="green",shape="box"];50[label="ww41",fontsize=16,color="green",shape="box"];51[label="Char Zero",fontsize=16,color="green",shape="box"];357[label="ww400",fontsize=16,color="green",shape="box"];358[label="ww410",fontsize=16,color="green",shape="box"];359[label="lookup0 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 otherwise",fontsize=16,color="black",shape="box"];359 -> 361[label="",style="solid", color="black", weight=3]; 360[label="Just ww38",fontsize=16,color="green",shape="box"];361[label="lookup0 (Char (Succ ww36)) (Char (Succ ww37)) ww38 ww39 True",fontsize=16,color="black",shape="box"];361 -> 362[label="",style="solid", color="black", weight=3]; 362 -> 4[label="",style="dashed", color="red", weight=0]; 362[label="lookup (Char (Succ ww36)) ww39",fontsize=16,color="magenta"];362 -> 363[label="",style="dashed", color="magenta", weight=3]; 362 -> 364[label="",style="dashed", color="magenta", weight=3]; 363[label="ww39",fontsize=16,color="green",shape="box"];364[label="Char (Succ ww36)",fontsize=16,color="green",shape="box"];} ---------------------------------------- (6) Obligation: Q DP problem: The TRS P consists of the following rules: new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Succ(ww410), h) -> new_lookup1(ww36, ww37, ww38, ww39, ww400, ww410, h) new_lookup10(ww36, ww37, ww38, ww39, h) -> new_lookup(Char(Succ(ww36)), ww39, h) new_lookup(Char(Zero), :(@2(Char(Succ(ww40000)), ww401), ww41), ba) -> new_lookup(Char(Zero), ww41, ba) new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Zero, h) -> new_lookup(Char(Succ(ww36)), ww39, h) new_lookup(Char(Succ(ww300)), :(@2(Char(Succ(ww40000)), ww401), ww41), ba) -> new_lookup1(ww300, ww40000, ww401, ww41, ww300, ww40000, ba) new_lookup1(ww36, ww37, ww38, ww39, Zero, Succ(ww410), h) -> new_lookup10(ww36, ww37, ww38, ww39, h) new_lookup(Char(Succ(ww300)), :(@2(Char(Zero), ww401), ww41), ba) -> new_lookup(Char(Succ(ww300)), ww41, ba) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (7) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs. ---------------------------------------- (8) Complex Obligation (AND) ---------------------------------------- (9) Obligation: Q DP problem: The TRS P consists of the following rules: new_lookup(Char(Zero), :(@2(Char(Succ(ww40000)), ww401), ww41), ba) -> new_lookup(Char(Zero), ww41, ba) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (10) 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_lookup(Char(Zero), :(@2(Char(Succ(ww40000)), ww401), ww41), ba) -> new_lookup(Char(Zero), ww41, ba) The graph contains the following edges 1 >= 1, 2 > 2, 3 >= 3 ---------------------------------------- (11) YES ---------------------------------------- (12) Obligation: Q DP problem: The TRS P consists of the following rules: new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Zero, h) -> new_lookup(Char(Succ(ww36)), ww39, h) new_lookup(Char(Succ(ww300)), :(@2(Char(Succ(ww40000)), ww401), ww41), ba) -> new_lookup1(ww300, ww40000, ww401, ww41, ww300, ww40000, ba) new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Succ(ww410), h) -> new_lookup1(ww36, ww37, ww38, ww39, ww400, ww410, h) new_lookup1(ww36, ww37, ww38, ww39, Zero, Succ(ww410), h) -> new_lookup10(ww36, ww37, ww38, ww39, h) new_lookup10(ww36, ww37, ww38, ww39, h) -> new_lookup(Char(Succ(ww36)), ww39, h) new_lookup(Char(Succ(ww300)), :(@2(Char(Zero), ww401), ww41), ba) -> new_lookup(Char(Succ(ww300)), ww41, ba) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (13) 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_lookup(Char(Succ(ww300)), :(@2(Char(Succ(ww40000)), ww401), ww41), ba) -> new_lookup1(ww300, ww40000, ww401, ww41, ww300, ww40000, ba) The graph contains the following edges 1 > 1, 2 > 2, 2 > 3, 2 > 4, 1 > 5, 2 > 6, 3 >= 7 *new_lookup(Char(Succ(ww300)), :(@2(Char(Zero), ww401), ww41), ba) -> new_lookup(Char(Succ(ww300)), ww41, ba) The graph contains the following edges 1 >= 1, 2 > 2, 3 >= 3 *new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Succ(ww410), h) -> new_lookup1(ww36, ww37, ww38, ww39, ww400, ww410, h) The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4, 5 > 5, 6 > 6, 7 >= 7 *new_lookup1(ww36, ww37, ww38, ww39, Succ(ww400), Zero, h) -> new_lookup(Char(Succ(ww36)), ww39, h) The graph contains the following edges 4 >= 2, 7 >= 3 *new_lookup1(ww36, ww37, ww38, ww39, Zero, Succ(ww410), h) -> new_lookup10(ww36, ww37, ww38, ww39, h) The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4, 7 >= 5 *new_lookup10(ww36, ww37, ww38, ww39, h) -> new_lookup(Char(Succ(ww36)), ww39, h) The graph contains the following edges 4 >= 2, 5 >= 3 ---------------------------------------- (14) YES