12#ifndef MCRL2_MODAL_FORMULA_STATE_FORMULA_H
13#define MCRL2_MODAL_FORMULA_STATE_FORMULA_H
15#include "mcrl2/modal_formula/regular_formula.h"
35 assert(
core::
detail::check_rule_StateFrm(*
this));
136 return out << state_formulas::pp(x);
160 assert(
core::
detail::check_term_StateTrue(*
this));
176 return x.function() == core::detail::function_symbols::StateTrue;
189 return out << state_formulas::pp(x);
213 assert(
core::
detail::check_term_StateFalse(*
this));
229 return x.function() == core::detail::function_symbols::StateFalse;
242 return out << state_formulas::pp(x);
266 assert(
core::
detail::check_term_StateNot(*
this));
282 return atermpp::down_cast<state_formula>((*
this)[0]);
288template <
class... ARGUMENTS>
291 atermpp::make_term_appl(t, core::detail::function_symbol_StateNot(), args...);
300 return x.function() == core::detail::function_symbols::StateNot;
313 return out << state_formulas::pp(x);
337 assert(
core::
detail::check_term_StateMinus(*
this));
353 return atermpp::down_cast<state_formula>((*
this)[0]);
359template <
class... ARGUMENTS>
362 atermpp::make_term_appl(t, core::detail::function_symbol_StateMinus(), args...);
371 return x.function() == core::detail::function_symbols::StateMinus;
384 return out << state_formulas::pp(x);
408 assert(
core::
detail::check_term_StateAnd(*
this));
424 return atermpp::down_cast<state_formula>((*
this)[0]);
429 return atermpp::down_cast<state_formula>((*
this)[1]);
435template <
class... ARGUMENTS>
438 atermpp::make_term_appl(t, core::detail::function_symbol_StateAnd(), args...);
447 return x.function() == core::detail::function_symbols::StateAnd;
460 return out << state_formulas::pp(x);
484 assert(
core::
detail::check_term_StateOr(*
this));
500 return atermpp::down_cast<state_formula>((*
this)[0]);
505 return atermpp::down_cast<state_formula>((*
this)[1]);
511template <
class... ARGUMENTS>
514 atermpp::make_term_appl(t, core::detail::function_symbol_StateOr(), args...);
523 return x.function() == core::detail::function_symbols::StateOr;
536 return out << state_formulas::pp(x);
560 assert(
core::
detail::check_term_StateImp(*
this));
576 return atermpp::down_cast<state_formula>((*
this)[0]);
581 return atermpp::down_cast<state_formula>((*
this)[1]);
587template <
class... ARGUMENTS>
590 atermpp::make_term_appl(t, core::detail::function_symbol_StateImp(), args...);
599 return x.function() == core::detail::function_symbols::StateImp;
612 return out << state_formulas::pp(x);
636 assert(
core::
detail::check_term_StatePlus(*
this));
652 return atermpp::down_cast<state_formula>((*
this)[0]);
657 return atermpp::down_cast<state_formula>((*
this)[1]);
663template <
class... ARGUMENTS>
666 atermpp::make_term_appl(t, core::detail::function_symbol_StatePlus(), args...);
675 return x.function() == core::detail::function_symbols::StatePlus;
688 return out << state_formulas::pp(x);
712 assert(
core::
detail::check_term_StateConstantMultiply(*
this));
728 return atermpp::down_cast<data::data_expression>((*
this)[0]);
733 return atermpp::down_cast<state_formula>((*
this)[1]);
739template <
class... ARGUMENTS>
742 atermpp::make_term_appl(t, core::detail::function_symbol_StateConstantMultiply(), args...);
751 return x.function() == core::detail::function_symbols::StateConstantMultiply;
764 return out << state_formulas::pp(x);
788 assert(
core::
detail::check_term_StateConstantMultiplyAlt(*
this));
804 return atermpp::down_cast<state_formula>((*
this)[0]);
809 return atermpp::down_cast<data::data_expression>((*
this)[1]);
815template <
class... ARGUMENTS>
818 atermpp::make_term_appl(t, core::detail::function_symbol_StateConstantMultiplyAlt(), args...);
827 return x.function() == core::detail::function_symbols::StateConstantMultiplyAlt;
840 return out << state_formulas::pp(x);
864 assert(
core::
detail::check_term_StateForall(*
this));
880 return atermpp::down_cast<data::variable_list>((*
this)[0]);
885 return atermpp::down_cast<state_formula>((*
this)[1]);
891template <
class... ARGUMENTS>
894 atermpp::make_term_appl(t, core::detail::function_symbol_StateForall(), args...);
903 return x.function() == core::detail::function_symbols::StateForall;
916 return out << state_formulas::pp(x);
940 assert(
core::
detail::check_term_StateExists(*
this));
956 return atermpp::down_cast<data::variable_list>((*
this)[0]);
961 return atermpp::down_cast<state_formula>((*
this)[1]);
967template <
class... ARGUMENTS>
970 atermpp::make_term_appl(t, core::detail::function_symbol_StateExists(), args...);
979 return x.function() == core::detail::function_symbols::StateExists;
992 return out << state_formulas::pp(x);
1016 assert(
core::
detail::check_term_StateInfimum(*
this));
1032 return atermpp::down_cast<data::variable_list>((*
this)[0]);
1037 return atermpp::down_cast<state_formula>((*
this)[1]);
1043template <
class... ARGUMENTS>
1046 atermpp::make_term_appl(t, core::detail::function_symbol_StateInfimum(), args...);
1055 return x.function() == core::detail::function_symbols::StateInfimum;
1068 return out << state_formulas::pp(x);
1092 assert(
core::
detail::check_term_StateSupremum(*
this));
1108 return atermpp::down_cast<data::variable_list>((*
this)[0]);
1113 return atermpp::down_cast<state_formula>((*
this)[1]);
1119template <
class... ARGUMENTS>
1122 atermpp::make_term_appl(t, core::detail::function_symbol_StateSupremum(), args...);
1131 return x.function() == core::detail::function_symbols::StateSupremum;
1144 return out << state_formulas::pp(x);
1168 assert(
core::
detail::check_term_StateSum(*
this));
1184 return atermpp::down_cast<data::variable_list>((*
this)[0]);
1189 return atermpp::down_cast<state_formula>((*
this)[1]);
1195template <
class... ARGUMENTS>
1198 atermpp::make_term_appl(t, core::detail::function_symbol_StateSum(), args...);
1207 return x.function() == core::detail::function_symbols::StateSum;
1220 return out << state_formulas::pp(x);
1244 assert(
core::
detail::check_term_StateMust(*
this));
1260 return atermpp::down_cast<regular_formulas::regular_formula>((*
this)[0]);
1265 return atermpp::down_cast<state_formula>((*
this)[1]);
1271template <
class... ARGUMENTS>
1274 atermpp::make_term_appl(t, core::detail::function_symbol_StateMust(), args...);
1283 return x.function() == core::detail::function_symbols::StateMust;
1296 return out << state_formulas::pp(x);
1320 assert(
core::
detail::check_term_StateMay(*
this));
1336 return atermpp::down_cast<regular_formulas::regular_formula>((*
this)[0]);
1341 return atermpp::down_cast<state_formula>((*
this)[1]);
1347template <
class... ARGUMENTS>
1350 atermpp::make_term_appl(t, core::detail::function_symbol_StateMay(), args...);
1359 return x.function() == core::detail::function_symbols::StateMay;
1372 return out << state_formulas::pp(x);
1396 assert(
core::
detail::check_term_StateYaled(*
this));
1412 return x.function() == core::detail::function_symbols::StateYaled;
1425 return out << state_formulas::pp(x);
1449 assert(
core::
detail::check_term_StateYaledTimed(*
this));
1465 return atermpp::down_cast<data::data_expression>((*
this)[0]);
1471template <
class... ARGUMENTS>
1474 atermpp::make_term_appl(t, core::detail::function_symbol_StateYaledTimed(), args...);
1483 return x.function() == core::detail::function_symbols::StateYaledTimed;
1496 return out << state_formulas::pp(x);
1520 assert(
core::
detail::check_term_StateDelay(*
this));
1536 return x.function() == core::detail::function_symbols::StateDelay;
1549 return out << state_formulas::pp(x);
1573 assert(
core::
detail::check_term_StateDelayTimed(*
this));
1589 return atermpp::down_cast<data::data_expression>((*
this)[0]);
1595template <
class... ARGUMENTS>
1598 atermpp::make_term_appl(t, core::detail::function_symbol_StateDelayTimed(), args...);
1607 return x.function() == core::detail::function_symbols::StateDelayTimed;
1620 return out << state_formulas::pp(x);
1644 assert(
core::
detail::check_term_StateVar(*
this));
1653 variable(
const std::string& name,
const data::data_expression_list& arguments)
1665 return atermpp::down_cast<core::identifier_string>((*
this)[0]);
1670 return atermpp::down_cast<data::data_expression_list>((*
this)[1]);
1676template <
class... ARGUMENTS>
1679 atermpp::make_term_appl(t, core::detail::function_symbol_StateVar(), args...);
1688 return x.function() == core::detail::function_symbols::StateVar;
1701 return out << state_formulas::pp(x);
1725 assert(
core::
detail::check_term_StateNu(*
this));
1746 return atermpp::down_cast<core::identifier_string>((*
this)[0]);
1751 return atermpp::down_cast<data::assignment_list>((*
this)[1]);
1756 return atermpp::down_cast<state_formula>((*
this)[2]);
1762template <
class... ARGUMENTS>
1765 atermpp::make_term_appl(t, core::detail::function_symbol_StateNu(), args...);
1774 return x.function() == core::detail::function_symbols::StateNu;
1787 return out << state_formulas::pp(x);
1811 assert(
core::
detail::check_term_StateMu(*
this));
1832 return atermpp::down_cast<core::identifier_string>((*
this)[0]);
1837 return atermpp::down_cast<data::assignment_list>((*
this)[1]);
1842 return atermpp::down_cast<state_formula>((*
this)[2]);
1848template <
class... ARGUMENTS>
1851 atermpp::make_term_appl(t, core::detail::function_symbol_StateMu(), args...);
1860 return x.function() == core::detail::function_symbols::StateMu;
1873 return out << state_formulas::pp(x);
aterm(const aterm &other) noexcept=default
This class has user-declared copy constructor so declare default copy and move operators.
A unordered_map class in which aterms can be stored.
\brief An untyped parameter
\brief A timed multi-action
const process::action_list & actions() const
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
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, label_type > split_by_action
std::size_t num_eq_classes() const
Gives the number of bisimulation equivalence classes of the LTS.
mcrl2::state_formulas::state_formula counter_formula(std::size_t s, std::size_t t)
Creates a state formula that distinguishes state s from state t.
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 refine_partion_with_respect_to_divergences()
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
mcrl2::state_formulas::state_formula counter_formula_aux(const block_index_type B1, const block_index_type B2)
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
function object to compare two constln_t pointers based on their contents
A class that can be used to store counterexample trees and.
A class that contains a labelled transition system.
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.
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
bool is_untyped_data_parameter(const atermpp::aterm &x)
The main namespace for the LPS library.
bool bisimulation_compare(const LTS_TYPE &l1, const LTS_TYPE &l2, bool branching=false, bool preserve_divergences=false, bool generate_counter_examples=false, const std::string &counter_example_file="", bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
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::array< std::string, 5 > extension_strings
std::string supported_lts_formats_text(lts_type default_format, const std::set< lts_type > &supported)
Gives a textual list describing supported LTS formats.
std::string supported_lts_formats_text(const std::set< lts_type > &supported)
Gives a textual list describing supported LTS formats.
std::string string_for_type(const lts_type type)
Gives a string representation of an LTS format.
std::string mime_type_for_type(const lts_type type)
Gives the MIME type associated with an LTS format.
void get_trans(const outgoing_transitions_per_state_t &begin, tree_set_store &tss, std::ptrdiff_t d, std::vector< transition > &d_trans, LTS_TYPE &aut)
lts_type parse_format(std::string const &s)
Determines the LTS format from a format specification string.
static const std::array< std::string, 5 > type_strings
std::string extension_for_type(const lts_type type)
Gives the filename extension associated with an LTS format.
const std::set< lts_type > & supported_lts_formats()
Gives the set of all supported LTS formats.
std::string lts_extensions_as_string(const std::set< lts_type > &supported)
Gives a list of extensions for supported LTS formats.
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.
bool destructive_bisimulation_compare(LTS_TYPE &l1, LTS_TYPE &l2, bool branching=false, bool preserve_divergences=false, bool generate_counter_examples=false, const std::string &counter_example_file="", bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
void bisimulation_reduce(LTS_TYPE &l, bool branching=false, bool preserve_divergences=false)
Reduce transition system l with respect to strong or (divergence preserving) branching bisimulation.
bool lts_named_cmp(const std::array< std::string, Size > &N, T a, T b)
static const std::array< std::string, 5 > type_desc_strings
static const std::array< std::string, 5 > mime_type_strings
static const std::set< lts_type > & initialise_supported_lts_formats()
bool is_deterministic(const LTS_TYPE &l)
Checks whether this LTS is deterministic.
void determinise(LTS_TYPE &l)
Determinises this LTS.
void reduce(LTS_TYPE &l, lts_equivalence eq)
Applies a reduction algorithm to this LTS.
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, lts_equivalence eq, bool generate_counter_examples=false, const std::string &counter_example_file="", bool structured_output=false)
Checks whether this LTS is equivalent to another LTS.
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.
bool destructive_compare(LTS_TYPE &l1, LTS_TYPE &l2, lts_preorder pre, bool generate_counter_example, const std::string &counter_example_file="", bool structured_output=false, lps::exploration_strategy strategy=lps::es_breadth, bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
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...
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...
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, lts_preorder pre, bool generate_counter_example, const std::string &counter_example_file="", bool structured_output=false, lps::exploration_strategy strategy=lps::es_breadth, bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
static const atermpp::aterm StateMay
static const atermpp::aterm StateOr
static const atermpp::aterm StateFrm
static const atermpp::aterm StateYaled
static const atermpp::aterm StateInfimum
static const atermpp::aterm StateAnd
static const atermpp::aterm StateExists
static const atermpp::aterm StateConstantMultiplyAlt
static const atermpp::aterm StateYaledTimed
static const atermpp::aterm StateFalse
static const atermpp::aterm StateDelay
static const atermpp::aterm StatePlus
static const atermpp::aterm StateMinus
static const atermpp::aterm StateNu
static const atermpp::aterm StateDelayTimed
static const atermpp::aterm StateSupremum
static const atermpp::aterm StateSum
static const atermpp::aterm StateMu
static const atermpp::aterm StateVar
static const atermpp::aterm StateImp
static const atermpp::aterm StateTrue
static const atermpp::aterm StateForall
static const atermpp::aterm StateMust
static const atermpp::aterm StateNot
static const atermpp::aterm StateConstantMultiply
std::vector< state_type > bottom_states
block_index_type parent_block_index
block_index_type block_index
void swap(block &b) noexcept
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)