spot
1.2.6
|
Wrap a tgba to offer information about upcoming conditions. More...
#include <tgba/futurecondcol.hh>
Public Types | |
typedef scc_map::cond_set | cond_set |
typedef std::vector< cond_set > | fc_map |
Public Member Functions | |
future_conditions_collector (const tgba *aut, bool show=false) | |
Create a future_conditions_collector wrapper for aut. More... | |
const cond_set & | future_conditions (const spot::state *s) const |
Returns the set of future conditions visible after s. More... | |
virtual std::string | format_state (const state *state) const |
Format a state for output. More... | |
unsigned | scc_of_state (const spot::state *s) const |
Returns the number of the SCC s belongs to. More... | |
virtual state * | get_init_state () const |
Get the initial state of the automaton. More... | |
virtual tgba_succ_iterator * | succ_iter (const state *local_state, const state *global_state=0, const tgba *global_automaton=0) const |
Get an iterator over the successors of local_state. More... | |
virtual bdd_dict * | get_dict () const |
Get the dictionary associated to the automaton. 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 bdd | all_acceptance_conditions () const |
Return the set of all acceptance conditions used by this automaton. More... | |
virtual bdd | neg_acceptance_conditions () const |
Return the conjuction of all negated acceptance variables. More... | |
virtual bdd | compute_support_conditions (const state *state) const |
Do the actual computation of tgba::support_conditions(). More... | |
virtual bdd | compute_support_variables (const state *state) const |
Do the actual computation of tgba::support_variables(). 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 unsigned int | number_of_acceptance_conditions () const |
The number of acceptance conditions. More... | |
Protected Member Functions | |
void | map_builder_ (unsigned s) |
Protected Attributes | |
fc_map | future_conds_ |
const tgba * | aut_ |
scc_map | scc_map_ |
bool | show_ |
const state * | last_support_conditions_input_ |
const state * | last_support_variables_input_ |
Wrap a tgba to offer information about upcoming conditions.
This class is a spot::tgba wrapper that simply add a new method, future_conditions(), to any spot::tgba.
This new method returns a set of conditions that can be seen on a transitions accessible (maybe indirectly) from the given state.
spot::future_conditions_collector::future_conditions_collector | ( | const tgba * | aut, |
bool | show = false |
||
) |
Create a future_conditions_collector wrapper for aut.
If show is set to true, then the format_state() method will include the set of conditions computed for the given state in its output string.
|
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.
|
virtualinherited |
Do the actual computation of tgba::support_conditions().
Implements spot::tgba.
|
virtualinherited |
Do the actual computation of tgba::support_variables().
Implements spot::tgba.
|
virtual |
Format a state for output.
If the constructor was called with show set to true, then this method will include the set of conditions computed for state by future_conditions() in the output string.
Reimplemented from spot::tgba_scc.
const cond_set& spot::future_conditions_collector::future_conditions | ( | const spot::state * | s) | const |
Returns the set of future conditions visible after s.
|
virtualinherited |
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.
|
virtualinherited |
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.
|
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).
state*
(the projected state) that must be destroyed by the caller. Reimplemented from spot::tgba.
|
inherited |
Returns the number of the SCC s belongs to.
|
virtualinherited |
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.
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.
|
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 from spot::tgba.