mCRL2
|
implements the main algorithm for the branching bisimulation quotient More...
#include <liblts_bisim_gj.h>
Public Member Functions | |
bisim_partitioner_gj (LTS_TYPE &aut, const bool branching=false, const bool preserve_divergence=false) | |
constructor | |
std::size_t | num_eq_classes () const |
Calculate the number of equivalence classes. | |
state_index | get_eq_class (const state_index si) const |
Get the equivalence class of a state. | |
void | finalize_minimized_LTS () |
Adapt the LTS after minimisation. | |
bool | in_same_class (state_index const s, state_index const t) const |
Check whether two states are in the same equivalence class. | |
Public Attributes | |
LTS_TYPE & | m_aut |
automaton that is being reduced | |
std::vector< state_type_gj > | m_states |
std::vector< transition_pointer_pair > | m_outgoing_transitions |
std::vector< transition_type > | m_transitions |
std::vector< state_index > | m_states_in_blocks |
std::vector< block_type > | m_blocks |
std::vector< constellation_type > | m_constellations |
std::vector< transition_index > | m_BLC_transitions |
Protected Types | |
typedef std::unordered_set< state_index > | set_of_states_type |
typedef std::unordered_set< transition_index > | set_of_transitions_type |
typedef std::vector< constellation_index > | set_of_constellations_type |
typedef std::unordered_map< std::pair< label_index, constellation_index >, set_of_states_type > | label_constellation_to_set_of_states_map |
typedef std::unordered_map< std::pair< block_index, label_index >, transition_index > | block_label_to_size_t_map |
Protected Member Functions | |
void | check_transitions (const bool check_temporary_complexity_counters, const bool check_block_to_constellation=true) |
bool | check_data_structures (const std::string &tag, const bool initialisation=false, const bool check_temporary_complexity_counters=true) |
bool | check_stability (const std::string &tag, const std::vector< label_index > *const todo_stack_labels=nullptr, const block_label_to_size_t_map *const block_label_to_cotransition=nullptr, const constellation_index old_constellation=-1) |
void | add_work_to_same_saC (const bool initialisation, const state_index si, const label_index a, const constellation_index C, const enum check_complexity::counter_type ctr, const unsigned max_value) |
void | display_BLC_list (const block_index bi) const |
void | print_data_structures (const std::string &header, const bool initialisation=false) const |
std::string | ptr (const transition &t) const |
std::string | ptr (const transition_index ti) const |
state_index | number_of_states_in_block (const block_index B) const |
state_index | number_of_states_in_constellation (const constellation_index C) const |
void | swap_states_in_states_in_block (typename std::vector< state_index >::iterator pos1, typename std::vector< state_index >::iterator pos2) |
void | swap_states_in_states_in_block (typename std::vector< state_index >::iterator pos1, typename std::vector< state_index >::iterator pos2, typename std::vector< state_index >::iterator pos3) |
block_index | split_block_B_into_R_and_BminR (const block_index B, const todo_state_vector &R, std::function< void(const state_index)> update_Ptilde) |
bool | swap_in_the_doubly_linked_list_LBC_in_blocks (const transition_index ti, linked_list< BLC_indicators >::iterator new_BLC_block, linked_list< BLC_indicators >::iterator old_BLC_block) |
void | update_the_doubly_linked_list_LBC_new_constellation (const block_index index_block_B, const transition &t, const transition_index ti) |
transition_index | update_the_doubly_linked_list_LBC_new_block (const block_index old_bi, const block_index new_bi, const transition_index ti) |
void | clear_state_counters (bool restrict_to_R=false) |
template<std::size_t VARIANT, class MARKED_STATE_TRANSITION_ITERATOR , class UNMARKED_STATE_ITERATOR > | |
block_index | simple_splitB (const block_index B, const MARKED_STATE_TRANSITION_ITERATOR M_begin, const MARKED_STATE_TRANSITION_ITERATOR M_end, const UNMARKED_STATE_ITERATOR M_co_begin, const UNMARKED_STATE_ITERATOR M_co_end, const bool initialisation, const label_index a, const constellation_index C, bool &M_in_bi, std::function< void(const state_index)> update_Ptilde) |
void | make_transition_non_inert (const transition &t) |
void | change_non_bottom_state_to_bottom_state (const state_index si, const bool initialisation=false) |
template<std::size_t VARIANT, class MARKED_STATE_TRANSITION_ITERATOR , class UNMARKED_STATE_ITERATOR > | |
block_index | splitB (const block_index B, const MARKED_STATE_TRANSITION_ITERATOR M_begin, const MARKED_STATE_TRANSITION_ITERATOR M_end, const UNMARKED_STATE_ITERATOR M_co_begin, const UNMARKED_STATE_ITERATOR M_co_end, const label_index a, const constellation_index C, bool &M_in_new_block, std::function< void(const block_index, const block_index, const transition_index, const transition_index)> update_block_label_to_cotransition, const bool initialisation=false, std::function< void(const transition_index, const transition_index, const block_index)> process_transition=[](const transition_index, const transition_index, const block_index){}, std::function< void(const state_index)> update_Ptilde=[](const state_index){}) |
void | accumulate_entries_into_not_investigated (std::vector< label_count_sum_triple > &action_counter, const std::vector< block_index > &todo_stack) |
void | accumulate_entries (std::vector< transition_index > &counter) |
void | reset_entries (std::vector< label_count_sum_triple > &action_counter, std::vector< block_index > &todo_stack) |
transition_index | accumulate_entries (std::vector< transition_index > &action_counter, const std::vector< label_index > &todo_stack) const |
void | group_in_situ (const std::vector< transition_index >::iterator begin, const std::vector< transition_index >::iterator end, std::vector< block_index > &todo_stack, std::vector< label_count_sum_triple > &value_counter) |
void | create_initial_partition () |
void | stabilizeB () |
void | maintain_block_label_to_cotransition (const block_index old_block, const block_index new_block, const transition_index moved_transition, const transition_index alternative_transition, block_label_to_size_t_map &block_label_to_cotransition, const constellation_index ci) const |
transition_index | find_inert_co_transition_for_block (const block_index index_block_B, const constellation_index old_constellation) |
bool | state_has_outgoing_co_transition (const transition_index transition_to_bi, const constellation_index old_constellation) |
bool | some_bottom_state_has_no_outgoing_co_transition (block_index B, std::vector< transition_index >::iterator transitions_begin, std::vector< transition_index >::iterator transitions_end, const constellation_index old_constellation, std::vector< state_index >::iterator &first_unmarked_bottom_state) |
bool | W_empty (const set_of_states_type &W, const set_of_states_type &aux, const label_index a, const constellation_index C, std::vector< state_index >::iterator &first_unmarked_bottom_state) |
bool | not_all_bottom_states_are_touched (const block_index bi, const std::vector< transition_index >::iterator begin, const std::vector< transition_index >::iterator end, std::vector< state_index >::iterator &first_unmarked_bottom_state) |
bool | hatU_does_not_cover_B_bottom (const block_index index_block_B, const constellation_index old_constellation, std::vector< state_index >::iterator first_unmarked_bottom_state) |
block_index | select_and_remove_a_block_in_a_non_trivial_constellation (constellation_index &ci) |
void | refine_partition_until_it_becomes_stable () |
Protected Attributes | |
std::vector< state_index > | m_P |
todo_state_vector | m_R |
todo_state_vector | m_U |
std::vector< state_index > | m_U_counter_reset_vector |
set_of_constellations_type | m_non_trivial_constellations |
const bool | m_branching |
true iff branching (not strong) bisimulation has been requested | |
const bool | m_preserve_divergence |
true iff divergence-preserving branching bisimulation has been requested | |
implements the main algorithm for the branching bisimulation quotient
Definition at line 633 of file liblts_bisim_gj.h.
|
protected |
Definition at line 643 of file liblts_bisim_gj.h.
|
protected |
Definition at line 642 of file liblts_bisim_gj.h.
|
protected |
Definition at line 639 of file liblts_bisim_gj.h.
|
protected |
Definition at line 637 of file liblts_bisim_gj.h.
|
protected |
Definition at line 638 of file liblts_bisim_gj.h.
|
inline |
constructor
The constructor constructs the data structures and immediately calculates the partition corresponding with the bisimulation quotient. It destroys the transitions on the LTS (to save memory) but does not adapt the LTS to represent the quotient's transitions. It is assumed that there are no tau-loops in aut.
aut | LTS that needs to be reduced |
branching | If true branching bisimulation is used, otherwise strong bisimulation is applied. |
preserve_divergence | If true and branching is true, preserve tau loops on states. |
Definition at line 1291 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 2634 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 2610 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 2596 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1091 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 2302 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 761 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 966 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 686 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1782 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 2744 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1132 of file liblts_bisim_gj.h.
|
inline |
Adapt the LTS after minimisation.
After the efficient branching bisimulation minimisation, the information about the quotient LTS is only stored in the partition data structure of the partitioner object. This function exports the information back to the LTS by adapting its states and transitions: it updates the number of states and adds those transitions that are mandated by the partition data structure. If desired, it also creates a vector containing an arbritrary (example) original state per equivalence class.
The main parameter and return value are implicit with this function: a reference to the LTS was stored in the object by the constructor.
Definition at line 1349 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 3456 of file liblts_bisim_gj.h.
|
inline |
Get the equivalence class of a state.
After running the minimisation algorithm, this function produces the number of the equivalence class of a state. This number is the same as the number of the state in the minimised LTS to which the original state is mapped.
s | state whose equivalence class needs to be found |
Definition at line 1330 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 2650 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 3695 of file liblts_bisim_gj.h.
|
inline |
Check whether two states are in the same equivalence class.
s | first state that needs to be compared. |
t | second state that needs to be compared. |
Definition at line 1416 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 3412 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 2295 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 3647 of file liblts_bisim_gj.h.
|
inline |
Calculate the number of equivalence classes.
The number of equivalence classes (which is valid after the partition has been constructed) is equal to the number of states in the bisimulation quotient.
Definition at line 1317 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1437 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1442 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1169 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1422 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1427 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 3785 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 2621 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 3764 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1818 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 3516 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1482 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 2355 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 3166 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 3486 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1592 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1447 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1458 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1709 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 1639 of file liblts_bisim_gj.h.
|
inlineprotected |
Definition at line 3585 of file liblts_bisim_gj.h.
LTS_TYPE& mcrl2::lts::detail::bisim_partitioner_gj< LTS_TYPE >::m_aut |
automaton that is being reduced
Definition at line 649 of file liblts_bisim_gj.h.
std::vector<transition_index> mcrl2::lts::detail::bisim_partitioner_gj< LTS_TYPE >::m_BLC_transitions |
Definition at line 661 of file liblts_bisim_gj.h.
std::vector<block_type> mcrl2::lts::detail::bisim_partitioner_gj< LTS_TYPE >::m_blocks |
Definition at line 659 of file liblts_bisim_gj.h.
|
protected |
true iff branching (not strong) bisimulation has been requested
Definition at line 674 of file liblts_bisim_gj.h.
std::vector<constellation_type> mcrl2::lts::detail::bisim_partitioner_gj< LTS_TYPE >::m_constellations |
Definition at line 660 of file liblts_bisim_gj.h.
|
protected |
Definition at line 670 of file liblts_bisim_gj.h.
std::vector<transition_pointer_pair> mcrl2::lts::detail::bisim_partitioner_gj< LTS_TYPE >::m_outgoing_transitions |
Definition at line 654 of file liblts_bisim_gj.h.
|
protected |
Definition at line 663 of file liblts_bisim_gj.h.
|
protected |
true iff divergence-preserving branching bisimulation has been requested
Note that this field must be false if strong bisimulation has been requested. There is no such thing as divergence-preserving strong bisimulation.
Definition at line 681 of file liblts_bisim_gj.h.
|
protected |
Definition at line 667 of file liblts_bisim_gj.h.
std::vector<state_type_gj> mcrl2::lts::detail::bisim_partitioner_gj< LTS_TYPE >::m_states |
Definition at line 652 of file liblts_bisim_gj.h.
std::vector<state_index> mcrl2::lts::detail::bisim_partitioner_gj< LTS_TYPE >::m_states_in_blocks |
Definition at line 658 of file liblts_bisim_gj.h.
std::vector<transition_type> mcrl2::lts::detail::bisim_partitioner_gj< LTS_TYPE >::m_transitions |
Definition at line 657 of file liblts_bisim_gj.h.
|
protected |
Definition at line 667 of file liblts_bisim_gj.h.
|
protected |
Definition at line 668 of file liblts_bisim_gj.h.