replace sba_explicit_* by tgba_digraph, and use tgba_digraph is postproc
This is a huge patch. tgba_digraph are equiped with some boolean properties that can be used to indicate whether they represent SBA (and will carry more informations later). All algorithms that produce or use sba_explicit_* automata are changed to use tgba_digraph. postproc has been rewritten using only tgba_digraph, and this required changing the return types of many algorithms from tgba* to tgba_digraph*. * src/bin/dstar2tgba.cc, src/bin/ltlfilt.cc, src/dstarparse/dra2ba.cc, src/dstarparse/dstar2tgba.cc, src/dstarparse/nra2nba.cc, src/dstarparse/nsa2tgba.cc, src/dstarparse/public.hh, src/tgba/tgbagraph.hh, src/tgba/tgbasafracomplement.cc, src/tgbaalgos/compsusp.cc, src/tgbaalgos/compsusp.hh, src/tgbaalgos/degen.cc, src/tgbaalgos/degen.hh, src/tgbaalgos/dotty.cc, src/tgbaalgos/minimize.cc, src/tgbaalgos/minimize.hh, src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh, src/tgbaalgos/sccfilter.cc, src/tgbaalgos/sccinfo.cc, src/tgbaalgos/stripacc.cc, src/tgbaalgos/stripacc.hh, src/tgbaalgos/translate.cc, src/tgbaalgos/translate.hh, src/tgbatest/ltl2tgba.cc, wrap/python/spot.i: Update.
This commit is contained in:
parent
637aeff2d3
commit
6c9d5e4bb3
26 changed files with 296 additions and 257 deletions
|
|
@ -411,6 +411,48 @@ namespace spot
|
|||
}
|
||||
g_.defrag();
|
||||
}
|
||||
|
||||
|
||||
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));
|
||||
for (auto& t: g_.out(s))
|
||||
// Stop at the first transition, since the remaining should be
|
||||
// labeled identically.
|
||||
return t.acc == all_acceptance_conditions_;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool state_is_accepting(const state* s) const
|
||||
{
|
||||
return state_is_accepting(state_number(s));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue