Skip to main content

Aiger to BDD bridge.

Project description

py-aiger-bdd

Build Status codecov

PyPI version License: MIT

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 aiger_bv as BV
from aiger_bdd import to_bdd, from_bdd, count

x = BV.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for py-aiger-bdd, version 3.0.3
Filename, size File type Python version Upload date Hashes
Filename, size py_aiger_bdd-3.0.3-py3-none-any.whl (4.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size py-aiger-bdd-3.0.3.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page