boolsimplifier 0.1.6 → 0.1.7
raw patch · 2 files changed
+9/−8 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/BoolSimplifier.hs +8/−7
- boolsimplifier.cabal +1/−1
Data/BoolSimplifier.hs view
@@ -5,7 +5,7 @@ Maintainer : gershomb@gmail.com Stability : experimental -Machinery for representing and simplifying simple propositional formulas. Type families are used to maintain a simple normal form, taking advantage of the duality between "And" and "Or". Additional tools are provided to pull out common atoms in subformulas and otherwise iterate until a simplified fixpoint. Full and general simplification is NP-hard, but the tools here can take typical machine-generated formulas and perform most simplifications that could be spotted and done by hand by a reasonable programmer.+Machinery for representing and simplifying simple propositional formulas. Type families are used to maintain a simple normal form, taking advantage of the duality between \"And\" and \"Or\". Additional tools are provided to pull out common atoms in subformulas and otherwise iterate until a simplified fixpoint. Full and general simplification is NP-hard, but the tools here can take typical machine-generated formulas and perform most simplifications that could be spotted and done by hand by a reasonable programmer. -} @@ -116,7 +116,7 @@ -- | smart constructor for @QOp@--- does following optimization: a /\ (a \/ b) <-> a, or dually: a \/ (a /\ b) <-> a+-- does following optimization: a \/\\ (a \\\/ b) \<\-\> a, or dually: a \\\/ (a \/\\ b) \<\-\> a qop :: (Ord a, Show qtyp, Show (QFlipTyp qtyp),@@ -229,7 +229,7 @@ orq x y = qop (S.fromList [x,y]) S.empty --- | (a /\ b) \/ (a /\ c) \/ d <-> (a /\ (b \/ c)) \/ d+-- | (a \/\\ b) \\\/ (a \/\\ c) \\\/ d \<\-\> (a \/\\ (b \\\/ c)) \\\/ d -- (and also the dual) simplifyQueryRep :: (Ord a, Show (QFlipTyp qtyp), Show (QFlipTyp (QFlipTyp qtyp)), QFlipTyp (QFlipTyp qtyp) ~ qtyp) => QueryRep qtyp a -> QueryRep qtyp a@@ -364,13 +364,14 @@ type QNeg QAndTyp = QOrTyp qNot (QOp as cs) = QOp (S.map qNot as) (S.map qNot cs) --- | a /\ (b \/ ~b) /\ (c \/ d) <-> a /\ (c \/ d)--- a /\ ~a /\ (b \/ c) <-> False--- (a \/ ~a) /\ (b \/ ~b) <-> True (*)+-- | +-- > a /\ (b \/ ~b) /\ (c \/ d) <-> a /\ (c \/ d)+-- > a /\ ~a /\ (b \/ c) <-> False+-- > (a \/ ~a) /\ (b \/ ~b) <-> True (*) -- -- and duals ----- N.B. 0-ary \/ is False and 0-ary /\ is True+-- > N.B. 0-ary \/ is False and 0-ary /\ is True -- simplifyIons :: (Ord a, Show (QFlipTyp qtyp), QFlipTyp (QFlipTyp qtyp) ~ qtyp) => QueryRep qtyp (Ion a) -> QueryRep qtyp (Ion a) simplifyIons (QOp as cs)
boolsimplifier.cabal view
@@ -1,5 +1,5 @@ Name: boolsimplifier-Version: 0.1.6+Version: 0.1.7 Synopsis: Simplification tools for simple propositional formulas. Description: Normal form representation for boolean expressions. Typically simplifies such expressions, but is not guaranteed to produce the absolute simplest form.