genem: improve handling of co-Büchi
* spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh: Make sure scc_and_mark_filter does not install a filter if there is nothing to filter. * tests/python/genem.py, spot/twaalgos/genem.cc, python/spot/impl.i: Adjust.
This commit is contained in:
parent
afdc7ddaf8
commit
0623965b43
5 changed files with 20 additions and 13 deletions
|
|
@ -108,9 +108,8 @@ namespace spot
|
|||
}
|
||||
return true;
|
||||
}
|
||||
// FIXME: If there is acc.fin_unit() it, is
|
||||
// probably a good idea to filter right away.
|
||||
scc_info si(aut, scc_info_options::STOP_ON_ACC);
|
||||
scc_info si(scc_and_mark_filter(aut, aut_acc.fin_unit()),
|
||||
scc_info_options::STOP_ON_ACC);
|
||||
|
||||
const int accepting_scc = si.one_accepting_scc();
|
||||
if (accepting_scc >= 0)
|
||||
|
|
|
|||
|
|
@ -75,9 +75,10 @@ namespace spot
|
|||
};
|
||||
}
|
||||
|
||||
scc_info::scc_info(scc_and_mark_filter& filt, scc_info_options options)
|
||||
scc_info::scc_info(const scc_and_mark_filter& filt, scc_info_options options)
|
||||
: scc_info(filt.get_aut(), filt.start_state(),
|
||||
filt.get_filter(), &filt, options)
|
||||
filt.get_filter(),
|
||||
const_cast<scc_and_mark_filter*>(&filt), options)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -457,12 +457,12 @@ namespace spot
|
|||
/// This is usually used to prevent some edges from being
|
||||
/// considered as part of cycles, and can additionally restrict
|
||||
/// to exploration to some SCC discovered by another SCC.
|
||||
scc_info(scc_and_mark_filter& filt, scc_info_options options);
|
||||
scc_info(const scc_and_mark_filter& filt, scc_info_options options);
|
||||
// we separate the two functions so that we can rename
|
||||
// scc_info(x,options) into scc_info_with_options(x,options) in Python.
|
||||
// Otherwrise calling scc_info(aut,options) can be confused with
|
||||
// scc_info(aut,initial_state).
|
||||
scc_info(scc_and_mark_filter& filt)
|
||||
scc_info(const scc_and_mark_filter& filt)
|
||||
: scc_info(filt, scc_info_options::ALL)
|
||||
{
|
||||
}
|
||||
|
|
@ -814,9 +814,13 @@ namespace spot
|
|||
return aut_->get_init_state_number();
|
||||
}
|
||||
|
||||
scc_info::edge_filter get_filter()
|
||||
scc_info::edge_filter get_filter() const
|
||||
{
|
||||
return lower_si_ ? filter_scc_and_mark_ : filter_mark_;
|
||||
if (lower_si_)
|
||||
return filter_scc_and_mark_;
|
||||
if (cut_sets_)
|
||||
return filter_mark_;
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue