Build a map of Strongly Connected components in in a TGBA. More...
#include <tgbaalgos/scc.hh>
Classes | |
struct | scc |
Public Types | |
typedef std::map< unsigned, bdd > | succ_type |
typedef std::set< bdd, bdd_less_than > | cond_set |
Public Member Functions | |
scc_map (const tgba *aut) | |
Constructor. | |
~scc_map () | |
void | build_map () |
Actually compute the graph of strongly connected components. | |
const tgba * | get_aut () const |
Get the automaton for which the map has been constructed. | |
unsigned | scc_count () const |
Get the number of SCC in the automaton. | |
unsigned | initial () const |
Get number of the SCC containing the initial state. | |
const succ_type & | succ (unsigned n) const |
Successor SCCs of a SCC. | |
bool | trivial (unsigned n) const |
Return whether an SCC is trivial. | |
bool | accepting (unsigned n) const |
Return whether an SCC is accepting. | |
const cond_set & | cond_set_of (unsigned n) const |
Return the set of conditions occurring in an SCC. | |
bdd | ap_set_of (unsigned n) const |
Return the set of atomic properties occurring in an SCC. | |
bdd | aprec_set_of (unsigned n) const |
Return the set of atomic properties reachable from this SCC. | |
bdd | acc_set_of (unsigned n) const |
Return the set of acceptance conditions occurring in an SCC. | |
bdd | useful_acc_of (unsigned n) const |
Return the set of useful acceptance conditions of SCC n. | |
const std::list< const state * > & | states_of (unsigned n) const |
Return the set of states of an SCC. | |
const state * | one_state_of (unsigned n) const |
Return one state of an SCC. | |
unsigned | scc_of_state (const state *s) const |
Return the number of the SCC a state belongs too. | |
unsigned | self_loops () const |
Return the number of self loops in the automaton. | |
Protected Types | |
typedef std::list< scc > | stack_type |
typedef Sgi::hash_map< const state *, int, state_ptr_hash, state_ptr_equal > | hash_type |
typedef std::pair< const spot::state *, tgba_succ_iterator * > | pair_state_iter |
typedef std::vector< scc > | scc_map_type |
Protected Member Functions | |
bdd | update_supp_rec (unsigned state) |
int | relabel_component () |
Protected Attributes | |
const tgba * | aut_ |
stack_type | root_ |
std::stack< bdd > | arc_acc_ |
std::stack< bdd > | arc_cond_ |
hash_type | h_ |
int | num_ |
std::stack< pair_state_iter > | todo_ |
scc_map_type | scc_map_ |
unsigned | self_loops_ |
Build a map of Strongly Connected components in in a TGBA.
typedef std::set<bdd, bdd_less_than> spot::scc_map::cond_set |
typedef Sgi::hash_map<const state*, int, state_ptr_hash, state_ptr_equal> spot::scc_map::hash_type [protected] |
typedef std::pair<const spot::state*, tgba_succ_iterator*> spot::scc_map::pair_state_iter [protected] |
typedef std::vector<scc> spot::scc_map::scc_map_type [protected] |
typedef std::list<scc> spot::scc_map::stack_type [protected] |
typedef std::map<unsigned, bdd> spot::scc_map::succ_type |
spot::scc_map::scc_map | ( | const tgba * | aut | ) |
Constructor.
This will note compute the map initially. You should call build_map() to do so.
spot::scc_map::~scc_map | ( | ) |
bdd spot::scc_map::acc_set_of | ( | unsigned | n | ) | const |
Return the set of acceptance conditions occurring in an SCC.
bool spot::scc_map::accepting | ( | unsigned | n | ) | const |
Return whether an SCC is accepting.
bdd spot::scc_map::ap_set_of | ( | unsigned | n | ) | const |
Return the set of atomic properties occurring in an SCC.
bdd spot::scc_map::aprec_set_of | ( | unsigned | n | ) | const |
Return the set of atomic properties reachable from this SCC.
void spot::scc_map::build_map | ( | ) |
Actually compute the graph of strongly connected components.
const cond_set& spot::scc_map::cond_set_of | ( | unsigned | n | ) | const |
Return the set of conditions occurring in an SCC.
const tgba* spot::scc_map::get_aut | ( | ) | const |
Get the automaton for which the map has been constructed.
unsigned spot::scc_map::initial | ( | ) | const |
Get number of the SCC containing the initial state.
const state* spot::scc_map::one_state_of | ( | unsigned | n | ) | const |
Return one state of an SCC.
The state in the returned list is still owned by the scc_map instance. It should NOT be destroyed by the client code.
int spot::scc_map::relabel_component | ( | ) | [protected] |
unsigned spot::scc_map::scc_count | ( | ) | const |
Get the number of SCC in the automaton.
SCCs are labelled from 0 to scc_count()-1.
unsigned spot::scc_map::scc_of_state | ( | const state * | s | ) | const |
Return the number of the SCC a state belongs too.
unsigned spot::scc_map::self_loops | ( | ) | const |
Return the number of self loops in the automaton.
const std::list<const state*>& spot::scc_map::states_of | ( | unsigned | n | ) | const |
Return the set of states of an SCC.
The states in the returned list are still owned by the scc_map instance. They should NOT be destroyed by the client code.
const succ_type& spot::scc_map::succ | ( | unsigned | n | ) | const |
Successor SCCs of a SCC.
bool spot::scc_map::trivial | ( | unsigned | n | ) | const |
Return whether an SCC is trivial.
Trivial SCCs have one state and no self-loop.
bdd spot::scc_map::update_supp_rec | ( | unsigned | state | ) | [protected] |
bdd spot::scc_map::useful_acc_of | ( | unsigned | n | ) | const |
Return the set of useful acceptance conditions of SCC n.
Useless acceptances conditions are always implied by other acceptances conditions. This returns all the other acceptance conditions.
std::stack<bdd> spot::scc_map::arc_acc_ [protected] |
std::stack<bdd> spot::scc_map::arc_cond_ [protected] |
const tgba* spot::scc_map::aut_ [protected] |
hash_type spot::scc_map::h_ [protected] |
int spot::scc_map::num_ [protected] |
stack_type spot::scc_map::root_ [protected] |
scc_map_type spot::scc_map::scc_map_ [protected] |
unsigned spot::scc_map::self_loops_ [protected] |
std::stack<pair_state_iter> spot::scc_map::todo_ [protected] |