Replace assert in xaiger with more useful error message
authorDan Ravensloft <dan.ravensloft@gmail.com>
Wed, 10 Mar 2021 19:31:55 +0000 (19:31 +0000)
committerMarcelina Koƛcielnicka <mwk@0x04.net>
Wed, 10 Mar 2021 21:35:06 +0000 (22:35 +0100)
backends/aiger/xaiger.cc

index 27499b64a7aa8ec0c03e658e7bf6b5e762f5e9a9..7ed8ff1cfce5b08a3d1b47a93d43cdde7dc67ec3 100644 (file)
@@ -432,7 +432,8 @@ struct XAigerWriter
                        //   that has been padded to its full width
                        if (bit == State::Sx)
                                continue;
-                       log_assert(!aig_map.count(bit));
+                       if (aig_map.count(bit))
+                               log_error("Visited AIG node more than once; this could be a combinatorial loop that has not been broken - see Yosys bug 2530\n");
                        aig_map[bit] = 2*aig_m;
                }