spot  0.8.2
Public Member Functions | Protected Attributes
spot::fair_kripke_succ_iterator Class Reference

Iterator code for a Fair Kripke structure.This iterator can be used to simplify the writing of an iterator on a Fair Kripke structure (or lookalike). More...

#include <kripke/fairkripke.hh>

Inheritance diagram for spot::fair_kripke_succ_iterator:
Inheritance graph
[legend]
Collaboration diagram for spot::fair_kripke_succ_iterator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 fair_kripke_succ_iterator (const bdd &cond, const bdd &acc_cond)
 Constructor.
virtual ~fair_kripke_succ_iterator ()
virtual bdd current_condition () const
 Get the condition on the transition leading to this successor.
virtual bdd current_acceptance_conditions () const
 Get the acceptance conditions on the transition leading to this successor.
Iteration
virtual void first ()=0
 Position the iterator on the first successor (if any).
virtual void next ()=0
 Jump to the next successor (if any).
virtual bool done () const =0
 Check whether the iteration is finished.
Inspection
virtual statecurrent_state () const =0
 Get the state of the current successor.

Protected Attributes

bdd cond_
bdd acc_cond_

Detailed Description

Iterator code for a Fair Kripke structure.

This iterator can be used to simplify the writing of an iterator on a Fair Kripke structure (or lookalike).

If you inherit from this iterator, you should only redefine

This class implements fair_kripke_succ_iterator::current_condition(), and fair_kripke_succ_iterator::current_acceptance_conditions().


Constructor & Destructor Documentation

spot::fair_kripke_succ_iterator::fair_kripke_succ_iterator ( const bdd &  cond,
const bdd &  acc_cond 
)

Constructor.

The cond and acc_cond arguments will be those returned by fair_kripke_succ_iterator::current_condition(), and fair_kripke_succ_iterator::current_acceptance_conditions().


Member Function Documentation

Get the acceptance conditions on the transition leading to this successor.

Implements spot::tgba_succ_iterator.

virtual bdd spot::fair_kripke_succ_iterator::current_condition ( ) const [virtual]

Get the condition on the transition leading to this successor.

This is a boolean function of atomic propositions.

Implements spot::tgba_succ_iterator.

virtual state* spot::tgba_succ_iterator::current_state ( ) const [pure virtual, inherited]

Get the state of the current successor.

Note that the same state may occur at different points in the iteration. These actually correspond to the same destination. It just means there were several transitions, with different conditions, leading to the same state.

The returned state should be destroyed (see state::destroy) by the caller after it is no longer used.

Implemented in spot::tgba_explicit_succ_iterator, spot::taa_succ_iterator, spot::kripke_explicit_succ_iterator, spot::tgba_succ_iterator_union, and spot::tgba_succ_iterator_concrete.

virtual bool spot::tgba_succ_iterator::done ( ) const [pure virtual, inherited]

Check whether the iteration is finished.

This function should be called after any call to first() or next() and before any enquiry about the current state.

The usual way to do this is with a for loop.

    for (s->first(); !s->done(); s->next())
      ...

Implemented in spot::tgba_explicit_succ_iterator, spot::taa_succ_iterator, spot::kripke_explicit_succ_iterator, spot::tgba_succ_iterator_union, and spot::tgba_succ_iterator_concrete.

virtual void spot::tgba_succ_iterator::first ( ) [pure virtual, inherited]

Position the iterator on the first successor (if any).

This method can be called several times to make multiple passes over successors.

Warning:
One should always call done() to ensure there is a successor, even after first(). A common trap is to assume that there is at least one successor: this is wrong.

Implemented in spot::tgba_explicit_succ_iterator, spot::taa_succ_iterator, spot::kripke_explicit_succ_iterator, spot::tgba_succ_iterator_union, and spot::tgba_succ_iterator_concrete.

virtual void spot::tgba_succ_iterator::next ( ) [pure virtual, inherited]

Jump to the next successor (if any).

Warning:
Again, one should always call done() to ensure there is a successor.

Implemented in spot::tgba_explicit_succ_iterator, spot::taa_succ_iterator, spot::kripke_explicit_succ_iterator, spot::tgba_succ_iterator_union, and spot::tgba_succ_iterator_concrete.


Member Data Documentation


The documentation for this class was generated from the following file:

Please comment this page and report errors about it on the RefDocComments page.
Generated on Thu Jan 19 2012 19:33:04 for spot by doxygen 1.7.6.1