module Data.ABC.Internal.FRAIG
( Prove_Params_t_(..)
, proveParamsDefault
) where
import Control.Applicative ((<$>), (<*>))
import Control.Monad
import Foreign
import Foreign.C
import qualified System.IO.Unsafe as Unsafe
type Prove_Params_t = Ptr (Prove_Params_t_)
data Prove_Params_t_ = Prove_Params_t_
{
fUseFraiging'Prove_Params :: Bool
, fUseRewriting'Prove_Params :: Bool
, fUseBdds'Prove_Params :: Bool
, fVerbose'Prove_Params :: Bool
, nItersMax'Prove_Params :: Int
, nMiteringLimitStart'Prove_Params :: Int
, nMiteringLimitMulti'Prove_Params :: Float
, nRewritingLimitStart'Prove_Params :: Int
, nRewritingLimitMulti'Prove_Params :: Float
, nFraigingLimitStart'Prove_Params :: Int
, nFraigingLimitMulti'Prove_Params :: Float
, nBddSizeLimit'Prove_Params :: Int
, fBddReorder'Prove_Params :: Bool
, nMiteringLimitLast'Prove_Params :: Int
, nTotalBacktrackLimit'Prove_Params :: Int64
, nTotalInspectLimit'Prove_Params :: Int64
, nTotalBacktracksMade'Prove_Params :: Int64
, nTotalInspectsMade'Prove_Params :: Int64
} deriving (Read, Show, Eq)
instance Storable Prove_Params_t_ where
sizeOf _ = 88
alignment _ = 4
peek p = Prove_Params_t_
<$> liftM toBool ((\ptr -> do {peekByteOff ptr 0 ::IO CInt}) p)
<*> liftM toBool ((\ptr -> do {peekByteOff ptr 4 ::IO CInt}) p)
<*> liftM toBool ((\ptr -> do {peekByteOff ptr 8 ::IO CInt}) p)
<*> liftM toBool ((\ptr -> do {peekByteOff ptr 12 ::IO CInt}) p)
<*> liftM fromIntegral ((\ptr -> do {peekByteOff ptr 16 ::IO CInt}) p)
<*> liftM fromIntegral ((\ptr -> do {peekByteOff ptr 20 ::IO CInt}) p)
<*> liftM realToFrac ((\ptr -> do {peekByteOff ptr 24 ::IO CFloat}) p)
<*> liftM fromIntegral ((\ptr -> do {peekByteOff ptr 28 ::IO CInt}) p)
<*> liftM realToFrac ((\ptr -> do {peekByteOff ptr 32 ::IO CFloat}) p)
<*> liftM fromIntegral ((\ptr -> do {peekByteOff ptr 36 ::IO CInt}) p)
<*> liftM realToFrac ((\ptr -> do {peekByteOff ptr 40 ::IO CFloat}) p)
<*> liftM fromIntegral ((\ptr -> do {peekByteOff ptr 44 ::IO CInt}) p)
<*> liftM toBool ((\ptr -> do {peekByteOff ptr 48 ::IO CInt}) p)
<*> liftM fromIntegral ((\ptr -> do {peekByteOff ptr 52 ::IO CInt}) p)
<*> liftM fromIntegral ((\ptr -> do {peekByteOff ptr 56 ::IO CLong}) p)
<*> liftM fromIntegral ((\ptr -> do {peekByteOff ptr 64 ::IO CLong}) p)
<*> liftM fromIntegral ((\ptr -> do {peekByteOff ptr 72 ::IO CLong}) p)
<*> liftM fromIntegral ((\ptr -> do {peekByteOff ptr 80 ::IO CLong}) p)
poke p x = do
(\ptr val -> do {pokeByteOff ptr 0 (val::CInt)}) p (fromBool $ fUseFraiging'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 4 (val::CInt)}) p (fromBool $ fUseRewriting'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 8 (val::CInt)}) p (fromBool $ fUseBdds'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 12 (val::CInt)}) p (fromBool $ fVerbose'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 16 (val::CInt)}) p (fromIntegral $ nItersMax'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 20 (val::CInt)}) p (fromIntegral $ nMiteringLimitStart'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 24 (val::CFloat)}) p (realToFrac $ nMiteringLimitMulti'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 28 (val::CInt)}) p (fromIntegral $ nRewritingLimitStart'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 32 (val::CFloat)}) p (realToFrac $ nRewritingLimitMulti'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 36 (val::CInt)}) p (fromIntegral $ nFraigingLimitStart'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 40 (val::CFloat)}) p (realToFrac $ nFraigingLimitMulti'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 44 (val::CInt)}) p (fromIntegral $ nBddSizeLimit'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 48 (val::CInt)}) p (fromBool $ fBddReorder'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 52 (val::CInt)}) p (fromIntegral $ nMiteringLimitLast'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 56 (val::CLong)}) p (fromIntegral $ nTotalBacktrackLimit'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 64 (val::CLong)}) p (fromIntegral $ nTotalInspectLimit'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 72 (val::CLong)}) p (fromIntegral $ nTotalBacktracksMade'Prove_Params x)
(\ptr val -> do {pokeByteOff ptr 80 (val::CLong)}) p (fromIntegral $ nTotalInspectsMade'Prove_Params x)
proveParamsSetDefault :: IO ((Prove_Params_t_))
proveParamsSetDefault =
alloca $ \a1' ->
proveParamsSetDefault'_ a1' >>
peek a1'>>= \a1'' ->
return (a1'')
proveParamsDefault :: Prove_Params_t_
proveParamsDefault = Unsafe.unsafePerformIO proveParamsSetDefault
foreign import ccall safe "Data/ABC/Internal/FRAIG.chs.h Prove_ParamsSetDefault"
proveParamsSetDefault'_ :: ((Prove_Params_t) -> (IO ()))