A Transition-based Generalized Büchi Automaton.The acronym TGBA (Transition-based Generalized Büchi Automaton) was coined by Dimitra Giannakopoulou and Flavio Lerda in "From States to Transitions: Improving Translation of LTL Formulae to Büchi Automata". (FORTE'02). More...
#include <tgba/tgba.hh>
Public Member Functions | |
virtual | ~tgba () |
virtual state * | get_init_state () const =0 |
Get the initial state of the automaton. | |
virtual tgba_succ_iterator * | succ_iter (const state *local_state, const state *global_state=0, const tgba *global_automaton=0) const =0 |
Get an iterator over the successors of local_state. | |
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 bdd_dict * | get_dict () const =0 |
Get the dictionary associated to the automaton. | |
virtual std::string | format_state (const state *state) const =0 |
Format the state as a string for printing. | |
virtual std::string | transition_annotation (const tgba_succ_iterator *t) const |
Return a possible annotation for the transition pointed to by the iterator. | |
virtual state * | project_state (const state *s, const tgba *t) const |
Project a state on an automaton. | |
virtual bdd | all_acceptance_conditions () const =0 |
Return the set of all acceptance conditions used by this automaton. | |
virtual unsigned int | number_of_acceptance_conditions () const |
The number of acceptance conditions. | |
virtual bdd | neg_acceptance_conditions () const =0 |
Return the conjuction of all negated acceptance variables. | |
Protected Member Functions | |
tgba () | |
virtual bdd | compute_support_conditions (const state *state) const =0 |
Do the actual computation of tgba::support_conditions(). | |
virtual bdd | compute_support_variables (const state *state) const =0 |
Do the actual computation of tgba::support_variables(). | |
Private Attributes | |
const state * | last_support_conditions_input_ |
bdd | last_support_conditions_output_ |
const state * | last_support_variables_input_ |
bdd | last_support_variables_output_ |
int | num_acc_ |
A Transition-based Generalized Büchi Automaton.
The acronym TGBA (Transition-based Generalized Büchi Automaton) was coined by Dimitra Giannakopoulou and Flavio Lerda in "From States to Transitions: Improving Translation of LTL Formulae to Büchi Automata". (FORTE'02).
TGBAs are transition-based, meanings their labels are put on arcs, not on nodes. They use Generalized Büchi acceptance conditions: there are several acceptance sets (of transitions), and a path can be accepted only if it traverses at least one transition of each set infinitely often.
Browsing such automaton can be achieved using two functions: get_init_state
, and succ_iter
. The former returns the initial state while the latter lists the successor states of any state.
Note that although this is a transition-based automata, we never represent transitions! Transition informations are obtained by querying the iterator over the successors of a state.
spot::tgba::tgba | ( | ) | [protected] |
virtual spot::tgba::~tgba | ( | ) | [virtual] |
virtual bdd spot::tgba::all_acceptance_conditions | ( | ) | const [pure virtual] |
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.
Implemented in spot::kripke, spot::taa_tgba, spot::tgba_bdd_concrete, spot::tgba_explicit, spot::tgba_kv_complement, spot::tgba_product, spot::tgba_safra_complement, spot::tgba_scc, spot::tgba_sgba_proxy, spot::tgba_tba_proxy, and spot::tgba_union.
virtual bdd spot::tgba::compute_support_conditions | ( | const state * | state | ) | const [protected, pure virtual] |
Do the actual computation of tgba::support_conditions().
Implemented in spot::fair_kripke, spot::taa_tgba, spot::tgba_bdd_concrete, spot::tgba_explicit, spot::tgba_kv_complement, spot::tgba_product, spot::tgba_safra_complement, spot::tgba_scc, spot::tgba_sgba_proxy, spot::tgba_tba_proxy, and spot::tgba_union.
virtual bdd spot::tgba::compute_support_variables | ( | const state * | state | ) | const [protected, pure virtual] |
Do the actual computation of tgba::support_variables().
Implemented in spot::fair_kripke, spot::taa_tgba, spot::tgba_bdd_concrete, spot::tgba_explicit, spot::tgba_kv_complement, spot::tgba_product, spot::tgba_safra_complement, spot::tgba_scc, spot::tgba_sgba_proxy, spot::tgba_tba_proxy, and spot::tgba_union.
virtual std::string spot::tgba::format_state | ( | const state * | state | ) | const [pure virtual] |
Format the state as a string for printing.
This formating is the responsability of the automata that owns the state.
Implemented in spot::future_conditions_collector, spot::taa_tgba, spot::taa_tgba_labelled< label, label_hash >, spot::tgba_bdd_concrete, spot::tgba_explicit, spot::tgba_explicit_string, spot::tgba_explicit_formula, spot::tgba_kv_complement, spot::tgba_product, spot::tgba_reduc, spot::tgba_safra_complement, spot::tgba_scc, spot::tgba_sgba_proxy, spot::tgba_tba_proxy, spot::tgba_union, spot::taa_tgba_labelled< const ltl::formula *, ltl::formula_ptr_hash >, and spot::taa_tgba_labelled< std::string, string_hash >.
virtual bdd_dict* spot::tgba::get_dict | ( | ) | const [pure virtual] |
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.
Implemented in spot::taa_tgba, spot::tgba_bdd_concrete, spot::tgba_explicit, spot::tgba_kv_complement, spot::tgba_product, spot::tgba_safra_complement, spot::tgba_scc, spot::tgba_sgba_proxy, spot::tgba_tba_proxy, and spot::tgba_union.
virtual state* spot::tgba::get_init_state | ( | ) | const [pure virtual] |
Get the initial state of the automaton.
The state has been allocated with new
. It is the responsability of the caller to delete
it when no longer needed.
Implemented in spot::taa_tgba, spot::tgba_bdd_concrete, spot::tgba_explicit, spot::tgba_kv_complement, spot::tgba_product, spot::tgba_safra_complement, spot::tgba_scc, spot::tgba_sgba_proxy, spot::tgba_tba_proxy, spot::tgba_sba_proxy, and spot::tgba_union.
virtual bdd spot::tgba::neg_acceptance_conditions | ( | ) | const [pure virtual] |
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.
Implemented in spot::kripke, spot::taa_tgba, spot::tgba_bdd_concrete, spot::tgba_explicit, spot::tgba_kv_complement, spot::tgba_product, spot::tgba_safra_complement, spot::tgba_scc, spot::tgba_sgba_proxy, spot::tgba_tba_proxy, and spot::tgba_union.
virtual unsigned int spot::tgba::number_of_acceptance_conditions | ( | ) | const [virtual] |
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 deleted by the caller. Reimplemented in spot::tgba_product, spot::tgba_scc, spot::tgba_tba_proxy, and spot::tgba_union.
virtual tgba_succ_iterator* spot::tgba::succ_iter | ( | const state * | local_state, | |
const state * | global_state = 0 , |
|||
const tgba * | global_automaton = 0 | |||
) | const [pure virtual] |
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 delete 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. |
Implemented in spot::taa_tgba, spot::tgba_bdd_concrete, spot::tgba_explicit, spot::tgba_kv_complement, spot::tgba_product, spot::tgba_safra_complement, spot::tgba_scc, spot::tgba_sgba_proxy, spot::tgba_tba_proxy, and spot::tgba_union.
bdd spot::tgba::support_conditions | ( | const state * | state | ) | const |
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.
bdd spot::tgba::support_variables | ( | const state * | state | ) | const |
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] |
Return a possible annotation for the transition pointed to by the iterator.
Implementing this function is optional; the default annotation it the empty string.
t | a non-done tgba_succ_iterator for this automata |
Reimplemented in spot::tgba_product, spot::tgba_scc, and spot::tgba_tba_proxy.
const state* spot::tgba::last_support_conditions_input_ [mutable, private] |
bdd spot::tgba::last_support_conditions_output_ [mutable, private] |
const state* spot::tgba::last_support_variables_input_ [mutable, private] |
bdd spot::tgba::last_support_variables_output_ [mutable, private] |
int spot::tgba::num_acc_ [mutable, private] |