/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) NumRed [SOUND, 3 ms] (6) HASKELL (7) Narrow [SOUND, 0 ms] (8) QDP (9) TransformationProof [EQUIVALENT, 0 ms] (10) QDP (11) DependencyGraphProof [EQUIVALENT, 0 ms] (12) QDP (13) UsableRulesProof [EQUIVALENT, 0 ms] (14) QDP (15) QReductionProof [EQUIVALENT, 0 ms] (16) QDP (17) QDPSizeChangeProof [EQUIVALENT, 0 ms] (18) 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 "!! (x : vw) 0 = x; !! (vx : xs) n|n > 0xs !! (n - 1); !! (vy : vz) wu = error []; !! [] wv = error []; " is transformed to "!! (x : vw) yv = emEm5 (x : vw) yv; !! (vx : xs) n = emEm3 (vx : xs) n; !! (vy : vz) wu = emEm1 (vy : vz) wu; !! [] wv = emEm0 [] wv; " "emEm0 [] wv = error []; " "emEm1 (vy : vz) wu = error []; emEm1 xv xw = emEm0 xv xw; " "emEm2 vx xs n True = xs !! (n - 1); emEm2 vx xs n False = emEm1 (vx : xs) n; " "emEm3 (vx : xs) n = emEm2 vx xs n (n > 0); emEm3 xy xz = emEm1 xy xz; " "emEm4 True (x : vw) yv = x; emEm4 yw yx yy = emEm3 yx yy; " "emEm5 (x : vw) yv = emEm4 (yv == 0) (x : vw) yv; emEm5 yz zu = emEm3 yz zu; " 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) NumRed (SOUND) Num Reduction:All numbers are transformed to their corresponding representation with Succ, Pred and Zero. ---------------------------------------- (6) Obligation: mainModule Main module Main where { import qualified Prelude; } ---------------------------------------- (7) Narrow (SOUND) Haskell To QDPs digraph dp_graph { node [outthreshold=100, inthreshold=100];1[label="(!!)",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="(!!) zv3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 4[label="(!!) zv3 zv4",fontsize=16,color="burlywood",shape="triangle"];50[label="zv3/zv30 : zv31",fontsize=10,color="white",style="solid",shape="box"];4 -> 50[label="",style="solid", color="burlywood", weight=9]; 50 -> 5[label="",style="solid", color="burlywood", weight=3]; 51[label="zv3/[]",fontsize=10,color="white",style="solid",shape="box"];4 -> 51[label="",style="solid", color="burlywood", weight=9]; 51 -> 6[label="",style="solid", color="burlywood", weight=3]; 5[label="(!!) (zv30 : zv31) zv4",fontsize=16,color="black",shape="box"];5 -> 7[label="",style="solid", color="black", weight=3]; 6[label="(!!) [] zv4",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 7[label="emEm5 (zv30 : zv31) zv4",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 8[label="emEm0 [] zv4",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 9[label="emEm4 (zv4 == Pos Zero) (zv30 : zv31) zv4",fontsize=16,color="black",shape="box"];9 -> 11[label="",style="solid", color="black", weight=3]; 10[label="error []",fontsize=16,color="black",shape="triangle"];10 -> 12[label="",style="solid", color="black", weight=3]; 11[label="emEm4 (primEqInt zv4 (Pos Zero)) (zv30 : zv31) zv4",fontsize=16,color="burlywood",shape="box"];52[label="zv4/Pos zv40",fontsize=10,color="white",style="solid",shape="box"];11 -> 52[label="",style="solid", color="burlywood", weight=9]; 52 -> 13[label="",style="solid", color="burlywood", weight=3]; 53[label="zv4/Neg zv40",fontsize=10,color="white",style="solid",shape="box"];11 -> 53[label="",style="solid", color="burlywood", weight=9]; 53 -> 14[label="",style="solid", color="burlywood", weight=3]; 12[label="error []",fontsize=16,color="red",shape="box"];13[label="emEm4 (primEqInt (Pos zv40) (Pos Zero)) (zv30 : zv31) (Pos zv40)",fontsize=16,color="burlywood",shape="box"];54[label="zv40/Succ zv400",fontsize=10,color="white",style="solid",shape="box"];13 -> 54[label="",style="solid", color="burlywood", weight=9]; 54 -> 15[label="",style="solid", color="burlywood", weight=3]; 55[label="zv40/Zero",fontsize=10,color="white",style="solid",shape="box"];13 -> 55[label="",style="solid", color="burlywood", weight=9]; 55 -> 16[label="",style="solid", color="burlywood", weight=3]; 14[label="emEm4 (primEqInt (Neg zv40) (Pos Zero)) (zv30 : zv31) (Neg zv40)",fontsize=16,color="burlywood",shape="box"];56[label="zv40/Succ zv400",fontsize=10,color="white",style="solid",shape="box"];14 -> 56[label="",style="solid", color="burlywood", weight=9]; 56 -> 17[label="",style="solid", color="burlywood", weight=3]; 57[label="zv40/Zero",fontsize=10,color="white",style="solid",shape="box"];14 -> 57[label="",style="solid", color="burlywood", weight=9]; 57 -> 18[label="",style="solid", color="burlywood", weight=3]; 15[label="emEm4 (primEqInt (Pos (Succ zv400)) (Pos Zero)) (zv30 : zv31) (Pos (Succ zv400))",fontsize=16,color="black",shape="box"];15 -> 19[label="",style="solid", color="black", weight=3]; 16[label="emEm4 (primEqInt (Pos Zero) (Pos Zero)) (zv30 : zv31) (Pos Zero)",fontsize=16,color="black",shape="box"];16 -> 20[label="",style="solid", color="black", weight=3]; 17[label="emEm4 (primEqInt (Neg (Succ zv400)) (Pos Zero)) (zv30 : zv31) (Neg (Succ zv400))",fontsize=16,color="black",shape="box"];17 -> 21[label="",style="solid", color="black", weight=3]; 18[label="emEm4 (primEqInt (Neg Zero) (Pos Zero)) (zv30 : zv31) (Neg Zero)",fontsize=16,color="black",shape="box"];18 -> 22[label="",style="solid", color="black", weight=3]; 19[label="emEm4 False (zv30 : zv31) (Pos (Succ zv400))",fontsize=16,color="black",shape="box"];19 -> 23[label="",style="solid", color="black", weight=3]; 20[label="emEm4 True (zv30 : zv31) (Pos Zero)",fontsize=16,color="black",shape="box"];20 -> 24[label="",style="solid", color="black", weight=3]; 21[label="emEm4 False (zv30 : zv31) (Neg (Succ zv400))",fontsize=16,color="black",shape="box"];21 -> 25[label="",style="solid", color="black", weight=3]; 22[label="emEm4 True (zv30 : zv31) (Neg Zero)",fontsize=16,color="black",shape="box"];22 -> 26[label="",style="solid", color="black", weight=3]; 23[label="emEm3 (zv30 : zv31) (Pos (Succ zv400))",fontsize=16,color="black",shape="box"];23 -> 27[label="",style="solid", color="black", weight=3]; 24[label="zv30",fontsize=16,color="green",shape="box"];25[label="emEm3 (zv30 : zv31) (Neg (Succ zv400))",fontsize=16,color="black",shape="box"];25 -> 28[label="",style="solid", color="black", weight=3]; 26[label="zv30",fontsize=16,color="green",shape="box"];27[label="emEm2 zv30 zv31 (Pos (Succ zv400)) (Pos (Succ zv400) > Pos Zero)",fontsize=16,color="black",shape="box"];27 -> 29[label="",style="solid", color="black", weight=3]; 28[label="emEm2 zv30 zv31 (Neg (Succ zv400)) (Neg (Succ zv400) > Pos Zero)",fontsize=16,color="black",shape="box"];28 -> 30[label="",style="solid", color="black", weight=3]; 29[label="emEm2 zv30 zv31 (Pos (Succ zv400)) (compare (Pos (Succ zv400)) (Pos Zero) == GT)",fontsize=16,color="black",shape="box"];29 -> 31[label="",style="solid", color="black", weight=3]; 30[label="emEm2 zv30 zv31 (Neg (Succ zv400)) (compare (Neg (Succ zv400)) (Pos Zero) == GT)",fontsize=16,color="black",shape="box"];30 -> 32[label="",style="solid", color="black", weight=3]; 31[label="emEm2 zv30 zv31 (Pos (Succ zv400)) (primCmpInt (Pos (Succ zv400)) (Pos Zero) == GT)",fontsize=16,color="black",shape="box"];31 -> 33[label="",style="solid", color="black", weight=3]; 32[label="emEm2 zv30 zv31 (Neg (Succ zv400)) (primCmpInt (Neg (Succ zv400)) (Pos Zero) == GT)",fontsize=16,color="black",shape="box"];32 -> 34[label="",style="solid", color="black", weight=3]; 33[label="emEm2 zv30 zv31 (Pos (Succ zv400)) (primCmpNat (Succ zv400) Zero == GT)",fontsize=16,color="black",shape="box"];33 -> 35[label="",style="solid", color="black", weight=3]; 34[label="emEm2 zv30 zv31 (Neg (Succ zv400)) (LT == GT)",fontsize=16,color="black",shape="box"];34 -> 36[label="",style="solid", color="black", weight=3]; 35[label="emEm2 zv30 zv31 (Pos (Succ zv400)) (GT == GT)",fontsize=16,color="black",shape="box"];35 -> 37[label="",style="solid", color="black", weight=3]; 36[label="emEm2 zv30 zv31 (Neg (Succ zv400)) False",fontsize=16,color="black",shape="box"];36 -> 38[label="",style="solid", color="black", weight=3]; 37[label="emEm2 zv30 zv31 (Pos (Succ zv400)) True",fontsize=16,color="black",shape="box"];37 -> 39[label="",style="solid", color="black", weight=3]; 38[label="emEm1 (zv30 : zv31) (Neg (Succ zv400))",fontsize=16,color="black",shape="box"];38 -> 40[label="",style="solid", color="black", weight=3]; 39 -> 4[label="",style="dashed", color="red", weight=0]; 39[label="zv31 !! (Pos (Succ zv400) - Pos (Succ Zero))",fontsize=16,color="magenta"];39 -> 41[label="",style="dashed", color="magenta", weight=3]; 39 -> 42[label="",style="dashed", color="magenta", weight=3]; 40 -> 10[label="",style="dashed", color="red", weight=0]; 40[label="error []",fontsize=16,color="magenta"];41[label="zv31",fontsize=16,color="green",shape="box"];42[label="Pos (Succ zv400) - Pos (Succ Zero)",fontsize=16,color="black",shape="box"];42 -> 43[label="",style="solid", color="black", weight=3]; 43[label="primMinusInt (Pos (Succ zv400)) (Pos (Succ Zero))",fontsize=16,color="black",shape="box"];43 -> 44[label="",style="solid", color="black", weight=3]; 44[label="primMinusNat (Succ zv400) (Succ Zero)",fontsize=16,color="black",shape="box"];44 -> 45[label="",style="solid", color="black", weight=3]; 45[label="primMinusNat zv400 Zero",fontsize=16,color="burlywood",shape="box"];58[label="zv400/Succ zv4000",fontsize=10,color="white",style="solid",shape="box"];45 -> 58[label="",style="solid", color="burlywood", weight=9]; 58 -> 46[label="",style="solid", color="burlywood", weight=3]; 59[label="zv400/Zero",fontsize=10,color="white",style="solid",shape="box"];45 -> 59[label="",style="solid", color="burlywood", weight=9]; 59 -> 47[label="",style="solid", color="burlywood", weight=3]; 46[label="primMinusNat (Succ zv4000) Zero",fontsize=16,color="black",shape="box"];46 -> 48[label="",style="solid", color="black", weight=3]; 47[label="primMinusNat Zero Zero",fontsize=16,color="black",shape="box"];47 -> 49[label="",style="solid", color="black", weight=3]; 48[label="Pos (Succ zv4000)",fontsize=16,color="green",shape="box"];49[label="Pos Zero",fontsize=16,color="green",shape="box"];} ---------------------------------------- (8) Obligation: Q DP problem: The TRS P consists of the following rules: new_emEm(:(zv30, zv31), Pos(Succ(zv400)), h) -> new_emEm(zv31, new_primMinusNat(zv400), h) The TRS R consists of the following rules: new_primMinusNat(Succ(zv4000)) -> Pos(Succ(zv4000)) new_primMinusNat(Zero) -> Pos(Zero) The set Q consists of the following terms: new_primMinusNat(Succ(x0)) new_primMinusNat(Zero) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (9) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule new_emEm(:(zv30, zv31), Pos(Succ(zv400)), h) -> new_emEm(zv31, new_primMinusNat(zv400), h) at position [1] we obtained the following new rules [LPAR04]: (new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3),new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3)) (new_emEm(:(y0, y1), Pos(Succ(Zero)), y3) -> new_emEm(y1, Pos(Zero), y3),new_emEm(:(y0, y1), Pos(Succ(Zero)), y3) -> new_emEm(y1, Pos(Zero), y3)) ---------------------------------------- (10) Obligation: Q DP problem: The TRS P consists of the following rules: new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3) new_emEm(:(y0, y1), Pos(Succ(Zero)), y3) -> new_emEm(y1, Pos(Zero), y3) The TRS R consists of the following rules: new_primMinusNat(Succ(zv4000)) -> Pos(Succ(zv4000)) new_primMinusNat(Zero) -> Pos(Zero) The set Q consists of the following terms: new_primMinusNat(Succ(x0)) new_primMinusNat(Zero) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (11) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (12) Obligation: Q DP problem: The TRS P consists of the following rules: new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3) The TRS R consists of the following rules: new_primMinusNat(Succ(zv4000)) -> Pos(Succ(zv4000)) new_primMinusNat(Zero) -> Pos(Zero) The set Q consists of the following terms: new_primMinusNat(Succ(x0)) new_primMinusNat(Zero) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (13) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (14) Obligation: Q DP problem: The TRS P consists of the following rules: new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3) R is empty. The set Q consists of the following terms: new_primMinusNat(Succ(x0)) new_primMinusNat(Zero) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (15) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. new_primMinusNat(Succ(x0)) new_primMinusNat(Zero) ---------------------------------------- (16) Obligation: Q DP problem: The TRS P consists of the following rules: new_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (17) 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_emEm(:(y0, y1), Pos(Succ(Succ(x0))), y3) -> new_emEm(y1, Pos(Succ(x0)), y3) The graph contains the following edges 1 > 1, 3 >= 3 ---------------------------------------- (18) YES