spot  0.8.1
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
spot::taa_tgba_labelled< label, label_hash > Class Template Reference

#include <tgba/taatgba.hh>

Inheritance diagram for spot::taa_tgba_labelled< label, label_hash >:
Inheritance graph
[legend]
Collaboration diagram for spot::taa_tgba_labelled< label, label_hash >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::list< transition * > state
typedef std::set< state * > state_set

Public Member Functions

 taa_tgba_labelled (bdd_dict *dict)
void set_init_state (const label &s)
void set_init_state (const std::vector< label > &s)
transitioncreate_transition (const label &s, const std::vector< label > &d)
transitioncreate_transition (const label &s, const label &d)
void add_acceptance_condition (transition *t, const ltl::formula *f)
virtual std::string format_state (const spot::state *s) const
 Format the state as a string for printing.
void output (std::ostream &os) const
 Output a TAA in a stream.
void add_condition (transition *t, const ltl::formula *f)
virtual spot::stateget_init_state () const
 Get the initial state of the automaton.
virtual tgba_succ_iteratorsucc_iter (const spot::state *local_state, const spot::state *global_state=0, const tgba *global_automaton=0) const
 Get an iterator over the successors of local_state.
virtual bdd_dictget_dict () const
 Get the dictionary associated to the automaton.
virtual bdd all_acceptance_conditions () const
 Return the set of all acceptance conditions used by this automaton.
virtual bdd neg_acceptance_conditions () const
 Return the conjuction of all negated acceptance variables.
bdd support_conditions (const state *state) const
 Get a formula that must hold whatever successor is taken.
bdd support_variables (const state *state) const
 Get the conjunctions of variables tested by the outgoing transitions of state.
virtual std::string transition_annotation (const tgba_succ_iterator *t) const
 Return a possible annotation for the transition pointed to by the iterator.
virtual stateproject_state (const state *s, const tgba *t) const
 Project a state on an automaton.
virtual unsigned int number_of_acceptance_conditions () const
 The number of acceptance conditions.

Protected Types

typedef label label_t
typedef Sgi::hash_map< const
label, taa_tgba::state
*, label_hash > 
ns_map
typedef Sgi::hash_map< const
taa_tgba::state *, label,
ptr_hash< taa_tgba::state > > 
sn_map
typedef std::vector
< taa_tgba::state_set * > 
ss_vec

Protected Member Functions

virtual std::string label_to_string (const label_t &lbl) const =0
 Return a label as a string.
virtual label_t clone_if (const label_t &lbl) const =0
 Clone the label if necessary to assure it is owned by this, avoiding memory issues when label is a pointer.
virtual bdd compute_support_conditions (const spot::state *state) const
 Do the actual computation of tgba::support_conditions().
virtual bdd compute_support_variables (const spot::state *state) const
 Do the actual computation of tgba::support_variables().

Protected Attributes

ns_map name_state_map_
sn_map state_name_map_
bdd_dictdict_
bdd all_acceptance_conditions_
bool all_acceptance_conditions_computed_
bdd neg_acceptance_conditions_
taa_tgba::state_setinit_
ss_vec state_set_vec_
const statelast_support_conditions_input_
const statelast_support_variables_input_

Private Member Functions

taa_tgba::stateadd_state (const label &name)
 Return the taa_tgba::state for name, creating it when it does not exist already.
taa_tgba::state_setadd_state_set (const std::vector< label > &names)
 Return the taa::state_set for names.
std::string format_state_set (const taa_tgba::state_set *ss) const

Detailed Description

template<typename label, typename label_hash>
class spot::taa_tgba_labelled< label, label_hash >

A taa_tgba instance with states labeled by a given type. Still an abstract class, see below.


Member Typedef Documentation

template<typename label, typename label_hash>
typedef label spot::taa_tgba_labelled< label, label_hash >::label_t [protected]
template<typename label, typename label_hash>
typedef Sgi::hash_map< const label, taa_tgba::state*, label_hash > spot::taa_tgba_labelled< label, label_hash >::ns_map [protected]
template<typename label, typename label_hash>
typedef Sgi::hash_map< const taa_tgba::state*, label, ptr_hash<taa_tgba::state> > spot::taa_tgba_labelled< label, label_hash >::sn_map [protected]
typedef std::vector<taa_tgba::state_set*> spot::taa_tgba::ss_vec [protected, inherited]
typedef std::list<transition*> spot::taa_tgba::state [inherited]
typedef std::set<state*> spot::taa_tgba::state_set [inherited]

