Properly handle "simulated-states" property in twagraph::defrag_states.

* spot/twa/twagraph.cc: Implement the change.
* spot/twaalgos/simulation.hh: Improve documentation.
* tests/python/simstate.py: Improve the test.
* doc/org/concepts.org: Typo.
This commit is contained in:
Maximilien Colange 2017-06-05 14:43:29 +02:00
parent acbb51062a
commit 4f8a8f7305
4 changed files with 38 additions and 2 deletions

View file

@ -620,6 +620,16 @@ namespace spot
}
dl->resize(used_states);
}
if (auto ss = get_named_prop<std::vector<unsigned>>("simulated-states"))
{
for (auto& s : *ss)
{
if (s >= newst.size())
s = -1U;
else
s = newst[s];
}
}
init_number_ = newst[init_number_];
g_.defrag_states(std::move(newst), used_states);
}