12#ifndef MCRL2_PBES_DETAIL_LPS2PBES_RHS_H
13#define MCRL2_PBES_DETAIL_LPS2PBES_RHS_H
22namespace pbes_system {
46 template <
typename TermTraits>
56 typedef TermTraits tr;
59 return tr::forall(y, tr::imp(left, right));
63 return tr::exists(y, tr::and_(left, right));
72 std::map<lps::multi_action, propositional_variable>
Zpos;
73 std::map<lps::multi_action, propositional_variable>
Zneg;
78 std::vector<data::variable> result;
93 std::vector<data::data_expression> result;
96 auto const& args = a.arguments();
97 result.insert(result.end(), args.begin(), args.end());
105 std::vector<pbes_equation> result;
106 for (
auto const& p:
Zneg)
109 result.push_back(eqn);
111 for (
auto const& p:
Zpos)
114 result.push_back(eqn);
121 std::vector<std::string> v;
124 v.emplace_back(ai.label().name());
140 std::size_t index = 0;
155 std::vector<data::data_expression> v;
158 for (; i != d.
end(); ++i, ++j)
165 template <
typename TermTraits>
175 typedef TermTraits tr;
186 right1 = tr::or_(tr::and_(right, Pos), Neg);
187 return tr::forall(y, tr::imp(left, right1));
191 right1 = tr::and_(tr::or_(right, Neg), Pos);
192 return tr::exists(y, tr::and_(left, right1));
199template <
typename TermTraits,
typename Parameters>
202template <
typename Derived,
typename TermTraits,
typename Parameters>
206 typedef TermTraits
tr;
222 return static_cast<Derived&
>(*this);
251 parameters.id_generator.add_identifier(v.name());
259 parameters.id_generator.remove_identifier(v.name());
292 push(tr::and_(left, right));
299 push(tr::or_(left, right));
328 template <
typename MustMayExpression>
341 template <
typename MustMayExpression>
345 std::vector<pbes_expression> v;
363 sigma[a.lhs()] = a.rhs();
379 pbes_expression result = is_must ? tr::join_and(v.begin(), v.end()) : tr::join_or(v.begin(), v.end());
401 std::vector<pbes_expression> v;
429 std::vector<pbes_expression> v;
489template <
template <
class,
class,
class>
class Traverser,
typename TermTraits,
typename Parameters>
490struct apply_rhs_traverser:
public Traverser<apply_rhs_traverser<Traverser, TermTraits, Parameters>, TermTraits, Parameters>
492 typedef Traverser<apply_rhs_traverser<Traverser, TermTraits, Parameters>, TermTraits, Parameters>
super;
498 :
super(parameters, tr)
502template <
typename TermTraits,
typename Parameters>
513template <
typename TermTraits,
typename Parameters>
516 Parameters& parameters,
519 std::vector<pbes_equation>& equations,
523template <
typename Derived,
typename TermTraits,
typename Parameters>
527 typedef TermTraits
tr;
547 std::vector<pbes_equation>& equations_,
551 variables(variables_.begin(), variables_.end()),
592 template <
typename MustMayExpression>
621template <
template <
class,
class,
class>
class Traverser,
typename TermTraits,
typename Parameters>
624 typedef Traverser<apply_rhs_structured_traverser<Traverser, TermTraits, Parameters>, TermTraits, Parameters>
super;
632 std::vector<pbes_equation>& equations,
635 :
super(parameters, variables,
sigma, equations, tr)
639template <
typename TermTraits,
typename Parameters>
642 Parameters& parameters,
645 std::vector<pbes_equation>& equations,
Term containing a string.
const_iterator end() const
Returns a const_iterator pointing to the end of the term_list.
const_iterator begin() const
Returns a const_iterator pointing to the beginning of the term_list.
void push_front(const Term &el)
Inserts a new element at the beginning of the current list.
\brief Assignment of a data expression to a variable
Generic substitution function. The substitution is stored as a mapping of variables to expressions....
Identifier generator that stores the identifiers of the context in a set. Using the operator()() and ...
LPS summand containing a multi-action.
LPS summand containing a deadlock.
const std::vector< ActionSummand > & action_summands() const
Returns the sequence of action summands.
const data::variable_list & process_parameters() const
Returns the sequence of process parameters.
\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
static fixpoint_symbol nu()
Returns the nu symbol.
\brief A propositional variable instantiation
\brief A propositional variable declaration
Standard exception class for reporting runtime errors.
This file contains some functions that are present in all libraries except the data library....
static RewriterCompilingJitty::substitution_type & sigma(RewriterCompilingJitty *this_rewriter)
add your file description here.
add your file description here.
data_expression join_and(ForwardTraversalIterator first, ForwardTraversalIterator last)
Returns and applied to the sequence of data expressions [first, last)
function_symbol less_equal(const sort_expression &s)
Constructor for function symbol <=.
data_expression not_(const data_expression &x)
data_expression_list make_data_expression_list(Container const &r, typename atermpp::enable_if_container< Container, data_expression >::type *=nullptr)
Converts an container with data expressions to data_expression_list.
atermpp::term_list< data_expression > data_expression_list
\brief list of data_expressions
atermpp::term_list< variable > variable_list
\brief list of variables
function_symbol equal_to(const sort_expression &s)
Constructor for function symbol ==.
const data::variable & undefined_real_variable()
Returns a data variable that corresponds to 'undefined'.
void replace_variables(T &x, const Substitution &sigma, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
function_symbol greater(const sort_expression &s)
Constructor for function symbol >
data::mutable_map_substitution make_fresh_variable_substitution(const data::variable_list &variables, data::set_identifier_generator &id_generator, bool add_to_context=true)
Generates a substitution that assigns fresh variables to the given sequence of variables....
data::data_expression_list mu_expressions(const state_formulas::state_formula &f)
Returns the data expressions corresponding to ass(f)
data::variable pos(const std::string &name)
Returns a data variable of type Pos with a given name.
pbes_expression RHS(const state_formulas::state_formula &x, Parameters ¶meters, TermTraits tr)
TermTraits::term_type Sat(const lps::multi_action &a, const action_formulas::action_formula &x, data::set_identifier_generator &id_generator, TermTraits tr)
data::variable_list Par(const core::identifier_string &X, const data::variable_list &l, const state_formulas::state_formula &x)
TermTraits::term_type RHS_structured(const state_formulas::state_formula &x, Parameters ¶meters, const data::variable_list &variables, const fixpoint_symbol &sigma, std::vector< pbes_equation > &equations, TermTraits tr)
const pbes_expression & true_()
void replace_variables_capture_avoiding(T &x, Substitution &sigma, data::set_identifier_generator &id_generator, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
const pbes_expression & false_()
std::string string_join(const Container &c, const std::string &separator)
Joins a sequence of strings. This is a replacement for boost::algorithm::join, since it gives stack o...
void number2string(std::size_t number, std::string &buffer, std::size_t start_position)
Convert a number to a string in the buffer starting at position start_position.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
add your file description here.
Substitution that maps data variables to data expressions. The substitution is stored as an assignmen...
apply_rhs_structured_traverser(Parameters ¶meters, const data::variable_list &variables, const fixpoint_symbol &sigma, std::vector< pbes_equation > &equations, TermTraits tr)
Traverser< apply_rhs_structured_traverser< Traverser, TermTraits, Parameters >, TermTraits, Parameters > super
Traverser< apply_rhs_traverser< Traverser, TermTraits, Parameters >, TermTraits, Parameters > super
apply_rhs_traverser(Parameters ¶meters, TermTraits tr)
data::mutable_map_substitution sigma
std::string multi_action_name(const lps::multi_action &a) const
data::data_expression equal_to(const data::variable_list &d, const data::data_expression_list &e) const
std::map< lps::multi_action, propositional_variable > Zneg
lps2pbes_counter_example_parameters(const state_formulas::state_formula &phi0, const lps::stochastic_linear_process &lps, data::set_identifier_generator &id_generator, const data::variable &T)
std::map< lps::multi_action, propositional_variable > Zpos
data::variable_list action_variables(const process::action_list &actions) const
pbes_expression rhs_may_must(bool is_must, const data::variable_list &y, const pbes_expression &left, const pbes_expression &right, const lps::multi_action &ai, const data::assignment_list &gi, TermTraits)
data::data_expression_list action_expressions(const process::action_list &actions) const
std::vector< pbes_equation > equations() const
pbes_expression rhs_may_must(bool is_must, const data::variable_list &y, const pbes_expression &left, const pbes_expression &right, const lps::multi_action &, const data::assignment_list &, TermTraits)
const state_formulas::state_formula & phi0
const lps::stochastic_linear_process & lps
lps2pbes_parameters(const state_formulas::state_formula &phi0_, const lps::stochastic_linear_process &lps_, data::set_identifier_generator &id_generator_, const data::variable &T_)
data::set_identifier_generator & id_generator
pbes_expression apply_may_must_rhs(const MustMayExpression &x)
const fixpoint_symbol & sigma
void leave(const state_formulas::forall &x)
data::variable_list rhs_structured_compute_variables(const state_formulas::state_formula &x, const std::multiset< data::variable > &variables) const
void apply_may_must(const MustMayExpression &x, bool is_must)
std::multiset< data::variable > variables
void leave(const state_formulas::exists &x)
rhs_traverser< Derived, TermTraits, Parameters > super
rhs_structured_traverser(Parameters ¶meters, const data::variable_list &variables_, const fixpoint_symbol &sigma_, std::vector< pbes_equation > &equations_, TermTraits tr)
void apply(const state_formulas::may &x)
void enter(const state_formulas::forall &x)
std::vector< pbes_equation > & equations
void enter(const state_formulas::exists &x)
pbes_expression apply_may_must_result(const pbes_expression &p)
void apply(const state_formulas::must &x)
void apply(const state_formulas::not_ &)
pbes_expression apply_may_must_rhs(const MustMayExpression &x)
void leave(const state_formulas::delay_timed &x)
void apply(const state_formulas::must &x)
void apply(const state_formulas::may &x)
state_formulas::state_formula_traverser< Derived > super
void push(const pbes_expression &x)
rhs_traverser(Parameters ¶meters_, TermTraits)
void apply_may_must(const MustMayExpression &x, bool is_must)
void leave(const state_formulas::or_ &)
void leave(const state_formulas::yaled_timed &x)
void pop_variables(const data::variable_list &variables)
void apply(const state_formulas::forall &x)
void leave(const state_formulas::true_ &)
void apply(const state_formulas::mu &x)
void apply(const state_formulas::exists &x)
tr::term_type pbes_expression
std::vector< pbes_expression > result_stack
void apply(const state_formulas::imp &)
void push_variables(const data::variable_list &variables)
void leave(const state_formulas::and_ &)
void apply(const state_formulas::nu &x)
pbes_expression apply_may_must_result(const pbes_expression &p)
void leave(const state_formulas::yaled &)
void leave(const state_formulas::false_ &)
void leave(const state_formulas::delay &)
const pbes_expression & top() const
void leave(const state_formulas::variable &x)
void leave(const data::data_expression &x)