spot  1.2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
spot::kripke_explicit Class Reference

Kripke Structure. More...

#include <kripke/kripkeexplicit.hh>

Inheritance diagram for spot::kripke_explicit:
Inheritance graph
Collaboration diagram for spot::kripke_explicit:
Collaboration graph

Public Member Functions

 kripke_explicit (bdd_dict *)
 
 kripke_explicit (bdd_dict *, state_kripke *)
 
bdd_dictget_dict () const
 Get the dictionary associated to the automaton. More...
 
state_kripkeget_init_state () const
 Get the initial state of the automaton. More...
 
kripke_explicit_succ_iteratorsucc_iter (const spot::state *local_state, const spot::state *global_state=0, const tgba *global_automaton=0) const
 Allow to get an iterator on the state we passed in parameter. More...
 
bdd state_condition (const state *s) const
 Get the condition on the state. More...
 
bdd state_condition (const std::string &) const
 Get the condition on the state. More...
 
std::string format_state (const state *) const
 Return the name of the state. More...
 
void add_state (std::string)
 Create state, if it does not already exists. More...
 
void add_transition (std::string source, std::string dest)
 Add a transition between two states. More...
 
void add_conditions (bdd add, std::string on_me)
 Add a BDD condition to the state. More...
 
void add_condition (const ltl::formula *f, std::string on_me)
 Add a formula to the state corresponding to the name. More...
 
const std::map< const
state_kripke *, std::string > & 
sn_get () const
 Return map between states and their names. More...
 
virtual bdd state_acceptance_conditions (const state *) const
 The set of acceptance conditions that label the state s. More...
 
virtual bdd neg_acceptance_conditions () const
 Return the conjuction of all negated acceptance variables. More...
 
virtual bdd all_acceptance_conditions () const
 Return the set of all acceptance conditions used by this automaton. More...
 
bdd support_conditions (const state *state) const
 Get a formula that must hold whatever successor is taken. More...
 
bdd support_variables (const state *state) const
 Get the conjunctions of variables tested by the outgoing transitions of state. More...
 
virtual std::string transition_annotation (const tgba_succ_iterator *t) const
 Return a possible annotation for the transition pointed to by the iterator. More...
 
virtual stateproject_state (const state *s, const tgba *t) const
 Project a state on an automaton. More...
 
virtual unsigned int number_of_acceptance_conditions () const
 The number of acceptance conditions. More...
 

Protected Member Functions

virtual bdd compute_support_conditions (const state *s) const
 Do the actual computation of tgba::support_conditions(). More...
 
virtual bdd compute_support_variables (const state *s) const
 Do the actual computation of tgba::support_variables(). More...
 

Protected Attributes

const statelast_support_conditions_input_
 
const statelast_support_variables_input_
 

Detailed Description

Kripke Structure.

Member Function Documentation

void spot::kripke_explicit::add_condition ( const ltl::formula f,
std::string  on_me 
)

Add a formula to the state corresponding to the name.

Parameters
fthe formula to add.
on_methe state where to add.
void spot::kripke_explicit::add_conditions ( bdd  add,
std::string  on_me 
)

Add a BDD condition to the state.

Parameters
addthe condition.
on_mewhere add the condition.
void spot::kripke_explicit::add_state ( std::string  )

Create state, if it does not already exists.

Used by the parser.

void spot::kripke_explicit::add_transition ( std::string  source,
std::string  dest 
)

Add a transition between two states.

virtual bdd spot::kripke::all_acceptance_conditions ( ) const
virtualinherited

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.

virtual bdd spot::fair_kripke::compute_support_conditions ( const state state) const
protectedvirtualinherited

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

Implements spot::tgba.

virtual bdd spot::fair_kripke::compute_support_variables ( const state state) const
protectedvirtualinherited

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

Implements spot::tgba.

std::string spot::kripke_explicit::format_state ( const state ) const
virtual

Return the name of the state.

Implements spot::tgba.

bdd_dict* spot::kripke_explicit::get_dict ( ) const
virtual

Get the dictionary associated to the automaton.

Atomic propositions and acceptance conditions 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.

state_kripke* spot::kripke_explicit::get_init_state ( ) const
virtual

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.

virtual bdd spot::kripke::neg_acceptance_conditions ( ) const
virtualinherited

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
virtualinherited

The number of acceptance conditions.

virtual state* spot::tgba::project_state ( const state s,
const tgba t 
) const
virtualinherited

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, spot::tgba_scc, and spot::tgba_proxy.

const std::map<const state_kripke*, std::string>& spot::kripke_explicit::sn_get ( ) const

Return map between states and their names.

virtual bdd spot::kripke::state_acceptance_conditions ( const state s) const
virtualinherited

The set of acceptance conditions that label the state s.

Implements spot::fair_kripke.

bdd spot::kripke_explicit::state_condition ( const state s) const
virtual

Get the condition on the state.

Implements spot::fair_kripke.

bdd spot::kripke_explicit::state_condition ( const std::string &  ) const

Get the condition on the state.

kripke_explicit_succ_iterator* spot::kripke_explicit::succ_iter ( const spot::state local_state,
const spot::state global_state = 0,
const tgba global_automaton = 0 
) const
virtual

Allow to get an iterator on the state we passed in parameter.

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
virtualinherited

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, spot::tgba_scc, and spot::tgba_proxy.


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

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Thu May 15 2014 11:04:11 for spot by doxygen 1.8.4