12#ifndef MCRL2_LPS_LINEAR_PROCESS_H
13#define MCRL2_LPS_LINEAR_PROCESS_H
29template <
typename Summand>
51 return action_summand(summation_variables, condition, a, assignments);
59class stochastic_linear_process;
62template <
typename ActionSummand>
101 const auto& summands = atermpp::down_cast<atermpp::aterm_list>(lps[1]);
107 const auto& summation_variables = down_cast<data::variable_list>(t[0]);
108 const auto& condition = down_cast<data::data_expression>(t[1]);
109 const auto& time = down_cast<data::data_expression>(t[3]);
110 const auto& assignments = down_cast<data::assignment_list>(t[4]);
111 const auto& distribution = down_cast<stochastic_distribution>(t[5]);
112 if (!stochastic_distributions_allowed && distribution.is_defined())
114 throw mcrl2::runtime_error(
"Summand with stochastic distribution encountered, while this tool is not yet able to deal with stochastic distributions.");
123 const auto& actions = down_cast<process::action_list>(t[2][0]);
124 m_action_summands.push_back(detail::make_action_summand<ActionSummand>(summation_variables, condition,
multi_action(actions, time), assignments, distribution));
191 if (i->deadlock().has_time())
226template <
typename ActionSummand>
249std::string
pp(
const linear_process& x);
add your file description here.
const function_symbol & function() const
Returns the function symbol belonging to an aterm.
void push_front(const Term &el)
Inserts a new element at the beginning of the current list.
LPS summand containing a multi-action.
LPS summand containing a deadlock.
deadlock_summand_vector & deadlock_summands()
Returns the sequence of deadlock summands.
const std::vector< ActionSummand > & action_summands() const
Returns the sequence of action summands.
deadlock_summand_vector m_deadlock_summands
The deadlock summands of the process.
linear_process_base()=default
Constructor.
data::variable_list m_process_parameters
The process parameters of the process.
linear_process_base(const data::variable_list &process_parameters, const deadlock_summand_vector &deadlock_summands, const std::vector< ActionSummand > &action_summands)
Constructor.
bool has_time() const
Returns true if time is available in at least one of the summands.
data::variable_list & process_parameters()
Returns the sequence of process parameters.
std::vector< ActionSummand > m_action_summands
The action summands of the process.
ActionSummand action_summand_type
The action summand type.
linear_process_base(const atermpp::aterm &lps, bool stochastic_distributions_allowed=true)
Constructor.
const deadlock_summand_vector & deadlock_summands() const
Returns the sequence of deadlock summands.
std::vector< ActionSummand > & action_summands()
Returns the sequence of action summands.
std::size_t summand_count() const
Returns the number of LPS summands.
const data::variable_list & process_parameters() const
Returns the sequence of process parameters.
linear_process(const data::variable_list &process_parameters, const deadlock_summand_vector &deadlock_summands, const action_summand_vector &action_summands)
Constructor.
linear_process(const atermpp::aterm &lps, bool=false)
Constructor.
linear_process()=default
Constructor.
linear_process_base< action_summand > super
\brief A timed multi-action
\brief A stochastic distribution
bool is_defined() const
Returns true if the distribution is defined, i.e. it contains a valid distribution....
Standard exception class for reporting runtime errors.
add your file description here.
const Derived & down_cast(const Base &t, typename std::enable_if< is_convertible< Base, Derived >::value &&!std::is_base_of< Derived, Base >::value >::type *=nullptr)
A cheap cast from one aterm based type to another When casting one aterm based type into another,...
bool check_term_LinearProcess(const Term &t)
bool check_rule_LinearProcessSummand(const Term &t)
const atermpp::function_symbol & function_symbol_LinearProcess()
action_summand make_action_summand< action_summand >(const data::variable_list &summation_variables, const data::data_expression &condition, const multi_action &a, const data::assignment_list &assignments, const stochastic_distribution &distribution)
Summand make_action_summand(const data::variable_list &, const data::data_expression &, const multi_action &, const data::assignment_list &, const stochastic_distribution &)
bool check_well_typedness(const linear_process &x)
std::string pp(const action_summand &x)
std::vector< deadlock_summand > deadlock_summand_vector
\brief vector of deadlock_summands
std::ostream & operator<<(std::ostream &out, const action_summand &x)
atermpp::aterm deadlock_summand_to_aterm(const deadlock_summand &s)
Conversion to atermappl.
std::set< data::variable > find_free_variables(const lps::deadlock &x)
atermpp::aterm linear_process_to_aterm(const linear_process_base< ActionSummand > &p)
Conversion to aterm.
std::vector< action_summand > action_summand_vector
\brief vector of action_summands
std::set< data::variable > find_all_variables(const lps::deadlock &x)
atermpp::aterm action_summand_to_aterm(const action_summand &s)
Conversion to aterm.
void find_action_labels(const T &x, OutputIterator o)
Returns all action labels that occur in an object.
bool is_multi_action(const atermpp::aterm &x)
bool is_linear_process(const atermpp::aterm &x)
Test for a linear_process expression.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
static const atermpp::function_symbol Delta
static const atermpp::function_symbol LinearProcess