Skip to content

mvcisback/py-aiger-bdd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-aiger-bdd

Build Status 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

About

Aiger <-> BDD bridge.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages