mCRL2
Loading...
Searching...
No Matches
resolve_name_clashes.h
Go to the documentation of this file.
1// Author(s): Wieger Wesselink
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
9/// \file mcrl2/lps/resolve_name_clashes.h
10/// \brief add your file description here.
11
12#ifndef MCRL2_LPS_RESOLVE_NAME_CLASHES_H
13#define MCRL2_LPS_RESOLVE_NAME_CLASHES_H
14
15#include "mcrl2/lps/replace.h"
16
17namespace mcrl2 {
18
19namespace lps {
20
21namespace detail {
22
23// returns the names of the variables in v
24template <typename VariableContainer>
26{
27 std::set<core::identifier_string> result;
28 for (const data::variable& v: vars)
29 {
30 result.insert(v.name());
31 }
32 return result;
33}
34
35// returns the names of variables in v that are also in w
36template <typename VariableContainer>
38{
39 std::set<core::identifier_string> result;
40 for (const data::variable& v: vars)
41 {
42 if (w.find(v.name()) != w.end())
43 {
44 result.insert(v.name());
45 }
46 }
47 return result;
48}
49
50inline
52 const std::set<core::identifier_string>& process_parameter_names,
54{
55 const data::variable_list& summation_variables = summand.summation_variables();
56 std::set<core::identifier_string> names = variable_name_clashes(summation_variables, process_parameter_names);
57 if (!names.empty())
58 {
59 data::mutable_map_substitution<> sigma;
60 for (const data::variable& v: summation_variables)
61 {
62 if (process_parameter_names.find(v.name()) != process_parameter_names.end())
63 {
64 sigma[v] = data::variable(generator(v.name()), v.sort());
65 }
66 }
67 lps::replace_all_variables(summand, sigma);
68 }
69}
70
71inline
73 const std::set<core::identifier_string>& process_parameter_names,
75{
76 const data::variable_list& summation_variables = summand.summation_variables();
77 std::set<core::identifier_string> names = variable_name_clashes(summation_variables, process_parameter_names);
78 if (!names.empty())
79 {
80 data::mutable_map_substitution<> sigma;
81 for (const data::variable& v: summation_variables)
82 {
83 if (process_parameter_names.find(v.name()) != process_parameter_names.end())
84 {
85 sigma[v] = data::variable(generator(v.name()), v.sort());
86 }
87 }
88 lps::replace_all_variables(summand, sigma);
89 }
90}
91
92inline
94 const std::set<core::identifier_string>& process_parameter_names,
96{
97 data::mutable_map_substitution<> sigma;
98 std::set<core::identifier_string> summation_names;
99
100 // handle the summation variables
101 for (const data::variable& v: summand.summation_variables())
102 {
103 if (process_parameter_names.find(v.name()) != process_parameter_names.end())
104 {
105 sigma[v] = data::variable(generator(v.name()), v.sort());
106 }
107 summation_names.insert(v.name());
108 }
109 if (!sigma.empty())
110 {
111 lps::replace_all_variables(summand, sigma);
112 }
113
114 // handle the distribution variables
115 sigma.clear();
116
117 for (const data::variable& v: summand.distribution().variables())
118 {
119 if (process_parameter_names.find(v.name()) != process_parameter_names.end() ||
120 summation_names.find(v.name()) != summation_names.end()) // Check stochastic variables also with respect to the summand variables.
121 {
122 sigma[v] = data::variable(generator(v.name()), v.sort());
123 }
124 }
125 if (!sigma.empty())
126 {
127 summand.distribution() = lps::replace_all_variables(summand.distribution(), sigma);
128 summand.assignments() = lps::replace_all_variables(summand.assignments(), sigma);
129 }
130}
131
132} // namespace detail
133
134/// \brief Renames summand variables such that there are no name clashes between summand variables and process parameters
135template <typename Specification>
137{
138 typename Specification::process_type& proc = spec.process();
139 std::set<core::identifier_string> process_parameter_names = detail::variable_names(proc.process_parameters());
140
142 generator.add_identifiers(lps::find_identifiers(spec));
143 generator.add_identifiers(data::function_and_mapping_identifiers(spec.data()));
144
145 for (typename Specification::process_type::action_summand_type& s: proc.action_summands())
146 {
147 detail::resolve_summand_variable_name_clashes(s, process_parameter_names, generator);
148 }
149
150 for (deadlock_summand& s: proc.deadlock_summands())
151 {
152 detail::resolve_summand_variable_name_clashes(s, process_parameter_names, generator);
153 }
154}
155
156} // namespace lps
157
158} // namespace mcrl2
159
160#endif // MCRL2_LPS_RESOLVE_NAME_CLASHES_H
mcrl2::utilities::shared_guard lock_shared()
Acquire a shared lock on this thread aterm pool.
A list of aterm objects.
Definition aterm_list.h:24
bool operator==(const unprotected_aterm_core &t) const
Comparison operator.
Definition aterm_core.h:83
bool operator!=(const unprotected_aterm_core &t) const
Inequality operator on two unprotected aterms.
Definition aterm_core.h:92
const variable_list & variables() const
Definition abstraction.h:63
const data_expression & body() const
Definition abstraction.h:68
existential quantification.
Definition exists.h:26
universal quantification.
Definition forall.h:26
Rewriter that operates on data expressions.
Definition rewriter.h:81
void thread_initialise()
Initialises this rewriter with thread dependent information.
Definition rewriter.h:150
Identifier generator that stores the identifiers of the context in a set. Using the operator()() and ...
\brief A data variable
Definition variable.h:28
logger(const log_level_t l)
Default constructor.
Definition logger.h:164
LPS summand containing a multi-action.
void insert(const state &s) override
Definition explorer.h:127
void swap(breadth_first_todo_set &other)
Definition explorer.h:137
atermpp::deque< state > & todo_buffer()
Definition explorer.h:132
breadth_first_todo_set(ForwardIterator first, ForwardIterator last)
Definition explorer.h:117
breadth_first_todo_set(const state &init)
Definition explorer.h:112
void choose_element(state &result) override
Definition explorer.h:121
LPS summand containing a deadlock.
void choose_element(state &result) override
Definition explorer.h:155
depth_first_todo_set(ForwardIterator first, ForwardIterator last)
Definition explorer.h:151
depth_first_todo_set(const state &init)
Definition explorer.h:146
void insert(const state &s) override
Definition explorer.h:161
std::vector< data::variable > m_process_parameters
Definition explorer.h:482
void generate_transitions(const explorer_summand &summand, const SummandSequence &confluent_summands, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr, data::data_expression &condition, state_type &s1, atermpp::aterm key, data::enumerator_algorithm<> &enumerator, data::enumerator_identifier_generator &id_generator, ReportTransition report_transition=ReportTransition())
Definition explorer.h:646
void make_timed_state(state &result, const state &s, const data::data_expression &t) const
Definition explorer.h:1053
explorer(const Specification &lpsspec, const explorer_options &options_)
Definition explorer.h:988
data::enumerator_algorithm m_global_enumerator
Definition explorer.h:475
void abort() override
Abort the state space generation.
Definition explorer.h:1742
lps::multi_action rewrite_action(const lps::multi_action &a, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr) const
Rewrite action a, and put it back in place.
Definition explorer.h:598
std::vector< state > generate_successors(const state &s0, const SummandSequence &summands, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr, data::enumerator_algorithm<> &enumerator, data::enumerator_identifier_generator &id_generator, const SummandSequence &confluent_summands=SummandSequence())
Definition explorer.h:889
const state_type & make_state(const stochastic_state &s) const
Definition explorer.h:1072
std::size_t m_n
Definition explorer.h:483
void generate_state_space(bool recursive, const StateType &s0, const SummandSequence &regular_summands, const SummandSequence &confluent_summands, indexed_set_for_states_type &discovered, DiscoverState discover_state=DiscoverState(), ExamineTransition examine_transition=ExamineTransition(), StartState start_state=StartState(), FinishState finish_state=FinishState(), DiscoverInitialState discover_initial_state=DiscoverInitialState())
Definition explorer.h:1267
std::vector< std::pair< lps::multi_action, state > > generate_transitions(const data::data_expression_list &init, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr)
Generates outgoing transitions for a given state.
Definition explorer.h:1451
const indexed_set_for_states_type & state_map() const
Returns a mapping containing all discovered states.
Definition explorer.h:1748
bool less_equal(const data::data_expression &t0, const data::data_expression &t1, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr) const
Definition explorer.h:518
const std::vector< data::variable > & process_parameters() const
Definition explorer.h:1763
const std::vector< explorer_summand > & confluent_summands() const
Definition explorer.h:1758
void set_process_parameter_values(const data::data_expression_list &values, data::mutable_indexed_substitution<> &sigma)
Definition explorer.h:1779
void set_process_parameter_values(const data::data_expression_list &values)
Definition explorer.h:1784
std::set< data::function_symbol > add_real_operators(std::set< data::function_symbol > s) const
Definition explorer.h:928
data::enumerator_identifier_generator m_global_id_generator
Definition explorer.h:476
Specification m_global_lpsspec
Definition explorer.h:478
data::data_expression_list process_parameter_values() const
Process parameter values for use in a single thread.
Definition explorer.h:1774
void generate_state_space_dfs_recursive(bool recursive, DiscoverState discover_state=DiscoverState(), ExamineTransition examine_transition=ExamineTransition(), TreeEdge tree_edge=TreeEdge(), BackEdge back_edge=BackEdge(), ForwardOrCrossEdge forward_or_cross_edge=ForwardOrCrossEdge(), FinishState finish_state=FinishState())
Definition explorer.h:1586
static constexpr bool is_timed
Definition explorer.h:453
const data::data_expression_list & initial_state() const
Definition explorer.h:1022
void generate_state_space(bool recursive, DiscoverState discover_state=DiscoverState(), ExamineTransition examine_transition=ExamineTransition(), StartState start_state=StartState(), FinishState finish_state=FinishState(), DiscoverInitialState discover_initial_state=DiscoverInitialState())
Generates the state space, and reports all discovered states and transitions by means of callback fun...
Definition explorer.h:1375
void generate_state_space_dfs_recursive(const state &s0, std::unordered_set< state > gray, std::unordered_set< state > &discovered, const SummandSequence &regular_summands, const SummandSequence &confluent_summands, DiscoverState discover_state=DiscoverState(), ExamineTransition examine_transition=ExamineTransition(), TreeEdge tree_edge=TreeEdge(), BackEdge back_edge=BackEdge(), ForwardOrCrossEdge forward_or_cross_edge=ForwardOrCrossEdge(), FinishState finish_state=FinishState())
Definition explorer.h:1506
indexed_set_for_states_type m_discovered
Definition explorer.h:495
state find_representative(state &u0, const SummandSequence &summands, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr, data::enumerator_algorithm<> &enumerator, data::enumerator_identifier_generator &id_generator)
Definition explorer.h:528
std::vector< explorer_summand > m_regular_summands
Definition explorer.h:487
const explorer_options m_options
Definition explorer.h:470
void compute_stochastic_state(stochastic_state &result, const stochastic_distribution &distribution, const DataExpressionSequence &next_state, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr, data::enumerator_algorithm<> &enumerator) const
Definition explorer.h:559
summand_cache_map global_cache
Definition explorer.h:493
const data::rewriter & get_rewriter() const
Definition explorer.h:1028
data::data_expression_list m_initial_state
Definition explorer.h:484
std::mutex m_exclusive_state_access
Definition explorer.h:480
data::mutable_indexed_substitution m_global_sigma
Definition explorer.h:473
data::data_expression_list process_parameter_values(data::mutable_indexed_substitution<> &sigma) const
Definition explorer.h:1768
std::vector< std::pair< lps::multi_action, state_type > > generate_transitions(const state &d0, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr, data::enumerator_algorithm<> &enumerator, data::enumerator_identifier_generator &id_generator)
Generates outgoing transitions for a given state.
Definition explorer.h:1406
state_type make_state(const state &s) const
Definition explorer.h:1060
lps::stochastic_distribution m_initial_distribution
Definition explorer.h:485
std::vector< explorer_summand > m_confluent_summands
Definition explorer.h:488
volatile std::atomic< bool > m_must_abort
Definition explorer.h:490
data::rewriter m_global_rewr
Definition explorer.h:474
void generate_state_space_dfs_iterative(const state &s0, std::unordered_set< state > &discovered, const SummandSequence &regular_summands, const SummandSequence &confluent_summands, DiscoverState discover_state=DiscoverState(), ExamineTransition examine_transition=ExamineTransition(), TreeEdge tree_edge=TreeEdge(), BackEdge back_edge=BackEdge(), ForwardOrCrossEdge forward_or_cross_edge=ForwardOrCrossEdge(), FinishState finish_state=FinishState())
Definition explorer.h:1625
void check_enumerator_solution(const data::data_expression &p_expression, const explorer_summand &summand, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr) const
Definition explorer.h:625
const std::vector< explorer_summand > & regular_summands() const
Definition explorer.h:1753
void generate_state_space_thread(std::unique_ptr< todo_set > &todo, const std::size_t thread_index, std::atomic< std::size_t > &number_of_active_processes, std::atomic< std::size_t > &number_of_idle_processes, const SummandSequence &regular_summands, const SummandSequence &confluent_summands, indexed_set_for_states_type &discovered, DiscoverState discover_state, ExamineTransition examine_transition, StartState start_state, FinishState finish_state, data::rewriter thread_rewr, data::mutable_indexed_substitution<> thread_sigma)
Definition explorer.h:1086
std::unique_ptr< todo_set > make_todo_set(const state &init)
Definition explorer.h:937
void compute_state(state &result, const DataExpressionSequence &v, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr) const
Definition explorer.h:547
std::vector< std::pair< lps::multi_action, state_type > > generate_transitions(const state &d0)
Generates outgoing transitions for a given state, using the global substitution, rewriter,...
Definition explorer.h:1443
data::rewriter construct_rewriter(const Specification &lpsspec, bool remove_unused_rewrite_rules)
Definition explorer.h:960
std::unique_ptr< todo_set > make_todo_set(ForwardIterator first, ForwardIterator last)
Definition explorer.h:949
std::list< transition > out_edges(const state &s)
Definition explorer.h:1035
std::vector< data::data_expression > timed_state
Definition explorer.h:498
std::vector< std::pair< lps::multi_action, state_type > > generate_transitions(const data::data_expression_list &init, std::size_t i, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr, data::data_expression &condition, state_type &d0, data::enumerator_algorithm<> &enumerator, data::enumerator_identifier_generator &id_generator)
Generates outgoing transitions for a given state, reachable via the summand with index i.
Definition explorer.h:1462
std::list< transition > out_edges(const state &s, const SummandSequence &regular_summands, const SummandSequence &confluent_summands, data::mutable_indexed_substitution<> &sigma, data::rewriter &rewr, data::enumerator_algorithm<> &enumerator, data::enumerator_identifier_generator &id_generator)
Definition explorer.h:838
Specification preprocess(const Specification &lpsspec)
Definition explorer.h:500
std::list< transition > out_edges(const state &s, const std::size_t summand_index)
Definition explorer.h:1043
bool is_confluent_tau(const multi_action &a)
Definition explorer.h:974
atermpp::indexed_set< state, mcrl2::utilities::detail::GlobalThreadSafe > indexed_set_for_states_type
Definition explorer.h:455
static constexpr bool is_stochastic
Definition explorer.h:452
void generate_state_space_dfs_iterative(bool recursive, DiscoverState discover_state=DiscoverState(), ExamineTransition examine_transition=ExamineTransition(), TreeEdge tree_edge=TreeEdge(), BackEdge back_edge=BackEdge(), ForwardOrCrossEdge forward_or_cross_edge=ForwardOrCrossEdge(), FinishState finish_state=FinishState())
Definition explorer.h:1714
highway_todo_set(const state &init, std::size_t N_)
Definition explorer.h:177
std::size_t size() const override
Definition explorer.h:228
highway_todo_set(ForwardIterator first, ForwardIterator last, std::size_t N_)
Definition explorer.h:187
std::random_device device
Definition explorer.h:173
void insert(const state &s) override
Definition explorer.h:209
void choose_element(state &result) override
Definition explorer.h:198
bool empty() const override
Definition explorer.h:233
breadth_first_todo_set new_states
Definition explorer.h:171
void finish_state() override
Definition explorer.h:238
\brief A timed multi-action
const process::action_list & actions() const
const data::data_expression & time() const
Simulation process.
Definition simulation.h:25
void enable_auto_select_probability(bool enable)
If enabled, automatically a probabilistic state is chosen using its intrinsic probability.
void select_transition(std::size_t transition_number)
Choose outgoing transition indexed by transition_number and add its state to the state vector.
void add_new_state(const lps::stochastic_state &s)
std::uniform_int_distribution< std::size_t > m_distrib
Definition simulation.h:85
std::deque< simulator_state_t > m_full_trace
Definition simulation.h:88
void randomly_select_state()
Randomly choose one state among a sequence of probabilistic states.
bool m_auto_select_probabilistic_state
Definition simulation.h:83
void select_state(std::size_t state_number)
Choose one state among a sequence of probabilistic states.
simulation(const stochastic_specification &specification, data::rewrite_strategy strategy=data::rewrite_strategy())
Constructor.
void randomly_select_transition()
Randomly choose an outgoing transition and add its state to the state vector.
bool match_trace_transition(lts::trace &trace)
bool match_trace_probabilistic_state(lts::trace &trace)
void save(const std::string &filename) const
Save the trace to a file.
bool probabilistic_state_must_be_selected(const std::size_t state_index) const
Indicate whether a probabilistic state has been selected.
Definition simulation.h:61
const std::deque< simulator_state_t > & trace() const
Returns the current annotated state vector.
Definition simulation.h:43
stochastic_specification m_specification
Definition simulation.h:81
void truncate(std::size_t state_number, bool probabilistic)
Remove states from the end of the simulation, making state_number the last state.
std::vector< transition_t > transitions(const lps::state &source_state)
transition transition_t
Definition simulation.h:28
void load(const std::string &filename)
Load a trace from a file.
Linear process specification.
LPS summand containing a multi-action.
const stochastic_distribution & distribution() const
Returns the distribution of this summand.
\brief A stochastic distribution
bool is_defined() const
Returns true if the distribution is defined, i.e. it contains a valid distribution....
virtual bool empty() const
Definition explorer.h:94
todo_set(ForwardIterator first, ForwardIterator last)
Definition explorer.h:74
atermpp::deque< state > todo
Definition explorer.h:63
virtual void choose_element(state &result)
Definition explorer.h:80
virtual ~todo_set()=default
virtual std::size_t size() const
Definition explorer.h:99
todo_set(const state &init)
Definition explorer.h:69
virtual void insert(const state &s)
Definition explorer.h:86
virtual void finish_state()
Definition explorer.h:91
This class contains a trace consisting of a sequence of (timed) actions possibly with intermediate st...
Definition trace.h:52
void increase_position()
Increase the current position by one, except if this brings one beyond the end of the trace.
Definition trace.h:169
bool current_action_exists() const
Indicate whether the current action exists.
Definition trace.h:272
bool current_state_exists() const
Indicate whether a current state exists.
Definition trace.h:234
const lps::state & current_state() const
Get the state at the current position in the trace.
Definition trace.h:260
void reset_position()
Set the current position back to the beginning of the trace.
Definition trace.h:161
void save(const std::string &filename, trace_format tf=tfMcrl2) const
Output the trace into a file with the indicated name.
Definition trace.h:401
mcrl2::lps::multi_action current_action()
Get the outgoing action from the current position in the trace.
Definition trace.h:283
Standard exception class for reporting runtime errors.
Definition exception.h:27
A shared lock guard for the shared_mutex.
void unlock_shared()
Unlocks the acquired shared guard explicitly. Otherwise, performed in destructor.
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
Definition logger.h:391
thread_aterm_pool & g_thread_term_pool()
A reference to the thread local term pool storage.
The main namespace for the aterm++ library.
Definition algorithm.h:21
Namespace for system defined sort bool_.
Definition bool.h:32
const function_symbol & true_()
Constructor for function symbol true.
Definition bool.h:77
Namespace for system defined sort real_.
data_expression & real_one()
data_expression & real_zero()
Namespace for all data library functionality.
Definition data.cpp:22
bool is_false(const data_expression &x)
Test if x is false.
Definition consistency.h:37
void add_assignments(data::mutable_indexed_substitution<> &sigma, const VariableSequence &v, const DataExpressionSequence &e)
Adds assignments [v := e] to the substitution sigma for each variable in v.
rewrite_strategy
The strategy of the rewriter.
void remove_assignments(data::mutable_indexed_substitution<> &sigma, const VariableSequence &v)
Removes assignments to variables in v from the substitution sigma.
atermpp::term_list< data_expression > data_expression_list
\brief list of data_expressions
void one_point_rule_rewrite(T &x, typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value >::type *=0)
atermpp::term_list< variable > variable_list
\brief list of variables
T one_point_rule_rewrite(const T &x, typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value >::type *=0)
void resolve_summand_variable_name_clashes(deadlock_summand &summand, const std::set< core::identifier_string > &process_parameter_names, data::set_identifier_generator &generator)
void resolve_summand_variable_name_clashes(stochastic_action_summand &summand, const std::set< core::identifier_string > &process_parameter_names, data::set_identifier_generator &generator)
void resolve_summand_variable_name_clashes(action_summand &summand, const std::set< core::identifier_string > &process_parameter_names, data::set_identifier_generator &generator)
std::set< core::identifier_string > variable_name_clashes(const VariableContainer &vars, const std::set< core::identifier_string > &w)
std::set< core::identifier_string > variable_names(const VariableContainer &vars)
The main namespace for the LPS library.
Definition constelm.h:21
const stochastic_distribution & summand_distribution(const lps::stochastic_action_summand &summand)
Definition confluence.h:79
const stochastic_distribution & summand_distribution(const Summand &)
Definition confluence.h:71
void replace_constants_by_variables(T &x, const data::rewriter &r, data::mutable_indexed_substitution<> &sigma, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
Replace each constant data application c in x by a fresh variable v, and add extend the substitution ...
Node find_representative(Node &u0, GenerateSuccessors generate_successors)
Search for a unique representative in a graph.
atermpp::term_balanced_tree< data::data_expression > state
Definition state.h:24
std::vector< data::data_expression > make_data_expression_vector(const data::data_expression_list &v)
Definition explorer.h:55
const stochastic_distribution & initial_distribution(const lps::stochastic_specification &lpsspec)
Definition explorer.h:264
void order_summand_variables(Specification &lpsspec)
Order summand variables to make enumeration over these variables more efficient.
void check_stochastic_state(const stochastic_state &s, const data::rewriter &rewr)
atermpp::utilities::unordered_map< atermpp::aterm, atermpp::term_list< data::data_expression_list >, detail::cache_hash, detail::cache_equality, std::allocator< std::pair< atermpp::aterm, atermpp::term_list< data::data_expression_list > > >, true > summand_cache_map
Definition explorer.h:345
void resolve_summand_variable_name_clashes(Specification &spec)
Renames summand variables such that there are no name clashes between summand variables and process p...
void one_point_rule_rewrite(T &x, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
Applies the one point rule rewriter to all embedded data expressions in an object x.
T one_point_rule_rewrite(const T &x, typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
Applies the one point rule rewriter to all embedded data expressions in an object x.
const stochastic_distribution & initial_distribution(const lps::specification &)
Definition explorer.h:257
T replace_constants_by_variables(const T &x, const data::rewriter &r, data::mutable_indexed_substitution<> &sigma, typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
Replace each constant data application c in x by a fresh variable v, and add extend the substitution ...
The main LTS namespace.
The main namespace for the Process library.
atermpp::term_list< action > action_list
\brief list of actions
void write_text(const std::string &filename, const std::string &text)
Saves text to the file filename, or to stdout if filename equals "-".
Definition io.h:46
std::string read_text(const std::string &filename)
Reads text from the file filename, or from stdin if filename equals "-".
Definition io.h:27
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Replace each constant data application c by a fresh variable v, and add extend the substitution sigma...
std::unordered_map< data::data_expression, data::variable > substitutions
Builder< replace_constants_by_variables_builder< Builder > > super
replace_constants_by_variables_builder(const data::rewriter &r_, data::mutable_indexed_substitution<> &sigma_)
data_expression operator()(const data_expression &x) const
virtual void abort()=0
bool operator()(const atermpp::aterm &key1, const cheap_cache_key &key2) const
Definition explorer.h:292
bool operator()(const atermpp::aterm &key1, const atermpp::aterm &key2) const
Definition explorer.h:287
std::size_t operator()(const cheap_cache_key &key) const
Definition explorer.h:325
std::size_t operator()(const std::pair< const atermpp::aterm, std::list< atermpp::term_list< mcrl2::data::data_expression > > > &pair) const
Definition explorer.h:309
std::size_t operator()(const atermpp::aterm &key) const
Definition explorer.h:315
cheap_cache_key(data::mutable_indexed_substitution<> &sigma, const std::vector< data::variable > &gamma)
Definition explorer.h:278
const std::vector< data::variable > & m_gamma
Definition explorer.h:276
data::mutable_indexed_substitution & m_sigma
Definition explorer.h:275
void apply(T &result, const data::data_expression &x)
lps::data_expression_builder< one_point_rule_rewrite_builder > super
data::detail::replace_constants_by_variables_builder< lps::data_expression_builder > super
replace_constants_by_variables_builder(const data::rewriter &r, data::mutable_indexed_substitution<> &sigma)
transition(lps::multi_action action_, const state_type &state_)
Definition explorer.h:463
std::set< core::identifier_string > actions_internal_for_divergencies
std::set< core::identifier_string > trace_actions
explorer_options(data::rewrite_strategy rewr_strat)
exploration_strategy search_strategy
explorer_options & operator=(const explorer_options &other)=default
std::set< lps::multi_action > trace_multiactions
explorer_options(const explorer_options &other)=default
data::variable_list variables
Definition explorer.h:350
std::vector< data::variable > gamma
Definition explorer.h:359
std::vector< data::variable > free_variables(const T &x, const data::variable_list &v)
Definition explorer.h:382
explorer_summand(const ActionSummand &summand, std::size_t summand_index, const data::variable_list &process_parameters, caching cache_strategy_)
Definition explorer.h:364
stochastic_distribution distribution
Definition explorer.h:353
data::data_expression condition
Definition explorer.h:351
summand_cache_map local_cache
Definition explorer.h:361
atermpp::function_symbol f_gamma
Definition explorer.h:360
void compute_key(atermpp::aterm &key, data::mutable_indexed_substitution<> &sigma) const
Definition explorer.h:397
std::vector< data::data_expression > next_state
Definition explorer.h:354
std::vector< transition_t > transitions
Definition simulation.h:35
The skip operation with a variable number of arguments.
Definition skip.h:21
void operator()(const Args &...) const
Definition skip.h:23
std::size_t operator()(const atermpp::detail::reference_aterm< T > &t) const