Inheritance diagram for pn_succ_iterator:
Public Member Functions | |
pn_succ_iterator (const petri_net &n, const marking *m, const bdd &cond) | |
Construct an iterator over the successors of the marking m in the Petri net n. The marking m satisfies the atomic propositions represented by cond. | |
virtual | ~pn_succ_iterator () |
Destructor. | |
void | first () |
Position the iterator on the first successor (if any). | |
void | next () |
Jump to the next successor (if any). | |
bool | done () const |
Check whether the iteration is finished. | |
spot::state * | current_state () const |
Get the state of the current successor. | |
bdd | current_condition () const |
Get the condition on the transition leading to this successor. This model checker is base on state properties and then all the outgoing arcs are labelled by the conditions of the source state. | |
bdd | current_acceptance_conditions () const |
Get the acceptance conditions on the transition leading to this successor. Here no acceptance conditions are taken into account. The method returns false. | |
std::string | format_transition () const |
Return the transition name of the current successor for printing. | |
Private Member Functions | |
pn_succ_iterator (const pn_succ_iterator &s) | |
not implemented (assert(false)) | |
pn_succ_iterator & | operator= (const pn_succ_iterator &s) |
not implemented (assert(false)) | |
Private Attributes | |
const petri_net & | net |
Designate the associated Petri net. | |
const marking * | mark |
Point to the marking for which we iterate. | |
std::list< int > * | fir |
Point to the list of transitions firable from *mark in net. | |
std::list< int >::const_iterator | it |
Designate the current successor. | |
bdd | condition |
Condition satisfied by *mark. |
Definition at line 36 of file pnsucciter.hh.
|
Construct an iterator over the successors of the marking m in the Petri net n. The marking m satisfies the atomic propositions represented by cond. Notice that the constructed instance takes the control of the marking pointed by m. In particular, this marking will be deallocated automatically at the destruction.
|
|
Destructor.
pn_succ_iterator::~pn_succ_iterator() { delete mark; delete fir; } // |
|
not implemented (assert(false))
|
|
Get the acceptance conditions on the transition leading to this successor. Here no acceptance conditions are taken into account. The method returns false.
Implements spot::tgba_succ_iterator. |
|
Get the condition on the transition leading to this successor. This model checker is base on state properties and then all the outgoing arcs are labelled by the conditions of the source state.
bdd pn_succ_iterator::current_condition() const { assert(!done()); return condition; } // Implements spot::tgba_succ_iterator. |
|
Get the state of the current successor.
The state has been allocated with
spot::state* pn_succ_iterator::current_state() const { assert(!done()); marking* m = net.successor(*mark, *it); pn_state* res = new pn_state(*m); delete m; return res; } // Implements spot::tgba_succ_iterator. |
|
Check whether the iteration is finished.
bool pn_succ_iterator::done() const { return it==fir->end(); } // Implements spot::tgba_succ_iterator. |
|
Position the iterator on the first successor (if any).
void pn_succ_iterator::first() { it = fir->begin(); } // Implements spot::tgba_succ_iterator. |
|
Return the transition name of the current successor for printing.
std::string pn_succ_iterator::format_transition() const { assert(!done()); return net.get_transition_name(*it); } // |
|
Jump to the next successor (if any).
void pn_succ_iterator::next() { assert(!done()); it++; } // Implements spot::tgba_succ_iterator. |
|
not implemented (assert(false))
|
|
Condition satisfied by *mark.
Definition at line 131 of file pnsucciter.hh. |
|
Point to the list of transitions firable from *mark in net.
Definition at line 125 of file pnsucciter.hh. |
|
Designate the current successor.
Definition at line 128 of file pnsucciter.hh. |
|
Point to the marking for which we iterate.
Definition at line 122 of file pnsucciter.hh. |
|
Designate the associated Petri net.
Definition at line 119 of file pnsucciter.hh. |