qm: The Quine-McCluskey Algorithm for Minimization of Boolean Functions.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

Ported to Haskell from the Python qm Package (http://pypi.python.org/pypi/qm) and the improved qm (including Petrick's method) by George Prekas (http://github.com/prekageo/optistate).


[Skip to Readme]

Properties

Versions 0.1.0.0
Change log None available
Dependencies base (>=4.8 && <4.9), containers (>=0.5 && <0.6), transformers (>=0.4.2.0) [details]
License MIT
Author Robert Dick, Pat Maupin, George Prekas, Martin Finke
Maintainer martin@basteln.local
Category Logic
Home page https://github.com/martinfinke/qm
Source repo this: git clone https://github.com/martinfinke/qm(tag stable)
Uploaded by basteln at 2015-05-28T15:04:36Z

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for qm-0.1.0.0

[back to package description]

The Quine-McCluskey Algorithm in Haskell

Ported to Haskell from the Python qm Package and the improved qm (including Petrick's method) by George Prekas.

Installation

From GitHub

git clone https://github.com/martinfinke/qm

From Hackage

cabal install qm

Installing Dependencies

cabal install --only-dependencies --enable-tests

Running the Tests

cabal test

Usage

Note: When showing terms, leading zeros are dropped. So 0-10 is shown as -10.

Set of Primes

Finding the set of all primes:

import Qm
let terms = Set.fromList $ map getTerm $ map fromString [
        "0010", "0101", "0110", "1011", "1100", "1110", "1111"
        ]
compute_primes terms -- fromList [-10, 101, -110, 1-11, 11-0, 111-]

Minimum Cover

Find the minimum cover for a list of minterms:

import Qm
let terms = map getTerm $ map fromString [
        "0010", "0101", "0110", "1011", "1100", "1110", "1111"
        ]
qm terms [] [] -- [-10,101,1-11,11-0]

License

See LICENSE file.