cjdrake / pyeda

Python EDA
BSD 2-Clause "Simplified" License
305 stars 55 forks source link

Boolean Function Unknown Values #102

Closed cjdrake closed 7 years ago

cjdrake commented 10 years ago

Currently, PyEDA only supports constant zero and one. There is value to extending the set of Boolean constants to include the following values:

These two values can be used to optimistically or pessimistically evaluate functions. For example, And(0, logical) would always be 0, but And(0, illogical) would always be illogical.

The encoding of logical will be 2, and the encoding of illogical will be 3.

The implementation needs to support this as an optional feature in a function representation. It makes sense for expressions, but not for all representations. For example, implicant tables use positional cube notation to represent multi-valued logic, which has different usage and semantics.

cjdrake commented 7 years ago

Closing this one, b/c I implemented a version of this functionality in the boolexpr library.