Aiger to BDD bridge.
Project description
py-aiger-bdd
Installation
$ pip install py-aiger-bdd
For developers, note that this project uses the poetry python package/dependency management tool. Please familarize yourself with it and then run:
$ poetry install
Usage
This tutorial assumes familiarity with py-aiger and py-aiger-bv.
import aigerbv
from aiger_bdd import to_bdd, from_bdd, count
x = aigerbv.atom(3, 'x', signed=False)
expr = x < 5 # Could be an AIG or AIGBV or BoolExpr.
bdd, manager, input2var = to_bdd(expr) # Convert circuit encoded by expr into a BDD.
expr2 = from_bdd(bdd) # Creates an Aiger Expression from a BDD.
assert count(expr, fraction=True) == 5/8
assert count(expr, fraction=False) == 5
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-aiger-bdd-0.2.3.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for py_aiger_bdd-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af2f1b1927c158d7bd458d3de5c2e1e9a30c936c4b887337f8958bdf06113d1d |
|
MD5 | 68345a2819e59e57d4b53a57168955d5 |
|
BLAKE2b-256 | e05e62039c2d57fcc4f7e4dff42b1f8e975f431ac283e944c44b8881034c5a79 |