8.01/3.55 YES 9.92/4.05 proof of /export/starexec/sandbox/benchmark/theBenchmark.hs 9.92/4.05 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 9.92/4.05 9.92/4.05 9.92/4.05 H-Termination with start terms of the given HASKELL could be proven: 9.92/4.05 9.92/4.05 (0) HASKELL 9.92/4.05 (1) BR [EQUIVALENT, 0 ms] 9.92/4.05 (2) HASKELL 9.92/4.05 (3) COR [EQUIVALENT, 0 ms] 9.92/4.05 (4) HASKELL 9.92/4.05 (5) Narrow [EQUIVALENT, 32 ms] 9.92/4.05 (6) YES 9.92/4.05 9.92/4.05 9.92/4.05 ---------------------------------------- 9.92/4.05 9.92/4.05 (0) 9.92/4.05 Obligation: 9.92/4.05 mainModule Main 9.92/4.05 module Main where { 9.92/4.05 import qualified Prelude; 9.92/4.05 data Main.Char = Char MyInt ; 9.92/4.05 9.92/4.05 data MyInt = Pos Main.Nat | Neg Main.Nat ; 9.92/4.05 9.92/4.05 data Main.Nat = Succ Main.Nat | Zero ; 9.92/4.05 9.92/4.05 fromEnumChar :: Main.Char -> MyInt; 9.92/4.05 fromEnumChar = primCharToInt; 9.92/4.05 9.92/4.05 primCharToInt :: Main.Char -> MyInt; 9.92/4.05 primCharToInt (Main.Char x) = x; 9.92/4.05 9.92/4.05 primIntToChar :: MyInt -> Main.Char; 9.92/4.05 primIntToChar x = Main.Char x; 9.92/4.05 9.92/4.05 primMinusNat :: Main.Nat -> Main.Nat -> MyInt; 9.92/4.05 primMinusNat Main.Zero Main.Zero = Main.Pos Main.Zero; 9.92/4.05 primMinusNat Main.Zero (Main.Succ y) = Main.Neg (Main.Succ y); 9.92/4.05 primMinusNat (Main.Succ x) Main.Zero = Main.Pos (Main.Succ x); 9.92/4.05 primMinusNat (Main.Succ x) (Main.Succ y) = primMinusNat x y; 9.92/4.05 9.92/4.05 primPlusInt :: MyInt -> MyInt -> MyInt; 9.92/4.05 primPlusInt (Main.Pos x) (Main.Neg y) = primMinusNat x y; 9.92/4.05 primPlusInt (Main.Neg x) (Main.Pos y) = primMinusNat y x; 9.92/4.05 primPlusInt (Main.Neg x) (Main.Neg y) = Main.Neg (primPlusNat x y); 9.92/4.05 primPlusInt (Main.Pos x) (Main.Pos y) = Main.Pos (primPlusNat x y); 9.92/4.05 9.92/4.05 primPlusNat :: Main.Nat -> Main.Nat -> Main.Nat; 9.92/4.05 primPlusNat Main.Zero Main.Zero = Main.Zero; 9.92/4.05 primPlusNat Main.Zero (Main.Succ y) = Main.Succ y; 9.92/4.05 primPlusNat (Main.Succ x) Main.Zero = Main.Succ x; 9.92/4.05 primPlusNat (Main.Succ x) (Main.Succ y) = Main.Succ (Main.Succ (primPlusNat x y)); 9.92/4.05 9.92/4.05 psMyInt :: MyInt -> MyInt -> MyInt; 9.92/4.05 psMyInt = primPlusInt; 9.92/4.05 9.92/4.05 pt :: (b -> c) -> (a -> b) -> a -> c; 9.92/4.05 pt f g x = f (g x); 9.92/4.05 9.92/4.05 succChar :: Main.Char -> Main.Char; 9.92/4.05 succChar = pt toEnumChar (pt (psMyInt (Main.Pos (Main.Succ Main.Zero))) fromEnumChar); 9.92/4.05 9.92/4.05 toEnumChar :: MyInt -> Main.Char; 9.92/4.05 toEnumChar = primIntToChar; 9.92/4.05 9.92/4.05 } 9.92/4.05 9.92/4.05 ---------------------------------------- 9.92/4.05 9.92/4.05 (1) BR (EQUIVALENT) 9.92/4.05 Replaced joker patterns by fresh variables and removed binding patterns. 9.92/4.05 ---------------------------------------- 9.92/4.05 9.92/4.05 (2) 9.92/4.05 Obligation: 9.92/4.05 mainModule Main 9.92/4.05 module Main where { 9.92/4.05 import qualified Prelude; 9.92/4.05 data Main.Char = Char MyInt ; 9.92/4.05 9.92/4.05 data MyInt = Pos Main.Nat | Neg Main.Nat ; 9.92/4.05 9.92/4.05 data Main.Nat = Succ Main.Nat | Zero ; 9.92/4.05 9.92/4.05 fromEnumChar :: Main.Char -> MyInt; 9.92/4.05 fromEnumChar = primCharToInt; 9.92/4.05 9.92/4.05 primCharToInt :: Main.Char -> MyInt; 9.92/4.05 primCharToInt (Main.Char x) = x; 9.92/4.05 9.92/4.05 primIntToChar :: MyInt -> Main.Char; 9.92/4.05 primIntToChar x = Main.Char x; 9.92/4.05 9.92/4.05 primMinusNat :: Main.Nat -> Main.Nat -> MyInt; 9.92/4.05 primMinusNat Main.Zero Main.Zero = Main.Pos Main.Zero; 9.92/4.05 primMinusNat Main.Zero (Main.Succ y) = Main.Neg (Main.Succ y); 9.92/4.05 primMinusNat (Main.Succ x) Main.Zero = Main.Pos (Main.Succ x); 9.92/4.05 primMinusNat (Main.Succ x) (Main.Succ y) = primMinusNat x y; 9.92/4.05 9.92/4.05 primPlusInt :: MyInt -> MyInt -> MyInt; 9.92/4.05 primPlusInt (Main.Pos x) (Main.Neg y) = primMinusNat x y; 9.92/4.05 primPlusInt (Main.Neg x) (Main.Pos y) = primMinusNat y x; 9.92/4.05 primPlusInt (Main.Neg x) (Main.Neg y) = Main.Neg (primPlusNat x y); 9.92/4.05 primPlusInt (Main.Pos x) (Main.Pos y) = Main.Pos (primPlusNat x y); 9.92/4.05 9.92/4.05 primPlusNat :: Main.Nat -> Main.Nat -> Main.Nat; 9.92/4.05 primPlusNat Main.Zero Main.Zero = Main.Zero; 9.92/4.05 primPlusNat Main.Zero (Main.Succ y) = Main.Succ y; 9.92/4.05 primPlusNat (Main.Succ x) Main.Zero = Main.Succ x; 9.92/4.05 primPlusNat (Main.Succ x) (Main.Succ y) = Main.Succ (Main.Succ (primPlusNat x y)); 9.92/4.05 9.92/4.05 psMyInt :: MyInt -> MyInt -> MyInt; 9.92/4.05 psMyInt = primPlusInt; 9.92/4.05 9.92/4.05 pt :: (b -> a) -> (c -> b) -> c -> a; 9.92/4.05 pt f g x = f (g x); 9.92/4.05 9.92/4.05 succChar :: Main.Char -> Main.Char; 9.92/4.05 succChar = pt toEnumChar (pt (psMyInt (Main.Pos (Main.Succ Main.Zero))) fromEnumChar); 9.92/4.05 9.92/4.05 toEnumChar :: MyInt -> Main.Char; 9.92/4.05 toEnumChar = primIntToChar; 9.92/4.05 9.92/4.05 } 9.92/4.05 9.92/4.05 ---------------------------------------- 9.92/4.05 9.92/4.05 (3) COR (EQUIVALENT) 9.92/4.05 Cond Reductions: 9.92/4.05 The following Function with conditions 9.92/4.05 "undefined |Falseundefined; 9.92/4.05 " 9.92/4.05 is transformed to 9.92/4.05 "undefined = undefined1; 9.92/4.05 " 9.92/4.05 "undefined0 True = undefined; 9.92/4.05 " 9.92/4.05 "undefined1 = undefined0 False; 9.92/4.05 " 9.92/4.05 9.92/4.05 ---------------------------------------- 9.92/4.05 9.92/4.05 (4) 9.92/4.05 Obligation: 9.92/4.05 mainModule Main 9.92/4.05 module Main where { 9.92/4.05 import qualified Prelude; 9.92/4.05 data Main.Char = Char MyInt ; 9.92/4.05 9.92/4.05 data MyInt = Pos Main.Nat | Neg Main.Nat ; 9.92/4.05 9.92/4.05 data Main.Nat = Succ Main.Nat | Zero ; 9.92/4.05 9.92/4.05 fromEnumChar :: Main.Char -> MyInt; 9.92/4.05 fromEnumChar = primCharToInt; 9.92/4.05 9.92/4.05 primCharToInt :: Main.Char -> MyInt; 9.92/4.05 primCharToInt (Main.Char x) = x; 9.92/4.05 9.92/4.05 primIntToChar :: MyInt -> Main.Char; 9.92/4.05 primIntToChar x = Main.Char x; 9.92/4.05 9.92/4.05 primMinusNat :: Main.Nat -> Main.Nat -> MyInt; 9.92/4.05 primMinusNat Main.Zero Main.Zero = Main.Pos Main.Zero; 9.92/4.05 primMinusNat Main.Zero (Main.Succ y) = Main.Neg (Main.Succ y); 9.92/4.05 primMinusNat (Main.Succ x) Main.Zero = Main.Pos (Main.Succ x); 9.92/4.05 primMinusNat (Main.Succ x) (Main.Succ y) = primMinusNat x y; 9.92/4.05 9.92/4.05 primPlusInt :: MyInt -> MyInt -> MyInt; 9.92/4.05 primPlusInt (Main.Pos x) (Main.Neg y) = primMinusNat x y; 9.92/4.05 primPlusInt (Main.Neg x) (Main.Pos y) = primMinusNat y x; 9.92/4.05 primPlusInt (Main.Neg x) (Main.Neg y) = Main.Neg (primPlusNat x y); 9.92/4.05 primPlusInt (Main.Pos x) (Main.Pos y) = Main.Pos (primPlusNat x y); 9.92/4.05 9.92/4.05 primPlusNat :: Main.Nat -> Main.Nat -> Main.Nat; 9.92/4.05 primPlusNat Main.Zero Main.Zero = Main.Zero; 9.92/4.05 primPlusNat Main.Zero (Main.Succ y) = Main.Succ y; 9.92/4.05 primPlusNat (Main.Succ x) Main.Zero = Main.Succ x; 9.92/4.05 primPlusNat (Main.Succ x) (Main.Succ y) = Main.Succ (Main.Succ (primPlusNat x y)); 9.92/4.05 9.92/4.05 psMyInt :: MyInt -> MyInt -> MyInt; 9.92/4.05 psMyInt = primPlusInt; 9.92/4.05 9.92/4.05 pt :: (c -> b) -> (a -> c) -> a -> b; 9.92/4.05 pt f g x = f (g x); 9.92/4.05 9.92/4.05 succChar :: Main.Char -> Main.Char; 9.92/4.05 succChar = pt toEnumChar (pt (psMyInt (Main.Pos (Main.Succ Main.Zero))) fromEnumChar); 9.92/4.05 9.92/4.05 toEnumChar :: MyInt -> Main.Char; 9.92/4.05 toEnumChar = primIntToChar; 9.92/4.05 9.92/4.05 } 9.92/4.05 9.92/4.05 ---------------------------------------- 9.92/4.05 9.92/4.05 (5) Narrow (EQUIVALENT) 9.92/4.05 Haskell To QDPs 9.92/4.05 9.92/4.05 digraph dp_graph { 9.92/4.05 node [outthreshold=100, inthreshold=100];1[label="succChar",fontsize=16,color="grey",shape="box"];1 -> 3[label="",style="dashed", color="grey", weight=3]; 9.92/4.05 3[label="succChar vx3",fontsize=16,color="black",shape="triangle"];3 -> 4[label="",style="solid", color="black", weight=3]; 9.92/4.05 4[label="pt toEnumChar (pt (psMyInt (Pos (Succ Zero))) fromEnumChar) vx3",fontsize=16,color="black",shape="box"];4 -> 5[label="",style="solid", color="black", weight=3]; 9.92/4.05 5[label="toEnumChar (pt (psMyInt (Pos (Succ Zero))) fromEnumChar vx3)",fontsize=16,color="black",shape="box"];5 -> 6[label="",style="solid", color="black", weight=3]; 9.92/4.05 6[label="primIntToChar (pt (psMyInt (Pos (Succ Zero))) fromEnumChar vx3)",fontsize=16,color="black",shape="box"];6 -> 7[label="",style="solid", color="black", weight=3]; 9.92/4.05 7[label="Char (pt (psMyInt (Pos (Succ Zero))) fromEnumChar vx3)",fontsize=16,color="green",shape="box"];7 -> 8[label="",style="dashed", color="green", weight=3]; 9.92/4.05 8[label="pt (psMyInt (Pos (Succ Zero))) fromEnumChar vx3",fontsize=16,color="black",shape="box"];8 -> 9[label="",style="solid", color="black", weight=3]; 9.92/4.05 9[label="psMyInt (Pos (Succ Zero)) (fromEnumChar vx3)",fontsize=16,color="black",shape="box"];9 -> 10[label="",style="solid", color="black", weight=3]; 9.92/4.05 10[label="primPlusInt (Pos (Succ Zero)) (fromEnumChar vx3)",fontsize=16,color="black",shape="box"];10 -> 11[label="",style="solid", color="black", weight=3]; 9.92/4.05 11[label="primPlusInt (Pos (Succ Zero)) (primCharToInt vx3)",fontsize=16,color="burlywood",shape="box"];36[label="vx3/Char vx30",fontsize=10,color="white",style="solid",shape="box"];11 -> 36[label="",style="solid", color="burlywood", weight=9]; 9.92/4.05 36 -> 12[label="",style="solid", color="burlywood", weight=3]; 9.92/4.05 12[label="primPlusInt (Pos (Succ Zero)) (primCharToInt (Char vx30))",fontsize=16,color="black",shape="box"];12 -> 13[label="",style="solid", color="black", weight=3]; 9.92/4.05 13[label="primPlusInt (Pos (Succ Zero)) vx30",fontsize=16,color="burlywood",shape="box"];37[label="vx30/Pos vx300",fontsize=10,color="white",style="solid",shape="box"];13 -> 37[label="",style="solid", color="burlywood", weight=9]; 9.92/4.05 37 -> 14[label="",style="solid", color="burlywood", weight=3]; 9.92/4.05 38[label="vx30/Neg vx300",fontsize=10,color="white",style="solid",shape="box"];13 -> 38[label="",style="solid", color="burlywood", weight=9]; 9.92/4.05 38 -> 15[label="",style="solid", color="burlywood", weight=3]; 9.92/4.05 14[label="primPlusInt (Pos (Succ Zero)) (Pos vx300)",fontsize=16,color="black",shape="box"];14 -> 16[label="",style="solid", color="black", weight=3]; 9.92/4.05 15[label="primPlusInt (Pos (Succ Zero)) (Neg vx300)",fontsize=16,color="black",shape="box"];15 -> 17[label="",style="solid", color="black", weight=3]; 9.92/4.05 16[label="Pos (primPlusNat (Succ Zero) vx300)",fontsize=16,color="green",shape="box"];16 -> 18[label="",style="dashed", color="green", weight=3]; 9.92/4.05 17[label="primMinusNat (Succ Zero) vx300",fontsize=16,color="burlywood",shape="box"];39[label="vx300/Succ vx3000",fontsize=10,color="white",style="solid",shape="box"];17 -> 39[label="",style="solid", color="burlywood", weight=9]; 9.92/4.05 39 -> 19[label="",style="solid", color="burlywood", weight=3]; 9.92/4.05 40[label="vx300/Zero",fontsize=10,color="white",style="solid",shape="box"];17 -> 40[label="",style="solid", color="burlywood", weight=9]; 9.92/4.05 40 -> 20[label="",style="solid", color="burlywood", weight=3]; 9.92/4.05 18[label="primPlusNat (Succ Zero) vx300",fontsize=16,color="burlywood",shape="box"];41[label="vx300/Succ vx3000",fontsize=10,color="white",style="solid",shape="box"];18 -> 41[label="",style="solid", color="burlywood", weight=9]; 9.92/4.05 41 -> 21[label="",style="solid", color="burlywood", weight=3]; 9.92/4.05 42[label="vx300/Zero",fontsize=10,color="white",style="solid",shape="box"];18 -> 42[label="",style="solid", color="burlywood", weight=9]; 9.92/4.05 42 -> 22[label="",style="solid", color="burlywood", weight=3]; 9.92/4.05 19[label="primMinusNat (Succ Zero) (Succ vx3000)",fontsize=16,color="black",shape="box"];19 -> 23[label="",style="solid", color="black", weight=3]; 9.92/4.05 20[label="primMinusNat (Succ Zero) Zero",fontsize=16,color="black",shape="box"];20 -> 24[label="",style="solid", color="black", weight=3]; 9.92/4.05 21[label="primPlusNat (Succ Zero) (Succ vx3000)",fontsize=16,color="black",shape="box"];21 -> 25[label="",style="solid", color="black", weight=3]; 9.92/4.05 22[label="primPlusNat (Succ Zero) Zero",fontsize=16,color="black",shape="box"];22 -> 26[label="",style="solid", color="black", weight=3]; 9.92/4.05 23[label="primMinusNat Zero vx3000",fontsize=16,color="burlywood",shape="box"];43[label="vx3000/Succ vx30000",fontsize=10,color="white",style="solid",shape="box"];23 -> 43[label="",style="solid", color="burlywood", weight=9]; 9.92/4.05 43 -> 27[label="",style="solid", color="burlywood", weight=3]; 9.92/4.05 44[label="vx3000/Zero",fontsize=10,color="white",style="solid",shape="box"];23 -> 44[label="",style="solid", color="burlywood", weight=9]; 9.92/4.05 44 -> 28[label="",style="solid", color="burlywood", weight=3]; 9.92/4.05 24[label="Pos (Succ Zero)",fontsize=16,color="green",shape="box"];25[label="Succ (Succ (primPlusNat Zero vx3000))",fontsize=16,color="green",shape="box"];25 -> 29[label="",style="dashed", color="green", weight=3]; 9.92/4.05 26[label="Succ Zero",fontsize=16,color="green",shape="box"];27[label="primMinusNat Zero (Succ vx30000)",fontsize=16,color="black",shape="box"];27 -> 30[label="",style="solid", color="black", weight=3]; 9.92/4.05 28[label="primMinusNat Zero Zero",fontsize=16,color="black",shape="box"];28 -> 31[label="",style="solid", color="black", weight=3]; 9.92/4.05 29[label="primPlusNat Zero vx3000",fontsize=16,color="burlywood",shape="box"];45[label="vx3000/Succ vx30000",fontsize=10,color="white",style="solid",shape="box"];29 -> 45[label="",style="solid", color="burlywood", weight=9]; 9.92/4.05 45 -> 32[label="",style="solid", color="burlywood", weight=3]; 9.92/4.05 46[label="vx3000/Zero",fontsize=10,color="white",style="solid",shape="box"];29 -> 46[label="",style="solid", color="burlywood", weight=9]; 9.92/4.05 46 -> 33[label="",style="solid", color="burlywood", weight=3]; 9.92/4.05 30[label="Neg (Succ vx30000)",fontsize=16,color="green",shape="box"];31[label="Pos Zero",fontsize=16,color="green",shape="box"];32[label="primPlusNat Zero (Succ vx30000)",fontsize=16,color="black",shape="box"];32 -> 34[label="",style="solid", color="black", weight=3]; 9.92/4.05 33[label="primPlusNat Zero Zero",fontsize=16,color="black",shape="box"];33 -> 35[label="",style="solid", color="black", weight=3]; 9.92/4.05 34[label="Succ vx30000",fontsize=16,color="green",shape="box"];35[label="Zero",fontsize=16,color="green",shape="box"];} 9.92/4.05 9.92/4.05 ---------------------------------------- 9.92/4.05 9.92/4.05 (6) 9.92/4.05 YES 10.06/4.10 EOF