lsils / mockturtle

C++ logic network library
MIT License
210 stars 139 forks source link

Fix node substitution #551

Closed yashton closed 2 years ago

yashton commented 2 years ago

Substitution is missing check for substituting same node and for liveliness

XMG, XAG, and MIG are missing updates to the substitution methods that are present in AIG.

hriener commented 2 years ago

Looks mostly good to me.

However, the tests seem to fail with your changes (substituting a node with its complement in particular). Moreover, you should add tests for substitute_nodes. (There are maybe other tests that should be updated too.)

yashton commented 2 years ago

Great, I'll get the test passing and expanded.

lee30sonia commented 2 years ago

Fixed by #560