spot
1.2.4
|
Kripke Structure. More...
#include <kripke/kripkeexplicit.hh>
Public Member Functions | |
kripke_explicit (bdd_dict *) | |
kripke_explicit (bdd_dict *, state_kripke *) | |
bdd_dict * | get_dict () const |
Get the dictionary associated to the automaton. More... | |
state_kripke * | get_init_state () const |
Get the initial state of the automaton. More... | |
kripke_explicit_succ_iterator * | succ_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 state * | project_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 state * | last_support_conditions_input_ |
const state * | last_support_variables_input_ |
Kripke Structure.
void spot::kripke_explicit::add_condition | ( | const ltl::formula * | f, |
std::string | on_me | ||
) |
Add a formula to the state corresponding to the name.
f | the formula to add. |
on_me | the state where to add. |
void spot::kripke_explicit::add_conditions | ( | bdd | add, |
std::string | on_me | ||
) |
Add a BDD condition to the state.
add | the condition. |
on_me | where 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.
|
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.
|
protectedvirtualinherited |
Do the actual computation of tgba::support_conditions().
Implements spot::tgba.
|
protectedvirtualinherited |
Do the actual computation of tgba::support_variables().
Implements spot::tgba.
|
virtual |
Return the name of the state.
Implements spot::tgba.
|
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.
|
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.
|
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.
|
virtualinherited |
The number of acceptance conditions.
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).
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.
|
virtualinherited |
The set of acceptance conditions that label the state s.
Implements spot::fair_kripke.
|
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.
|
virtual |
Allow to get an iterator on the state we passed in parameter.
Implements spot::tgba.
|
inherited |
Get a formula that must hold whatever successor is taken.
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.
|
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.
|
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().
t | a non-done tgba_succ_iterator for this automaton |
Reimplemented in spot::tgba_product, spot::tgba_scc, and spot::tgba_proxy.