12#ifndef MCRL2_PBES_DETAIL_PFNF_TRAVERSER_H
13#define MCRL2_PBES_DETAIL_PFNF_TRAVERSER_H
15#include "mcrl2/data/rewriter.h"
16#include "mcrl2/pbes/replace.h"
19#ifdef MCRL2_PFNF_VISITOR_DEBUG
20#include "mcrl2/data/print.h"
41 std::map<data::variable, data::variable>::const_iterator i = sigma.find(v);
51 std::vector<data::variable> result;
52 for (
const data::variable& v: variables)
54 result.push_back((*
this)(v));
56 return data::variable_list(result.begin(),result.end());
61 std::ostringstream out;
63 for (std::map<data::variable, data::variable>::const_iterator i = sigma.begin(); i != sigma.end(); ++i)
65 if (i != sigma.begin())
69 out << data::pp(i->first) <<
" := " << data::pp(i->second);
111 for (propositional_variable_instantiation& v: rhs)
113 v = pbes_system::replace_free_variables(v, variable_data_expression_substitution(sigma));
139 for (pfnf_traverser_quantifier& quantifier: quantifiers)
141 quantifier.second = sigma(quantifier.second);
143 for (pfnf_traverser_implication& implication: implications)
145 implication.substitute(sigma);
170template <
typename Container>
171Container
concat(
const Container& x,
const Container& y)
173 Container result = x;
174 result.insert(result.end(), y.begin(), y.end());
190 std::set<data::variable> left_variables;
191 std::set<data::variable> right_variables;
192 std::set<data::variable> name_clashes;
193 for (std::vector<pfnf_traverser_quantifier>::const_iterator i = left.quantifiers.begin(); i != left.quantifiers.end(); ++i)
195 left_variables.insert(i->second.begin(), i->second.end());
197 for (std::vector<pfnf_traverser_quantifier>::const_iterator j = right.quantifiers.begin(); j != right.quantifiers.end(); ++j)
199 for (
const data::variable& v: j->second)
201 right_variables.insert(v);
202 if (left_variables.find(v) != left_variables.end())
204 name_clashes.insert(v);
209#ifdef MCRL2_PFNF_VISITOR_DEBUG
210std::cout <<
"NAME CLASHES: " << core::detail::print_set(name_clashes) << std::endl;
213 if (!name_clashes.empty())
216 for (
const data::variable& v: left_variables)
218 generator.add_identifier(v.name());
220 for (
const data::variable& v: right_variables)
222 generator.add_identifier(v.name());
225 for (
const data::variable& v: name_clashes)
227 sigma.sigma[v] = data::variable(generator(std::string(v.name())), v.sort());
229#ifdef MCRL2_PFNF_VISITOR_DEBUG
230std::cout <<
"LEFT\n"; print_expression(left);
231std::cout <<
"RIGHT BEFORE\n"; print_expression(right);
232std::cout <<
"SIGMA = " << sigma.to_string() << std::endl;
235#ifdef MCRL2_PFNF_VISITOR_DEBUG
236std::cout <<
"RIGHT AFTER\n"; print_expression(right);
272 assert(!expression_stack.empty());
277 for (
const pfnf_traverser_implication& impl: expr.implications)
280 pbes_expression x = std::accumulate(impl.rhs.begin(), impl.rhs.end(), F,
281 [&p](
const pbes_expression& arg1,
const pbes_expression& arg2) ->
const pbes_expression
283 data::optimized_or(p, arg1, arg2);
286 data::optimized_imp(p, impl.g, x);
287 data::optimized_and(result, result, p);
289 for (
const pfnf_traverser_quantifier& q: expr.quantifiers)
293 result = forall(q.second, result);
297 result = exists(q.second, result);
307 const std::vector<pfnf_traverser_quantifier>& q = expr.quantifiers;
309 const std::vector<pfnf_traverser_implication>& g = expr.implications;
310 for (
const pfnf_traverser_quantifier& i: expr.quantifiers)
312 std::cout << (i.first ?
"forall " :
"exists ") << data::pp(i.second) <<
" ";
314 std::cout << (q.empty() ?
"" :
" . ") << pbes_system::pp(h) <<
"\n";
315 for (
const pfnf_traverser_implication& i: g)
317 std::cout <<
" /\\ " << pbes_system::pp(i.g) <<
" => ";
325 for (std::vector<propositional_variable_instantiation>::const_iterator j = i.rhs.begin(); j != i.rhs.end(); ++j)
327 if (j != i.rhs.begin())
329 std::cout <<
" \\/ ";
331 std::cout << pbes_system::pp(*j);
334 std::cout << std::endl;
342 void print(
const std::string& msg =
"")
const
344 std::cout <<
"--- " << msg << std::endl;
345 for (
const pfnf_traverser_expression& expr: expression_stack)
347 print_expression(expr);
354 expression_stack.push_back(pfnf_traverser_expression(x));
359 throw std::runtime_error(
"operation not should not occur");
366 expression_stack.pop_back();
368 expression_stack.pop_back();
370 std::vector<pfnf_traverser_quantifier> q = concat(left.quantifiers, right.quantifiers);
372 std::vector<pfnf_traverser_implication> g = concat(left.implications, right.implications);
374 expression_stack.push_back(pfnf_traverser_expression(h, q, g));
381 expression_stack.pop_back();
383 expression_stack.pop_back();
386 std::vector<pfnf_traverser_quantifier> q = concat(left.quantifiers, right.quantifiers);
395 const std::vector<pfnf_traverser_implication>& q_phi = left.implications;
396 const std::vector<pfnf_traverser_implication>& q_psi = right.implications;
398 std::vector<pfnf_traverser_implication> g;
401 for (
const pfnf_traverser_implication& i: q_phi)
403 g.push_back(pfnf_traverser_implication(make_and(not_h_psi, i.g), i.rhs));
407 for (
const pfnf_traverser_implication& i: q_psi)
409 g.push_back(pfnf_traverser_implication(make_and(not_h_phi, i.g), i.rhs));
413 for (
const pfnf_traverser_implication& i: q_phi)
415 for (
const pfnf_traverser_implication& k: q_psi)
417 g.push_back(pfnf_traverser_implication(make_and(i.g, k.g), concat(i.rhs, k.rhs)));
421 expression_stack.push_back(pfnf_traverser_expression(h, q, g));
426 throw std::runtime_error(
"operation imp should not occur");
431 quantifier_stack.push_back(x.variables());
437 expression_stack.back().quantifiers.push_back(std::make_pair(
true, quantifier_stack.back()));
438 quantifier_stack.pop_back();
443 quantifier_stack.push_back(x.variables());
449 expression_stack.back().quantifiers.push_back(std::make_pair(
false, quantifier_stack.back()));
450 quantifier_stack.pop_back();
456 std::vector<pfnf_traverser_quantifier> q;
458 std::vector<pfnf_traverser_implication> g(1, pfnf_traverser_implication(true_(), std::vector<propositional_variable_instantiation>(1, x)));
459 expression_stack.push_back(pfnf_traverser_expression(h, q, g));
bool operator<(const unprotected_aterm_core &t) const
Comparison operator for two unprotected aterms.
bool operator==(const unprotected_aterm_core &t) const
Comparison operator.
bool operator!=(const unprotected_aterm_core &t) const
Inequality operator on two unprotected aterms.
data_expression(const data_expression &) noexcept=default
Move semantics.
Base class for storing properties of mCRL2 types. Properties are (key, value) pairs stored as strings...
Rewriter that operates on data expressions.
basic_rewriter< data_expression >::substitution_type substitution_type
Identifier generator that stores the identifiers of the context in a set. Using the operator()() and ...
variable(const variable &) noexcept=default
Move semantics.
const sort_expression & sort() const
logger(const log_level_t l)
Default constructor.
\brief The and operator for pbes expressions
and_(const pbes_expression &left, const pbes_expression &right)
\brief Constructor Z14.
A rewriter that rewrites universal quantifiers over conjuncts in BQNF expressions to conjuncts over u...
bqnf_rewriter()
Constructor.
term_type operator()(const term_type &x, SubstitutionFunction sigma) const
Rewrites a pbes expression.
std::unique_ptr< pbes_system::detail::bqnf_quantifier_rewriter > bqnf_quantifier_rewriter
std::unique_ptr< pbes_system::detail::bqnf_visitor > bqnf_checker
pbes_equation equation_type
The equation type.
pbes_expression term_type
The term type.
term_type operator()(const term_type &t) const
Rewrites a PBES expression in BQNF such that universal quantifier over conjuncts are replaced by conj...
Stores the following properties of a linear process specification:
data::detail::data_property_map< pbes_property_map > super
std::string compare(const pbes_property_map &other) const
pbes_property_map(const pbes &p)
Constructor Initializes the pbes_property_map with a linear process specification.
std::string print(const propositional_variable &v) const
std::pair< std::size_t, std::size_t > compute_equation_counts(const pbes &p) const
Computes the number of mu and nu equations and returns them as a pair.
std::size_t compute_block_nesting_depth(const pbes &p) const
pbes_expression make_expr(const pbes_expression &expr) const
std::string to_string() const
bool operator<(const quantified_variable &other) const
quantified_variable(bool is_forall, const data::variable &var)
bool operator==(const quantified_variable &other) const
bool operator!=(const quantified_variable &other) const
\brief The existential quantification operator for pbes expressions
exists(const atermpp::aterm &term)
exists(const data::variable_list &variables, const pbes_expression &body)
\brief Constructor Z14.
const data::variable_list & variables() const
const pbes_expression & body() const
\brief The universal quantification operator for pbes expressions
const pbes_expression & body() const
forall(const data::variable_list &variables, const pbes_expression &body)
\brief Constructor Z14.
forall(const atermpp::aterm &term)
const data::variable_list & variables() const
\brief The implication operator for pbes expressions
const pbes_expression & left() const
imp(const atermpp::aterm &term)
imp(const pbes_expression &left, const pbes_expression &right)
\brief Constructor Z14.
const pbes_expression & right() const
\brief The not operator for pbes expressions
not_(const pbes_expression &operand)
\brief Constructor Z14.
A rewriter that applies one point rule quantifier elimination to a PBES.
\brief The or operator for pbes expressions
const pbes_expression & left() const
or_(const pbes_expression &left, const pbes_expression &right)
\brief Constructor Z14.
const pbes_expression & right() const
or_(const atermpp::aterm &term)
Represents an edge of the dependency graph. The assignments are stored implicitly using the 'right' p...
edge(const propositional_variable &src, const qvar_list &qvars, const propositional_variable_instantiation &tgt, const std::set< data::variable > &conj_context, const std::set< data::variable > &disj_context, data::data_expression c=data::sort_bool::true_())
Constructor.
const propositional_variable_instantiation & target() const
The propositional variable instantiation that determines the target of the edge.
qvar_list quantifier_inside_approximation(const vertex &source, const DataRewriter &rewr) const
Try to guess which quantifiers of Q can end up directly before target, when the quantifier inside rew...
const propositional_variable_instantiation m_target
The propositional variable instantiation that determines the target of the edge.
const qvar_list & quantified_variables() const
const qvar_list m_qvars
The quantifiers in whose direct context the target PVI occurs.
const propositional_variable m_source
The propositional variable at the source of the edge.
const std::set< data::variable > m_disj_context
edge()=default
Constructor.
const data::data_expression & condition() const
The condition of the edge.
const std::set< data::variable > m_conj_context
const propositional_variable & source() const
The propositional variable at the source of the edge.
std::string to_string() const
Returns a string representation of the edge.
Represents a vertex of the dependency graph.
void fix_constraints(std::vector< data::data_expression > deleted_constraints)
Weaken the constraints so they satisfy.
const qvar_list & quantified_variables() const
qvar_list m_qvars
The list of quantified variables that occur in the constraints.
std::string to_string() const
Returns a string representation of the vertex.
bool update(const qvar_list &qvars, const data::data_expression_list &e, const constraint_map &e_constraints, const DataRewriter &datar)
Assign new values to the parameters of this vertex, and update the constraints accordingly....
constraint_map m_constraints
Maps data variables to data expressions. If a parameter is not.
bool m_visited
Indicates whether this vertex has been visited at least once.
const constraint_map & constraints() const
Maps data variables to data expressions. If the right hand side is a data variable,...
bool is_constant(const data::variable &v) const
Returns true if the parameter v has been assigned a constant expression.
propositional_variable m_variable
The propositional variable that corresponds to the vertex.
std::vector< std::size_t > constant_parameter_indices() const
Returns the indices of the constant parameters of this vertex.
const propositional_variable & variable() const
The propositional variable that corresponds to the vertex.
bool bound_in_quantifiers(const qvar_list &qvars, const data::data_expression &e)
Returns true iff all free variables in e are bound in qvars.
vertex(propositional_variable x)
Constructor.
vertex()=default
Constructor.
Algorithm class for the constelm algorithm.
const PbesRewriter & m_pbes_rewriter
Compares data expressions for equality.
std::string print_todo_list(const std::deque< propositional_variable > &todo)
vertex_map m_vertices
The vertices of the dependency graph. They are stored in a map, to support searching for a vertex.
std::string print_edge_update(const edge &e, const vertex &u, const vertex &v)
std::map< propositional_variable, std::vector< data::variable > > redundant_parameters() const
Returns the parameters that have been removed by the constelm algorithm.
std::string print_edges()
Logs the edges of the dependency graph.
pbes_constelm_algorithm(const DataRewriter &datar, const PbesRewriter &pbesr)
Constructor.
std::map< core::identifier_string, std::vector< edge > > edge_map
The storage type for edges.
std::map< core::identifier_string, std::vector< std::size_t > > m_redundant_parameters
The redundant parameters.
std::list< E > concat(const std::list< E > a, const std::list< E > b)
std::string print_evaluation_failure(const edge &e, const vertex &u)
std::map< core::identifier_string, vertex > vertex_map
The storage type for vertices.
std::list< detail::quantified_variable > qvar_list
std::map< data::variable, data::data_expression > constraint_map
A map with constraints on the vertices of the graph.
const DataRewriter & m_data_rewriter
Compares data expressions for equality.
void run(pbes &p, bool compute_conditions=false, bool check_quantifiers=true)
Runs the constelm algorithm.
edge_map m_edges
The edges of the dependency graph. They are stored in a map, to easily access all out-edges correspon...
std::string print_condition(const edge &e, const vertex &u, const pbes_expression &value)
std::string print_vertices() const
Logs the vertices of the dependency graph.
pbes_expression & operator=(pbes_expression &&) noexcept=default
pbes_expression & operator=(const pbes_expression &) noexcept=default
pbes_expression(const atermpp::aterm &term)
pbes_expression(const pbes_expression &) noexcept=default
Move semantics.
pbes_expression()
\brief Default constructor X3.
parameterized boolean equation system
bool is_closed() const
True if the pbes is closed.
propositional_variable_instantiation & initial_state()
Returns the initial state.
bool is_well_typed() const
Checks if the PBES is well typed.
A rewriter that brings PBES expressions into PFNF normal form.
pbes_expression term_type
The term type.
data::variable variable_type
The variable type.
pbes_expression operator()(const pbes_expression &x, SubstitutionFunction sigma) const
Rewrites a pbes expression.
pbes_expression operator()(const pbes_expression &x) const
Rewrites a pbes expression.
\brief A propositional variable instantiation
const data::data_expression_list & parameters() const
propositional_variable_instantiation(const propositional_variable_instantiation &) noexcept=default
Move semantics.
const core::identifier_string & name() const
\brief A propositional variable declaration
propositional_variable(const propositional_variable &) noexcept=default
Move semantics.
const core::identifier_string & name() const
A rewriter that pushes quantifiers inside in a PBES expression.
Standard exception class for reporting runtime errors.
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
The main namespace for the aterm++ library.
Namespace for system defined sort bool_.
bool is_or_application(const atermpp::aterm &e)
Recogniser for application of ||.
bool is_and_application(const atermpp::aterm &e)
Recogniser for application of &&.
bool is_not_application(const atermpp::aterm &e)
Recogniser for application of !.
const function_symbol & true_()
Constructor for function symbol true.
Namespace for all data library functionality.
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
rewrite_strategy
The strategy of the rewriter.
atermpp::term_list< data_expression > data_expression_list
\brief list of data_expressions
atermpp::term_list< variable > variable_list
\brief list of variables
bool mCRL2logEnabled(const log_level_t level)
The namespace for accessor functions on pbes expressions.
const pbes_expression & arg(const pbes_expression &t)
Returns the pbes expression argument of expressions of type not, exists and forall.
const pbes_expression & left(const pbes_expression &t)
Returns the left hand side of an expression of type and, or or imp.
const pbes_expression & right(const pbes_expression &t)
Returns the right hand side of an expression of type and, or or imp.
std::vector< pbes_expression > pfnf_implications(const pbes_expression &x)
bool is_pfnf_simple_expression(const pbes_expression &x)
void make_constelm_substitution(const std::map< data::variable, data::data_expression > &m, data::rewriter::substitution_type &result)
Container concat(const Container &x, const Container &y)
Concatenates two containers.
bool is_pfnf_or_expression(const pbes_expression &x)
std::pair< bool, data::variable_list > pfnf_traverser_quantifier
Represents a quantifier Qv:V. If the bool is true it is a forall, otherwise an exists.
void split_and(const pbes_expression &expr, std::vector< pbes_expression > &result)
Splits a conjunction into a sequence of operands Given a pbes expression of the form p1 && p2 && ....
pbes to_ppg(pbes x)
Rewrites a PBES to a PPG.
rewrite_pbes_expressions_with_substitution_builder< Builder, Rewriter, Substitution > make_rewrite_pbes_expressions_with_substitution_builder(const Rewriter &R, Substitution &sigma)
bool is_pfnf_or(const pbes_expression &x)
bool is_pfnf_inner_and(const pbes_expression &x)
bool is_pfnf_data_expression(const pbes_expression &x)
void split_or(const pbes_expression &expr, std::vector< pbes_expression > &result)
Splits a conjunction into a sequence of operands Given a pbes expression of the form p1 || p2 || ....
bool is_bqnf(const T &x)
Determines if an expression is a BQNF expression.
void split_pfnf_expression(const pbes_expression &phi, pbes_expression &h, std::vector< pbes_expression > &g)
rewrite_pbes_expressions_builder< Builder, Rewriter > make_rewrite_pbes_expressions_builder(const Rewriter &R)
bool is_pfnf_imp(const pbes_expression &x)
pbes_expression remove_quantifiers(const pbes_expression &x)
bool is_pfnf_outer_and(const pbes_expression &x)
bool is_pfnf_expression(const pbes_expression &x)
The main namespace for the PBES library.
bool is_data(const pbes_expression &t)
Returns true if the term t is a data expression.
pbes_rewriter_type
An enumerated type for the available pbes rewriters.
const pbes_expression & true_()
void rewrite(T &x, Rewriter R, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
std::string pfnf_pp(const T &x)
Returns a PFNF string representation of the object x.
bool is_exists(const atermpp::aterm &x)
bool is_or(const atermpp::aterm &x)
T rewrite(const T &x, Rewriter R, typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
void pbesinfo(const std::string &input_filename, const std::string &input_file_message, const utilities::file_format &file_format, bool opt_full)
void pbespp(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &input_format, core::print_format_type format, bool use_pfnf_printer)
bool is_forall(const atermpp::aterm &x)
T pbes_rewrite(const T &x, const Rewriter &R, Substitution sigma, typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value >::type *=0)
Rewrites all embedded pbes expressions in an object x, and applies a substitution to variables on the...
void constelm(pbes &p, data::rewrite_strategy rewrite_strategy, pbes_rewriter_type rewriter_type, bool compute_conditions=false, bool remove_redundant_equations=true, bool check_quantifiers=true)
Apply the constelm algorithm.
atermpp::aterm pbes_to_aterm(const pbes &p)
Conversion to atermappl.
void rewrite(T &x, Rewriter R, const Substitution &sigma, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
bool is_false(const pbes_expression &t)
Test for the value false.
T rewrite(const T &x, Rewriter R, const Substitution &sigma, typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
void pbes_rewrite(T &x, const Rewriter &R, Substitution sigma, typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value >::type *=0)
Rewrites all embedded pbes expressions in an object x, and applies a substitution to variables on the...
void pbesconstelm(const std::string &input_filename, const std::string &output_filename, const utilities::file_format &input_format, const utilities::file_format &output_format, data::rewrite_strategy rewrite_strategy, pbes_rewriter_type rewriter_type, bool compute_conditions, bool remove_redundant_equations, bool check_quantifiers)
void pbes_rewrite(T &x, const Rewriter &R, typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
Rewrites all embedded pbes expressions in an object x.
bool is_propositional_variable_instantiation(const atermpp::aterm &x)
bool is_and(const atermpp::aterm &x)
bool is_imp(const atermpp::aterm &x)
T pbes_rewrite(const T &x, const Rewriter &R, typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value >::type *=0)
Rewrites all embedded pbes expressions in an object x.
bool is_true(const pbes_expression &t)
Test for the value true.
const pbes_expression & false_()
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
void swap(atermpp::aterm &t1, atermpp::aterm &t2) noexcept
Swaps two term_applss.
data::data_expression operator()(const data::data_expression &x) const
A quantified predicate variable instantiation.
std::list< quantified_variable > Q
propositional_variable_instantiation X_e
bool operator<(const QPVI &other) const
virtual pbes_expression filter_guard(const pbes_expression &g, const pbes_expression &phi_i, const data::variable_list &d)
Filters a 'guard' g with respect to a set of variables d and an expression phi_i such that parts of g...
bqnf_quantifier_rewriter()
Constructor.
virtual pbes_expression rewrite_bqnf_expression(const pbes_expression &e)
Rewrites a BQNF expression. Replaces universal quantifier over conjuncts with conjuncts over universa...
virtual pbes_expression rewrite_bounded_forall(const pbes_expression &e)
Rewrites a bounded universal quantifier expression. If the subexpression is a conjunction,...
virtual pbes_expression rewrite_and(const pbes_expression &e)
Rewrites a conjunctive expression. rewrite_imp(/_i phi_i) = /_i rewrite_bqnf_expression(phi_i).
virtual pbes_expression rewrite_imp(const pbes_expression &e)
Rewrites an implication: rewrite_imp(phi => psi) = rewrite_bqnf_expression(phi) => rewrite_bqnf_expre...
virtual pbes_expression rewrite_bounded_exists(const pbes_expression &e)
Rewrites a bounded existential quantifier expression. rewrite_bounded_exists(exists v ....
virtual pbes_expression filter(const pbes_expression &e, const std::set< data::variable > &d)
Filters the expression e such that subexpressions that are data expression that do not refer to varia...
virtual pbes_expression rewrite_or(const pbes_expression &e)
Rewrites a disjunctive expression. rewrite_imp(\/_i phi_i) = \/_i rewrite_bqnf_expression(phi_i).
A visitor class for PBES equations in BQNF. There is a visit_<node> function for each type of node....
void leave(const exists &x)
void push(const stack_elem &x)
void leave(const forall &x)
std::vector< stack_elem > condition_fv_stack
pbes_expression_traverser< edge_condition_traverser > super
const stack_elem & top() const
void leave(const propositional_variable_instantiation &x)
std::list< detail::quantified_variable > qvar_list
void merge_conditions(stack_elem &ec1, bool negate1, stack_elem &ec2, bool negate2, stack_elem &ec, bool is_conjunctive)
const edge_map & result() const
std::list< pbes_expression > quantified_context
void enter(const forall &x)
edge_traverser_stack_elem stack_elem
void leave(const data::data_expression &x)
void enter(const exists &x)
std::set< data::variable > disjunctive_context_FV
The set of free variables that occur on the other side of the conjunctions this PVI occurs in....
std::set< data::variable > conjunctive_context_FV
The set of free variables that occur on the other side of the conjunctions this PVI occurs in....
std::set< data::data_expression > conditions
Contains expressions that characterise when an edge is enabled. The conjunction of these expressions ...
std::set< data::variable > FV
data::data_expression Cpos
std::multimap< QPVI, edge_details > edge_map
data::data_expression Cneg
edge_traverser_stack_elem(const data::data_expression &cond_pos, const data::data_expression &cond_neg, std::set< data::variable > &&free_vars)
void apply(const pbes_expression &x)
pbes_expression_traverser< is_pfnf_traverser > super
std::string abstraction_operator(const Abstraction &x) const
pbes_expression abstraction_body(const Abstraction &x) const
bool is_abstraction(const pbes_system::pbes_expression &x)
void print_pbes_abstraction(const Abstraction &x)
void apply(const pbes_system::pbes_expression &x)
pbes_system::detail::printer< Derived > super
data::variable_list abstraction_variables(const Abstraction &x) const
pfnf_traverser_expression(const atermpp::aterm &x)
std::vector< pfnf_traverser_implication > implications
std::vector< pfnf_traverser_quantifier > quantifiers
void substitute(const variable_variable_substitution &sigma)
pfnf_traverser_expression(const atermpp::aterm &x, const std::vector< pfnf_traverser_quantifier > &quantifiers_, const std::vector< pfnf_traverser_implication > &implications_)
Represents the implication g => ( X0(e0) \/ ... \/ Xk(ek) )
pfnf_traverser_implication(const atermpp::aterm &x)
void substitute(const variable_variable_substitution &sigma)
pfnf_traverser_implication(const atermpp::aterm &g_, const std::vector< propositional_variable_instantiation > &rhs_)
std::vector< propositional_variable_instantiation > rhs
Applies the PFNF rewriter to a PBES expression.
void enter(const propositional_variable_instantiation &x)
void enter(const data::data_expression &x)
pbes_expression make_and(const pfnf_traverser_expression &left, const pfnf_traverser_expression &right) const
void print_expression(const pfnf_traverser_expression &expr) const
Prints an expression.
void leave(const exists &)
pbes_expression evaluate() const
Returns the top element of the expression stack converted to a pbes expression.
std::vector< data::variable_list > quantifier_stack
A stack containing quantifier variables.
void enter(const forall &x)
pbes_expression_traverser< pfnf_traverser > super
void enter(const exists &x)
void leave(const forall &)
pbes_expression make_or(const pfnf_traverser_expression &left, const pfnf_traverser_expression &right) const
std::vector< pfnf_traverser_expression > expression_stack
A stack containing expressions in PFNF format.
pbes_expression make_not(const pfnf_traverser_expression &x) const
void resolve_name_clashes(pfnf_traverser_expression &left, pfnf_traverser_expression &right)
void apply(T &result, const pbes_expression &x)
Builder< rewrite_pbes_expressions_builder< Builder, Rewriter > > super
void update(pbes_system::pbes &x)
rewrite_pbes_expressions_builder(const Rewriter &R_)
Builder< rewrite_pbes_expressions_with_substitution_builder< Builder, Rewriter, Substitution > > super
void apply(T &result, const pbes_expression &x)
rewrite_pbes_expressions_with_substitution_builder(const Rewriter &R_, Substitution &sigma_)
const variable_variable_substitution & sigma
data::data_expression operator()(const data::variable &v) const
variable_data_expression_substitution(const variable_variable_substitution &sigma_)
data::data_expression expression_type
data::variable variable_type
data::variable operator()(const data::variable &v) const
std::map< data::variable, data::variable > sigma
std::string to_string() const
data::variable_list operator()(const data::variable_list &variables) const
An attempt for improving the efficiency.
enumerate_quantifiers_rewriter(const data::rewriter &R, const data::data_specification &dataspec, bool enumerate_infinite_sorts=true)
Prints the object x to a stream.
void operator()(const T &x, std::ostream &out)
A rewriter that simplifies boolean expressions in a term, and rewrites data expressions.
A rewriter that simplifies boolean expressions and quantifiers, and rewrites data expressions.
std::size_t operator()(const atermpp::detail::reference_aterm< T > &t) const