Replace log_assert() with meaningful log_error()
authorEddie Hung <eddie@fpgeh.com>
Fri, 28 Jun 2019 18:28:29 +0000 (11:28 -0700)
committerEddie Hung <eddie@fpgeh.com>
Fri, 28 Jun 2019 19:54:44 +0000 (12:54 -0700)
frontends/aiger/aigerparse.cc

index 7008d0542f29fdc6a56a94198d8bd8f1f445a789..1ac0f7ba465cc87fa735ba31c95e61a56d7384eb 100644 (file)
@@ -376,7 +376,11 @@ void AigerReader::parse_xaiger()
                        continue;
                if (m->name.begins_with("$paramod"))
                        continue;
-               auto r = box_lookup.insert(std::make_pair(it->second.as_int(), m->name));
+               auto id = it->second.as_int();
+               auto r = box_lookup.insert(std::make_pair(id, m->name));
+               if (!r.second)
+                       log_error("Module '%s' has the same abc_box_id = %d value as '%s'.\n",
+                                       log_id(m), id, log_id(r.first->second));
                log_assert(r.second);
        }