bex-py
This is a python binding for the bex crate, a library for boolean expression manipulation. It is inspired by and intends to be mostly compatible with the dd package.
Installation
pip install tangentstorm-bex
Usage
Here's a simple example of how to use the bex module:
import bex
# Create a BDD base
base = bex.BddBase()
# Create some variables
a = bex.nvar(0)
b = bex.nvar(1)
# Perform some operations
c = base.op_and(a, b)
d = base.op_or(a, b)
# Print the results
print(f"a & b = {c}")
print(f"a | b = {d}")
Here's a simple example of how to use the dd_bex module:
from bex.dd import BDD
bdd = BDD()
bdd.declare('x0', 'x1', 'x2')
n = bdd.add_expr('(x0 & x1) | x2')
bdd.dump('and-or.svg', [n])
import webbrowser
webbrowser.open('and-or.svg')
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for tangentstorm-bex 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tangentstorm_bex-0.3.0.tar.gz | 339.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tangentstorm_bex-0.3.0-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
Total release size: 735.4 kB
Release files / tangentstorm_bex-0.3.0.tar.gz
| Download URL | tangentstorm_bex-0.3.0.tar.gz |
|---|---|
| Size | 339.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c918e257493fbb7cdbf2471daf9e29c8489bd9fe6f9ac779f212327bf272eea
|
|
BLAKE2b-256 checksum How to use checksums |
4b6c92e290999caaa33a6a99c169e2554a723157e51a510bc1074c7f73e48565
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.2
|
Release files / tangentstorm_bex-0.3.0-cp311-cp311-win_amd64.whl
| Download URL | tangentstorm_bex-0.3.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 396.1 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0e3b7b26491c3541edeff1392b44ffad8de239730a838ec3b8606b000c2877c2
|
|
BLAKE2b-256 checksum How to use checksums |
585ebd26b0adcdc3545e4b847f48c2fcaf3d2f2302205738bd73403f26297265
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.2
|