Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

spot::tgba_explicit_labelled< label, label_hash > Class Template Reference

A tgba_explicit instance with states labeled by a given type. More...

#include <tgba/tgbaexplicit.hh>

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

List of all members.

Public Types

typedef std::list< transition * > state

Public Member Functions

 tgba_explicit_labelled (bdd_dict *dict)
bool has_state (const label &name)
const label & get_label (const tgba_explicit::state *s) const
const label & get_label (const spot::state *s) const
stateadd_state (const label &name)
stateset_init_state (const label &state)
transitioncreate_transition (state *source, const state *dest)
transitioncreate_transition (const label &source, const label &dest)
void complement_all_acceptance_conditions ()
void declare_acceptance_condition (const ltl::formula *f)
void merge_transitions ()
virtual ~tgba_explicit_labelled ()
virtual stateadd_default_init ()=0
 Add a default initial state.
void add_condition (transition *t, const ltl::formula *f)
void add_conditions (transition *t, bdd f)
 This assumes that all variables in f are known from dict.
void copy_acceptance_conditions_of (const tgba *a)
 Copy the acceptance conditions of a tgba.
void set_acceptance_conditions (bdd acc)
 The the acceptance conditions.
bool has_acceptance_condition (const ltl::formula *f) const
void add_acceptance_condition (transition *t, const ltl::formula *f)
void add_acceptance_conditions (transition *t, bdd f)
 This assumes that all acceptance conditions in f are known from dict.
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.
virtual std::string format_state (const spot::state *s) const =0
 Format the state as a string for printing.
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< label,
tgba_explicit::state
*, label_hash > 
ns_map
typedef Sgi::hash_map< const
tgba_explicit::state *, label,
ptr_hash< tgba_explicit::state > > 
sn_map

Protected Member Functions

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().
bdd get_acceptance_condition (const ltl::formula *f)

Protected Attributes

ns_map name_state_map_
sn_map state_name_map_
bdd_dictdict_
tgba_explicit::stateinit_
bdd all_acceptance_conditions_
bdd neg_acceptance_conditions_
bool all_acceptance_conditions_computed_

Detailed Description

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

A tgba_explicit instance with states labeled by a given type.


Member Typedef Documentation

template<typename label, typename label_hash>
typedef label spot::tgba_explicit_labelled< label, label_hash >::label_t [protected]
template<typename label, typename label_hash>
typedef Sgi::hash_map<label, tgba_explicit::state*, label_hash> spot::tgba_explicit_labelled< label, label_hash >::ns_map [protected]
template<typename label, typename label_hash>
typedef Sgi::hash_map<const tgba_explicit::state*, label, ptr_hash<tgba_explicit::state> > spot::tgba_explicit_labelled< label, label_hash >::sn_map [protected]
typedef std::list<transition*> spot::tgba_explicit::state [inherited]

Constructor & Destructor Documentation

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

Member Function Documentation

void spot::tgba_explicit::add_acceptance_condition ( transition t,
const ltl::formula f 
) [inherited]
void spot::tgba_explicit::add_acceptance_conditions ( transition t,
bdd  f 
) [inherited]

This assumes that all acceptance conditions in f are known from dict.

void spot::tgba_explicit::add_condition ( transition t,
const ltl::formula f 
) [inherited]
void spot::tgba_explicit::add_conditions ( transition t,
bdd  f 
) [inherited]

This assumes that all variables in f are known from dict.

virtual state* spot::tgba_explicit::add_default_init (  )  [pure virtual, inherited]

Add a default initial state.

Implemented in spot::tgba_explicit_string, spot::tgba_explicit_formula, and spot::tgba_explicit_number.

template<typename label, typename label_hash>
state* spot::tgba_explicit_labelled< label, label_hash >::add_state ( const label &  name  )  [inline]
virtual bdd spot::tgba_explicit::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.

Referenced by spot::tgba_explicit_labelled< std::string, string_hash >::complement_all_acceptance_conditions().

template<typename label, typename label_hash>
void spot::tgba_explicit_labelled< label, label_hash >::complement_all_acceptance_conditions (  )  [inline]
virtual bdd spot::tgba_explicit::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::tgba_explicit::compute_support_variables ( const spot::state state  )  const [protected, virtual, inherited]

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

Implements spot::tgba.

void spot::tgba_explicit::copy_acceptance_conditions_of ( const tgba a  )  [inherited]

Copy the acceptance conditions of a tgba.

If used, this function should be called before creating any transition.

template<typename label, typename label_hash>
transition* spot::tgba_explicit_labelled< label, label_hash >::create_transition ( state source,
const state dest 
) [inline]
template<typename label, typename label_hash>
transition* spot::tgba_explicit_labelled< label, label_hash >::create_transition ( const label &  source,
const label &  dest 
) [inline]
template<typename label, typename label_hash>
void spot::tgba_explicit_labelled< label, label_hash >::declare_acceptance_condition ( const ltl::formula f  )  [inline]
virtual std::string spot::tgba_explicit::format_state ( const spot::state state  )  const [pure virtual, inherited]

Format the state as a string for printing.

This formating is the responsability of the automata that owns the state.

Implements spot::tgba.

Implemented in spot::tgba_explicit_string, spot::tgba_explicit_formula, and spot::tgba_explicit_number.

bdd spot::tgba_explicit::get_acceptance_condition ( const ltl::formula f  )  [protected, inherited]
virtual bdd_dict* spot::tgba_explicit::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::tgba_explicit::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>
const label& spot::tgba_explicit_labelled< label, label_hash >::get_label ( const tgba_explicit::state s  )  const [inline]
template<typename label, typename label_hash>
const label& spot::tgba_explicit_labelled< label, label_hash >::get_label ( const spot::state s  )  const [inline]
bool spot::tgba_explicit::has_acceptance_condition ( const ltl::formula f  )  const [inherited]
template<typename label, typename label_hash>
bool spot::tgba_explicit_labelled< label, label_hash >::has_state ( const label &  name  )  [inline]
template<typename label, typename label_hash>
void spot::tgba_explicit_labelled< label, label_hash >::merge_transitions (  )  [inline]
virtual bdd spot::tgba_explicit::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.

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_product, spot::tgba_scc, spot::tgba_tba_proxy, and spot::tgba_union.

void spot::tgba_explicit::set_acceptance_conditions ( bdd  acc  )  [inherited]

The the acceptance conditions.

template<typename label, typename label_hash>
state* spot::tgba_explicit_labelled< label, label_hash >::set_init_state ( const label &  state  )  [inline]
virtual tgba_succ_iterator* spot::tgba_explicit::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_state The 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_state In a product, the state of the global product automaton. Otherwise, 0. Like locale_state, global_state is not adopted by succ_iter.
global_automaton In 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.

Implementing this function is optional; the default annotation it the empty string.

Parameters:
t a non-done tgba_succ_iterator for this automata

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


Member Data Documentation

bdd spot::tgba_explicit::all_acceptance_conditions_ [mutable, protected, inherited]
bool spot::tgba_explicit::all_acceptance_conditions_computed_ [mutable, protected, inherited]
bdd_dict* spot::tgba_explicit::dict_ [protected, inherited]
template<typename label, typename label_hash>
ns_map spot::tgba_explicit_labelled< label, label_hash >::name_state_map_ [protected]
template<typename label, typename label_hash>
sn_map spot::tgba_explicit_labelled< label, label_hash >::state_name_map_ [protected]

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 Tue Feb 1 2011 12:00:54 for spot by doxygen 1.7.1