Various XAG optimization algorithms

Header: mockturtle/algorithms/xag_optimization.hpp

inline xag_network mockturtle::xag_constant_fanin_optimization(xag_network const &xag)

Optimizes some AND gates by computing transitive linear fanin.

This function reevaluates the transitive linear fanin for each AND gate. This is a subnetwork composed of all immediate XOR gates in the transitive fanin cone until primary inputs or AND gates are reached. This linear transitive fanin might be constant for some fanin due to the cancellation property of the XOR operation. In such cases the AND gate can be replaced by a constant or a fanin.

inline xag_network mockturtle::xag_dont_cares_optimization(xag_network const &xag)

Optimizes some AND gates using satisfiability don’t cares.

If an AND gate is satisfiability don’t care for assignment 00, it can be replaced by an XNOR gate, therefore reducing the multiplicative complexity.

inline xag_network mockturtle::linear_resynthesis_optimization(xag_network const &xag, std::function<xag_network(xag_network const&)> linear_resyn, std::function<void(std::vector<uint32_t> const&)> const &on_ignore_inputs = {})

Optimizes XOR gates by linear network resynthesis.

See exact_linear_resynthesis_optimization for an example implementation of this function.

template<bill::solvers Solver = bill::solvers::glucose_41>
inline xag_network mockturtle::exact_linear_resynthesis_optimization(xag_network const &xag, uint32_t conflict_limit = 0u)

Optimizes XOR gates by exact linear network resynthesis.