ng: ensure that only match states have reports

Ensure (and assert) that vertices without an edge to {accept, acceptEod}
do not have reports set.
This commit is contained in:
Justin Viiret
2016-07-18 12:41:31 +10:00
committed by Matthew Barr
parent 3d9a60d023
commit 4ce268af47
10 changed files with 70 additions and 20 deletions

View File

@@ -363,6 +363,12 @@ void splitIntoComponents(const NGHolder &g, deque<unique_ptr<NGHolder>> &comps,
*shell_comp = true;
}
// Ensure that only vertices with accept edges have reports.
for (auto &gc : comps) {
assert(gc);
clearReports(*gc);
}
// We should never produce empty component graphs.
assert(all_of(begin(comps), end(comps),
[](const unique_ptr<NGHolder> &g_comp) {