|
spot 2.16
|
MTBDD-based representation of a state-based ω-automaton. More...
#include <spot/twaalgos/mtdswa.hh>
Public Member Functions | |
| mtdswa (const bdd_dict_ptr &dict) noexcept | |
| Construct an MTDSwA with the given BDD dictionary. | |
| bdd_dict_ptr | get_dict () const |
| Get the bdd_dict associated to this automaton. | |
| unsigned | num_roots () const |
| Return the number of root states. | |
| unsigned | num_states () const |
| The number of states in the automaton. | |
| std::ostream & | print_dot (std::ostream &os, const char *opts=nullptr) const |
| Print the MTBDD. | |
| twa_graph_ptr | as_twa (bool state_based=false, bool labels=true, bool complete=false) const |
| Convert to twa. | |
| void | sinks_as_states () |
| Convert bddtrue/bddfalse nodes to actual states. | |
| void | sinks_as_constants (bool keep_all_states=false) |
| Convert sink states to bddtrue/bddfalse constants. | |
| bdd | get_controllable_variables () const |
| Returns the conjunction of controllable variables. | |
| void | set_controllable_variables (const std::vector< std::string > &vars, bool ignore_non_registered_ap=false) |
| Declare a list of controllable variables. | |
| void | set_controllable_variables (bdd vars) |
| Declare a list of controllable variables. | |
Public Attributes | |
| std::vector< formula > | aps |
| The list of atomic propositions possibly used by the automaton. | |
| std::vector< bdd > | states |
| BDD transitions for each root state. | |
| std::vector< formula > | names |
| Name formula for each root state. | |
| std::vector< acc_cond::mark_t > | colors |
| Acceptance marks per root state. | |
| acc_cond | acc |
| Acceptance condition of the automaton. | |
| std::unordered_map< int, int > | terminal_to_state_map |
| Map terminal BDD values to state indices (debug only). | |
| std::unordered_map< int, unsigned > | highlight_nodes |
| Highlighted BDD nodes (for visualization). | |
| std::unordered_map< int, int > | highlight_groups |
| Cluster grouping for BDD nodes (for visualization). | |
MTBDD-based representation of a state-based ω-automaton.
|
inlinenoexcept |
Construct an MTDSwA with the given BDD dictionary.
| twa_graph_ptr spot::mtdswa::as_twa | ( | bool | state_based = false, |
| bool | labels = true, |
||
| bool | complete = false |
||
| ) | const |
Convert to twa.
|
inline |
Returns the conjunction of controllable variables.
|
inline |
Get the bdd_dict associated to this automaton.
|
inline |
Return the number of root states.
Note that this does not include bddtrue and bddfalse even if they are reachable.
|
inline |
The number of states in the automaton.
This counts the number of roots, plus one if the bddtrue state is reachable. This is therefore the size that the transition-based output of as_twa() would have.
| std::ostream & spot::mtdswa::print_dot | ( | std::ostream & | os, |
| const char * | opts = nullptr |
||
| ) | const |
Print the MTBDD.
Add opts="s" to show SCCs.
| void spot::mtdswa::set_controllable_variables | ( | bdd | vars | ) |
Declare a list of controllable variables.
Doing so affects the way the automaton is printed in dot format, but this is also a prerequisite for interpreting the automaton as a game.
This function is expected to be called after you have built the automaton, in some way (causing atomic propositions to be registered). If ignore_non_registered_ap is set, variable listed as output but not registered by the automaton will be dropped. Else, an exception will be raised for those variables.
| void spot::mtdswa::set_controllable_variables | ( | const std::vector< std::string > & | vars, |
| bool | ignore_non_registered_ap = false |
||
| ) |
Declare a list of controllable variables.
Doing so affects the way the automaton is printed in dot format, but this is also a prerequisite for interpreting the automaton as a game.
This function is expected to be called after you have built the automaton, in some way (causing atomic propositions to be registered). If ignore_non_registered_ap is set, variable listed as output but not registered by the automaton will be dropped. Else, an exception will be raised for those variables.
| void spot::mtdswa::sinks_as_constants | ( | bool | keep_all_states = false | ) |
Convert sink states to bddtrue/bddfalse constants.
This modifies the automaton in place so that any sink state is turned into bddtrue or bddfalse depending on its acceptance.
The original sink states will be removed and the other state will be renumbered, unless keep_all_states is set.
| void spot::mtdswa::sinks_as_states | ( | ) |
Convert bddtrue/bddfalse nodes to actual states.
This modifies the automaton in place so that it does not use the bddtrue and bddfalse constants. Those will be replaced by accepting and rejecting sinks respectively. Those new states are introduced only if no existing state can serve the same purpose.
When the acceptance condition is always accepting, or when it is always rejecting, introducing a sink state might require changing the acceptance condition. When that happens, the acceptance will be set to Büchi.
If the automaton had named states, newly introduced sinks will be named as formula::tt() or formula::ff().
| acc_cond spot::mtdswa::acc |
Acceptance condition of the automaton.
| std::vector<formula> spot::mtdswa::aps |
The list of atomic propositions possibly used by the automaton.
This is actually the list of atomic propositions that appeared in the formulas/automata that were used to build this automaton. The automaton itself may use fewer atomic propositions, for instance in case some of them cancel each other.
This vector is sorted by formula ID, to make it easy to merge with another sorted vector.
| std::vector<acc_cond::mark_t> spot::mtdswa::colors |
Acceptance marks per root state.
| std::unordered_map<int, int> spot::mtdswa::highlight_groups |
Cluster grouping for BDD nodes (for visualization).
| std::unordered_map<int, unsigned> spot::mtdswa::highlight_nodes |
Highlighted BDD nodes (for visualization).
| std::vector<formula> spot::mtdswa::names |
Name formula for each root state.
| std::vector<bdd> spot::mtdswa::states |
BDD transitions for each root state.
| std::unordered_map<int, int> spot::mtdswa::terminal_to_state_map |
Map terminal BDD values to state indices (debug only).
1.9.8