Skip to content

sid-code/boolalg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

boolalg

boolalg is a boolean algebra system written in Nim. It can simplify boolean algebra expressions in any number of variables to their minimal sum of products form. It comes with a parser to parse boolean algebra expressions (see index.html for instructions).

It uses an ad-hoc algorithm that runs in polynomial time. It works well on small expressions with many variables, unlike Karnaugh maps. However, it cannot simplify arbitrary expressions.

Building

Demo

You can build (and run) the demo by running

$ nim c boolalg

and run it with

$ ./boolalg "(-a)b + ac + bc"

and it will show you the expression's simplest form.

Web application

The library can also be compiled to Nim's JavaScript backend. This is done with the command

$ nim js -o:web/app.js app.nim

To view the application, open web/index.html.

This application is hosted here.

Todo List

  • API documentation

License

MIT