LydiaSyft
|
A DFA with symbolic states and transitions. More...
#include <SymbolicStateDfa.h>
Public Member Functions | |
std::shared_ptr< VarMgr > | var_mgr () const |
Returns the variable manager. | |
std::size_t | automaton_id () const |
Returns the automaton ID. More... | |
std::vector< int > | initial_state () const |
Returns the bitvector representing the initial state of the DFA. | |
CUDD::BDD | initial_state_bdd () const |
Returns the BDD representing the initial state of the DFA. | |
CUDD::BDD | final_states () const |
Returns the BDD encoding the set of final states. | |
std::vector< CUDD::BDD > | transition_function () const |
Returns the transition function of the DFA as a vector of BDDs. More... | |
void | restrict_dfa_with_states (const CUDD::BDD &valid_states) |
Restrict a symbolic DFA with a given set of states. More... | |
void | restrict_dfa_with_transitions (const CUDD::BDD &feasible_moves) |
Restrict a symbolic DFA with a set of feasible moves. More... | |
void | dump_dot (const std::string &filename) const |
Saves the symbolic representation of the DFA in a .dot file. More... | |
void | new_sink_states (const CUDD::BDD &sink_states) |
Shrink a set of states to a sink state. More... | |
Static Public Member Functions | |
static SymbolicStateDfa | from_explicit (const ExplicitStateDfaAdd &explicit_dfa) |
Converts an explicit DFA to a symbolic representation. More... | |
static SymbolicStateDfa | from_predicates (std::shared_ptr< VarMgr > var_mgr, std::vector< CUDD::BDD > predicates) |
Creates a simple automaton that remembers the value of predicates. More... | |
static SymbolicStateDfa | product_AND (const std::vector< SymbolicStateDfa > &dfa_vector) |
Returns a product AND of two symbolic DFAs. More... | |
static std::vector< int > | state_to_binary (std::size_t state, std::size_t bit_count) |
Returns the binary encoding of a given state index. More... | |
static SymbolicStateDfa | product_OR (const std::vector< SymbolicStateDfa > &dfa_vector) |
Returns a product AND of two symbolic DFAs. More... | |
static SymbolicStateDfa | complement (const SymbolicStateDfa dfa) |
Returns the complement of a symbolic DFA. More... | |
A DFA with symbolic states and transitions.
Shufang Zhu, Lucas M. Tabajara, Jianwen Li, Geguang Pu, Moshe Y. Vardi: Symbolic LTLf Synthesis. IJCAI 2017: 1362-1369
std::size_t Syft::SymbolicStateDfa::automaton_id | ( | ) | const |
Returns the automaton ID.
This ID can be used to retrieve the associated state variables from the variable manager.
|
static |
Returns the complement of a symbolic DFA.
dfa | The DFA to be complemented. |
void Syft::SymbolicStateDfa::dump_dot | ( | const std::string & | filename | ) | const |
Saves the symbolic representation of the DFA in a .dot file.
The file includes both the BDDs representing the transition function and the BDD representing the final states.
filename | The name of the file to save the symbolic DFA to. |
|
static |
Converts an explicit DFA to a symbolic representation.
Encodes the state space of the DFA in a logarithmic number of state variables, using BDDs to represent the transition function and the set of final states.
explicit_dfa | The explicit DFA to be converted. |
|
static |
Creates a simple automaton that remembers the value of predicates.
var_mgr | The variable manager to use to create the state variables. |
predicates | A vector of BDDs over named variables representing the predicates to remember. |
void Syft::SymbolicStateDfa::new_sink_states | ( | const CUDD::BDD & | sink_states | ) |
Shrink a set of states to a sink state.
sink_states | The set of states to shrink. |
|
static |
Returns a product AND of two symbolic DFAs.
first_dfa | The first DFA. |
second_dfa | The second DFA. |
|
static |
Returns a product AND of two symbolic DFAs.
first_dfa | The first DFA. |
second_dfa | The second DFA. |
void Syft::SymbolicStateDfa::restrict_dfa_with_states | ( | const CUDD::BDD & | valid_states | ) |
Restrict a symbolic DFA with a given set of states.
Basically restrict a DFA to a set of states from the DFA.
valid_states | The set of states to be kept. |
void Syft::SymbolicStateDfa::restrict_dfa_with_transitions | ( | const CUDD::BDD & | feasible_moves | ) |
Restrict a symbolic DFA with a set of feasible moves.
feasible_moves | The set of feasible moves to be kept. |
|
static |
Returns the binary encoding of a given state index.
state | The state index. |
bit_count | The number of bits in the binary encoding DFA. |
std::vector< CUDD::BDD > Syft::SymbolicStateDfa::transition_function | ( | ) | const |
Returns the transition function of the DFA as a vector of BDDs.
The BDD in index i computes the value of state variable i in the next step, given the current values of the state and alphabet variables.