# `aigverse` - A Python Library for Logic Networks, Synthesis, and Optimization

\\begin{abstract}

`aigverse` is an open-source C++17 and Python infrastructure library for working with logic networks, synthesis, and
optimization in Python-first workflows.

It builds directly upon the [EPFL Logic Synthesis Libraries](https://arxiv.org/abs/1805.05121),
particularly [mockturtle](https://github.com/lsils/mockturtle), [kitty](https://github.com/lsils/kitty),
and [lorina](https://github.com/hriener/lorina), and exposes these mature C++ capabilities through an idiomatic Python
interface. This allows users to run synthesis workflows from Python without reimplementing core algorithms there. The
result is reusable support for And-Inverter Graph (AIG) construction and manipulation, optimization and equivalence
checking, dataset generation, and export into graph and numeric representations for downstream data science and ML
pipelines.

Key features include:

- Efficient logic representation using And-Inverter Graphs (AIGs)
- Support for various file formats (AIGER, Verilog, Bench, PLA)
- High-performance C++ backend with a Pythonic interface
- Optional adapters for graph and numeric interoperability in machine learning and data science workflows
- Comprehensive tools for logic synthesis and optimization
- On-demand access to standard benchmark suites (e.g., EPFL), downloaded once and cached locally
- An optional bridge to an externally installed [ABC](https://github.com/berkeley-abc/abc) for its optimization scripts

`aigverse` is designed as reusable bridge infrastructure rather than as a full end-to-end EDA toolchain.

This documentation provides a comprehensive guide to the `aigverse` library, including
[installation instructions](installation.html.md), a [quickstart guide](aigs.html.md), and detailed
[API documentation](api/aigverse/index.html.md).
The source code of `aigverse` is publicly available on GitHub
at [marcelwa/aigverse](https://github.com/marcelwa/aigverse), while pre-built binaries are available
via [PyPI](https://pypi.org/project/aigverse/) for all major operating systems and all modern Python versions.

#### SEE ALSO
For a deeper dive into the vision and technical details behind `aigverse`, see the presentation **“aigverse: Toward machine learning-driven logic synthesis”** from the [Free Silicon Conference (FSiC) 2025](https://wiki.f-si.org/index.php?title=FSiC2025). The [slides are available on the FSiC wiki](https://wiki.f-si.org/index.php?title=Aigverse:_Toward_machine_learning-driven_logic_synthesis) and cover the motivation, architecture, and future directions of the `aigverse` project.

\\end{abstract}

\\sphinxtableofcontents

# User Guide

* [Installation](installation.html.md)
  * [Core Library](installation.html.md#core-library)
  * [Machine Learning Adapters](installation.html.md#machine-learning-adapters)
  * [ABC Integration](installation.html.md#abc-integration)
* [And-Inverter Graphs (AIGs)](aigs.html.md)
  * [Quickstart](aigs.html.md#quickstart)
  * [Basic AIG Concepts](aigs.html.md#basic-aig-concepts)
  * [AIG Views](aigs.html.md#aig-views)
  * [File I/O](aigs.html.md#file-i-o)
  * [Index Lists](aigs.html.md#index-lists)
  * [Edge Lists](aigs.html.md#edge-lists)
  * [`pickle` Support](aigs.html.md#pickle-support)
* [Truth Tables](truth_tables.html.md)
  * [Creating Truth Tables](truth_tables.html.md#creating-truth-tables)
  * [Basic Manipulation](truth_tables.html.md#basic-manipulation)
  * [Truth Table Properties](truth_tables.html.md#truth-table-properties)
  * [Truth Table Simulation](truth_tables.html.md#truth-table-simulation)
  * [`pickle` Support](truth_tables.html.md#pickle-support)
* [Algorithms](algorithms.html.md)
  * [Simulation](algorithms.html.md#simulation)
  * [Optimization](algorithms.html.md#optimization)
  * [Equivalence Checking](algorithms.html.md#equivalence-checking)
* [Generators](generators.html.md)
  * [Random AIG Generation](generators.html.md#random-aig-generation)
  * [Python-Side Batching](generators.html.md#python-side-batching)
  * [Structured Benchmark Builders](generators.html.md#structured-benchmark-builders)
  * [Control Generators](generators.html.md#control-generators)
* [Benchmarks](benchmarks.html.md)
  * [The EPFL suite](benchmarks.html.md#the-epfl-suite)
  * [Revisions](benchmarks.html.md#revisions)
  * [Where downloads are cached](benchmarks.html.md#where-downloads-are-cached)
* [ABC Integration](abc.html.md)
  * [Named scripts](abc.html.md#named-scripts)
  * [Individual commands](abc.html.md#individual-commands)
  * [Arbitrary commands](abc.html.md#arbitrary-commands)
  * [Running many networks at once](abc.html.md#running-many-networks-at-once)
  * [What ABC thinks of a network](abc.html.md#what-abc-thinks-of-a-network)
  * [Sequential networks](abc.html.md#sequential-networks)
  * [Type preservation and limitations](abc.html.md#type-preservation-and-limitations)
  * [When things go wrong](abc.html.md#when-things-go-wrong)
  * [A worked study](abc.html.md#a-worked-study)
  * [Keeping the scripts in sync](abc.html.md#keeping-the-scripts-in-sync)
  * [Using your own aliases](abc.html.md#using-your-own-aliases)
* [Machine Learning Integration](machine_learning.html.md)
  * [Adapters](machine_learning.html.md#adapters)
  * [Dataset Generation](machine_learning.html.md#dataset-generation)
  * [NetworkX](machine_learning.html.md#networkx)
  * [DLPack Tensors](machine_learning.html.md#dlpack-tensors)
  * [Truth Tables](machine_learning.html.md#truth-tables)
* [Visualization](visualization.html.md)
  * [Graphviz (DOT) Export](visualization.html.md#graphviz-dot-export)
  * [NetworkX and Matplotlib](visualization.html.md#networkx-and-matplotlib)
  * [Highlighting Critical Paths and Fanout](visualization.html.md#highlighting-critical-paths-and-fanout)
  * [Interactive Exploration](visualization.html.md#interactive-exploration)
  * [Before vs. After: Visualizing Optimization](visualization.html.md#before-vs-after-visualizing-optimization)
* [Changelog](CHANGELOG.html.md)
  * [Unreleased](CHANGELOG.html.md#unreleased)
  * [0.1.5 - 2026-08-24](CHANGELOG.html.md#id1)
  * [0.1.4 - 2026-08-19](CHANGELOG.html.md#id5)
  * [0.1.3 - 2026-08-04](CHANGELOG.html.md#id9)
  * [0.1.2 - 2026-07-24](CHANGELOG.html.md#id13)
  * [0.1.1 - 2026-05-18](CHANGELOG.html.md#id17)
  * [0.1.0 - 2026-05-09](CHANGELOG.html.md#id19)
* [Upgrade Guide](UPGRADING.html.md)
  * [0.1.0](UPGRADING.html.md#id1)

# Developers

* [Contributing](contributing.html.md)
* [Support & Consulting](support.html.md)
* [Development Guide](DevelopmentGuide.html.md)
