packages feed

aig 0.2.5 → 0.2.6

raw patch · 3 files changed

+12/−3 lines, 3 filesdep ~basenew-uploaderPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

+ Data.AIG.Interface: writeAigerWithLatches :: IsAIG l g => FilePath -> Network l g -> Int -> IO ()
- Data.AIG.Interface: class IsLit l => IsAIG l g | g -> l where withNewGraph p f = newGraph p >>= (`withSomeGraph` f) newGraph p = withNewGraph p (return . SomeGraph) constant g True = trueLit g constant g False = falseLit g asConstant g l | l === trueLit g = Just True | l === falseLit g = Just False | otherwise = Nothing ands g [] = return (trueLit g) ands g (x : r) = foldM (and g) x r or g x y = not <$> and g (not x) (not y) eq g x y = not <$> xor g x y implies g x y = or g (not x) y xor g x y = do { o <- or g x y; a <- and g x y; and g o (not a) } mux g c x y = do { x' <- and g c x; y' <- and g (not c) y; or g x' y' } evaluate (Network g outputs) inputs = do { f <- evaluator g inputs; return (f <$> outputs) }
+ Data.AIG.Interface: class IsLit l => IsAIG l g | g -> l

Files

aig.cabal view
@@ -1,5 +1,5 @@ Name:               aig-Version:            0.2.5+Version:            0.2.6 License:            BSD3 License-file:       LICENSE Author:             Galois Inc.@@ -32,9 +32,9 @@     Data.AIG.Trace    default-Language: Haskell2010-  ghc-options:      -Wall -fno-ignore-asserts -O2+  ghc-options:      -Wall -fno-ignore-asserts   build-depends:-    base == 4.*,+    base >= 4 && < 4.12,     base-compat >= 0.6.0,     mtl,     vector,
src/Data/AIG/Interface.hs view
@@ -196,6 +196,9 @@   -- | Write network out to AIGER file.   writeAiger :: FilePath -> Network l g -> IO () +  -- | Write network out to AIGER file with some inputs designated as latches.+  writeAigerWithLatches :: FilePath -> Network l g -> Int -> IO ()+   -- | Write network out to DIMACS CNF file.   -- Returns vector mapping combinational inputs to CNF Variable   -- numbers.@@ -464,6 +467,9 @@   getInput _g i = return . BasicLit . LitTree . Input $ i    writeAiger _fp _ntk =+     fail "Cannot write AIGER files from the BasicGraph implementation"++  writeAigerWithLatches _fp _ntk _n =      fail "Cannot write AIGER files from the BasicGraph implementation"    writeCNF _g _l _fp =
src/Data/AIG/Trace.hs view
@@ -170,6 +170,9 @@   writeAiger fp0 (Network g outs0) =        (traceOp g "writeAiger" $ \fp outs -> writeAiger fp (Network (tGraph g) (map unTraceLit outs))) fp0 outs0 +  writeAigerWithLatches fp0 (Network g outs0) nl0 =+       (traceOp g "writeAigerWithLatches" $ \fp outs nl -> writeAigerWithLatches fp (Network (tGraph g) (map unTraceLit outs)) nl) fp0 outs0 nl0+   writeCNF g =        traceOp g "writeCNF" $ \out fp -> writeCNF (tGraph g) (unTraceLit out) fp