Upgrade Guide¶
This document describes breaking changes and how to upgrade.
0.1.0¶
The aigverse library has been refactored into multiple extension modules to improve organization and scalability. If
you are upgrading from an older version, you will need to update your imports.
This version also includes an API rework for AIG optimization workflows.
Key Changes¶
Networks:
Aig,SequentialAig,NamedAig, etc.,AigEdge,AigEdgeList,AigIndexListand helper types are now inaigverse.networks.Algorithms:
balancing,equivalence_checking,simulate, etc. are now inaigverse.algorithms. All of their parameters except the input networks are now keyword-only for better readability.IO: Reading/Writing functions are now in
aigverse.io.Utils:
TruthTableand its free operation functions are now inaigverse.utils.
Optimization and cleanup behavior¶
aig_resubstitution,sop_refactoring,aig_cut_rewriting, andbalancingnow return a new cleanedAigby default.aig_resubstitutionandsop_refactoringsupport theinplacekeyword argument (defaultFalse). Withinplace=True, the input network is mutated, and the return value isNone.cleanup_danglingmoved fromAigmember API toaigverse.algorithms.cleanup_dangling.
Before¶
from aigverse.algorithms import aig_resubstitution
aig_resubstitution(aig)
After¶
from aigverse.algorithms import aig_resubstitution, cleanup_dangling
# Return-new default
aig = aig_resubstitution(aig)
# Optional in-place mode for performance-oriented pipelines
aig_resubstitution(aig, inplace=True)
aig = cleanup_dangling(aig)
Performance note¶
If you intentionally chain inplace=True optimization calls for speed, you are responsible for calling
cleanup_dangling at appropriate checkpoints.
Conversion API changes¶
Removed free functions:
to_edge_list(ntk)to_index_list(ntk)to_aig(il)
Added member methods:
Aig.to_edge_list(...)Aig.to_index_list()AigIndexList.to_aig()
Before¶
from aigverse.networks import to_edge_list, to_index_list, to_aig
el = to_edge_list(aig)
il = to_index_list(aig)
aig2 = to_aig(il)
After¶
el = aig.to_edge_list()
il = aig.to_index_list()
aig2 = il.to_aig()
File I/O¶
Before¶
from aigverse import Aig, read_aiger_into_aig
aig = read_aiger_into_aig("design.aig")
After¶
from aigverse.networks import Aig
from aigverse.io import read_aiger_into_aig
aig = read_aiger_into_aig("design.aig")
Pythonic properties¶
Network query methods are now read-only properties instead of callable methods.
Before (method) |
After (property) |
Affected (base) types |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AigSignal accessors follow the same rule and are now read-only properties.
Before (method) |
After (property) |
|---|---|
|
|
|
|
|
|
Migration hint: replace method calls with direct property access (drop ()), e.g. signal.get_index() ->
signal.index.
Before¶
print(f"AIG has {aig.num_pis()} inputs and {aig.num_gates()} gates")
After¶
print(f"AIG has {aig.num_pis} inputs and {aig.num_gates} gates")
API policy¶
The package root intentionally does not re-export network classes or algorithm functions to lazily import extension
modules.
Use explicit modular imports (e.g. aigverse.networks, aigverse.algorithms, aigverse.io, aigverse.utils).