Quine McClusky algorithm in Haskell

A small program tingu is implemented in haskell. It reads minterms from a file and produce the output on console. It is hosted on github. You can use it like

 ./tingu -i minterms 

Your minterms should be described in a file like following

 vars = 4
minterms = 1,2,5,7,8,9,10,13,15, 

Then output of program is

 Hello, I am Tingu, the mighty crab! And I like tea. You should call me $./tingu -i filename from your terminal. 
** I have found the essential prime implicants of your function. 
** Verifying my answers. It may take some time.... 
+++ OK, passed 100 tests. Peace!! 

Peace !!


3 thoughts on “Quine McClusky algorithm in Haskell

  1. Hey!
    Thank you so much for posting this here hahaha it’s exactly what I needed. But I’m having trouble trying to load it in GHCi, can you help me with that?

    1. I guess you need to compile it using ghc; it won’t load into ghci. Do the following.

      ghc tingu.hs

      This will generate a binary `tingu`. Now you can pass the minterms from a file e.g. `minterms.txt`

      ./tingu -i minterms.txt

      It is working on my system (ubuntu-14.04) with haskell-platform.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s