12#ifndef MCRL2_DATA_MERGE_DATA_SPECIFICATIONS_H
13#define MCRL2_DATA_MERGE_DATA_SPECIFICATIONS_H
15#include "mcrl2/data/typecheck.h"
31 for(
const basic_sort& s: dataspec2.user_defined_sorts())
33 if (std::find(dataspec1.user_defined_sorts().begin(),dataspec1.user_defined_sorts().end(),s)==dataspec1.user_defined_sorts().end())
40 for(
const alias& a: dataspec2.user_defined_aliases())
42 if (std::find(dataspec1.user_defined_aliases().begin(),dataspec1.user_defined_aliases().end(),a)==dataspec1.user_defined_aliases().end())
49 for(
const function_symbol& f: dataspec2.user_defined_constructors())
51 if (std::find(dataspec1.user_defined_constructors().begin(),dataspec1.user_defined_constructors().end(),f)==
52 dataspec1.user_defined_constructors().end())
54 result.add_constructor(f);
59 for(
const function_symbol& f: dataspec2.user_defined_mappings())
61 if (std::find(dataspec1.user_defined_mappings().begin(),dataspec1.user_defined_mappings().end(),f)==dataspec1.user_defined_mappings().end())
63 result.add_mapping(f);
68 for(
const data_equation& e: dataspec2.user_defined_equations())
70 if (std::find(dataspec1.user_defined_equations().begin(),dataspec1.user_defined_equations().end(),e)==dataspec1.user_defined_equations().end())
72 result.add_equation(e);
83 catch (mcrl2::runtime_error& e)
85 throw mcrl2::runtime_error(std::string(
"Merging of two data specifications fails.\n") + e.what());
aterm_string(const aterm_string &t) noexcept=default
sort_expression sort() const
Returns the sort of the data expression.
data_specification()=default
Default constructor. Generate a data specification that contains only booleans and positive numbers.
data_type_checker(const data_specification &data_spec)
make a data type checker. Throws a mcrl2::runtime_error exception if the data_specification is not we...
data_specification operator()() const
Yields a type checked data specification, provided typechecking was successful. If not successful an ...
\brief An untyped parameter
Linear process specification.
Linear process specification.
stochastic_specification(const specification &other)
Constructor. This constructor is explicit as implicit conversions of this kind is a source of bugs.
\brief An untyped multi action or data application
D_ParserTables parser_tables_mcrl2
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
void warn_left_merge_merge(const parse_node &)
Prints a warning for each occurrence of 'x ||_ y || z' in the parse tree.
void warn_and_or(const parse_node &)
Prints a warning for each occurrence of 'x && y || z' in the parse tree.
Namespace for system defined sort bool_.
const basic_sort & bool_()
Constructor for sort expression Bool.
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
data_specification merge_data_specifications(const data_specification &dataspec1, const data_specification &dataspec2)
Merges two data specifications. Throws an exception if conflicts are detected.
bool is_untyped_data_parameter(const atermpp::aterm &x)
The main namespace for the LPS library.
specification remove_stochastic_operators(const stochastic_specification &spec)
Converts a stochastic specification to a specification. Throws an exception if non-empty distribution...
The main namespace for the Process library.
bool is_untyped_multi_action(const atermpp::aterm &x)
expression builder that visits all sub expressions
expression traverser that visits all sub expressions