packages feed

sbv-0.9.22: Data/SBV/TestSuite/CRC/GenPoly.hs

-----------------------------------------------------------------------------
-- |
-- Module      :  Data.SBV.TestSuite.CRC.GenPoly
-- Copyright   :  (c) Levent Erkok
-- License     :  BSD3
-- Maintainer  :  erkokl@gmail.com
-- Stability   :  experimental
-- Portability :  portable
--
-- Test suite for Data.SBV.Examples.CRC.GenPoly
-----------------------------------------------------------------------------

module Data.SBV.TestSuite.CRC.GenPoly(testSuite) where

import Data.SBV
import Data.SBV.Internals
import Data.SBV.Examples.CRC.GenPoly

-- Test suite
testSuite :: SBVTestSuite
testSuite = mkTestSuite $ \_ -> test [
   "crcGood" ~: assert       =<< isSatisfiable crcGoodE
 , "crcGood" ~: assert . not =<< isTheorem (crcGood 3 12)
 ]
 where crcGoodE = do x1 <- exists_
                     x2 <- exists_
                     y1 <- exists_
                     y2 <- exists_
                     return (crcGood 3 0 (x1,x2) (y1,y2))