Constructor & Destructor Documentation

template<typename label, typename label_hash>
spot::taa_tgba_labelled< label, label_hash >::taa_tgba_labelled ( bdd_dict dict) [inline]

Member Function Documentation

template<typename label, typename label_hash>
void spot::taa_tgba_labelled< label, label_hash >::add_acceptance_condition ( transition t,
const ltl::formula f 
) [inline]
void spot::taa_tgba::add_condition ( transition t,
const ltl::formula f 
) [inherited]
template<typename label, typename label_hash>
taa_tgba::state* spot::taa_tgba_labelled< label, label_hash >::add_state ( const label &  name) [inline, private]
template<typename label, typename label_hash>
taa_tgba::state_set* spot::taa_tgba_labelled< label, label_hash >::add_state_set ( const std::vector< label > &  names) [inline, private]
virtual bdd spot::taa_tgba::all_acceptance_conditions ( ) const [virtual, inherited]

Return the set of all acceptance conditions used by this automaton.

The goal of the emptiness check is to ensure that a strongly connected component walks through each of these acceptiong conditions. I.e., the union of the acceptiong conditions of all transition in the SCC should be equal to the result of this function.

Implements spot::tgba.

template<typename label, typename label_hash>
virtual label_t spot::taa_tgba_labelled< label, label_hash >::clone_if ( const label_t lbl) const [protected, pure virtual]

Clone the label if necessary to assure it is owned by this, avoiding memory issues when label is a pointer.

Implemented in spot::taa_tgba_formula, and spot::taa_tgba_string.

Referenced by spot::taa_tgba_labelled< std::string, string_hash >::add_state().

virtual bdd spot::taa_tgba::compute_support_conditions ( const spot::state state) const [protected, virtual, inherited]

Do the actual computation of tgba::support_conditions().

Implements spot::tgba.

virtual bdd spot::taa_tgba::compute_support_variables ( const spot::state state) const [protected, virtual, inherited]

Do the actual computation of tgba::support_variables().

Implements spot::tgba.

template<typename label, typename label_hash>
transition* spot::taa_tgba_labelled< label, label_hash >::create_transition ( const label &  s,
const std::vector< label > &  d 
) [inline]
template<typename label, typename label_hash>
transition* spot::taa_tgba_labelled< label, label_hash >::create_transition ( const label &  s,
const label &  d 
) [inline]
template<typename label, typename label_hash>
virtual std::string spot::taa_tgba_labelled< label, label_hash >::format_state ( const spot::state s) const [inline, virtual]

Format the state as a string for printing.

If state is a spot::state_set of only one element, then the string corresponding to state->get_state() is returned.

Otherwise a string composed of each string corresponding to each state->get_state() in the spot::state_set is returned, e.g. like {string_1,...,string_n}.

Implements spot::taa_tgba.

template<typename label, typename label_hash>
std::string spot::taa_tgba_labelled< label, label_hash >::format_state_set ( const taa_tgba::state_set ss) const [inline, private]
virtual bdd_dict* spot::taa_tgba::get_dict ( ) const [virtual, inherited]

Get the dictionary associated to the automaton.

State are represented as BDDs. The dictionary allows to map BDD variables back to formulae, and vice versa. This is useful when dealing with several automata (which may use the same BDD variable for different formula), or simply when printing.

Implements spot::tgba.

virtual spot::state* spot::taa_tgba::get_init_state ( ) const [virtual, inherited]

Get the initial state of the automaton.

The state has been allocated with new. It is the responsability of the caller to destroy it when no longer needed.

Implements spot::tgba.

template<typename label, typename label_hash>
virtual std::string spot::taa_tgba_labelled< label, label_hash >::label_to_string ( const label_t lbl) const [protected, pure virtual]
virtual bdd spot::taa_tgba::neg_acceptance_conditions ( ) const [virtual, inherited]

Return the conjuction of all negated acceptance variables.

For instance if the automaton uses variables Acc[a], Acc[b] and Acc[c] to describe acceptance sets, this function should return !Acc[a]&!Acc[b]&!Acc[c].

This is useful when making products: each operand's condition set should be augmented with the neg_acceptance_conditions() of the other operand.

Implements spot::tgba.

virtual unsigned int spot::tgba::number_of_acceptance_conditions ( ) const [virtual, inherited]

The number of acceptance conditions.

template<typename label, typename label_hash>
void spot::taa_tgba_labelled< label, label_hash >::output ( std::ostream &  os) const [inline]

