packages feed

satchmo 2.8.1 → 2.8.2

raw patch · 3 files changed

+13/−8 lines, 3 files

Files

Satchmo/Binary/Op/Common.hs view
@@ -113,7 +113,7 @@ full_adder :: (MonadSAT m)             => Boolean -> Boolean -> Boolean            -> m ( Boolean , Boolean ) -- ^ (result, carry)-full_adder = full_adder_1+full_adder = full_adder_0  full_adder_1 p1 p2 p3 = do     p4 <- boolean ; p5 <- boolean@@ -159,10 +159,16 @@     d <- fun3 ( \ x y z -> 1   < s x y z ) a b c     return ( r, d ) +full_adder_from_half a b c = do+    (p,q) <- half_adder_plain a b+    (r,s) <- half_adder_plain p c+    qs <- or [q,s]+    return ( r, qs )+ half_adder :: (MonadSAT m)             => Boolean -> Boolean             -> m ( Boolean, Boolean ) -- ^ (result, carry)-half_adder = half_adder_1+half_adder = half_adder_plain  half_adder_1 p1 p2 = do     p3 <- boolean ; p4 <- boolean@@ -191,5 +197,6 @@ half_adder_plain a b = do     let s x y = sum $ map fromEnum [x,y]     r <- fun2 ( \ x y -> odd $ s x y ) a b-    d <- fun2 ( \ x y -> 1   < s x y ) a b+    -- d <- fun2 ( \ x y -> 1   < s x y ) a b+    d <- and [ a, b ] -- makes three clauses (not four)     return ( r, d )
Satchmo/SAT/Tmpfile.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-}-{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}+{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, FlexibleContexts #-}  module Satchmo.SAT.Tmpfile 
satchmo.cabal view
@@ -1,18 +1,16 @@ Name:           satchmo-Version:        2.8.1+Version:        2.8.2  License:        GPL License-file:	gpl-2.0.txt Author:         Pepe Iborra, Johannes Waldmann, Alexander Bau Maintainer:	Johannes Waldmann-Homepage:       <https://github.com/jwaldmann/satchmo>+Homepage:       https://github.com/jwaldmann/satchmo Synopsis:       SAT encoding monad description:	Encoding for boolean and integral constraints into CNF-SAT. 		The encoder is provided as a State monad  		(hence the "mo" in "satchmo"). -		This package depends on minisat-haskell-bindings, see-		<https://github.com/niklasso/minisat-haskell-bindings> Category:	Logic cabal-version:  >= 1.6 build-type: Simple