twa: add accepting_run() and accepting_word() methods
Fixes #153. * spot/twa/twa.cc, spot/twa/twa.hh: Add the methods. * bin/autfilt.cc, bin/common_aoutput.hh, bin/ltlcross.cc, tests/python/highlighting.ipynb, tests/python/word.ipynb: Use them to simplify the code. * NEWS: Mention them.
This commit is contained in:
parent
3836ea8d18
commit
014a9dbd6b
8 changed files with 145 additions and 71 deletions
|
|
@ -178,15 +178,10 @@ public:
|
|||
}
|
||||
if (has('w'))
|
||||
{
|
||||
auto res = spot::couvreur99(aut)->check();
|
||||
if (res)
|
||||
if (auto word = aut->accepting_word())
|
||||
{
|
||||
auto run = res->accepting_run();
|
||||
assert(run);
|
||||
spot::twa_word w(run->reduce());
|
||||
w.simplify();
|
||||
std::ostringstream out;
|
||||
out << w;
|
||||
out << *word;
|
||||
aut_word_ = out.str();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue