Copyright | Galois, Inc. 2010-2014 |
---|---|
License | BSD3 |
Maintainer | jhendrix@galois.com |
Stability | stable |
Portability | non-portable (language extensions) |
Safe Haskell | None |
Language | Haskell98 |
Warning: The Data.ABC.AIG module has known bugs (http:/github.comGaloisIncabcBridgeissues/4) for which solutions do not currently exist. Consider using Data.ABC.GIA instead.
Data.ABC.AIG defines a set of higher level functions for manipulating
and-inverter graph networks (AIG
) directly from ABC. This module
should be imported qualified
, e.g.
import Data.ABC.AIG (AIG) import qualified Data.ABC.AIG as AIG
- data AIG s
- newAIG :: IO (SomeGraph AIG)
- readAiger :: FilePath -> IO (Network Lit AIG)
- proxy :: Proxy Lit AIG
- data Lit s
- true :: AIG s -> Lit s
- false :: AIG s -> Lit s
- writeAIGManToCNFWithMapping :: Aig_Man_t -> FilePath -> IO (Vector Int)
- checkSat' :: Ptr Abc_Ntk_t -> IO SatResult
- data Network l g :: (* -> *) -> (* -> *) -> * where
- networkInputCount :: Network l g -> IO Int
- class IsLit l => IsAIG l g | g -> l where
- withNewGraph :: Proxy l g -> (forall s. g s -> IO a) -> IO a
- newGraph :: Proxy l g -> IO (SomeGraph g)
- aigerNetwork :: Proxy l g -> FilePath -> IO (Network l g)
- trueLit :: g s -> l s
- falseLit :: g s -> l s
- constant :: g s -> Bool -> l s
- asConstant :: g s -> l s -> Maybe Bool
- newInput :: g s -> IO (l s)
- and :: g s -> l s -> l s -> IO (l s)
- ands :: g s -> [l s] -> IO (l s)
- or :: g s -> l s -> l s -> IO (l s)
- eq :: g s -> l s -> l s -> IO (l s)
- implies :: g s -> l s -> l s -> IO (l s)
- xor :: g s -> l s -> l s -> IO (l s)
- mux :: g s -> l s -> l s -> l s -> IO (l s)
- inputCount :: g s -> IO Int
- getInput :: g s -> Int -> IO (l s)
- writeAiger :: FilePath -> Network l g -> IO ()
- writeCNF :: g s -> l s -> FilePath -> IO [Int]
- checkSat :: g s -> l s -> IO SatResult
- cec :: Network l g -> Network l g -> IO VerifyResult
- evaluator :: g s -> [Bool] -> IO (l s -> Bool)
- evaluate :: Network l g -> [Bool] -> IO [Bool]
- litView :: g s -> l s -> IO (LitView (l s))
- abstractEvaluateAIG :: g s -> (LitView a -> IO a) -> IO (l s -> IO a)
- class IsLit l where
- data SatResult :: *
- = Unsat
- | Sat ~[Bool]
- | SatUnknown
- data VerifyResult :: *
- = Valid
- | Invalid [Bool]
- | VerifyUnknown
- data SomeGraph g :: (* -> *) -> * where
Documentation
writeAIGManToCNFWithMapping :: Aig_Man_t -> FilePath -> IO (Vector Int) Source #
Convert the network referred to by an AIG manager into CNF format and write to a file, returning a mapping from ABC object IDs to CNF variable numbers.
Re-exports
data Network l g :: (* -> *) -> (* -> *) -> * where #
A network is an and-invertor graph paired with it's outputs, thus representing a complete combinational circuit.
networkInputCount :: Network l g -> IO Int #
Get number of inputs associated with current network.
class IsLit l => IsAIG l g | g -> l where #
An And-Inverter-Graph is a data structure storing bit-level nodes.
Graphs are and-inverter graphs, which contain a number of input literals and Boolean operations for creating new literals. Every literal is part of a specific graph, and literals from different networks may not be mixed.
Both the types for literals and graphs must take a single phantom type for an arugment that is used to ensure that literals from different networks cannot be used in the same operation.
Satisfiability check result.
Unsat | |
Sat ~[Bool] | |
SatUnknown |
data VerifyResult :: * #
Result of a verification check.