module Main (main) where import Control.Monad import Test.QuickCheck import Logic import DNF import System.Random import System.Environment repeatM :: Monad m => m a -> m [a] repeatM m = liftM2 (:) m (repeatM m) formula :: [Logic] formula = generate 100 (mkStdGen 280578) (repeatM arbitrary) main :: IO () main = do args <- getArgs let (dnf, nr) = case args of ["1"] -> (dnf1, 10000) ["2"] -> (dnf2, 50000) ["3"] -> (dnf3, 50000) ["4"] -> (dnf4, 100000) _ -> error "invalid argument" let p l = if isDNF (runStrategy dnf l) then True else error (show l) if all p $ take nr formula then reportTick else putStrLn "ERROR!"