tgba: move boolean properties from tgba_digraph to tgba
* src/tgba/tgbagraph.hh: Remove the set_bprop/get_bprop interface. * src/tgba/tgba.cc, src/tgba/tgba.hh: Add a new interface for setting/querying/copying the following properties: single_acc_set, state_based_acc, inherently_weak, deterministic. * src/dstarparse/dra2ba.cc, src/dstarparse/nra2nba.cc, src/neverparse/neverclaimparse.yy, src/saba/sabacomplementtgba.cc, src/tgba/tgbagraph.cc, src/tgbaalgos/degen.cc, src/tgbaalgos/dotty.cc, src/tgbaalgos/isdet.cc, src/tgbaalgos/lbtt.cc, src/tgbaalgos/minimize.cc, src/tgbaalgos/neverclaim.cc, src/tgbaalgos/postproc.cc, src/tgbaalgos/sccfilter.cc, src/tgbaalgos/simulation.cc, src/tgbatest/degenlskip.test, src/tgbatest/ltl2tgba.cc: Adjust to the new interface, or use it to bypass some useless work.
This commit is contained in:
parent
e3b5119f25
commit
b43f75e917
19 changed files with 160 additions and 87 deletions
|
|
@ -390,34 +390,9 @@ namespace spot
|
|||
/// extremities and acceptance.
|
||||
void merge_transitions();
|
||||
|
||||
protected:
|
||||
unsigned bprops_ = 0;
|
||||
|
||||
public:
|
||||
enum bprop {
|
||||
StateBasedAcc = 1,
|
||||
SingleAccSet = 2,
|
||||
SBA = StateBasedAcc | SingleAccSet,
|
||||
};
|
||||
|
||||
bool get_bprop(bprop p) const
|
||||
{
|
||||
return (bprops_ & p) == p;
|
||||
}
|
||||
|
||||
void set_bprop(bprop p)
|
||||
{
|
||||
bprops_ |= p;
|
||||
}
|
||||
|
||||
void clear_bprop(bprop p)
|
||||
{
|
||||
bprops_ &= ~p;
|
||||
}
|
||||
|
||||
bool state_is_accepting(unsigned s) const
|
||||
{
|
||||
assert(get_bprop(StateBasedAcc));
|
||||
assert(has_state_based_acc());
|
||||
for (auto& t: g_.out(s))
|
||||
// Stop at the first transition, since the remaining should be
|
||||
// labeled identically.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue