12#include "mcrl2/process/detail/alphabet_push_block.h"
13#include "mcrl2/process/parse_impl.h"
14#include "mcrl2/process/translate_user_notation.h"
15#include "mcrl2/process/remove_equations.h"
84 mCRL2log(log::log_level_t::verbose) <<
"applying alphabet reduction..." << std::endl;
88 std::vector<process_equation>& equations = procspec.equations();
89 std::map<process_identifier, multi_action_name_set> pcrl_equation_cache;
91 for (process_equation& equation: equations)
93 id_generator.add_identifier(equation.identifier().name());
95 pcrl_equation_cache = detail::compute_pcrl_equation_cache(equations, init);
96 core::identifier_string_list empty_blockset;
97 procspec.init() = push_block(empty_blockset, init, equations, id_generator, pcrl_equation_cache);
100 if (procspec.equations().size() < duplicate_equation_limit)
102 mCRL2log(log::log_level_t::debug) <<
"removing duplicate equations..." << std::endl;
104 mCRL2log(log::log_level_t::debug) <<
"removing duplicate equations finished" << std::endl;
107 mCRL2log(log::log_level_t::debug) <<
"alphabet reduction finished" << std::endl;
113 unsigned int start_symbol_index = p.start_symbol_index(
"ActDecl");
114 bool partial_parses =
false;
115 core::parse_node node = p.parse(text, start_symbol_index, partial_parses);
116 action_label_vector result;
117 detail::action_actions(p).callback_ActDecl(node, result);
118 process::action_label_list v(result.begin(), result.end());
119 v = process::normalize_sorts(v, data_spec);
128 unsigned int start_symbol_index = p.start_symbol_index(
"ProcExpr");
129 bool partial_parses =
false;
130 core::parse_node node = p.parse(text, start_symbol_index, partial_parses);
140 unsigned int start_symbol_index = p.start_symbol_index(
"mCRL2Spec");
141 bool partial_parses =
false;
142 core::parse_node node = p.parse(text, start_symbol_index, partial_parses);
Identifier generator that stores the identifiers of the context in a set. Using the operator()() and ...
\brief A process expression
Process specification consisting of a data specification, action labels, a sequence of process equati...
process_expression & init()
Returns the initialization of the process specification.
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.
void complete_process_specification(process_specification &x, bool alpha_reduce)
process_specification parse_process_specification_new(const std::string &text)
process_expression parse_process_expression_new(const std::string &text)
The main namespace for the Process library.
std::string pp(const action_list &x, bool precedence_aware=true)
std::set< core::identifier_string > find_identifiers(const process::process_specification &x)
std::set< data::variable > find_all_variables(const action &x)
void normalize_sorts(process::process_equation_vector &x, const data::sort_specification &sortspec)
std::string pp(const process::process_equation_list &x, bool arg0)
std::string pp(const process::action_name_multiset &x, bool arg0)
std::string pp(const process::action_label &x, bool arg0)
std::string pp(const process::process_equation &x, bool arg0)
std::string pp(const process::process_identifier &x, bool arg0)
std::set< data::sort_expression > find_sort_expressions(const process::process_specification &x)
std::string pp(const tau &x, bool precedence_aware=true)
process::action_label_list normalize_sorts(const process::action_label_list &x, const data::sort_specification &sortspec)
std::string pp(const if_then &x, bool precedence_aware=true)
std::set< data::sort_expression > find_sort_expressions(const process::process_equation_vector &x)
std::string pp(const stochastic_operator &x, bool precedence_aware=true)
void normalize_sorts(process::process_specification &x, const data::sort_specification &)
process::action_label_list parse_action_declaration(const std::string &text, const data::data_specification &data_spec)
Parses an action declaration from a string.
std::string pp(const process::communication_expression &x, bool arg0)
std::string pp(const process::rename_expression &x, bool arg0)
std::set< data::sort_expression > find_sort_expressions(const process::action_label_list &x)
std::string pp(const process_expression &x, bool precedence_aware=true)
std::string pp(const merge &x, bool precedence_aware=true)
std::string pp(const rename &x, bool precedence_aware=true)
std::string pp(const seq &x, bool precedence_aware=true)
std::string pp(const sum &x, bool precedence_aware=true)
std::string pp(const process::process_specification &x, bool arg0)
void typecheck_process_specification(process_specification &proc_spec)
Type check a parsed mCRL2 process specification. Throws an exception if something went wrong.
std::string pp(const process_expression_list &x, bool precedence_aware=true)
std::string pp(const bounded_init &x, bool precedence_aware=true)
std::set< data::sort_expression > find_sort_expressions(const process::process_expression &x)
process::process_expression translate_user_notation(const process::process_expression &x)
std::string pp(const allow &x, bool precedence_aware=true)
void translate_user_notation(process::process_specification &x)
action normalize_sorts(const action &x, const data::sort_specification &sortspec)
void alphabet_reduce(process_specification &procspec, std::size_t duplicate_equation_limit=(std::numeric_limits< size_t >::max)())
Applies alphabet reduction to a process specification.
std::string pp(const process_instance &x, bool precedence_aware=true)
std::string pp(const left_merge &x, bool precedence_aware=true)
std::string pp(const sync &x, bool precedence_aware=true)
std::string pp(const action &x, bool precedence_aware=true)
std::string pp(const process::untyped_multi_action &x, bool arg0)
std::string pp(const at &x, bool precedence_aware=true)
std::string pp(const comm &x, bool precedence_aware=true)
std::string pp(const untyped_process_assignment &x, bool precedence_aware=true)
std::string pp(const process::process_identifier_list &x, bool arg0)
action translate_user_notation(const action &x)
std::set< data::variable > find_free_variables(const action &x)
std::string pp(const process_instance_assignment &x, bool precedence_aware=true)
std::string pp(const process_expression_vector &x, bool precedence_aware=true)
void remove_duplicate_equations(process_specification &procspec)
Removes duplicate equations from a process specification, using a bisimulation algorithm.
std::string pp(const block &x, bool precedence_aware=true)
std::set< data::variable > find_free_variables(const process::process_specification &x)
std::string pp(const choice &x, bool precedence_aware=true)
std::string pp(const delta &x, bool precedence_aware=true)
std::string pp(const hide &x, bool precedence_aware=true)
std::string pp(const if_then_else &x, bool precedence_aware=true)
std::string pp(const process::action_label_list &x, bool arg0)
untyped_process_specification parse_mCRL2Spec(const core::parse_node &node) const
process::process_expression parse_ProcExpr(const core::parse_node &node) const
process_actions(const core::parser &parser_)
process_specification construct_process_specification()