12#ifndef MCRL2_DATA_ASSIGNMENT_H
13#define MCRL2_DATA_ASSIGNMENT_H
103 assert(core::detail::check_term_DataVarIdInit(*
this));
119 return atermpp::down_cast<variable>((*
this)[0]);
124 return atermpp::down_cast<data_expression>((*
this)[1]);
132 return x == lhs() ? rhs() : x;
139template <
class... ARGUMENTS>
161std::string
pp(
const assignment& x);
194 assert(core::detail::check_term_UntypedIdentifierAssignment(*
this));
213 const core::identifier_string& lhs()
const
215 return atermpp::down_cast<core::identifier_string>((*
this)[0]);
220 return atermpp::down_cast<data_expression>((*
this)[1]);
235template <
class... ARGUMENTS>
257std::string
pp(
const untyped_identifier_assignment& x);
280template <
typename VariableSequence,
typename ExpressionSequence >
283 std::vector<assignment> result;
284 typename ExpressionSequence::const_iterator j=expressions.begin();
285 for(
typename VariableSequence::const_iterator i=variables.begin(); i!=variables.end(); ++i, ++j)
287 assert(j!=expressions.end());
290 assert(j==expressions.end());
300template <
typename VariableSequence,
typename ExpressionSequence >
Term containing a string.
aterm()
Default constructor.
const function_symbol & function() const
Returns the function symbol belonging to an aterm.
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 swap(unprotected_aterm_core &t) noexcept
Swaps this term with its argument.
\brief Assignment expression
assignment_expression(assignment_expression &&) noexcept=default
assignment_expression()
\brief Default constructor X3.
assignment_expression(const assignment_expression &) noexcept=default
Move semantics.
assignment_expression(const atermpp::aterm &term)
\brief Assignment of a data expression to a variable
assignment(const variable &lhs, const data_expression &rhs)
\brief Constructor Z14.
const data_expression & rhs() const
assignment(const atermpp::aterm &term)
assignment(assignment &&) noexcept=default
assignment(const assignment &) noexcept=default
Move semantics.
assignment()
\brief Default constructor X3.
const data_expression & operator()(const variable &x) const
Applies the assignment to a variable.
\brief Assignment of a data expression to a string
untyped_identifier_assignment(const std::string &lhs, const data_expression &rhs)
\brief Constructor Z2.
untyped_identifier_assignment(const atermpp::aterm &term)
untyped_identifier_assignment()
\brief Default constructor X3.
const data_expression & rhs() const
untyped_identifier_assignment(const core::identifier_string &lhs, const data_expression &rhs)
\brief Constructor Z14.
untyped_identifier_assignment(untyped_identifier_assignment &&) noexcept=default
untyped_identifier_assignment(const untyped_identifier_assignment &) noexcept=default
Move semantics.
data_expression operator()(const untyped_identifier &x) const
Applies the assignment to a variable.
\brief An untyped identifier
The main namespace for the aterm++ library.
void make_term_appl(Term &target, const function_symbol &sym, ForwardIterator begin, ForwardIterator end)
Constructor an aterm in a variable based on a function symbol and an forward iterator providing the a...
bool check_rule_WhrDecl(const Term &t)
const atermpp::function_symbol & function_symbol_UntypedIdentifierAssignment()
const atermpp::function_symbol & function_symbol_DataVarIdInit()
std::vector< assignment > assignment_vector
\brief vector of assignments
void swap(abstraction &t1, abstraction &t2)
\brief swap overload
std::vector< untyped_identifier_assignment > untyped_identifier_assignment_vector
\brief vector of untyped_identifier_assignments
void make_assignment(atermpp::aterm &t, const ARGUMENTS &... args)
void make_untyped_identifier_assignment(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const abstraction &x)
bool is_assignment_expression(const atermpp::aterm &x)
variable_list left_hand_sides(const assignment_list &x)
Returns the left hand sides of an assignment list.
atermpp::term_list< data_expression > data_expression_list
\brief list of data_expressions
std::vector< assignment_expression > assignment_expression_vector
\brief vector of assignment_expressions
bool is_assignment(const atermpp::aterm &x)
atermpp::term_list< variable > variable_list
\brief list of variables
assignment_vector make_assignment_vector(VariableSequence const &variables, ExpressionSequence const &expressions)
Constructs an assignment_list by pairwise combining a variable and expression.
atermpp::term_list< assignment > assignment_list
\brief list of assignments
data_expression_list right_hand_sides(const assignment_list &x)
Returns the right hand sides of an assignment list.
bool is_untyped_identifier_assignment(const atermpp::aterm &x)
assignment_list make_assignment_list(const VariableSequence &variables, const ExpressionSequence &expressions)
Converts an iterator range to data_expression_list.
atermpp::term_list< untyped_identifier_assignment > untyped_identifier_assignment_list
\brief list of untyped_identifier_assignments
std::ostream & operator<<(std::ostream &out, const abstraction &x)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
static const atermpp::function_symbol DataVarIdInit
static const atermpp::function_symbol UntypedIdentifierAssignment
add your file description here.
add your file description here.