Output a TAA in a stream.

virtual state* spot::tgba::project_state ( const state s,
const tgba t 
) const [virtual, inherited]

Project a state on an automaton.

This converts s, into that corresponding spot::state for t. This is useful when you have the state of a product, and want restrict this state to a specific automata occuring in the product.

It goes without saying that s and t should be compatible (i.e., s is a state of t).

Returns:
0 if the projection fails (s is unrelated to t), or a new state* (the projected state) that must be destroyed by the caller.

Reimplemented in spot::tgba_union, spot::tgba_product, spot::tgba_tba_proxy, and spot::tgba_scc.

template<typename label, typename label_hash>
void spot::taa_tgba_labelled< label, label_hash >::set_init_state ( const label &  s) [inline]
template<typename label, typename label_hash>
void spot::taa_tgba_labelled< label, label_hash >::set_init_state ( const std::vector< label > &  s) [inline]
virtual tgba_succ_iterator* spot::taa_tgba::succ_iter ( const spot::state local_state,
const spot::state global_state = 0,
const tgba global_automaton = 0 
) const [virtual, inherited]

Get an iterator over the successors of local_state.

The iterator has been allocated with new. It is the responsability of the caller to delete it when no longer needed.

During synchornized products, additional informations are passed about the entire product and its state. Recall that products can be nested, forming a tree of spot::tgba where most values are computed on demand. global_automaton designate the root spot::tgba, and global_state its state. This two objects can be used by succ_iter() to restrict the set of successors to compute.

Parameters:
local_stateThe state whose successors are to be explored. This pointer is not adopted in any way by succ_iter, and it is still the caller's responsability to destroy it when appropriate (this can be done during the lifetime of the iterator).
global_stateIn a product, the state of the global product automaton. Otherwise, 0. Like locale_state, global_state is not adopted by succ_iter.
global_automatonIn a product, the global product automaton. Otherwise, 0.

Implements spot::tgba.

bdd spot::tgba::support_conditions ( const state state) const [inherited]

Get a formula that must hold whatever successor is taken.

Returns:
A formula which must be verified for all successors of state.

This can be as simple as bddtrue, or more completely the disjunction of the condition of all successors. This is used as an hint by succ_iter() to reduce the number of successor to compute in a product.

Sub classes should implement compute_support_conditions(), this function is just a wrapper that will cache the last return value for efficiency.

bdd spot::tgba::support_variables ( const state state) const [inherited]

Get the conjunctions of variables tested by the outgoing transitions of state.

All variables tested by outgoing transitions must be returned. This is mandatory.

This is used as an hint by some succ_iter() to reduce the number of successor to compute in a product.

Sub classes should implement compute_support_variables(), this function is just a wrapper that will cache the last return value for efficiency.

virtual std::string spot::tgba::transition_annotation ( const tgba_succ_iterator t) const [virtual, inherited]

Return a possible annotation for the transition pointed to by the iterator.

You may decide to use annotations when building a tgba class that represents the state space of a model, for instance to indicate how the tgba transitions relate to the original model (e.g. the annotation could be the name of a PetriNet transition, or the line number of some textual formalism).

Implementing this method is optional; the default annotation is the empty string.

This method is used for instance in dotty_reachable(), and replay_tgba_run().

Parameters:
ta non-done tgba_succ_iterator for this automaton

Reimplemented in spot::tgba_product, and spot::tgba_scc.


Member Data Documentation

bdd spot::taa_tgba::all_acceptance_conditions_ [mutable, protected, inherited]
bool spot::taa_tgba::all_acceptance_conditions_computed_ [mutable, protected, inherited]
bdd_dict* spot::taa_tgba::dict_ [protected, inherited]
taa_tgba::state_set* spot::taa_tgba::init_ [protected, inherited]
const state* spot::tgba::last_support_conditions_input_ [mutable, protected, inherited]
const state* spot::tgba::last_support_variables_input_ [mutable, protected, inherited]
template<typename label, typename label_hash>
ns_map spot::taa_tgba_labelled< label, label_hash >::name_state_map_ [protected]
bdd spot::taa_tgba::neg_acceptance_conditions_ [protected, inherited]
template<typename label, typename label_hash>
sn_map spot::taa_tgba_labelled< label, label_hash >::state_name_map_ [protected]
ss_vec spot::taa_tgba::state_set_vec_ [protected, inherited]

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 Sun Dec 18 2011 12:57:16 for spot by doxygen 1.7.6.1