7.46/3.51 YES 9.26/3.99 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 9.26/3.99 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 9.26/3.99 9.26/3.99 9.26/3.99 H-Termination with start terms of the given HASKELL could be proven: 9.26/3.99 9.26/3.99 (0) HASKELL 9.26/3.99 (1) BR [EQUIVALENT, 0 ms] 9.26/3.99 (2) HASKELL 9.26/3.99 (3) COR [EQUIVALENT, 0 ms] 9.26/3.99 (4) HASKELL 9.26/3.99 (5) Narrow [SOUND, 0 ms] 9.26/3.99 (6) QDP 9.26/3.99 (7) QDPSizeChangeProof [EQUIVALENT, 0 ms] 9.26/3.99 (8) YES 9.26/3.99 9.26/3.99 9.26/3.99 ---------------------------------------- 9.26/3.99 9.26/3.99 (0) 9.26/3.99 Obligation: 9.26/3.99 mainModule Main 9.26/3.99 module Main where { 9.26/3.99 import qualified Prelude; 9.26/3.99 data MyBool = MyTrue | MyFalse ; 9.26/3.99 9.26/3.99 data MyInt = Pos Main.Nat | Neg Main.Nat ; 9.26/3.99 9.26/3.99 data Main.Nat = Succ Main.Nat | Zero ; 9.26/3.99 9.26/3.99 evenMyInt :: MyInt -> MyBool; 9.26/3.99 evenMyInt = primEvenInt; 9.26/3.99 9.26/3.99 not :: MyBool -> MyBool; 9.26/3.99 not MyTrue = MyFalse; 9.26/3.99 not MyFalse = MyTrue; 9.26/3.99 9.26/3.99 oddMyInt :: MyInt -> MyBool; 9.26/3.99 oddMyInt = pt not evenMyInt; 9.26/3.99 9.26/3.99 primEvenInt :: MyInt -> MyBool; 9.26/3.99 primEvenInt (Main.Pos x) = primEvenNat x; 9.26/3.99 primEvenInt (Main.Neg x) = primEvenNat x; 9.26/3.99 9.26/3.99 primEvenNat :: Main.Nat -> MyBool; 9.26/3.99 primEvenNat Main.Zero = MyTrue; 9.26/3.99 primEvenNat (Main.Succ Main.Zero) = MyFalse; 9.26/3.99 primEvenNat (Main.Succ (Main.Succ x)) = primEvenNat x; 9.26/3.99 9.26/3.99 pt :: (c -> b) -> (a -> c) -> a -> b; 9.26/3.99 pt f g x = f (g x); 9.26/3.99 9.26/3.99 } 9.26/3.99 9.26/3.99 ---------------------------------------- 9.26/3.99 9.26/3.99 (1) BR (EQUIVALENT) 9.26/3.99 Replaced joker patterns by fresh variables and removed binding patterns. 9.26/3.99 ---------------------------------------- 9.26/3.99 9.26/3.99 (2) 9.26/3.99 Obligation: 9.26/3.99 mainModule Main 9.26/3.99 module Main where { 9.26/3.99 import qualified Prelude; 9.26/3.99 data MyBool = MyTrue | MyFalse ; 9.26/3.99 9.26/3.99 data MyInt = Pos Main.Nat | Neg Main.Nat ; 9.26/3.99 9.26/3.99 data Main.Nat = Succ Main.Nat | Zero ; 9.26/3.99 9.26/3.99 evenMyInt :: MyInt -> MyBool; 9.26/3.99 evenMyInt = primEvenInt; 9.26/3.99 9.26/3.99 not :: MyBool -> MyBool; 9.26/3.99 not MyTrue = MyFalse; 9.26/3.99 not MyFalse = MyTrue; 9.26/3.99 9.26/3.99 oddMyInt :: MyInt -> MyBool; 9.26/3.99 oddMyInt = pt not evenMyInt; 9.26/3.99 9.26/3.99 primEvenInt :: MyInt -> MyBool; 9.26/3.99 primEvenInt (Main.Pos x) = primEvenNat x; 9.26/3.99 primEvenInt (Main.Neg x) = primEvenNat x; 9.26/3.99 9.26/3.99 primEvenNat :: Main.Nat -> MyBool; 9.26/3.99 primEvenNat Main.Zero = MyTrue; 9.26/3.99 primEvenNat (Main.Succ Main.Zero) = MyFalse; 9.26/3.99 primEvenNat (Main.Succ (Main.Succ x)) = primEvenNat x; 9.26/3.99 9.26/3.99 pt :: (c -> a) -> (b -> c) -> b -> a; 9.26/3.99 pt f g x = f (g x); 9.26/3.99 9.26/3.99 } 9.26/3.99 9.26/3.99 ---------------------------------------- 9.26/3.99 9.26/3.99 (3) COR (EQUIVALENT) 9.26/3.99 Cond Reductions: 9.26/3.99 The following Function with conditions 9.26/3.99 "undefined |Falseundefined; 9.26/3.99 " 9.26/3.99 is transformed to 9.26/3.99 "undefined = undefined1; 9.26/3.99 " 9.26/3.99 "undefined0 True = undefined; 9.26/3.99 " 9.26/3.99 "undefined1 = undefined0 False; 9.26/3.99 " 9.26/3.99 9.26/3.99 ---------------------------------------- 9.26/3.99 9.26/3.99 (4) 9.26/3.99 Obligation: 9.26/3.99 mainModule Main 9.26/3.99 module Main where { 9.26/3.99 import qualified Prelude; 9.26/3.99 data MyBool = MyTrue | MyFalse ; 9.26/3.99 9.26/3.99 data MyInt = Pos Main.Nat | Neg Main.Nat ; 9.26/3.99 9.26/3.99 data Main.Nat = Succ Main.Nat | Zero ; 9.26/3.99 9.26/3.99 evenMyInt :: MyInt -> MyBool; 9.26/3.99 evenMyInt = primEvenInt; 9.26/3.99 9.26/3.99 not :: MyBool -> MyBool; 9.26/3.99 not MyTrue = MyFalse; 9.26/3.99 not MyFalse = MyTrue; 9.26/3.99 9.26/3.99 oddMyInt :: MyInt -> MyBool; 9.26/3.99 oddMyInt = pt not evenMyInt; 9.26/3.99 9.26/3.99 primEvenInt :: MyInt -> MyBool; 9.26/3.99 primEvenInt (Main.Pos x) = primEvenNat x; 9.26/3.99 primEvenInt (Main.Neg x) = primEvenNat x; 9.26/3.99 9.26/3.99 primEvenNat :: Main.Nat -> MyBool; 9.26/3.99 primEvenNat Main.Zero = MyTrue; 9.26/3.99 primEvenNat (Main.Succ Main.Zero) = MyFalse; 9.26/3.99 primEvenNat (Main.Succ (Main.Succ x)) = primEvenNat x; 9.26/3.99 9.26/3.99 pt :: (b -> c) -> (a -> b) -> a -> c; 9.26/3.99 pt f g x = f (g x); 9.26/3.99 9.26/3.99 } 9.26/3.99 9.26/3.99 ---------------------------------------- 9.26/3.99 9.26/3.99 (5) Narrow (SOUND) 9.26/3.99 Haskell To QDPs 9.26/3.99 9.26/3.99 digraph dp_graph { 9.26/3.99 node [outthreshold=100, inthreshold=100];1[label="oddMyInt",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 9.26/3.99 3[label="oddMyInt vx3",fontsize=16,color="black",shape="triangle"];3 -> 4[label="",style="solid", color="black", weight=3]; 9.26/3.99 4[label="pt not evenMyInt vx3",fontsize=16,color="black",shape="box"];4 -> 5[label="",style="solid", color="black", weight=3]; 9.26/3.99 5[label="not (evenMyInt vx3)",fontsize=16,color="black",shape="box"];5 -> 6[label="",style="solid", color="black", weight=3]; 9.26/3.99 6[label="not (primEvenInt vx3)",fontsize=16,color="burlywood",shape="box"];22[label="vx3/Pos vx30",fontsize=10,color="white",style="solid",shape="box"];6 -> 22[label="",style="solid", color="burlywood", weight=9]; 9.26/3.99 22 -> 7[label="",style="solid", color="burlywood", weight=3]; 9.26/3.99 23[label="vx3/Neg vx30",fontsize=10,color="white",style="solid",shape="box"];6 -> 23[label="",style="solid", color="burlywood", weight=9]; 9.26/3.99 23 -> 8[label="",style="solid", color="burlywood", weight=3]; 9.26/3.99 7[label="not (primEvenInt (Pos vx30))",fontsize=16,color="black",shape="box"];7 -> 9[label="",style="solid", color="black", weight=3]; 9.26/3.99 8[label="not (primEvenInt (Neg vx30))",fontsize=16,color="black",shape="box"];8 -> 10[label="",style="solid", color="black", weight=3]; 9.26/3.99 9[label="not (primEvenNat vx30)",fontsize=16,color="burlywood",shape="triangle"];24[label="vx30/Succ vx300",fontsize=10,color="white",style="solid",shape="box"];9 -> 24[label="",style="solid", color="burlywood", weight=9]; 9.26/3.99 24 -> 11[label="",style="solid", color="burlywood", weight=3]; 9.26/3.99 25[label="vx30/Zero",fontsize=10,color="white",style="solid",shape="box"];9 -> 25[label="",style="solid", color="burlywood", weight=9]; 9.26/3.99 25 -> 12[label="",style="solid", color="burlywood", weight=3]; 9.26/3.99 10 -> 9[label="",style="dashed", color="red", weight=0]; 9.26/3.99 10[label="not (primEvenNat vx30)",fontsize=16,color="magenta"];10 -> 13[label="",style="dashed", color="magenta", weight=3]; 9.26/3.99 11[label="not (primEvenNat (Succ vx300))",fontsize=16,color="burlywood",shape="box"];26[label="vx300/Succ vx3000",fontsize=10,color="white",style="solid",shape="box"];11 -> 26[label="",style="solid", color="burlywood", weight=9]; 9.26/3.99 26 -> 14[label="",style="solid", color="burlywood", weight=3]; 9.26/3.99 27[label="vx300/Zero",fontsize=10,color="white",style="solid",shape="box"];11 -> 27[label="",style="solid", color="burlywood", weight=9]; 9.26/3.99 27 -> 15[label="",style="solid", color="burlywood", weight=3]; 9.26/3.99 12[label="not (primEvenNat Zero)",fontsize=16,color="black",shape="box"];12 -> 16[label="",style="solid", color="black", weight=3]; 9.26/3.99 13[label="vx30",fontsize=16,color="green",shape="box"];14[label="not (primEvenNat (Succ (Succ vx3000)))",fontsize=16,color="black",shape="box"];14 -> 17[label="",style="solid", color="black", weight=3]; 9.26/3.99 15[label="not (primEvenNat (Succ Zero))",fontsize=16,color="black",shape="box"];15 -> 18[label="",style="solid", color="black", weight=3]; 9.26/3.99 16[label="not MyTrue",fontsize=16,color="black",shape="box"];16 -> 19[label="",style="solid", color="black", weight=3]; 9.26/3.99 17 -> 9[label="",style="dashed", color="red", weight=0]; 9.26/3.99 17[label="not (primEvenNat vx3000)",fontsize=16,color="magenta"];17 -> 20[label="",style="dashed", color="magenta", weight=3]; 9.26/3.99 18[label="not MyFalse",fontsize=16,color="black",shape="box"];18 -> 21[label="",style="solid", color="black", weight=3]; 9.26/3.99 19[label="MyFalse",fontsize=16,color="green",shape="box"];20[label="vx3000",fontsize=16,color="green",shape="box"];21[label="MyTrue",fontsize=16,color="green",shape="box"];} 9.26/3.99 9.26/3.99 ---------------------------------------- 9.26/3.99 9.26/3.99 (6) 9.26/3.99 Obligation: 9.26/3.99 Q DP problem: 9.26/3.99 The TRS P consists of the following rules: 9.26/3.99 9.26/3.99 new_not(Main.Succ(Main.Succ(vx3000))) -> new_not(vx3000) 9.26/3.99 9.26/3.99 R is empty. 9.26/3.99 Q is empty. 9.26/3.99 We have to consider all minimal (P,Q,R)-chains. 9.26/3.99 ---------------------------------------- 9.26/3.99 9.26/3.99 (7) QDPSizeChangeProof (EQUIVALENT) 9.26/3.99 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. 9.26/3.99 9.26/3.99 From the DPs we obtained the following set of size-change graphs: 9.26/3.99 *new_not(Main.Succ(Main.Succ(vx3000))) -> new_not(vx3000) 9.26/3.99 The graph contains the following edges 1 > 1 9.26/3.99 9.26/3.99 9.26/3.99 ---------------------------------------- 9.26/3.99 9.26/3.99 (8) 9.26/3.99 YES 9.26/4.02 EOF