Inheritance diagram for pn_tgba:
Public Member Functions | |
pn_tgba (const petri_net *pn, const spot::ltl::atomic_prop_set *sap=0, spot::bdd_dict *dict=0) | |
Construct a tgba view of pn where the set of atomic propositions which are obseved are in sap. The constructor registers these propositions in dict. | |
bdd | current_condition (const marking &m) const |
Return the bdd corresponding to the values of the observed atomic propositions in the marking m. | |
virtual | ~pn_tgba () |
Unregister all the used propositions. | |
spot::state * | get_init_state () const |
Get the initial state of the automaton. | |
spot::tgba_succ_iterator * | succ_iter (const spot::state *local_state, const spot::state *, const spot::tgba *) const |
Get an iterator over the successors of local_state. | |
spot::bdd_dict * | get_dict () const |
Get the dictionary associated to the automaton. | |
std::string | format_state (const spot::state *state) const |
Format the state as a string for printing. | |
std::string | transition_annotation (const spot::tgba_succ_iterator *t) const |
Format the pointed transition as a string for printing. | |
bdd | all_acceptance_conditions () const |
Return the empty set (false) as the Petri net accepts all infinite sequences. Take care that blocking sequences are not taken into account here. | |
bdd | neg_acceptance_conditions () const |
Return true. | |
Protected Member Functions | |
bdd | compute_support_conditions (const spot::state *state) const |
Do the actual computation of tgba::support_conditions(). Return true. | |
bdd | compute_support_variables (const spot::state *state) const |
Do the actual computation of tgba::support_variables(). Return true. | |
Private Member Functions | |
pn_tgba (const pn_tgba &p) | |
not implemented (assert(false)) | |
pn_tgba & | operator= (const pn_tgba &p) |
not implemented (assert(false)) | |
Private Attributes | |
const petri_net & | pn |
Reference the encapsulated Petri net. | |
spot::bdd_dict * | dict |
Point to the associated dictionnary. | |
std::map< int, int > | mplace_at_prop |
Definition at line 43 of file pntgba.hh.
|
Construct a tgba view of pn where the set of atomic propositions which are obseved are in sap. The constructor registers these propositions in dict. sap can be a null pointer if the tgba will not be used for checking. In this case, dict can also be a null pointer. The pointers pn and dict (if not null) are supposed to be valide during all the live of the constructed instance.
pn_tgba::pn_tgba(const petri_net* p, const spot::ltl::atomic_prop_set* sap, spot::bdd_dict* dic) : pn(*p) { assert(!sap || dic); dict = dic; if (sap) { spot::ltl::atomic_prop_set::iterator it; for(it=sap->begin(); it!=sap->end(); ++it) { mplace_at_prop[pn.get_place_num((*it)->name())] = dict->register_proposition(*it, this); } } } // |
|
Unregister all the used propositions.
pn_tgba::~pn_tgba() { if (dict) dict->unregister_all_my_variables(this); } // |
|
not implemented (assert(false))
|
|
Return the empty set (false) as the Petri net accepts all infinite sequences. Take care that blocking sequences are not taken into account here.
Implements spot::tgba.
|
|
Do the actual computation of tgba::support_conditions(). Return true.
|
|
Do the actual computation of tgba::support_variables(). Return true.
|
|
Return the bdd corresponding to the values of the observed atomic propositions in the marking m.
bdd pn_tgba::current_condition(const marking& m) const { bdd res = bddtrue; std::map<int, int>::const_iterator it; for(it=mplace_at_prop.begin(); it!=mplace_at_prop.end();it++) if (m.get(it->first) > 0) res &= bdd_ithvar(it->second); else res &= bdd_nithvar(it->second); return res; } // |
|
Format the state as a string for printing.
std::string pn_tgba::format_state(const spot::state* state) const { const pn_state* s = dynamic_cast<const pn_state*>(state); assert(s); marking* m = s->get_marking().expand(); std::string res = pn.format_marking(*m); delete m; return res; } // |
|
Get the dictionary associated to the automaton.
spot::bdd_dict* pn_tgba::get_dict() const { return dict; } // Implements spot::tgba.
|
|
Get the initial state of the automaton.
The state has been allocated with
spot::state* pn_tgba::get_init_state() const { marking* m0 = pn.get_initial_marking(); pn_state* res = new pn_state(*m0); delete m0; return res; } // Implements spot::tgba.
|
|
Return true.
Implements spot::tgba.
|
|
not implemented (assert(false))
|
|
Get an iterator over the successors of local_state.
The iterator has been allocated with The two last parameters are not used here
spot::tgba_succ_iterator* pn_tgba::succ_iter (const spot::state* local_state, const spot::state*, const spot::tgba*) const { const pn_state* s = dynamic_cast<const pn_state*>(local_state); assert(s); marking* m = s->get_marking().expand(); return new pn_succ_iterator(pn, m, current_condition(*m)); } // |
|
Format the pointed transition as a string for printing.
std::string pn_tgba::transition_annotation(const spot::tgba_succ_iterator* t) const { assert(!t->done()); return (dynamic_cast<const pn_succ_iterator*>(t))->format_transition(); } // |
|
Point to the associated dictionnary. |
|
Map the indexes of places used as atomic propositions to the corresponding indexes of bdd variables. Definition at line 154 of file pntgba.hh. |
|
Reference the encapsulated Petri net. |