`substitute_node`: Should it be allowed to substitute with a dead node?
Closed this issue · 2 comments
lee30sonia commented
The quality test (to be more specific, "Test quality improvement of MIG cut rewriting with compatibility graph and NPN4 resynthesis"
) does not pass anymore after the fix of #560. This is because cut_rewriting_with_compatibility_graph
tries to substitute with a dead node and "revive" it. There are a few possible fixes:
- Remove tests for
cut_rewriting_with_compatibility_graph
, as we already know this algorithm is buggy and is not recommended to use. - Modify
cut_rewriting_with_compatibility_graph
to skip the substitution if the replacement is dead. This will affect the quality ofcut_rewriting_with_compatibility_graph
, so the expected number in the quality test will also be modified. Also,is_dead
needs to be implemented forklut_network
. - Modify
cut_rewriting_with_compatibility_graph
to usesubstitute_nodes
. For this,substitute_nodes
needs to be implemented for other network types than AIG. With a quick experiment, this fix also affected the quality ofcut_rewriting_with_compatibility_graph
, and ended up in an infinite while loop in"Test quality improvement of cut rewriting with AIG NPN4 resynthesis"
, meaning that there might be some other problems... - Correctly deal with the case where the new signal is dead in
substitute_node
to "revive" it. This will affect other networks and algorithms, but also makes sense to some extent. So the question is: should this be allowed?
lee30sonia commented
#567 will fix the issue with the second solution above. However, I will keep this issue open as the other possibilities (especially the last one) could still be discussed.
lee30sonia commented