23#ifndef _LIBLTS_BISIM_GJKW_H
24#define _LIBLTS_BISIM_GJKW_H
26#include <unordered_map>
29#include "mcrl2/lts/detail/liblts_scc.h"
30#include "mcrl2/lts/detail/liblts_merge.h"
31#include "mcrl2/lts/detail/check_complexity.h"
32#include "mcrl2/lts/detail/fixed_vector.h"
47 #define ONLY_IF_DEBUG(...) __VA_ARGS__
49 #define ONLY_IF_DEBUG(...)
341 return std::to_string(
this - s_i_begin);
348 return "state " + debug_id_short();
364 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
460#define BLOCK_NO_SEQNR ((state_type) -1
)
651 new_unmarked_nonbottom_end)
667 new_marked_nonbottom_begin)
789 return "block [" + std::to_string(begin() - perm_begin) +
"," +
790 std::to_string(end() - perm_begin) +
")" +
791 (
BLOCK_NO_SEQNR != seqnr() ?
" (#"+std::to_string(seqnr())+
")" :
"");
803 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
965 block_t*
const LastB = end()[-1]->block; assert(FirstB != LastB);
1001 return "constellation [" +
1002 std::to_string(begin() - block_t::permutation_begin()) +
1003 "," + std::to_string(end() - block_t::permutation_begin()) +
1004 ") (#" + std::to_string(sort_key) +
")";
1010template <
class LTS_TYPE>
1036 template <
class LTS_TYPE>
1051 block_t::perm_begin = permutation.begin();
1052 state_info_entry::s_i_begin = state_info.data();
1061 { assert(state_info.empty()); assert(permutation.empty());
1073 for (permutation_iter_t permutation_iter = permutation.end();
1074 permutation.begin() != permutation_iter; )
1076 constln_t*
const C = permutation_iter[-1]->constln(); assert(C->end() == permutation_iter);
1078 assert(permutation_iter[-1]->block->begin() == C->begin());
1079 permutation_iter = C->begin();
1085 for (permutation_iter_t permutation_iter = permutation.end();
1086 permutation.begin() != permutation_iter; )
1088 block_t*
const B = permutation_iter[-1]->block; assert(B->end() == permutation_iter);
1089 permutation_iter = B->begin();
1092 else assert(0 == deleted_blocks);
1098 permutation.clear();
1110 return state_info[s].block;
1189
1190
1234 int_slice_begin_or_before_end;
1244 int_slice_begin_or_before_end;
1251 if (this_ < this_->int_slice_begin_or_before_end)
1252 { assert(this_->int_slice_begin_or_before_end->
1253 int_slice_begin_or_before_end <= this_);
1254 return this_->int_slice_begin_or_before_end + 1;
1255 } assert(this_->int_slice_begin_or_before_end->
1256 int_slice_begin_or_before_end == this_);
1265 if (this_ < this_->int_slice_begin_or_before_end)
1266 { assert(this_->int_slice_begin_or_before_end->
1267 int_slice_begin_or_before_end <= this_);
1268 return this_->int_slice_begin_or_before_end + 1;
1269 } assert(this_->int_slice_begin_or_before_end->
1270 int_slice_begin_or_before_end == this_);
1276 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1295 return "from " +
source->debug_id_short() +
" to " +
1296 succ->target->debug_id_short();
1303 return "transition " + debug_id_short();
1306 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1318 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1329 while (++iter != end)
1333 add_work_notemporary(ctr, max_value), );
1339
1353 return begin->pred->source->block;
1357 return begin->pred->source->block;
1363 return begin->pred->succ->target->constln();
1367 return begin->pred->succ->target->constln();
1387 std::string result(
"slice containing transition");
1388 if (end - begin > 1)
1393 assert(iter->pred->succ->B_to_C == iter);
1394 result += iter->pred->debug_id_short();
1397 assert(iter[1].pred->succ->B_to_C == iter+1);
1399 result += iter[1].pred->debug_id_short();
1403 while (++iter !=
end)
1405 assert(iter->pred->succ->B_to_C == iter);
1407 result += iter->pred->debug_id_short();
1412 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1428 if (iter->pred->source->pos >=
1429 iter->pred->source->block->bottom_begin())
1436 add_work_notemporary(ctr, max_value), );
1463 template <
class LTS_TYPE>
1467 { assert(B_to_C.end() > pos1); assert(pos1->pred->succ->B_to_C == pos1);
1468 assert(B_to_C.end() > pos2); assert(pos2->pred->succ->B_to_C == pos2);
1471 *pos1->pred = *pos2->pred;
1472 *pos2->pred = temp_entry;
1475 pos1->pred = pos2->pred;
1476 pos2->pred = temp_iter; assert(B_to_C.end() > pos1); assert(pos1->pred->succ->B_to_C == pos1);
1477 assert(B_to_C.end() > pos2); assert(pos2->pred->succ->B_to_C == pos2);
1481 { assert(pred.end() > pos1); assert(pos1->succ->B_to_C->pred == pos1);
1482 assert(pred.end() > pos2); assert(pos2->succ->B_to_C->pred == pos2);
1483 assert(pos1->succ->slice_begin() == pos2->succ->slice_begin());
1488 pos1->succ->B_to_C = pos2->succ->B_to_C;
1489 pos1->succ->target = pos2->succ->target;
1490 pos2->succ->B_to_C = temp_B_to_C;
1491 pos2->succ->target = temp_target;
1494 pos1->succ = pos2->succ;
1495 pos2->succ = temp_iter; assert(pred.end() > pos1); assert(pos1->succ->B_to_C->pred == pos1);
1496 assert(pred.end() > pos2); assert(pos2->succ->B_to_C->pred == pos2);
1497 assert(pos1->succ->slice_begin() == pos2->succ->slice_begin());
1502 { assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1503 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1507 std::swap(*pos1->B_to_C,*pos2->B_to_C);
1510 pos1->B_to_C =
std::move(pos2->B_to_C);
1511 pos2->B_to_C =
std::move(temp_iter);
1512 } assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1513 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1519 { assert((pos1->B_to_C <= pos3->B_to_C && pos3->B_to_C <= pos2->B_to_C) ||
1520 (pos2->B_to_C <= pos3->B_to_C && pos3->B_to_C <= pos1->B_to_C));
1521 if (pos2 == pos3 || pos1 == pos3)
1526 { assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1527 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1528 assert(succ.end() > pos3); assert(pos3->B_to_C->pred->succ == pos3);
1529 assert(pos1 != pos2); assert(pos1 != pos3); assert(pos2 != pos3);
1532 *pos1->B_to_C =
std::move(*pos3->B_to_C);
1533 *pos3->B_to_C =
std::move(*pos2->B_to_C);
1534 *pos2->B_to_C =
std::move(temp_entry);
1537 pos2->B_to_C =
std::move(pos3->B_to_C);
1538 pos3->B_to_C =
std::move(pos1->B_to_C);
1539 pos1->B_to_C =
std::move(temp_iter); assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1540 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1541 assert(succ.end() > pos3); assert(pos3->B_to_C->pred->succ == pos3);
1551 { assert(B_to_C.empty()); assert(succ.empty()); assert(pred.empty());
1567
1568
1569
1570
1571
1572
1573
1574
1578
1579
1580
1581
1582
1584 bool first_transition_of_state,
bool first_transition_of_block);
1587
1588
1589
1590
1591
1596
1601 succ_iter->B_to_C->pred->source->block->inert_begin(); assert(succ_iter->B_to_C->B_to_C_slice->begin <= other_B_to_C);
1602 assert(other_B_to_C <= succ_iter->B_to_C);
1603 assert(succ_iter->B_to_C < succ_iter->B_to_C->B_to_C_slice->end);
1605 succ_iter->B_to_C->pred->source->block->set_inert_begin(other_B_to_C +
1608 pred_iter_t const other_pred = succ_iter->target->inert_pred_begin(); assert(succ_iter->target->pred_begin() <= other_pred);
1609 assert(other_pred <= succ_iter->B_to_C->pred);
1610 assert(succ_iter->B_to_C->pred < succ_iter->target->pred_end());
1611 swap_in(succ_iter->B_to_C
, other_pred->succ->B_to_C
);
1612 succ_iter->target->set_inert_pred_begin(other_pred + 1);
1615 succ_iter->B_to_C->pred->source->inert_succ_begin(); assert(succ_iter->B_to_C->pred->source->succ_begin() <= other_succ);
1616 assert(other_succ <= succ_iter);
1617 assert(succ_iter < succ_iter->B_to_C->pred->source->succ_end());
1618 swap_out(succ_iter->B_to_C->pred
, other_succ->B_to_C->pred
);
1619 succ_iter->B_to_C->pred->source->set_inert_succ_begin(other_succ + 1);
1623
1624
1625
1626
1627
1628
1629
1630
1668
1669
1682template<
class LTS_TYPE>
1706 return first == other.first &&
second == other.second;
1734 bool preserve_divergence);
1738 bool branching,
bool preserve_divergence);
1745 bool preserve_divergence);
1757
1758
1762struct refine_shared_t;
1768template <
class LTS_TYPE>
1780 bool preserve_divergence =
false)
1784 { assert(branching || !preserve_divergence);
1801 init_helper.replace_transition_system(part_st,
ONLY_IF_DEBUG( branching, )
1802 preserve_divergence);
1812 return part_st.block(s)->seqnr();
1817 return part_st.block(s) == part_st.block(t);
1825 bool preserve_divergence);
1834 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1867
1868
1869
1870
1871
1872
1873
1874
1875template <
class LTS_TYPE>
1877 bool preserve_divergence =
false);
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892template <
class LTS_TYPE>
1894 bool branching =
false,
bool preserve_divergence =
false,
1895 bool generate_counter_examples =
false);
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912template <
class LTS_TYPE>
1914 bool branching =
false,
bool preserve_divergence =
false);
1917template <
class LTS_TYPE>
1918void bisimulation_reduce_gjkw(LTS_TYPE& l,
bool const branching ,
1919 bool const preserve_divergence )
1924 scc_reduce(l, preserve_divergence);
1930 preserve_divergence);
1933 bisim_part.replace_transition_system(branching, preserve_divergence);
1936template <
class LTS_TYPE>
1938 bool branching ,
bool preserve_divergence )
1940 LTS_TYPE l1_copy(l1);
1941 LTS_TYPE l2_copy(l2);
1942 return destructive_bisimulation_compare_gjkw(l1_copy, l2_copy, branching,
1943 preserve_divergence);
1946template <
class LTS_TYPE>
1948 bool branching ,
bool preserve_divergence ,
1949 bool generate_counter_examples ,
1950 const std::string& ,
1953 if (generate_counter_examples)
1956 "not generate counterexamples.\n";
1958 state_type init_l2 = l2.initial_state() + l1.num_states();
1966 scc_part.replace_transition_system(preserve_divergence);
1967 init_l2 = scc_part.get_eq_class(init_l2);
1971 preserve_divergence);
1972 return bisim_part.in_same_class(l1.initial_state(), init_l2);
2022 assert(iter->from_block() ==
this);
2023 assert(iter->to_constln() != SpC);
2037 } assert(new_fromred->from_block() ==
this);
2053 assert(succ_begin() == current_constln() || succ_end() == current_constln() ||
2054 *current_constln()[-1].target->constln() <
2055 *current_constln()->target->constln());
2081 assert(succ_begin() == current_constln() || succ_end() == current_constln() ||
2082 *current_constln()[-1].target->constln() <
2083 *current_constln()->target->constln());
2093 if (current_constln() != succ_begin() &&
2094 *SpC <= *current_constln()[-1].target->constln())
#define mCRL2complexity(unit, call, info_for_debug)
Assigns work to a counter and checks for errors.
const aterm & operator[](const size_type i) const
Returns the i-th argument.
aterm & operator=(const aterm &other) noexcept=default
const function_symbol & function() const
Returns the function symbol belonging to an aterm.
aterm(const aterm &other) noexcept=default
This class has user-declared copy constructor so declare default copy and move operators.
const function_symbol & function() const noexcept
bool operator!=(const function_symbol &f) const
Inequality test.
bool operator==(const function_symbol &f) const
Equality test.
std::size_t m_top_of_stack
unprotected_aterm_core m_stack[maximal_size_of_stack]
static constexpr std::size_t maximal_size_of_stack
void initialise(const term_balanced_tree< Term > &tree)
const Term & dereference() const
Dereference operator.
iterator(const iterator &other)
bool equal(const iterator &other) const
Equality operator.
iterator(const term_balanced_tree< Term > &tree)
void increment()
Increments the iterator.
bool is_node() const
Returns true iff the tree is a node with a left and right subtree.
friend void make_term_balanced_tree(term_balanced_tree< Term1 > &result, ForwardTraversalIterator p, const std::size_t size, Transformer transformer)
static void make_tree_helper(aterm &result, ForwardTraversalIterator &p, const std::size_t size, Transformer transformer)
term_balanced_tree & operator=(const term_balanced_tree &) noexcept=default
Assignment operator.
size_type size() const
Returns the size of the term_balanced_tree.
term_balanced_tree(term_balanced_tree &&) noexcept=default
Move constructor.
bool empty() const
Returns true if tree is empty.
Term & reference
Reference to T.
static const aterm & empty_tree()
static void make_tree(aterm &result, ForwardTraversalIterator &p, const std::size_t size, Transformer transformer)
term_balanced_tree(ForwardTraversalIterator first, const std::size_t size)
Creates an term_balanced_tree with a copy of a range.
std::size_t size_type
An unsigned integral type.
static const function_symbol & tree_single_node_function()
const aterm & left_branch() const
Get the left branch of the tree.
term_balanced_tree(const term_balanced_tree &) noexcept=default
Copy constructor.
Term * pointer
Pointer to T.
Term value_type
The type of object, T stored in the term_balanced_tree.
term_balanced_tree(ForwardTraversalIterator first, const std::size_t size, Transformer transformer)
Creates an term_balanced_tree with a copy of a range, where a transformer is applied to each term bef...
static const function_symbol & tree_node_function()
const Term & operator[](std::size_t position) const
Element indexing operator.
iterator begin() const
Returns an iterator pointing to the beginning of the term_balanced_tree.
iterator end() const
Returns an iterator pointing to the end of the term_balanced_tree.
term_balanced_tree()
Default constructor. Creates an empty tree.
const aterm & right_branch() const
Get the left branch of the tree.
term_balanced_tree & operator=(term_balanced_tree &&) noexcept=default
Move assign operator.
const Term const_reference
Const reference to T.
term_balanced_tree(const aterm &tree)
Construction from aterm.
const Term & element_at(std::size_t position, std::size_t size) const
Get an element at the indicated position.
static const function_symbol & tree_empty_function()
term_balanced_tree(detail::_term_appl *t)
ptrdiff_t difference_type
A signed integral type.
An unprotected term does not change the reference count of the shared term when it is copied or moved...
void swap(unprotected_aterm_core &t) noexcept
Swaps this term with its argument.
bool operator==(const unprotected_aterm_core &t) const
Comparison operator.
bool defined() const
Returns true if this term is not equal to the term assigned by the default constructor of aterms,...
const detail::_aterm * m_term
bool operator!=(const unprotected_aterm_core &t) const
Inequality operator on two unprotected aterms.
const function_symbol & function() const
Yields the function symbol in an aterm.
data_expression & operator=(const data_expression &) noexcept=default
data_expression & operator=(data_expression &&) noexcept=default
sort_expression sort() const
Returns the sort of the data expression.
data_expression(const data_expression &) noexcept=default
Move semantics.
data_expression(data_expression &&) noexcept=default
Rewriter that operates on data expressions.
data_expression operator()(const data_expression &d) const
Rewrites a data expression.
void add_sort(const basic_sort &s)
Adds a sort to this specification.
\brief An untyped parameter
logger(const log_level_t l)
Default constructor.
Read-only singly linked list of action rename rules.
\brief A timed multi-action
multi_action(const multi_action &) noexcept=default
Move semantics.
const process::action_list & actions() const
const data::data_expression & time() const
multi_action(multi_action &&) noexcept=default
multi_action(const process::action_list &actions=process::action_list(), data::data_expression time=data::undefined_real())
Constructor.
This class contains labels for probabilistic transistions, consisting of a numerator and a denumerato...
static const data::rewriter & m_rewriter()
static probabilistic_data_expression one()
Constant one.
probabilistic_data_expression operator+(const probabilistic_data_expression &other) const
Standard addition operator. Note that the expression is not evaluated. For this the rewriter has to b...
probabilistic_data_expression(const data::data_expression &d)
Construct a probabilistic_data_expression from a data_expression, which must be of sort real.
bool operator==(const probabilistic_data_expression &other) const
probabilistic_data_expression(std::size_t enumerator, std::size_t denominator)
bool operator!=(const probabilistic_data_expression &other) const
bool operator>=(const probabilistic_data_expression &other) const
bool operator<(const probabilistic_data_expression &other) const
bool operator<=(const probabilistic_data_expression &other) const
bool operator>(const probabilistic_data_expression &other) const
probabilistic_data_expression operator-(const probabilistic_data_expression &other) const
Standard subtraction operator.
static data::data_specification data_specification_with_real()
probabilistic_data_expression()
static probabilistic_data_expression zero()
Constant zero.
Linear process specification.
STATE & state()
Get the state in a state probability pair.
PROBABILITY m_probability
state_probability_pair(state_probability_pair &&p)=default
state_probability_pair & operator=(state_probability_pair &&p)=default
state_probability_pair(const state_probability_pair &p)=default
Copy constructor;.
state_probability_pair & operator=(const state_probability_pair &p)=default
Standard assignment.
const PROBABILITY & probability() const
get the probability from a state proability pair.
const STATE & state() const
Get the state from a state probability pair.
PROBABILITY & probability()
Set the probability in a state probability pair.
state_probability_pair(const STATE &state, const PROBABILITY &probability)
constructor.
bool operator==(const state_probability_pair &other) const
Standard equality operator.
Linear process specification.
A class containing the values for action labels for the .lts format.
action_label_lts & operator=(const action_label_lts &)=default
Copy assignment.
static mcrl2::lps::multi_action sort_multiactions(const mcrl2::lps::multi_action &a)
A function to sort a multi action to guarantee that multi-actions are compared properly.
void hide_actions(const std::vector< std::string > &tau_actions)
Hide the actions with labels in tau_actions.
action_label_lts(const action_label_lts &)=default
Copy constructor.
static const action_label_lts & tau_action()
action_label_lts()
Default constructor.
action_label_lts(const mcrl2::lps::multi_action &a)
Constructor.
This class contains strings to be used as values for action labels in lts's.
static std::string sort_multiactions(const std::string &s)
Sort multiactions in a string.
void hide_actions(const std::vector< std::string > &string_vector)
action_label_string & operator=(const action_label_string &)=default
Copy assignment.
static const action_label_string & tau_action()
action_label_string(const std::string &s)
bool operator<(const action_label_string &l) const
action_label_string(const action_label_string &)=default
Copy constructor.
stores information about a block
stores information about a constellation
refinable partition data structure
stores information about a single state
bool surely_has_no_transition_to(const constln_t *const SpC) const
quick check to find out whether the state has no transition to SpC
bool surely_has_transition_to(const constln_t *const SpC) const
quick check to find out whether the state has a transition to SpC
implements the main algorithm for the stutter equivalence quotient
void set_truths(formula &f)
Compute and set the truth values of a formula f.
block_index_type target(observation_t obs)
state_type max_state_index
std::pair< label_type, block_index_type > observation_t
std::size_t block_index_type
level_type gca_level(const block_index_type B1, const block_index_type B2)
Auxiliarry function that computes the level of the greatest common ancestor. In other words a lvl i s...
std::vector< block > blocks
std::vector< state_type > block_index_of_a_state
std::set< observation_t > derivatives_t
label_type label(observation_t obs)
regular_formulas::regular_formula create_regular_formula(const mcrl2::lts::action_label_string &a) const
create_regular_formula Creates a regular formula that represents action a
bisim_partitioner_minimal_depth(LTS_TYPE &l, const std::size_t init_l2)
Creates a bisimulation partitioner for an LTS.
std::set< block_index_type > partition
mcrl2::state_formulas::state_formula dist_formula_mindepth(const std::size_t s, const std::size_t t)
Creates a state formula that distinguishes state s from state t.
formula distinguish(const block_index_type b1, const block_index_type b2)
Creates a formula that distinguishes a block b1 from the block b2.
std::vector< block_index_type > BL
~bisim_partitioner_minimal_depth()=default
Destroys this partitioner.
std::map< std::pair< block_index_type, block_index_type >, level_type > greatest_common_ancestor
std::vector< bool > block_flags
std::vector< block_index_type > to_be_processed
regular_formulas::regular_formula create_regular_formula(const mcrl2::lps::multi_action &a) const
create_regular_formula Creates a regular formula that represents action a
bool in_same_class(const std::size_t s, const std::size_t t)
std::size_t formula_index_type
block_index_type lift_block(const block_index_type B1, level_type goal)
mcrl2::state_formulas::state_formula conjunction(std::vector< formula > &conjunctions)
conjunction Creates a conjunction of state formulas
std::vector< bool > state_flags
mcrl2::state_formulas::state_formula convert_formula(formula &f)
void split_BL(level_type lvl)
Performs the splits based on the blocks in Bsplit and the flags set in state_flags.
bool refine_partition(level_type lvl)
std::vector< bool > block_flags
state_type max_state_index
mcrl2::state_formulas::state_formula conjunction(std::set< mcrl2::state_formulas::state_formula > terms) const
conjunction Creates a conjunction of state formulas
std::size_t block_index_type
regular_formulas::regular_formula create_regular_formula(const mcrl2::lts::action_label_string &a) const
create_regular_formula Creates a regular formula that represents action a
regular_formulas::regular_formula create_regular_formula(const mcrl2::lps::multi_action &a) const
create_regular_formula Creates a regular formula that represents action a
std::vector< bool > block_is_in_to_be_processed
std::vector< bool > state_flags
std::map< block_index_type, block_index_type > right_child
std::vector< block_index_type > BL
bool in_same_class(const std::size_t s, const std::size_t t) const
Returns whether two states are in the same bisimulation equivalence class.
mcrl2::state_formulas::state_formula until_formula(const mcrl2::state_formulas::state_formula &phi1, const label_type &a, const mcrl2::state_formulas::state_formula &phi2)
until_formula Creates a state formula that corresponds to the until operator phi1phi2 from HMLU
std::size_t get_eq_class(const std::size_t s) const
Gives the bisimulation equivalence class number of a state.
bisim_partitioner(LTS_TYPE &l, const bool branching=false, const bool preserve_divergence=false, const bool generate_counter_examples=false)
Creates a bisimulation partitioner for an LTS.
~bisim_partitioner()=default
Destroys this partitioner.
std::map< block_index_type, std::set< block_index_type > > r_tauP
std::map< block_index_type, label_type > split_by_action
std::size_t num_eq_classes() const
Gives the number of bisimulation equivalence classes of the LTS.
void order_recursively_on_tau_reachability(const state_type s, std::map< state_type, std::vector< state_type > > &inert_transition_map, std::vector< non_bottom_state > &new_non_bottom_states, std::set< state_type > &visited)
std::vector< block_index_type > to_be_processed
std::map< block_index_type, block_index_type > split_by_block
void replace_transition_system(const bool branching, const bool preserve_divergences)
Replaces the transition relation of the current lts by the transitions of the bisimulation reduced tr...
std::vector< block > blocks
void order_on_tau_reachability(std::vector< non_bottom_state > &non_bottom_states)
void split_the_blocks_in_BL(bool &partition_is_unstable, const label_type splitter_label, const block_index_type splitter_block)
void refine_partition_until_it_becomes_stable(const bool branching, const bool preserve_divergence)
void create_initial_partition(const bool branching, const bool preserve_divergences)
std::vector< state_type > block_index_of_a_state
std::map< block_index_type, std::set< block_index_type > > r_alpha
mcrl2::state_formulas::state_formula counter_formula_aux(const block_index_type B1, const block_index_type B2)
mcrl2::state_formulas::state_formula counter_formula(const std::size_t s, const std::size_t t)
Creates a state formula that distinguishes state s from state t.
void refine_partion_with_respect_to_divergences(void)
void check_internal_consistency_of_the_partitioning_data_structure(const bool branching, const bool preserve_divergence) const
outgoing_transitions_per_state_action_t outgoing_transitions
counters for a B_to_C slice
class for time complexity checks
counter_type
Type for complexity budget counters.
compare_transitions_lts(const std::set< std::size_t > &hide_action_set)
bool operator()(const transition &t1, const transition &t2)
const std::set< std::size_t > & m_hide_action_set
const std::set< std::size_t > & m_hide_action_set
bool operator()(const transition &t1, const transition &t2)
compare_transitions_slt(const std::set< std::size_t > &hide_action_set)
bool operator()(const transition &t1, const transition &t2)
compare_transitions_target()
bool operator()(const transition &t1, const transition &t2)
compare_transitions_tl(const std::set< std::size_t > &hide_action_set)
const std::set< std::size_t > & m_hide_action_set
const std::set< std::size_t > & m_hide_action_set
compare_transitions_tls(const std::set< std::size_t > &hide_action_set)
bool operator()(const transition &t1, const transition &t2)
compare_transitions_tsl(const std::set< std::size_t > &hide_action_set)
const std::set< std::size_t > & m_hide_action_set
bool operator()(const transition &t1, const transition &t2)
A class that can be used to store counterexample trees and.
size_t upperbound(const state_type s) const
indexed_sorted_vector_for_tau_transitions(const LTS_TYPE &aut, bool outgoing)
std::vector< size_t > m_indices
size_t lowerbound(const state_type s) const
const std::vector< state_type > & get_transitions() const
std::vector< state_type > m_states_with_outgoing_or_incoming_tau_transition
size_t upperbound(const state_type s) const
std::vector< CONTENT > m_states_with_outgoing_or_incoming_transition
size_t lowerbound(const state_type s) const
std::vector< size_t > m_indices
std::pair< label_type, state_type > label_state_pair
indexed_sorted_vector_for_transitions(const std::vector< transition > &transitions, state_type num_states, bool outgoing)
const std::vector< CONTENT > & get_transitions() const
void swap(lts_aut_base &)
Standard swap function.
lts_type type()
Provides the type of this lts, in casu lts_aut.
bool operator==(const lts_aut_base &) const
Standard equality function.
lts_type type() const
The lts_type of state_label_dot. In this case lts_dot.
void swap(lts_dot_base &)
The standard swap function.
void clear()
Clear the transitions system.
const std::vector< std::string > & state_element_values(std::size_t idx) const
Provides the vector of strings that correspond to the values of the number at position idx in a vecto...
std::size_t add_state_element_value(std::size_t idx, const std::string &s)
Adds a string to the state element values for the idx-th position in a state vector....
bool operator==(const lts_fsm_base &other) const
void clear_process_parameters()
Clear the state parameters for this LTS.
std::vector< std::vector< std::string > > m_state_element_values
state_element_values contain the values that can occur at the i-th position of a state label
lts_type type() const
The lts_type of this labelled transition system. In this case lts_fsm.
std::string state_element_value(std::size_t parameter_index, std::size_t element_index) const
Returns the element_index'th element for the parameter with index parameter_index.
std::pair< std::string, std::string > process_parameter(std::size_t i) const
Returns the i-th parameter of the state vectors stored in this LTS.
std::vector< std::pair< std::string, std::string > > m_parameters
m_parameters contain the parameters corresponding to the consecutive elements of a state vector....
std::vector< std::pair< std::string, std::string > > process_parameters() const
Return the parameters of the state vectors stored in this LTS.
void add_process_parameter(const std::string &name, const std::string &sort)
Set the state parameters for this LTS.
std::string state_label_to_string(const state_label_fsm &l) const
Pretty print a state value of this FSM.
void swap(lts_fsm_base &other)
Standard swap function.
a base class for lts_lts_t and probabilistic_lts_t.
static lts_type type()
Yields the type of this lts, in this case lts_lts.
void set_process_parameters(const data::variable_list ¶ms)
Set the state parameters for this LTS.
bool operator==(const lts_lts_base &other) const
Standard equality function;.
process::action_label_list m_action_decls
void swap(lts_lts_base &l)
void set_action_label_declarations(const process::action_label_list &decls)
Set the action label information for this LTS.
const data::variable & process_parameter(std::size_t i) const
Returns the i-th parameter of the state vectors stored in this LTS.
data::data_specification m_data_spec
const data::variable_list & process_parameters() const
Return the process parameters stored in this LTS.
void set_data(const data::data_specification &spec)
Set the mCRL2 data specification of this LTS.
lts_lts_base()
Default constructor.
const process::action_label_list & action_label_declarations() const
Return action label declarations stored in this LTS.
data::variable_list m_parameters
This class contains an scc partitioner removing inert tau loops.
std::size_t get_eq_class(const std::size_t s) const
Gives the equivalence class number of a state. The equivalence class numbers range from 0 upto (and e...
void dfs_numbering(const state_type t, const indexed_sorted_vector_for_tau_transitions< LTS_TYPE > &src_tgt, std::vector< bool > &visited)
std::size_t num_eq_classes() const
Gives the number of bisimulation equivalence classes of the LTS.
state_type equivalence_class_index
void group_components(const state_type t, const state_type equivalence_class_index, const indexed_sorted_vector_for_tau_transitions< LTS_TYPE > &src_tgt_src, std::vector< bool > &visited)
scc_partitioner(LTS_TYPE &l)
Creates an scc partitioner for an LTS.
void replace_transition_system(const bool preserve_divergence_loops)
The lts for which this partioner is created is replaced by the lts modulo the calculated partition.
~scc_partitioner()=default
Destroys this partitioner.
bool in_same_class(const std::size_t s, const std::size_t t) const
Returns whether two states are in the same bisimulation equivalence class.
std::vector< state_type > block_index_of_a_state
std::vector< state_type > dfsn2state
A simple labelled transition format with only strings as action labels.
void load(const std::string &filename)
Load the labelled transition system from a file.
void load(std::istream &is)
Load the labelled transition system from an input stream.
void save(const std::string &filename) const
Save the labelled transition system to file.
void swap(lts_default_base &)
Standard swap function.
lts_type type()
Provides the type of this lts, in casu lts_none.
bool operator==(const lts_default_base &) const
Standard equality function.
A class to contain labelled transition systems in graphviz format.
void save(std::ostream &os) const
Save the labelled transition system to a stream.
The class lts_fsm_t contains labelled transition systems in .fsm format.
lts< state_label_fsm, action_label_string, detail::lts_fsm_base > super
void load(const std::string &filename)
Save the labelled transition system to file.
void save(const std::string &filename) const
Save the labelled transition system to file.
This class contains labelled transition systems in .lts format.
lts_lts_t()
Creates an object containing no information.
A class that contains a labelled transition system.
states_size_type num_state_labels() const
Gets the number of state labels of this LTS.
labels_size_type num_action_labels() const
Gets the number of action labels of this LTS.
states_size_type m_init_state
void add_transition(const transition &t)
Add a transition to the lts.
void set_num_action_labels(const labels_size_type n)
Sets the number of action labels of this LTS.
bool has_action_info() const
Checks whether this LTS has labels associated with its actions, which are numbers.
bool is_tau(labels_size_type action) const
Checks whether an action is a tau action.
std::set< labels_size_type > & hidden_label_set()
Returns the hidden label set that tells for each label what its corresponding hidden label is.
states_size_type num_states() const
Gets the number of states of this LTS.
void set_hidden_label_set(const std::set< labels_size_type > &m)
Sets the hidden label map that tells for each label what its corresponding hidden label is.
void clear_transitions(const std::size_t n=0)
Clear the transitions of an lts.
void set_num_transitions(const std::size_t n)
Sets the number of transitions of this LTS and tries to shrink the datastructure.
void clear_actions()
Clear the action labels of an lts.
void set_num_states(const states_size_type n, const bool has_state_labels=true)
Sets the number of states of this LTS.
void store_action_label_to_be_renamed(const ACTION_LABEL_T &a, const labels_size_type i, std::map< labels_size_type, labels_size_type > &action_rename_map)
void add_state_number_as_state_information()
Label each state with its state number.
static constexpr bool is_probabilistic_lts
An indicator that this is not a probabilistic lts.
bool is_probabilistic(const states_size_type state) const
Gets the label of a state.
ACTION_LABEL_T action_label_t
The type of action labels.
const std::set< labels_size_type > & hidden_label_set() const
Returns the hidden label set that tells for each label what its corresponding hidden label is.
std::vector< transition > m_transitions
std::vector< STATE_LABEL_T > & state_labels()
Provides the state labels of an LTS.
ACTION_LABEL_T action_label(const labels_size_type action) const
Gets the label of an action.
const labels_size_type tau_label_index() const
Provide the index of the label that represents tau.
const std::vector< ACTION_LABEL_T > & action_labels() const
The action labels in this lts.
bool has_state_info() const
Checks whether this LTS has state values associated with its states.
lts(const lts &l)
Creates a copy of the supplied LTS.
void set_initial_state(const states_size_type state)
Sets the initial state number of this LTS.
void set_action_label(const labels_size_type action, const ACTION_LABEL_T &label)
Sets the label of an action.
void rename_labels(const std::map< labels_size_type, labels_size_type > &action_rename_map)
std::set< labels_size_type > m_hidden_label_set
std::vector< STATE_LABEL_T >::size_type states_size_type
The sort that contains the indices of states.
void apply_hidden_actions(const std::vector< std::string > &tau_actions)
Rename actions in the lts by hiding the actions in the vector tau_actions.
labels_size_type apply_hidden_label_map(const labels_size_type action) const
If the action label is registered hidden, it returns tau, otherwise the original label.
std::vector< transition > & get_transitions()
Gets a reference to the vector of transitions of the current lts.
std::vector< ACTION_LABEL_T >::size_type labels_size_type
The sort that represents the indices of labels.
lts & operator=(const lts &l)
Standard assignment operator.
const std::vector< STATE_LABEL_T > & state_labels() const
Provides the state labels of an LTS.
std::vector< STATE_LABEL_T > m_state_labels
STATE_LABEL_T state_label(const states_size_type state) const
Gets the label of a state.
states_size_type add_state(const STATE_LABEL_T &label=STATE_LABEL_T())
Adds a state to this LTS.
STATE_LABEL_T state_label_t
The type of state labels.
void clear()
Clear the transitions system.
lts()
Creates an empty LTS.
bool operator==(const lts &other) const
Standard equality operator.
states_size_type m_nstates
const std::vector< transition > & get_transitions() const
Gets a const reference to the vector of transitions of the current lts.
LTS_BASE base_t
The type of the used lts base.
std::vector< transition >::size_type transitions_size_type
The sort that contains indices of transitions.
states_size_type initial_state() const
Gets the initial state number of this LTS.
void clear_state_labels()
Clear the labels of an lts.
void swap(lts &l)
Swap this lts with the supplied supplied LTS.
void record_hidden_actions(const std::vector< std::string > &tau_actions)
Records all actions with a string that occurs in tau_actions internally.
std::vector< ACTION_LABEL_T > m_action_labels
transitions_size_type num_transitions() const
Gets the number of transitions of this LTS.
void set_state_label(const states_size_type state, const STATE_LABEL_T &label)
Sets the label of a state.
labels_size_type add_action(const ACTION_LABEL_T &label)
Adds an action with a label to this LTS.
A simple labelled transition format with only strings as action labels.
void load(const std::string &filename)
Load the labelled transition system from a file.
void load(std::istream &is)
Load the labelled transition system from an input stream.
void save(const std::string &filename) const
Save the labelled transition system to file.
A class to contain labelled transition systems in graphviz format.
void save(std::ostream &os) const
Save the labelled transition system to a stream.
The class lts_fsm_t contains labelled transition systems in .fsm format.
probabilistic_lts< state_label_fsm, action_label_string, probabilistic_state_t, detail::lts_fsm_base > super
void save(const std::string &filename) const
Save the labelled transition system to file.
void load(const std::string &filename)
Save the labelled transition system to file.
This class contains probabilistic labelled transition systems in .lts format.
probabilistic_lts_lts_t()
Creates an object containing no information.
A class that contains a labelled transition system.
probabilistic_lts(probabilistic_lts &&other)=default
Standard move constructor.
void set_initial_probabilistic_state(const PROBABILISTIC_STATE_T &state)
Sets the probabilistic initial state number of this LTS.
const PROBABILISTIC_STATE_T & initial_probabilistic_state() const
Gets the initial state number of this LTS.
super::transitions_size_type transitions_size_type
bool operator==(const probabilistic_lts &other) const
Standard equality operator.
void swap(probabilistic_lts &other)
Swap this lts with the supplied supplied LTS.
super::states_size_type states_size_type
labels_size_type num_probabilistic_states() const
Gets the number of probabilistic states of this LTS.
static constexpr bool is_probabilistic_lts
An indicator that this is a probabilistic lts.
void clear_probabilistic_states()
Clear the probabilistic states in this probabilistic transitions system.
lts< STATE_LABEL_T, ACTION_LABEL_T, LTS_BASE > super
states_size_type add_and_reset_probabilistic_state(PROBABILISTIC_STATE_T &s)
Adds a probabilistic state to this LTS and resets the state to empty.
void set_initial_state(const states_size_type s)
void clear()
Clear the transitions system.
probabilistic_lts & operator=(probabilistic_lts &&other)=default
Standard assignment move operator.
PROBABILISTIC_STATE_T probabilistic_state_t
The type of probabilistic labels.
probabilistic_lts & operator=(const probabilistic_lts &other)=default
Standard assignment operator.
std::vector< PROBABILISTIC_STATE_T > m_probabilistic_states
probabilistic_lts(const probabilistic_lts &other)=default
Standard copy constructor.
states_size_type add_probabilistic_state(const PROBABILISTIC_STATE_T &s)
Adds a probabilistic state to this LTS.
super::state_label_t state_label_t
states_size_type initial_state() const
PROBABILISTIC_STATE_T m_init_probabilistic_state
super::labels_size_type labels_size_type
super::action_label_t action_label_t
const PROBABILISTIC_STATE_T & probabilistic_state(const states_size_type index) const
Gets the probabilistic label of an index.
probabilistic_lts()
Creates an empty LTS.
void set_probabilistic_state(const states_size_type index, const PROBABILISTIC_STATE_T &s)
Sets the probabilistic label corresponding to some index.
A class that contains a probabilistic state.
void set(const STATE &s)
Set this probabilistic state to a single state with probability one.
const_iterator begin() const
Gets an iterator over pairs of state and probability. This can only be used when the state is stored ...
void construct_internal_vector_representation()
Guarantee that this probabilistic state is internally stored as a vector, such that begin/end,...
probabilistic_state & operator=(const probabilistic_state &other)
Copy assignment constructor.
const_reverse_iterator rbegin() const
Gets a reverse iterator over pairs of state and probability. This can only be used when the state is ...
std::size_t size() const
Gets the number of probabilistic states in the vector representation of this state....
bool operator!=(const probabilistic_state &other) const
Standard equality operator.
iterator begin()
Gets an iterator over pairs of state and probability. This can only be used if the state is internall...
std::vector< state_probability_pair >::const_iterator const_iterator
STATE get() const
Get a probabilistic state if is is simple, i.e., consists of a single state.
iterator end()
Gets the end iterator over pairs of state and probability.
PROBABILITY probability_t
reverse_iterator rbegin()
Gets a reverse iterator over pairs of state and probability. This can only be used if the state is in...
std::vector< state_probability_pair > m_probabilistic_state
const_iterator end() const
Gets the end iterator over pairs of state and probability.
std::vector< state_probability_pair >::iterator iterator
void swap(probabilistic_state &other)
Swap this probabilistic state.
reverse_iterator rend()
Gets the reverse end iterator over pairs of state and probability.
std::vector< state_probability_pair >::const_reverse_iterator const_reverse_iterator
bool operator==(const probabilistic_state &other) const
Standard equality operator.
void clear()
Makes the probabilistic state empty.
probabilistic_state(const STATE_PROBABILITY_PAIR_ITERATOR begin, const STATE_PROBABILITY_PAIR_ITERATOR end)
Creates a probabilistic state on the basis of state_probability_pairs.
std::vector< state_probability_pair >::reverse_iterator reverse_iterator
probabilistic_state(const probabilistic_state &other)
Copy constructor.
void shrink_to_fit()
If a probabilistic state is ready, shrinking it to minimal size might be useful to reduce its memory ...
probabilistic_state()
Default constructor.
probabilistic_state(const STATE &s)
Constructor of a probabilistic state from a non probabilistic state.
void add(const STATE &s, const PROBABILITY &p)
Add a state with a probability to the probabilistic state.
const_reverse_iterator rend() const
Gets the reverse end iterator over pairs of state and probability.
Class for computing the signature for strong bisimulation.
Class for computing the signature for branching bisimulation.
Class for computing the signature for divergence preserving branching bisimulation.
Signature based reductions for labelled transition systems.
This class contains labels for states in dot format.
std::string name() const
This method returns the string in the name field of a state label.
std::string label() const
This method returns the label in the name field of a state label.
state_label_dot()
The default constructor.
std::string m_state_label
bool operator==(const state_label_dot &l) const
Standard comparison operator, comparing both the string in the name field, as well as the one in the ...
bool operator!=(const state_label_dot &l) const
Standard inequality operator. Just the negation of equality.
Contains empty state values, used for lts's without state valued.
bool operator==(const state_label_empty &) const
static state_label_empty number_to_label(const std::size_t)
Create a state label consisting of a number as the only list element. For empty state labels this doe...
bool operator!=(const state_label_empty &other) const
state_label_empty operator+(const state_label_empty &) const
An operator to concatenate two state labels.
This class contains state labels for the fsm format.
state_label_fsm(const state_label_fsm &)=default
Copy constructor.
state_label_fsm & operator=(const state_label_fsm &)=default
Copy assignment.
static state_label_fsm number_to_label(const std::size_t n)
Create a state label consisting of a number as the only list element.
state_label_fsm()
Default constructor. The label becomes an empty vector.
state_label_fsm(const std::vector< std::size_t > &v)
Default constructor. The label is set to the vector v.
state_label_fsm operator+(const state_label_fsm &l) const
An operator to concatenate two state labels. Fsm labels cannot be concatenated. Therefore,...
This class contains state labels for an labelled transition system in .lts format.
state_label_lts()
Default constructor.
state_label_lts(const state_label_lts &)=default
Copy constructor.
state_label_lts operator+(const state_label_lts &l) const
An operator to concatenate two state labels.
state_label_lts(const super &l)
Construct a state label out of list of balanced trees of data expressions, representing a state label...
atermpp::term_list< lps::state > super
state_label_lts(const lps::state &l)
Construct a state label out of a balanced tree of data expressions, representing a state label.
state_label_lts & operator=(const state_label_lts &)=default
Copy assignment.
static state_label_lts number_to_label(const std::size_t n)
Create a state label consisting of a number as the only list element.
state_label_lts(const CONTAINER &l)
Construct a single state label out of the elements in a container.
A class containing triples, source label and target representing transitions.
void set_label(const size_type label)
Set the label of the transition.
transition & operator=(const transition &t)=default
Assignment.
void set_to(const size_type to)
Set the target of the transition.
bool operator<(const transition &t) const
Standard lexicographic ordering on transitions.
transition(const std::size_t f, const std::size_t l, const std::size_t t)
Constructor (there is no default constructor).
size_type from() const
The source of the transition.
transition & operator=(transition &&t)=default
Move assignment.
bool operator!=(const transition &t) const
Standard inequality on transitions.
size_type label() const
The label of the transition.
size_type to() const
The target of the transition.
void set_from(const size_type from)
Set the source of the transition.
transition(transition &&t)=default
Move constructor.
transition(const transition &t)=default
Copy constructor.
std::size_t size_type
The type of the elements in a transition.
bool operator==(const transition &t) const
Standard equality on transitions.
action_label(const core::identifier_string &name, const data::sort_expression_list &sorts)
\brief Constructor Z12.
action(const action_label &label, const data::data_expression_list &arguments)
\brief Constructor Z14.
Process specification consisting of a data specification, action labels, a sequence of process equati...
\brief An untyped multi action or data application
Standard exception class for reporting runtime errors.
void div_mod(const big_natural_number &other, big_natural_number &result, big_natural_number &remainder, big_natural_number &calculation_buffer_divisor) const
bool is_number(std::size_t n) const
Returns whether this number equals a number of std::size_t.
big_natural_number(const std::size_t n)
big_natural_number operator*(const big_natural_number &other) const
operator std::size_t() const
Transforms this number to a std::size_t, provided it is sufficiently small. If not an mcrl2::runtime_...
bool operator>=(const big_natural_number &other) const
void is_well_defined() const
std::size_t operator[](const std::size_t n) const
Give the n-th digit where the most significant digit is positioned last.
void add(const big_natural_number &other)
std::vector< std::size_t > m_number
big_natural_number operator+(const big_natural_number &other) const
bool operator==(const big_natural_number &other) const
std::size_t divide_by(std::size_t n)
big_natural_number operator%(const big_natural_number &other) const
std::size_t size() const
Give the number of digits in this big number.
big_natural_number operator-(const big_natural_number &other) const
friend void swap(big_natural_number &x, big_natural_number &y)
Standard overload of swap.
void remove_significant_digits_that_are_zero()
bool operator<=(const big_natural_number &other) const
big_natural_number operator/(const big_natural_number &other) const
void clear()
Sets the number to zero.
bool operator!=(const big_natural_number &other) const
bool is_zero() const
Returns whether this number equals zero.
void multiply(const big_natural_number &other, big_natural_number &result, big_natural_number &calculation_buffer_for_multiplicand) const
void push_back(const std::size_t n)
bool operator<(const big_natural_number &other) const
void subtract(const big_natural_number &other)
bool operator>(const big_natural_number &other) const
void multiply_by(std::size_t n, std::size_t carry)
This class contains labels for probabilistic transistions, consisting of a numerator and a denominato...
probabilistic_arbitrary_precision_fraction operator*(const probabilistic_arbitrary_precision_fraction &other) const
probabilistic_arbitrary_precision_fraction()
static void greatest_common_divisor_destructive(utilities::big_natural_number &x, utilities::big_natural_number &y, utilities::big_natural_number &buffer_divide, utilities::big_natural_number &buffer_remainder, utilities::big_natural_number &buffer)
static utilities::big_natural_number & buffer2()
bool operator>=(const probabilistic_arbitrary_precision_fraction &other) const
static void remove_common_factors(utilities::big_natural_number &enumerator, utilities::big_natural_number &denominator)
bool operator!=(const probabilistic_arbitrary_precision_fraction &other) const
const utilities::big_natural_number & denominator() const
probabilistic_arbitrary_precision_fraction operator+(const probabilistic_arbitrary_precision_fraction &other) const
bool operator<(const probabilistic_arbitrary_precision_fraction &other) const
bool operator>(const probabilistic_arbitrary_precision_fraction &other) const
static probabilistic_arbitrary_precision_fraction & one()
Constant one.
static utilities::big_natural_number greatest_common_divisor(utilities::big_natural_number x, utilities::big_natural_number y)
static utilities::big_natural_number & buffer3()
static utilities::big_natural_number & buffer1()
probabilistic_arbitrary_precision_fraction operator-(const probabilistic_arbitrary_precision_fraction &other) const
utilities::big_natural_number m_denominator
const utilities::big_natural_number & enumerator() const
static probabilistic_arbitrary_precision_fraction & zero()
Constant zero.
probabilistic_arbitrary_precision_fraction operator/(const probabilistic_arbitrary_precision_fraction &other) const
bool operator<=(const probabilistic_arbitrary_precision_fraction &other) const
probabilistic_arbitrary_precision_fraction(const utilities::big_natural_number &enumerator, const utilities::big_natural_number &denominator)
utilities::big_natural_number m_enumerator
bool operator==(const probabilistic_arbitrary_precision_fraction &other) const
bool bisimulation_compare_gjkw(const LTS_TYPE &l1, const LTS_TYPE &l2, bool branching=false, bool preserve_divergence=false)
Checks whether the two initial states of two LTSs are strong or branching bisimilar.
void bisimulation_reduce_gjkw(LTS_TYPE &l, bool branching=false, bool preserve_divergence=false)
Reduce transition system l with respect to strong or (divergence preserving) branching bisimulation.
bool destructive_bisimulation_compare_gjkw(LTS_TYPE &l1, LTS_TYPE &l2, bool branching=false, bool preserve_divergence=false, bool generate_counter_examples=false)
Checks whether the two initial states of two LTSs are strong or branching bisimilar.
bool destructive_bisimulation_compare_gjkw(LTS_TYPE &l1, LTS_TYPE &l2, bool branching, bool preserve_divergence, bool generate_counter_examples, const std::string &, bool)
std::string debug_id() const
print a B_to_C slice identification for debugging
std::string debug_id() const
print a constellation identification for debugging
fixed_vector< B_to_C_entry > B_to_C
part_trans_t(trans_type m)
permutation_t permutation
permutation array
std::string debug_id() const
print a block identification for debugging
bisim_partitioner_gjkw(LTS_TYPE &l, bool branching=false, bool preserve_divergence=false)
check_complexity::trans_counter_t work_counter
succ_iter_t change_to_C(pred_iter_t pred_iter, ONLY_IF_DEBUG(constln_t *SpC, constln_t *NewC,) bool first_transition_of_state, bool first_transition_of_block)
transition target is moved to a new constellation
block_t * refinable_next
next block in the list of refinable blocks
static permutation_const_iter_t permutation_begin()
provide an iterator to the beginning of the permutation array
permutation_iter_t unmarked_bottom_end()
permutation_const_iter_t end() const
iterator past the last state in the block
void split_inert_to_C(block_t *B)
handle the transitions from the splitter to its own constellation
void set_inert_begin(B_to_C_iter_t new_inert_begin)
void replace_transition_system(bool branching, bool preserve_divergence)
void assert_stability(const part_state_t &part_st) const
assert that the data structure is consistent and stable
succ_const_iter_t slice_begin() const
bisim_gjkw::bisim_partitioner_gjkw_initialise_helper< LTS_TYPE > init_helper
const constln_t * to_constln() const
compute the goal constellation of the transitions in this slice
succ_iter_t slice_begin_or_before_end()
static state_type nr_of_blocks
total number of blocks with unique sequence number allocated
state_type unmarked_bottom_size() const
provides the number of unmarked bottom states in the block
void replace_transition_system(const part_state_t &part_st, ONLY_IF_DEBUG(bool branching,) bool preserve_divergence)
Replaces the transition relation of the current LTS by the transitions of the bisimulation-reduced tr...
bool split_s_inert_out(state_info_ptr s ONLY_IF_DEBUG(, constln_t *OldC))
Split outgoing transitions of a state in the splitter.
pred_iter_t inert_pred_end()
void set_marked_bottom_begin(permutation_iter_t new_marked_bottom_begin)
void SetFromRed(B_to_C_desc_iter_t new_fromred)
set FromRed to an existing element in to_constln
void make_nontrivial()
makes a constellation non-trivial (i. e. inserts it into the respective list)
permutation_const_iter_t nonbottom_begin() const
iterator to the first non-bottom state in the block
B_to_C_const_iter_t B_to_C_begin() const
pred_const_iter_t inert_pred_end() const
iterator one past the last inert incoming transition
permutation_iter_t marked_bottom_begin()
friend class bisim_partitioner_gjkw_initialise_helper
const block_t * from_block() const
compute the source block of the transitions in this slice
bisim_gjkw::block_t * refine(bisim_gjkw::block_t *RfnB, const bisim_gjkw::constln_t *SpC, const bisim_gjkw::B_to_C_descriptor *FromRed, bool postprocessing, const bisim_gjkw::constln_t *NewC=nullptr)
refine a block into the part that can reach SpC and the part that cannot
block_t * split_off_small_block()
split off a single block from the constellation
bisim_gjkw::block_t * postprocess_new_bottom(bisim_gjkw::block_t *RedB)
Split a block with new bottom states as needed.
void set_succ_begin(succ_iter_t new_out_begin)
B_to_C_iter_t postprocess_begin
iterator to the first transition into this constellation that needs postprocessing
bool add_work_to_bottom_transns(enum check_complexity::counter_type ctr, unsigned max_value)
B_to_C_iter_t B_to_C_end()
bool operator>(const constln_t &other) const
const constln_t * constln() const
get constellation where the state belongs
permutation_const_iter_t begin() const
iterator to the first state in the block
pred_iter_t noninert_pred_begin()
void make_trivial()
makes a constellation trivial (i. e. removes it from the respective list)
succ_iter_t slice_begin()
void swap_B_to_C(succ_iter_t const pos1, succ_iter_t const pos2)
succ_iter_t state_inert_out_end
iterator past the last inert outgoing transition
B_to_C_descriptor(B_to_C_iter_t begin_, B_to_C_iter_t end_)
bool surely_has_no_transition_to(const constln_t *SpC) const
std::size_t operator()(const Key &k) const
bool needs_postprocessing() const
returns true iff the slice is marked for postprocessing
void set_begin(permutation_iter_t new_begin)
permutation_const_iter_t marked_nonbottom_begin() const
iterator to the first marked non-bottom state in the block
permutation_iter_t pos
position of the state in the permutation array
state_type get_eq_class(state_type s) const
static constln_t * nontrivial_first
first constellation in the list of non-trivial constellations
permutation_iter_t unmarked_bottom_begin()
bool operator>=(const constln_t &other) const
std::unordered_map< label_type, state_type > action_block_map
void set_pred_begin(pred_iter_t new_in_begin)
succ_iter_t current_constln()
trans_type nr_of_transitions
permutation_const_iter_t end() const
constant iterator past the last state in the constellation
permutation_iter_t marked_nonbottom_end()
permutation_const_iter_t unmarked_bottom_begin() const
iterator to the first unmarked bottom state in the block
bisim_gjkw::part_trans_t part_tr
void set_succ_end(succ_iter_t new_out_end)
std::vector< state_type > inert_out_per_state
fixed_vector< pred_entry > pred
void set_inert_begin_and_end(B_to_C_iter_t new_inert_begin, B_to_C_iter_t new_inert_end)
B_to_C_const_iter_t inert_begin() const
iterator to the first inert transition of the block
permutation_iter_t unmarked_nonbottom_end()
void make_nonrefinable()
makes a block non-refinable (i. e. removes it from the respective list)
B_to_C_desc_iter_t B_to_C_slice
permutation_const_iter_t marked_bottom_begin() const
iterator to the first marked bottom state in the block
pred_const_iter_t noninert_pred_begin() const
iterator to first non-inert incoming transition
pred_iter_t noninert_pred_end()
bool mark_nonbottom(state_info_ptr s)
mark a non-bottom state
permutation_const_iter_t bottom_begin() const
iterator to the first bottom state in the block
std::string debug_id_short() const
print a short state identification for debugging
permutation_iter_t int_marked_bottom_begin
iterator to the first marked bottom state of the block
void swap_out(pred_iter_t const pos1, pred_iter_t const pos2)
state_type size() const
provides the number of states in the block
void init_transitions(part_state_t &part_st, part_trans_t &part_tr, bool branching, bool preserve_divergence)
initialise the state in part_st and the transitions in part_tr
bool operator==(const Key &other) const
permutation_iter_t int_begin
iterator to the first state in the constellation
succ_iter_t int_current_constln
iterator to first outgoing transition to the constellation of interest
block_t * split_off_blue(permutation_iter_t blue_nonbottom_end)
refine the block (the blue subblock is smaller)
part_state_t(state_type n)
constructor
permutation_iter_t int_bottom_begin
iterator to the first bottom state of the block
permutation_const_iter_t marked_bottom_end() const
iterator past the last marked bottom state in the block
std::vector< state_type > inert_out_per_block
void set_slice_begin_or_before_end(succ_iter_t new_value)
state_type notblue
number of inert transitions to non-blue states
permutation_const_iter_t marked_nonbottom_end() const
iterator one past the last marked non-bottom state in the block
static state_type num_eq_classes()
check_complexity::state_counter_t work_counter
const state_type sort_key
sort key to order constellation-related information
state_type marked_bottom_size() const
provides the number of marked bottom states in the block
std::vector< state_type > states_per_block
bool is_trivial() const
returns true iff the constellation is trivial
state_type nr_of_nonbottom_states
permutation_iter_t int_marked_nonbottom_begin
iterator to the first marked non-bottom state of the block
void make_noninert(succ_iter_t const succ_iter)
permutation_iter_t int_end
iterator past the last state of the block
pred_iter_t inert_pred_begin()
B_to_C_desc_list to_constln
list of B_to_C with transitions from this block
state_type get_nr_of_states() const
provides the number of states in the Kripke structure
static block_t * get_some_refinable()
provides an arbitrary refinable block
static succ_iter_t slice_end(succ_iter_t this_)
block_t * block
block where the state belongs
void create_initial_partition_gjkw(bool branching, bool preserve_divergence)
const constln_t * get_nontrivial_next() const
provides the next non-trivial constellation
void set_constln(constln_t *new_constln)
B_to_C_iter_t inert_begin()
succ_iter_t inert_succ_begin()
void set_marked_nonbottom_begin(permutation_iter_t new_marked_nonbottom_begin)
permutation_iter_t begin()
static permutation_const_iter_t perm_begin
bool operator<(const constln_t &other) const
compares two constellations for ordering them
bool make_refinable()
makes a block refinable (i. e. inserts it into the respective list)
fixed_vector< state_info_entry > state_info
array with all other information about states
state_type state_size() const
provide size of state space
state_type size() const
returns number of states in the constellation
B_to_C_const_iter_t inert_end() const
iterator past the last inert transition of the block
permutation_iter_t unmarked_nonbottom_begin()
const constln_t * constln() const
constellation where the block belongs to
permutation_iter_t bottom_end()
constln_t * int_constln
constellation to which the block belongs
permutation_const_iter_t bottom_end() const
iterator past the last bottom state in the block
static block_t * refinable_first
first block in the list of refinable blocks
static void slice_add_work_to_transns(succ_const_iter_t this_, enum check_complexity::counter_type ctr, unsigned max_value)
void swap_in(B_to_C_iter_t const pos1, B_to_C_iter_t const pos2)
state_type int_seqnr
unique sequence number of this block
succ_const_iter_t succ_begin() const
iterator to first outgoing transition
bool operator<=(const constln_t &other) const
succ_const_iter_t current_constln() const
void new_red_block_created(block_t *OldB, block_t *NewB, bool postprocessing)
handle B_to_C slices after a new red block has been created
void set_end(permutation_iter_t new_end)
void print_trans() const
print all transitions
std::vector< state_type > inert_in_per_state
bool is_refinable() const
checks whether the block is refinable
block_t * split_off_red(permutation_iter_t red_nonbottom_begin)
refine the block (the red subblock is smaller)
succ_iter_t int_slice_begin_or_before_end
points to the last or the first transition to the same constellation
succ_iter_t inert_succ_end()
succ_const_iter_t inert_succ_begin() const
iterator to first inert outgoing transition
permutation_const_iter_t begin() const
constant iterator to the first state in the constellation
bisim_gjkw::part_state_t part_st
pred_iter_t state_in_begin
iterator to first incoming transition
const state_type orig_nr_of_states
permutation_iter_t int_begin
iterator to the first state of the block
pred_iter_t state_inert_in_begin
iterator to first inert incoming transition
void assign_seqnr()
assigns a unique sequence number
std::unordered_map< Key, state_type, KeyHasher > extra_kripke_states
B_to_C_iter_t inert_end()
void new_blue_block_created(block_t *OldB, block_t *NewB)
handle B_to_C slices after a new blue block has been created
~bisim_partitioner_gjkw()
permutation_iter_t marked_bottom_end()
permutation_iter_t begin()
iterator to the first state in the constellation
static state_info_const_ptr s_i_begin
pointer at the first entry in the state_info array
check_complexity::B_to_C_counter_t work_counter
static constln_t * get_some_nontrivial()
provides an arbitrary non-trivial constellation
permutation_const_iter_t unmarked_bottom_end() const
iterator past the last unmarked bottom state in the block
bool operator<(const block_t &other) const
compares two blocks for ordering them
void set_bottom_begin(permutation_iter_t new_bottom_begin)
void set_nonbottom_end(permutation_iter_t new_nonbottom_end)
std::string debug_id() const
print a state identification for debugging
void set_inert_pred_begin(pred_iter_t new_inert_in_begin)
void clear()
deallocates constellations and blocks
constln_t(state_type sort_key_, permutation_iter_t begin_, permutation_iter_t end_, B_to_C_iter_t postprocess_none)
constructor
void set_inert_succ_begin_and_end(succ_iter_t new_inert_out_begin, succ_iter_t new_inert_out_end)
void swap3_B_to_C(succ_iter_t const pos1, succ_iter_t const pos2, succ_iter_t const pos3)
block_t(constln_t *const constln_, permutation_iter_t const begin_, permutation_iter_t const end_)
constructor
const block_t * block(state_type s) const
find block of a state
succ_const_iter_t inert_succ_end() const
iterator past the last inert outgoing transition
permutation_iter_t end()
iterator past the last state in the constellation
succ_const_iter_t slice_begin_or_before_end() const
check_complexity::block_counter_t work_counter
std::vector< state_type > noninert_in_per_state
bisim_partitioner_gjkw_initialise_helper(LTS_TYPE &l, bool branching, bool preserve_divergence)
constructor of the helper class
succ_iter_t state_out_begin
iterator to first outgoing transition
pred_const_iter_t inert_pred_begin() const
iterator to first inert incoming transition
std::string debug_id() const
print a transition identification for debugging
Key(const label_type &f, const state_type &s)
B_to_C_iter_t int_inert_begin
iterator to the first inert transition of the block
void set_unmarked_bottom_end(permutation_iter_t new_unmarked_bottom_end)
pred_const_iter_t noninert_pred_end() const
iterator past the last non-inert incoming transition
void set_inert_end(B_to_C_iter_t new_inert_end)
~part_state_t()
destructor
pred_const_iter_t pred_end() const
iterator past the last incoming transition
constln_t * nontrivial_next
next constellation in the list of non-trivial constellations
bool in_same_class(state_type s, state_type t) const
B_to_C_iter_t int_inert_end
iterator past the last inert transition of the block
fixed_vector< succ_entry > succ
permutation_iter_t nonbottom_end()
static state_info_const_ptr s_i_end
pointer past the last actual entry in the state_info array
void set_pred_end(pred_iter_t new_in_end)
permutation_iter_t bottom_begin()
permutation_const_iter_t unmarked_nonbottom_begin() const
iterator to the first unmarked non-bottom state in the block
void set_end(permutation_iter_t new_end)
set the iterator past the last state in the constellation
permutation_const_iter_t nonbottom_end() const
iterator past the last non-bottom state in the block
succ_const_iter_t succ_end() const
iterator past the last outgoing transition
void set_unmarked_nonbottom_end(permutation_iter_t new_unmarked_nonbottom_end)
void clear()
clear allocated memory
permutation_iter_t nonbottom_begin()
B_to_C_descriptor * FromRed(const constln_t *SpC)
read FromRed
std::string debug_id_short() const
print a short transition identification for debugging
std::vector< state_type > noninert_out_per_block
permutation_const_iter_t unmarked_nonbottom_end() const
iterator past the last unmarked non-bottom state in the block
succ_const_iter_t succ_end() const
void print_block(const char *message, const block_t *B, permutation_const_iter_t begin, permutation_const_iter_t end) const
print a slice of the partition (typically a block)
state_type marked_size() const
provides the number of marked states in the block
permutation_iter_t marked_nonbottom_begin()
pred_const_iter_t pred_end() const
std::vector< state_type > noninert_out_per_state
trans_type trans_size() const
B_to_C_iter_t postprocess_end
iterator past the last transition into this constellation that needs postprocessing
void refine_partition_until_it_becomes_stable_gjkw()
trans_type get_nr_of_transitions() const
provides the number of transitions in the Kripke structure
void print_part(const part_trans_t &part_tr) const
print the partition as a tree (per constellation and block)
permutation_iter_t int_end
iterator past the last state in the constellation
void set_current_constln(succ_iter_t const new_current_constln)
void set_inert_succ_begin(succ_iter_t const new_inert_out_begin)
bool mark(state_info_ptr s)
mark a state
succ_iter_t state_inert_out_begin
iterator to first inert outgoing transition
pred_const_iter_t pred_begin() const
iterator to first incoming transition
bool surely_has_transition_to(const constln_t *SpC) const
void set_begin(permutation_iter_t new_begin)
set the iterator to the first state in the constellation
#define ONLY_IF_DEBUG(...)
include something in Debug mode
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
#define BRANCH_BIS_EXPERIMENT_JFG
global_function_symbol g_tree_node("@node@", 2)
global_function_symbol g_empty("@empty@", 0)
aterm g_empty_tree(g_empty)
global_function_symbol g_single_tree_node("@single_node@", 1)
The main namespace for the aterm++ library.
term_balanced_tree< aterm > aterm_balanced_tree
A term_balanced_tree with elements of type aterm.
void make_term_balanced_tree(term_balanced_tree< Term > &result, ForwardTraversalIterator p, const std::size_t size, Transformer transformer)
bool is_aterm_balanced_tree(const aterm &t)
const atermpp::function_symbol & function_symbol_StateImp()
const atermpp::function_symbol & function_symbol_StateMinus()
const atermpp::function_symbol & function_symbol_ActForall()
const atermpp::function_symbol & function_symbol_StateForall()
const atermpp::function_symbol & function_symbol_StateYaledTimed()
const atermpp::function_symbol & function_symbol_RegSeq()
const atermpp::function_symbol & function_symbol_StateNu()
const atermpp::function_symbol & function_symbol_StateConstantMultiplyAlt()
const atermpp::function_symbol & function_symbol_StateExists()
const atermpp::function_symbol & function_symbol_StateVar()
const atermpp::function_symbol & function_symbol_ActMultAct()
const atermpp::function_symbol & function_symbol_StateNot()
const atermpp::function_symbol & function_symbol_ActImp()
const atermpp::function_symbol & function_symbol_StateSum()
const atermpp::function_symbol & function_symbol_ActAt()
const atermpp::function_symbol & function_symbol_StateMu()
const atermpp::function_symbol & function_symbol_RegTransOrNil()
const atermpp::function_symbol & function_symbol_StateMay()
const atermpp::function_symbol & function_symbol_StatePlus()
const atermpp::function_symbol & function_symbol_RegTrans()
const atermpp::function_symbol & function_symbol_RegAlt()
const atermpp::function_symbol & function_symbol_ActAnd()
const atermpp::function_symbol & function_symbol_StateDelayTimed()
const atermpp::function_symbol & function_symbol_StateConstantMultiply()
const atermpp::function_symbol & function_symbol_StateOr()
const atermpp::function_symbol & function_symbol_ActOr()
const atermpp::function_symbol & function_symbol_StateAnd()
const atermpp::function_symbol & function_symbol_StateInfimum()
const atermpp::function_symbol & function_symbol_ActNot()
const atermpp::function_symbol & function_symbol_ActExists()
const atermpp::function_symbol & function_symbol_UntypedRegFrm()
const atermpp::function_symbol & function_symbol_StateSupremum()
const atermpp::function_symbol & function_symbol_StateMust()
atermpp::aterm_string identifier_string
String type of the LPS library. Identifier strings are represented internally as ATerms.
static data_specification const & default_specification()
Namespace for system defined sort bool_.
const function_symbol & false_()
Constructor for function symbol false.
const function_symbol & true_()
Constructor for function symbol true.
Namespace for system defined sort int_.
application cint(const data_expression &arg0)
Application of function symbol @cInt.
const basic_sort & int_()
Constructor for sort expression Int.
Namespace for system defined sort nat.
const basic_sort & nat()
Constructor for sort expression Nat.
application cnat(const data_expression &arg0)
Application of function symbol @cNat.
data_expression nat(const std::string &n)
Constructs expression of type Nat from a string.
Namespace for system defined sort pos.
const function_symbol & c1()
Constructor for function symbol @c1.
data_expression pos(const std::string &n)
Constructs expression of type Pos from a string.
const basic_sort & pos()
Constructor for sort expression Pos.
Namespace for system defined sort real_.
data_expression & real_one()
application creal(const data_expression &arg0, const data_expression &arg1)
Application of function symbol @cReal.
data_expression & real_zero()
const basic_sort & real_()
Constructor for sort expression Real.
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
application minus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol -.
Namespace for all data library functionality.
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
application less(const data_expression &arg0, const data_expression &arg1)
Application of function symbol <.
atermpp::term_list< data_expression > data_expression_list
\brief list of data_expressions
bool is_untyped_data_parameter(const atermpp::aterm &x)
atermpp::term_list< variable > variable_list
\brief list of variables
atermpp::term_list< assignment > assignment_list
\brief list of assignments
application equal_to(const data_expression &arg0, const data_expression &arg1)
Application of function symbol ==.
multi_action complete_multi_action(process::untyped_multi_action &x, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
void remove_common_divisor(std::size_t &enumerator, std::size_t &denominator)
void complete_action_rename_specification(action_rename_specification &x, const lps::stochastic_specification &spec)
multi_action complete_multi_action(process::untyped_multi_action &x, multi_action_type_checker &typechecker, const data::data_specification &data_spec=data::detail::default_specification())
std::size_t greatest_common_divisor(std::size_t x, std::size_t y)
The main namespace for the LPS library.
void complete_data_specification(stochastic_specification &spec)
Adds all sorts that appear in the process of l to the data specification of l.
void parse_lps(std::istream &, Specification &)
void complete_data_specification(specification &spec)
Adds all sorts that appear in the process of l to the data specification of l.
atermpp::term_balanced_tree< data::data_expression > state
std::string pp(const probabilistic_data_expression &l)
multi_action parse_multi_action(std::stringstream &in, multi_action_type_checker &typechecker, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from an input stream.
action_rename_specification parse_action_rename_specification(std::istream &in, const lps::stochastic_specification &spec)
Parses a process specification from an input stream.
multi_action parse_multi_action(std::stringstream &in, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from an input stream.
void parse_lps< specification >(std::istream &from, specification &result)
void make_state(state &result, ForwardTraversalIterator p, const std::size_t size)
void parse_lps< stochastic_specification >(std::istream &from, stochastic_specification &result)
Parses a stochastic linear process specification from an input stream.
std::string pp(const lps::state &x)
specification parse_linear_process_specification(std::istream &spec_stream)
Parses a linear process specification from an input stream.
void make_state(state &result, ForwardTraversalIterator p, const std::size_t size, Transformer transformer)
const state_info_entry * state_info_const_ptr
fixed_vector< pred_entry >::iterator pred_iter_t
fixed_vector< succ_entry >::const_iterator succ_const_iter_t
permutation_t::iterator permutation_iter_t
fixed_vector< pred_entry >::const_iterator pred_const_iter_t
state_info_entry * state_info_ptr
fixed_vector< state_info_ptr > permutation_t
permutation_t::const_iterator permutation_const_iter_t
std::list< B_to_C_descriptor > B_to_C_desc_list
B_to_C_desc_list::const_iterator B_to_C_desc_const_iter_t
B_to_C_desc_list::iterator B_to_C_desc_iter_t
fixed_vector< B_to_C_entry >::iterator B_to_C_iter_t
fixed_vector< succ_entry >::iterator succ_iter_t
fixed_vector< B_to_C_entry >::const_iterator B_to_C_const_iter_t
static void swap_permutation(permutation_iter_t s1, permutation_iter_t s2)
swap two permutations
A base class for the lts_dot labelled transition system.
bool bisimulation_compare(const LTS_TYPE &l1, const LTS_TYPE &l2, const bool branching=false, const bool preserve_divergences=false, const bool generate_counter_examples=false, const std::string &counter_example_file="", const bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
void merge(LTS_TYPE &l1, const LTS_TYPE &l2)
std::string supported_lts_formats_text(lts_type default_format, const std::set< lts_type > &supported)
Gives a textual list describing supported LTS formats.
static std::string mime_type_strings[]
std::string supported_lts_formats_text(const std::set< lts_type > &supported)
Gives a textual list describing supported LTS formats.
bool destructive_bisimulation_compare_minimal_depth(LTS_TYPE &l1, LTS_TYPE &l2, const std::string &counter_example_file)
std::size_t state_type
type used to store state (numbers and) counts
void bisimulation_reduce(LTS_TYPE &l, const bool branching=false, const bool preserve_divergences=false)
Reduce transition system l with respect to strong or (divergence preserving) branching bisimulation.
std::string extension_for_type(const lts_type type)
Gives the filename extension associated with an LTS format.
void unmark_explicit_divergence_transitions(LTS_TYPE &l, const std::size_t divergent_transition_label)
std::string string_for_type(const lts_type type)
Gives a string representation of an LTS format.
lts_type parse_format(std::string const &s)
Determines the LTS format from a format specification string.
bool destructive_bisimulation_compare(LTS_TYPE &l1, LTS_TYPE &l2, const bool branching=false, const bool preserve_divergences=false, const bool generate_counter_examples=false, const std::string &counter_example_file="", const bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
static std::string type_desc_strings[]
LABEL_TYPE make_divergence_label(const std::string &s)
const std::set< lts_type > & supported_lts_formats()
Gives the set of all supported LTS formats.
std::size_t label_type
type used to store label numbers and counts
std::size_t trans_type
type used to store transition (numbers and) counts
std::string lts_extensions_as_string(const std::set< lts_type > &supported)
Gives a list of extensions for supported LTS formats.
static const std::string type_strings[]
bool lts_named_cmp(const std::string N[], T a, T b)
std::string lts_extensions_as_string(const std::string &sep, const std::set< lts_type > &supported)
Gives a list of extensions for supported LTS formats.
std::size_t mark_explicit_divergence_transitions(LTS_TYPE &l)
lts_type guess_format(std::string const &s, const bool be_verbose)
Determines the LTS format from a filename by its extension.
static const std::string extension_strings[]
void get_trans(const outgoing_transitions_per_state_t &begin, tree_set_store &tss, std::size_t d, std::vector< transition > &d_trans, LTS_TYPE &aut)
std::size_t apply_hidden_labels(const std::size_t n, const std::set< std::size_t > &hidden_action_set)
std::string mime_type_for_type(const lts_type type)
Gives the MIME type associated with an LTS format.
static const std::set< lts_type > & initialise_supported_lts_formats()
std::size_t label(const outgoing_transitions_per_state_action_t::const_iterator &i)
Label of an iterator exploring transitions per outgoing state and action.
std::string pp(const state_label_dot &l)
Pretty print function for a state_label_dot. Only prints the label field.
lts_equivalence
LTS equivalence relations.
@ lts_eq_branching_bisim_sigref
@ lts_eq_divergence_preserving_weak_bisim
@ lts_eq_branching_bisim_gjkw
@ lts_red_determinisation
@ lts_eq_branching_bisim_gv
@ lts_eq_divergence_preserving_branching_bisim_sigref
@ lts_eq_divergence_preserving_branching_bisim
@ lts_eq_branching_bisim_gj
@ lts_eq_divergence_preserving_branching_bisim_gjkw
@ lts_eq_divergence_preserving_branching_bisim_gv
@ lts_eq_divergence_preserving_branching_bisim_gj
std::string pp(const state_label_lts &label)
Pretty print a state value of this LTS.
bool is_deterministic(const LTS_TYPE &l)
Checks whether this LTS is deterministic.
lts_type
The enumerated type lts_type contains an index for every type type of labelled transition system that...
bool destructive_compare(LTS_TYPE &l1, LTS_TYPE &l2, const lts_preorder pre, const bool generate_counter_example, const std::string &counter_example_file="", const bool structured_output=false, const lps::exploration_strategy strategy=lps::es_breadth, const bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
transition_sort_style
Transition sort styles.
std::multimap< std::pair< transition::size_type, transition::size_type >, transition::size_type > outgoing_transitions_per_state_action_t
Type for exploring transitions per state and action.
std::string pp(const state_label_empty &)
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair_reversed(const std::vector< transition > &trans)
Provide the transitions as a multimap accessible per from state and label, ordered backwardly.
lts_preorder
LTS preorder relations.
@ lts_pre_failures_divergence_refinement
@ lts_pre_trace_anti_chain
@ lts_pre_failures_refinement
@ lts_pre_weak_failures_refinement
@ lts_pre_weak_trace_anti_chain
@ lts_pre_impossible_futures
void group_transitions_on_label_tgt(std::vector< transition > &transitions, const std::size_t number_of_labels, const std::size_t tau_label_index, const std::size_t number_of_states)
static std::vector< std::size_t > bogus_todo_stack
void group_transitions_on_label(std::vector< transition > &transitions, std::function< std::size_t(const transition &)> get_label, const std::size_t number_of_labels, const std::size_t tau_label_index)
std::size_t to(const outgoing_pair_t &p)
Target state of a label state pair.
std::string pp(const state_label_fsm &label)
Pretty print an fsm state label.
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair(const std::vector< transition > &trans)
Provide the transitions as a multimap accessible per from state and label.
std::size_t to(const outgoing_transitions_per_state_action_t::const_iterator &i)
To state of an iterator exploring transitions per outgoing state and action.
void sort_transitions(std::vector< transition > &transitions, const std::set< transition::size_type > &hidden_label_set, transition_sort_style ts=src_lbl_tgt)
Sorts the transitions using a sort style.
void sort_transitions(std::vector< transition > &transitions, transition_sort_style ts=src_lbl_tgt)
Sorts the transitions using a sort style.
void determinise(LTS_TYPE &l)
Determinises this LTS.
void group_transitions_on_tgt_label(std::vector< transition > &transitions, const std::size_t number_of_labels, const std::size_t tau_label_index, const std::size_t number_of_states)
std::string pp(const probabilistic_state< STATE, PROBABILITY > &l)
void reduce(LTS_TYPE &l, lts_equivalence eq)
Applies a reduction algorithm to this LTS.
detail::indexed_sorted_vector_for_transitions< outgoing_pair_t > outgoing_transitions_per_state_t
void group_transitions_on_tgt_label(LTS_TYPE &aut)
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair_reversed(const std::vector< transition > &trans, const std::set< transition::size_type > &hide_label_set)
Provide the transitions as a multimap accessible per from state and label, ordered backwardly.
bool destructive_compare(LTS_TYPE &l1, LTS_TYPE &l2, const lts_equivalence eq, const bool generate_counter_examples=false, const std::string &counter_example_file=std::string(), const bool structured_output=false)
Checks whether this LTS is equivalent to another LTS.
std::string ptr(const transition t)
Sorts the transitions on labels. Action with the tau label are put first.
std::string pp(const action_label_lts &l)
Print the action label to string.
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair(const std::vector< transition > &trans, const std::set< transition::size_type > &hide_label_set)
Provide the transitions as a multimap accessible per from state and label.
void merge(LTS_TYPE &l1, const LTS_TYPE &l2)
Merge the second lts into the first lts.
bool reachability_check(lts< SL, AL, BASE > &l, bool remove_unreachable=false)
Checks whether all states in this LTS are reachable from the initial state and remove unreachable sta...
std::size_t label(const outgoing_pair_t &p)
Label of a pair of a label and target state.
std::size_t from(const outgoing_transitions_per_state_action_t::const_iterator &i)
From state of an iterator exploring transitions per outgoing state and action.
void scc_reduce(LTS_TYPE &l, const bool preserve_divergence_loops=false)
void group_transitions_on_label(const std::vector< transition >::iterator begin, const std::vector< transition >::iterator end, std::function< std::size_t(const transition &)> get_label, std::vector< std::pair< std::size_t, std::size_t > > &count_sum_transitions_per_action, const std::size_t tau_label_index=0, std::vector< std::size_t > &todo_stack=bogus_todo_stack)
static const std::size_t const_tau_label_index
bool reachability_check(probabilistic_lts< SL, AL, PROBABILISTIC_STATE, BASE > &l, bool remove_unreachable=false)
Checks whether all states in a probabilistic LTS are reachable from the initial state and remove unre...
std::pair< transition::size_type, transition::size_type > outgoing_pair_t
Type for exploring transitions per state.
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, const lts_preorder pre, const bool generate_counter_example, const std::string &counter_example_file="", const bool structured_output=false, const lps::exploration_strategy strategy=lps::es_breadth, const bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
std::string pp(const action_label_string &l)
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, const lts_equivalence eq, const bool generate_counter_examples=false, const std::string &counter_example_file="", const bool structured_output=false)
Checks whether this LTS is equivalent to another LTS.
The main namespace for the Process library.
bool is_linear(const process_specification &p, bool verbose=false)
Returns true if the process specification is linear.
atermpp::term_list< action_label > action_label_list
\brief list of action_labels
std::vector< action > action_vector
\brief vector of actions
atermpp::term_list< action > action_list
\brief list of actions
bool is_untyped_multi_action(const atermpp::aterm &x)
process_specification parse_process_specification(std::istream &in)
Parses a process specification from an input stream.
void remove_common_divisor(std::size_t &p, std::size_t &q)
std::size_t hash_combine(const std::size_t h1, const std::size_t h2)
std::size_t multiply_single_number(const std::size_t n1, const std::size_t n2, std::size_t &multiplication_carry)
std::size_t divide_single_number(const std::size_t p, const std::size_t q, std::size_t &remainder)
std::size_t add_single_number(const std::size_t n1, const std::size_t n2, std::size_t &carry)
std::size_t greatest_common_divisor(std::size_t p, std::size_t q)
std::size_t subtract_single_number(const std::size_t n1, const std::size_t n2, std::size_t &carry)
std::string pp(const probabilistic_arbitrary_precision_fraction &l)
std::string pp(const big_natural_number &l)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
void swap(atermpp::term_balanced_tree< T > &t1, atermpp::term_balanced_tree< T > &t2)
Swaps two balanced trees.
static const atermpp::aterm StateMay
static const atermpp::aterm StateOr
static const atermpp::aterm UntypedRegFrm
static const atermpp::aterm StateFrm
static const atermpp::aterm StateYaled
static const atermpp::aterm RegAlt
static const atermpp::aterm ActNot
static const atermpp::aterm ActImp
static const atermpp::aterm ActTrue
static const atermpp::aterm StateInfimum
static const atermpp::aterm StateAnd
static const atermpp::aterm StateExists
static const atermpp::aterm RegTrans
static const atermpp::aterm ActOr
static const atermpp::aterm StateConstantMultiplyAlt
static const atermpp::aterm ActFrm
static const atermpp::aterm ActForall
static const atermpp::aterm StateYaledTimed
static const atermpp::aterm ActFalse
static const atermpp::aterm StateFalse
static const atermpp::aterm RegFrm
static const atermpp::aterm StateDelay
static const atermpp::aterm StatePlus
static const atermpp::aterm StateMinus
static const atermpp::aterm StateNu
static const atermpp::aterm ActAnd
static const atermpp::aterm StateDelayTimed
static const atermpp::aterm StateSupremum
static const atermpp::aterm StateSum
static const atermpp::aterm ActAt
static const atermpp::aterm ActExists
static const atermpp::aterm StateMu
static const atermpp::aterm RegTransOrNil
static const atermpp::aterm StateVar
static const atermpp::aterm StateImp
static const atermpp::aterm RegSeq
static const atermpp::aterm StateTrue
static const atermpp::aterm StateForall
static const atermpp::aterm StateMust
static const atermpp::aterm StateNot
static const atermpp::aterm ActMultAct
static const atermpp::aterm StateConstantMultiply
static const atermpp::function_symbol UntypedRegFrm
static const atermpp::function_symbol StateMu
static const atermpp::function_symbol ActMultAct
static const atermpp::function_symbol RegSeq
static const atermpp::function_symbol StateConstantMultiply
static const atermpp::function_symbol ActNot
static const atermpp::function_symbol StateSum
static const atermpp::function_symbol ActAnd
static const atermpp::function_symbol StateConstantMultiplyAlt
static const atermpp::function_symbol StateForall
static const atermpp::function_symbol StateOr
static const atermpp::function_symbol ActFalse
static const atermpp::function_symbol RegTransOrNil
static const atermpp::function_symbol StateYaledTimed
static const atermpp::function_symbol StateExists
static const atermpp::function_symbol ActExists
static const atermpp::function_symbol StateVar
static const atermpp::function_symbol StateTrue
static const atermpp::function_symbol StateFalse
static const atermpp::function_symbol StateImp
static const atermpp::function_symbol RegAlt
static const atermpp::function_symbol RegTrans
static const atermpp::function_symbol StateMinus
static const atermpp::function_symbol StateNot
static const atermpp::function_symbol StateInfimum
static const atermpp::function_symbol StateDelay
static const atermpp::function_symbol StateYaled
static const atermpp::function_symbol ActAt
static const atermpp::function_symbol StateMay
static const atermpp::function_symbol StateDelayTimed
static const atermpp::function_symbol ActImp
static const atermpp::function_symbol ActTrue
static const atermpp::function_symbol ActForall
static const atermpp::function_symbol StatePlus
static const atermpp::function_symbol StateMust
static const atermpp::function_symbol StateNu
static const atermpp::function_symbol StateAnd
static const atermpp::function_symbol ActOr
static const atermpp::function_symbol StateSupremum
std::vector< state_type > bottom_states
block_index_type parent_block_index
block_index_type block_index
std::vector< transition > non_inert_transitions
std::vector< non_bottom_state > non_bottom_states
std::vector< state_type > inert_transitions
non_bottom_state(const state_type s, const std::vector< state_type > &it)
non_bottom_state(const state_type s)
std::vector< state_type > states
block_index_type block_index
std::vector< transition > transitions
std::set< std::pair< label_type, block_index_type > > outgoing_observations
block_index_type parent_block_index
Converts a process expression into linear process format. Use the convert member functions for this.
lps::specification convert(const process_specification &p)
Converts a process_specification into a specification. Throws non_linear_process if a non-linear sub-...
Converts a process expression into linear process format. Use the convert member functions for this.
lps::stochastic_specification convert(const process_specification &p)
Converts a process_specification into a stochastic_specification. Throws non_linear_process if a non-...
std::size_t operator()(const atermpp::aterm &t) const
std::size_t operator()(const atermpp::detail::reference_aterm< T > &t) const
std::size_t operator()(const atermpp::term_balanced_tree< T > &t) const
std::size_t operator()(const mcrl2::lps::multi_action &ma) const
std::size_t operator()(const mcrl2::lps::probabilistic_data_expression &p) const
std::size_t operator()(const mcrl2::lps::state_probability_pair< STATE, PROBABILITY > &p) const
std::size_t operator()(const mcrl2::lts::action_label_lts &as) const
std::size_t operator()(const mcrl2::lts::action_label_string &as) const
std::size_t operator()(const mcrl2::lts::probabilistic_state< STATE, PROBABILITY > &p) const
std::size_t operator()(const mcrl2::lts::transition &t) const
std::size_t operator()(const mcrl2::utilities::big_natural_number &n) const
std::size_t operator()(const mcrl2::utilities::probabilistic_arbitrary_precision_fraction &p) const