Skip to main content

electruth is a collection of boolean logic tools. It can be used as both a command-line tool and a Python library. It understands boolean algebra (to some extent) and can be used to simplify boolean expressions using the Quine-McClusky method. This can be useful if you have a truth table in need of basic shortening. electruth can also be used to compare boolean expressions, which can be very useful if you need to compare a truth table with a schematic you created based on that truth table. electruth can also be used to transform complex boolean expressions into simpler ones consisting only of ANDS, ORS and NOTS.

License

electruth is free software under the terms of the GNU General Public License version 3 (or any later version). The author of electruth is Niels Serup, contactable at ns@metanohi.org. This is version 0.2.0 of the program, the first version to support Python 3.1+ (if you need support for Python 2.6+, you should download v0.1.1).

The libraries used by electruth are GPL-compatible.

Installation

Way #1

Just run this (requires that you have python-setuptools installed):

$ sudo easy_install3 electruth

Way #2

Get the newest version of electruth at http://metanohi.org/projects/electruth/ or at http://pypi.python.org/pypi/electruth

Extract the downloaded file and run this in a terminal:

# python3 setup.py install

Dependencies

Python 3.1+ is a requirement.

qvikconfig

Note that qvikconfig is included with electruth, so you don’t really have to install it.

Optional extras

If present, electruth will also use these Python modules:

termcolor

Note that termcolor is included with electruth, so you don’t really have to install it.

setproctitle

Use

Installing electruth installs a command-line utility named electruth. This program has many settings, and it’s recommended to run electruth --help to get an overview of them.

The program creates boolean expressions from whatever input you give it. If you give it more than one input, it will compare the two inputs (unless if you tell it not to do that). Many inputs are supported:

  • Basic boolean expressions (e.g. A and (B or C) or A * (B + C) (the same))

  • Truthtables, using tab-separated (.tsv) or comma-separated (.csv) values in a file, the first row specifying the names of the inputs and outputs with a < prefix for inputs and a > prefix for outputs.

  • Netlists (.net), e.g. those generated from gnetlist from the gEDA project (gEDA schematics from gschem can also be loaded, but they will be converted to netlists (saved in temporary files) at first).

Some settings can also be set in a config file. Config files use a property = value syntax (e.g. auto compare = false) separated by newlines.

To see the help for electruth, run:

pydoc3 electruth

And especially:

pydoc3 electruth.booleanexpression
pydoc3 electruth.netlist
pydoc3 electruth.truthtable

Development

electruth is written in Python and uses Git for code management. To get the latest branch, download it from gitorious.org like this:

$ git clone git://gitorious.org/electruth/electruth.git

This document

Copyright (C) 2010, 2011 Niels Serup

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

Metadata

Release files for electruth 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for electruth 0.2.0
File Size Uploaded Provenance
electruth-0.2.0.tar.gz 33.0 kB Without provenance Details

Release files / electruth-0.2.0.tar.gz

Download URL electruth-0.2.0.tar.gz
Size 33.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a79145037abf6003b83a09f4f05d95f45dd90a8f7a62f21da94ed35a5f53f4e9
BLAKE2b-256 checksum
How to use checksums
53b35e273f07870988f0938613fc873c4400b57117bf082f97b0af95abd26537
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for electruth 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page