packages feed

cudd 0.1.0.3.1 → 0.1.0.4

raw patch · 2 files changed

+62/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

+ Readme.md view
@@ -0,0 +1,56 @@+# Haskell-CUDD++Haskell bindings to version 3.0.0 of the CUDD binary decision diagram library.++http://vlsi.colorado.edu/~fabio/CUDD/++This package provides two interfaces to the CUDD library:+* A purely functional one in `Cudd.Cudd` that automatically dereferences BDDs during garbage collection.+* An ST Monad based one in `Cudd.Imperative` that gives you precise control over the ordering of BDD operations and when BDDs are dereferenced. Use this one if you want your code to perform well.++Also, for a higher level interface in the style of the [ersatz](https://hackage.haskell.org/package/ersatz) SAT encoder, see https://github.com/jwaldmann/cudd-ersatz/.++# Installation++Either install CUDD 3.0.0 using your system's package manager or download and install CUDD from here: http://vlsi.colorado.edu/~fabio/.++Then:++`cabal install cudd`++Depending on where CUDD is installed on your system, you may need to provide --extra-lib-dirs or --extra-include-dirs:++`cabal install cudd --extra-lib-dirs=/usr/local/lib`++# Usage++The purely functional interface:++```haskell+import Cudd.Cudd++main = do+    let manager = cuddInit+        v1      = ithVar manager 0+        v2      = ithVar manager 1+        conj    = bAnd manager v1 v2+        implies = lEq manager conj v1+    print implies+```++The ST Monad based interface:++```haskell+import Control.Monad.ST+import Cudd.Imperative++main = do+    res <- stToIO $ withManagerDefaults $ \manager -> do+        v1      <- ithVar manager 0+        v2      <- ithVar manager 1+        conj    <- bAnd manager v1 v2+        implies <- lEq manager conj v1+        deref manager conj+        return implies+    print res+```
cudd.cabal view
@@ -1,7 +1,7 @@ -- Initial cudd.cabal generated by cabal init.  For further  -- documentation, see http://haskell.org/cabal/users-guide/ name:                cudd-version:             0.1.0.3.1+version:             0.1.0.4 synopsis:            Bindings to the CUDD binary decision diagrams library description:              Bindings to version 3.0.0 of the CUDD binary decision diagrams library. @@ -16,6 +16,10 @@     .     "cabal install cudd"     .+    Depending on where CUDD is installed on your system, you may need to provide --extra-lib-dirs or --extra-include-dirs:+    .+    "cabal install cudd --extra-lib-dirs=\/usr\/local\/lib"+    .     /Usage/     .     This package provides two interfaces to the CUDD library:@@ -35,7 +39,7 @@ homepage:            https://github.com/adamwalker/haskell_cudd bug-reports:         https://github.com/adamwalker/haskell_cudd/issues build-type:          Simple--- extra-source-files:  +extra-source-files:  Readme.md cabal-version:       >=1.10  @@ -66,5 +70,4 @@         c_sources/cuddwrap.c,          c_sources/stubs.c     extra-libraries:     cudd, m-    extra-lib-dirs:      /usr/local/lib