/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.hs /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/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; data List a = Cons a (List a) | Nil ; data MyBool = MyTrue | MyFalse ; data Tup2 a b = Tup2 a b ; break :: (a -> MyBool) -> List a -> Tup2 (List a) (List a); break p = span (pt not p); not :: MyBool -> MyBool; not MyTrue = MyFalse; not MyFalse = MyTrue; otherwise :: MyBool; otherwise = MyTrue; pt :: (b -> a) -> (c -> b) -> c -> a; pt f g x = f (g x); span :: (a -> MyBool) -> List a -> Tup2 (List a) (List a); span p Nil = span3 p Nil; span p (Cons vv vw) = span2 p (Cons vv vw); span2 p (Cons vv vw) = span2Span1 p vw p vv vw (p vv); span2Span0 wx wy p vv vw MyTrue = Tup2 Nil (Cons vv vw); span2Span1 wx wy p vv vw MyTrue = Tup2 (Cons vv (span2Ys wx wy)) (span2Zs wx wy); span2Span1 wx wy p vv vw MyFalse = span2Span0 wx wy p vv vw otherwise; span2Vu43 wx wy = span wx wy; span2Ys wx wy = span2Ys0 wx wy (span2Vu43 wx wy); span2Ys0 wx wy (Tup2 ys vx) = ys; span2Zs wx wy = span2Zs0 wx wy (span2Vu43 wx wy); span2Zs0 wx wy (Tup2 vy zs) = zs; span3 p Nil = Tup2 Nil Nil; span3 wv ww = span2 wv ww; } ---------------------------------------- (1) BR (EQUIVALENT) Replaced joker patterns by fresh variables and removed binding patterns. ---------------------------------------- (2) Obligation: mainModule Main module Main where { import qualified Prelude; data List a = Cons a (List a) | Nil ; data MyBool = MyTrue | MyFalse ; data Tup2 b a = Tup2 b a ; break :: (a -> MyBool) -> List a -> Tup2 (List a) (List a); break p = span (pt not p); not :: MyBool -> MyBool; not MyTrue = MyFalse; not MyFalse = MyTrue; otherwise :: MyBool; otherwise = MyTrue; pt :: (c -> a) -> (b -> c) -> b -> a; pt f g x = f (g x); span :: (a -> MyBool) -> List a -> Tup2 (List a) (List a); span p Nil = span3 p Nil; span p (Cons vv vw) = span2 p (Cons vv vw); span2 p (Cons vv vw) = span2Span1 p vw p vv vw (p vv); span2Span0 wx wy p vv vw MyTrue = Tup2 Nil (Cons vv vw); span2Span1 wx wy p vv vw MyTrue = Tup2 (Cons vv (span2Ys wx wy)) (span2Zs wx wy); span2Span1 wx wy p vv vw MyFalse = span2Span0 wx wy p vv vw otherwise; span2Vu43 wx wy = span wx wy; span2Ys wx wy = span2Ys0 wx wy (span2Vu43 wx wy); span2Ys0 wx wy (Tup2 ys vx) = ys; span2Zs wx wy = span2Zs0 wx wy (span2Vu43 wx wy); span2Zs0 wx wy (Tup2 vy zs) = zs; span3 p Nil = Tup2 Nil Nil; span3 wv ww = span2 wv ww; } ---------------------------------------- (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; data List a = Cons a (List a) | Nil ; data MyBool = MyTrue | MyFalse ; data Tup2 a b = Tup2 a b ; break :: (a -> MyBool) -> List a -> Tup2 (List a) (List a); break p = span (pt not p); not :: MyBool -> MyBool; not MyTrue = MyFalse; not MyFalse = MyTrue; otherwise :: MyBool; otherwise = MyTrue; pt :: (b -> a) -> (c -> b) -> c -> a; pt f g x = f (g x); span :: (a -> MyBool) -> List a -> Tup2 (List a) (List a); span p Nil = span3 p Nil; span p (Cons vv vw) = span2 p (Cons vv vw); span2 p (Cons vv vw) = span2Span1 p vw p vv vw (p vv); span2Span0 wx wy p vv vw MyTrue = Tup2 Nil (Cons vv vw); span2Span1 wx wy p vv vw MyTrue = Tup2 (Cons vv (span2Ys wx wy)) (span2Zs wx wy); span2Span1 wx wy p vv vw MyFalse = span2Span0 wx wy p vv vw otherwise; span2Vu43 wx wy = span wx wy; span2Ys wx wy = span2Ys0 wx wy (span2Vu43 wx wy); span2Ys0 wx wy (Tup2 ys vx) = ys; span2Zs wx wy = span2Zs0 wx wy (span2Vu43 wx wy); span2Zs0 wx wy (Tup2 vy zs) = zs; span3 p Nil = Tup2 Nil Nil; span3 wv ww = span2 wv ww; } ---------------------------------------- (5) Narrow (SOUND) Haskell To QDPs digraph dp_graph { node [outthreshold=100, inthreshold=100];1[label="break",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 3[label="break wz3",fontsize=16,color="grey",shape="box"];3 -> 4[label="",style="dashed", color="grey", weight=3]; 4[label="break wz3 wz4",fontsize=16,color="black",shape="triangle"];4 -> 5[label="",style="solid", color="black", weight=3]; 5[label="span (pt not wz3) wz4",fontsize=16,color="burlywood",shape="triangle"];43[label="wz4/Cons wz40 wz41",fontsize=10,color="white",style="solid",shape="box"];5 -> 43[label="",style="solid", color="burlywood", weight=9]; 43 -> 6[label="",style="solid", color="burlywood", weight=3]; 44[label="wz4/Nil",fontsize=10,color="white",style="solid",shape="box"];5 -> 44[label="",style="solid", color="burlywood", weight=9]; 44 -> 7[label="",style="solid", color="burlywood", weight=3]; 6[label="span (pt not wz3) (Cons wz40 wz41)",fontsize=16,color="black",shape="box"];6 -> 8[label="",style="solid", color="black", weight=3]; 7[label="span (pt not wz3) Nil",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 8[label="span2 (pt not wz3) (Cons wz40 wz41)",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 9[label="span3 (pt not wz3) Nil",fontsize=16,color="black",shape="box"];9 -> 11[label="",style="solid", color="black", weight=3]; 10[label="span2Span1 (pt not wz3) wz41 (pt not wz3) wz40 wz41 (pt not wz3 wz40)",fontsize=16,color="black",shape="box"];10 -> 12[label="",style="solid", color="black", weight=3]; 11[label="Tup2 Nil Nil",fontsize=16,color="green",shape="box"];12 -> 13[label="",style="dashed", color="red", weight=0]; 12[label="span2Span1 (pt not wz3) wz41 (pt not wz3) wz40 wz41 (not (wz3 wz40))",fontsize=16,color="magenta"];12 -> 14[label="",style="dashed", color="magenta", weight=3]; 14[label="wz3 wz40",fontsize=16,color="green",shape="box"];14 -> 18[label="",style="dashed", color="green", weight=3]; 13[label="span2Span1 (pt not wz3) wz41 (pt not wz3) wz40 wz41 (not wz5)",fontsize=16,color="burlywood",shape="triangle"];45[label="wz5/MyTrue",fontsize=10,color="white",style="solid",shape="box"];13 -> 45[label="",style="solid", color="burlywood", weight=9]; 45 -> 16[label="",style="solid", color="burlywood", weight=3]; 46[label="wz5/MyFalse",fontsize=10,color="white",style="solid",shape="box"];13 -> 46[label="",style="solid", color="burlywood", weight=9]; 46 -> 17[label="",style="solid", color="burlywood", weight=3]; 18[label="wz40",fontsize=16,color="green",shape="box"];16[label="span2Span1 (pt not wz3) wz41 (pt not wz3) wz40 wz41 (not MyTrue)",fontsize=16,color="black",shape="box"];16 -> 19[label="",style="solid", color="black", weight=3]; 17[label="span2Span1 (pt not wz3) wz41 (pt not wz3) wz40 wz41 (not MyFalse)",fontsize=16,color="black",shape="box"];17 -> 20[label="",style="solid", color="black", weight=3]; 19[label="span2Span1 (pt not wz3) wz41 (pt not wz3) wz40 wz41 MyFalse",fontsize=16,color="black",shape="box"];19 -> 21[label="",style="solid", color="black", weight=3]; 20[label="span2Span1 (pt not wz3) wz41 (pt not wz3) wz40 wz41 MyTrue",fontsize=16,color="black",shape="box"];20 -> 22[label="",style="solid", color="black", weight=3]; 21[label="span2Span0 (pt not wz3) wz41 (pt not wz3) wz40 wz41 otherwise",fontsize=16,color="black",shape="box"];21 -> 23[label="",style="solid", color="black", weight=3]; 22[label="Tup2 (Cons wz40 (span2Ys (pt not wz3) wz41)) (span2Zs (pt not wz3) wz41)",fontsize=16,color="green",shape="box"];22 -> 24[label="",style="dashed", color="green", weight=3]; 22 -> 25[label="",style="dashed", color="green", weight=3]; 23[label="span2Span0 (pt not wz3) wz41 (pt not wz3) wz40 wz41 MyTrue",fontsize=16,color="black",shape="box"];23 -> 26[label="",style="solid", color="black", weight=3]; 24[label="span2Ys (pt not wz3) wz41",fontsize=16,color="black",shape="box"];24 -> 27[label="",style="solid", color="black", weight=3]; 25[label="span2Zs (pt not wz3) wz41",fontsize=16,color="black",shape="box"];25 -> 28[label="",style="solid", color="black", weight=3]; 26[label="Tup2 Nil (Cons wz40 wz41)",fontsize=16,color="green",shape="box"];27 -> 31[label="",style="dashed", color="red", weight=0]; 27[label="span2Ys0 (pt not wz3) wz41 (span2Vu43 (pt not wz3) wz41)",fontsize=16,color="magenta"];27 -> 32[label="",style="dashed", color="magenta", weight=3]; 28 -> 36[label="",style="dashed", color="red", weight=0]; 28[label="span2Zs0 (pt not wz3) wz41 (span2Vu43 (pt not wz3) wz41)",fontsize=16,color="magenta"];28 -> 37[label="",style="dashed", color="magenta", weight=3]; 32[label="span2Vu43 (pt not wz3) wz41",fontsize=16,color="black",shape="triangle"];32 -> 34[label="",style="solid", color="black", weight=3]; 31[label="span2Ys0 (pt not wz3) wz41 wz6",fontsize=16,color="burlywood",shape="triangle"];47[label="wz6/Tup2 wz60 wz61",fontsize=10,color="white",style="solid",shape="box"];31 -> 47[label="",style="solid", color="burlywood", weight=9]; 47 -> 35[label="",style="solid", color="burlywood", weight=3]; 37 -> 32[label="",style="dashed", color="red", weight=0]; 37[label="span2Vu43 (pt not wz3) wz41",fontsize=16,color="magenta"];36[label="span2Zs0 (pt not wz3) wz41 wz7",fontsize=16,color="burlywood",shape="triangle"];48[label="wz7/Tup2 wz70 wz71",fontsize=10,color="white",style="solid",shape="box"];36 -> 48[label="",style="solid", color="burlywood", weight=9]; 48 -> 39[label="",style="solid", color="burlywood", weight=3]; 34 -> 5[label="",style="dashed", color="red", weight=0]; 34[label="span (pt not wz3) wz41",fontsize=16,color="magenta"];34 -> 40[label="",style="dashed", color="magenta", weight=3]; 35[label="span2Ys0 (pt not wz3) wz41 (Tup2 wz60 wz61)",fontsize=16,color="black",shape="box"];35 -> 41[label="",style="solid", color="black", weight=3]; 39[label="span2Zs0 (pt not wz3) wz41 (Tup2 wz70 wz71)",fontsize=16,color="black",shape="box"];39 -> 42[label="",style="solid", color="black", weight=3]; 40[label="wz41",fontsize=16,color="green",shape="box"];41[label="wz60",fontsize=16,color="green",shape="box"];42[label="wz71",fontsize=16,color="green",shape="box"];} ---------------------------------------- (6) Obligation: Q DP problem: The TRS P consists of the following rules: new_span2Vu43(wz3, wz41, h) -> new_span(wz3, wz41, h) new_span(wz3, Cons(wz40, wz41), h) -> new_span2Span1(wz3, wz41, wz40, h) new_span2Span1(wz3, wz41, wz40, h) -> new_span(wz3, wz41, h) new_span2Span1(wz3, wz41, wz40, h) -> new_span2Vu43(wz3, wz41, 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_span(wz3, Cons(wz40, wz41), h) -> new_span2Span1(wz3, wz41, wz40, h) The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3, 3 >= 4 *new_span2Span1(wz3, wz41, wz40, h) -> new_span2Vu43(wz3, wz41, h) The graph contains the following edges 1 >= 1, 2 >= 2, 4 >= 3 *new_span2Span1(wz3, wz41, wz40, h) -> new_span(wz3, wz41, h) The graph contains the following edges 1 >= 1, 2 >= 2, 4 >= 3 *new_span2Vu43(wz3, wz41, h) -> new_span(wz3, wz41, h) The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3 ---------------------------------------- (8) YES