12#ifndef MCRL2_DATA_REWRITERS_QUANTIFIERS_INSIDE_REWRITER_H
13#define MCRL2_DATA_REWRITERS_QUANTIFIERS_INSIDE_REWRITER_H
16#include "mcrl2/data/builder.h"
17#include "mcrl2/data/join.h"
18#include "mcrl2/data/optimized_boolean_operators.h"
33 return std::set<variable>(x.begin(), x.end());
39 return variable_list(x.begin(), x.end());
42template <
typename BinaryOperation>
48 std::vector<std::set<data::variable>> vars;
49 for (
const data_expression& x_j: X)
51 vars.push_back(set_intersection(find_free_variables(x_j), V));
53 auto j = std::min_element(vars.begin(), vars.end(),
54 [&](
const std::set<data::variable>& x,
const std::set<data::variable>& y)
56 return x.size() < y.size();
59 const std::set<data::variable>& Z = *j;
61 std::vector<data_expression> phi;
62 std::vector<data_expression> psi;
63 for (std::size_t i = 0; i < X.size(); i++)
65 if (std::includes(Z.begin(), Z.end(), vars[i].begin(), vars[i].end()))
74 data_expression Phi = utilities::detail::join(phi.begin(), phi.end(), op, empty_sequence_result);
75 data_expression Psi = utilities::detail::join(psi.begin(), psi.end(), op, empty_sequence_result);
88 std::set<variable> W = make_variable_set(x.variables());
90 result = quantifiers_inside_forall(W, result);
97 std::set<variable> W = make_variable_set(x.variables());
99 result = quantifiers_inside_exists(W, result);
116 return vars.empty() ? body : forall(vars,body);
123 std::set<variable> W = make_variable_set(x.variables());
124 result = quantifiers_inside_forall(set_union(V, W), x.body());
128 template <
typename T>
132 std::set<variable> W = set_intersection(V, find_free_variables(x));
133 return make_forall_(variable_list(W.begin(), W.end()), x);
142 result = sort_bool::not_(quantifiers_inside_exists(V, phi));
149 result = sort_bool::and_(quantifiers_inside_forall(V, phi), quantifiers_inside_forall(V, psi));
158 std::vector<data_expression> X;
159 utilities::detail::split(x, std::back_inserter(X), tr::is_or, tr::left, tr::right);
160 const auto [Phi, Psi] = compute_Phi_Psi(X, V, tr::or_, tr::false_());
161 if (sort_bool::is_false_function_symbol(Psi))
163 result = make_forall_(make_variable_list(set_intersection(V,find_free_variables(x))), x);
166 std::set<variable> vars_Phi = find_free_variables(Phi);
167 std::set<variable> vars_Psi = find_free_variables(Psi);
168 result = make_forall_(make_variable_list(set_intersection(V, set_intersection(vars_Phi, vars_Psi))),
170 quantifiers_inside_forall(set_difference(set_intersection(V, vars_Phi), vars_Psi), Phi),
171 quantifiers_inside_forall(set_difference(set_intersection(V, vars_Psi), vars_Phi), Psi)
180 result = quantifiers_inside_forall(V, sort_bool::or_(sort_bool::not_(left), right));
185 result = apply_default(x);
204 return vars.empty() ? body : exists(vars,body);
211 std::set<variable> W = make_variable_set(x.variables());
212 result = quantifiers_inside_exists(set_union(V, W), x.body());
216 template <
typename T>
220 std::set<variable> W = set_intersection(V, find_free_variables(x));
221 return make_exists_(variable_list(W.begin(), W.end()), x);
227 result = apply_default(x);
236 result = sort_bool::not_(quantifiers_inside_forall(V, phi));
245 std::vector<data_expression> X;
246 utilities::detail::split(x, std::back_inserter(X), tr::is_and, tr::left, tr::right);
247 const auto [Phi, Psi] = compute_Phi_Psi(X, V, tr::and_, tr::true_());
248 if (sort_bool::is_true_function_symbol(Psi))
250 result = make_exists_(make_variable_list(set_intersection(V, find_free_variables(x))), x);
253 std::set<variable> vars_Phi = find_free_variables(Phi);
254 std::set<variable> vars_Psi = find_free_variables(Psi);
255 result = make_exists_(make_variable_list(set_intersection(V, set_intersection(vars_Phi, vars_Psi))),
257 quantifiers_inside_exists(set_difference(set_intersection(V, vars_Phi), vars_Psi), Phi),
258 quantifiers_inside_exists(set_difference(set_intersection(V, vars_Psi), vars_Phi), Psi)
267 result = sort_bool::or_(quantifiers_inside_exists(V, phi), quantifiers_inside_exists(V, psi));
274 result = quantifiers_inside_exists(V, sort_bool::or_(sort_bool::not_(left), right));
277 result = apply_default(x);
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.
const data_expression & body() const
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...
existential quantification.
universal quantification.
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.
const pbes_expression & left() const
const pbes_expression & right() const
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
exists(const exists &) noexcept=default
Move semantics.
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
forall(const forall &) noexcept=default
Move semantics.
\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.
const pbes_expression & operand() const
A rewriter that applies one point rule quantifier elimination to a PBES.
data::variable variable_type
The variable type.
pbes_expression operator()(const pbes_expression &x) const
Rewrites a pbes expression.
pbes_expression term_type
The term type.
\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.
pbes_expression operator()(const pbes_expression &x) const
Rewrites a pbes expression.
pbes_expression term_type
The term type.
data::variable variable_type
The variable type.
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.
data_expression quantifiers_inside_forall(const std::set< variable > &variables, const data_expression &x)
data_expression quantifiers_inside_exists(const std::set< variable > &variables, const data_expression &x)
variable_list make_variable_list(const std::set< variable > &x)
std::set< variable > make_variable_set(const variable_list &x)
data_expression quantifiers_inside(const data_expression &x)
std::tuple< data_expression, data_expression > compute_Phi_Psi(const std::vector< data_expression > &X, const std::set< variable > &V, BinaryOperation op, data_expression empty_sequence_result)
Namespace for system defined sort bool_.
const data_expression & arg(const data_expression &e)
Function for projecting out argument. arg from an application.
bool is_or_application(const atermpp::aterm &e)
Recogniser for application of ||.
const data_expression & right(const data_expression &e)
Function for projecting out argument. right from an application.
bool is_implies_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.
const data_expression & left(const data_expression &e)
Function for projecting out argument. left from an application.
Namespace for all data library functionality.
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
data_expression not_(const data_expression &x)
rewrite_strategy
The strategy of the rewriter.
T quantifiers_inside_rewrite(const T &x, typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value >::type *=0)
atermpp::term_list< data_expression > data_expression_list
\brief list of data_expressions
atermpp::term_list< variable > variable_list
\brief list of variables
void quantifiers_inside_rewrite(T &x, typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value >::type *=0)
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)
pbes_expression quantifiers_inside_forall(const std::set< data::variable > &variables, 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)
pbes_expression quantifiers_inside_exists(const std::set< data::variable > &variables, const pbes_expression &x)
rewrite_pbes_expressions_builder< Builder, Rewriter > make_rewrite_pbes_expressions_builder(const Rewriter &R)
std::tuple< pbes_expression, pbes_expression > compute_Phi_Psi(const std::vector< pbes_expression > &X, const std::set< data::variable > &V, BinaryOperation op, pbes_expression empty_sequence_result)
bool is_pfnf_imp(const pbes_expression &x)
pbes_expression quantifiers_inside(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_()
bool is_not(const atermpp::aterm &x)
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)
std::map< data::variable, std::set< data::data_expression > > find_equalities(const pbes_expression &x)
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.
std::map< data::variable, std::set< data::data_expression > > find_inequalities(const pbes_expression &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.
Contains type information for terms.
find_equalities_expression()
Creates (empty,empty)
data::data_expression operator()(const data::data_expression &x) const
void apply(T &result, const forall &x)
void apply(T &result, const exists &x)
data_expression_builder< quantifiers_inside_builder > super
data_expression make_exists_(const variable_list &vars, const data_expression &body)
void apply(T &result, const data_expression &x)
data_expression apply_default(const T &x)
quantifiers_inside_exists_builder(const std::set< variable > &V_)
const std::set< variable > & V
void apply(T &result, const forall &x)
void apply(T &result, const exists &x)
data_expression_builder< quantifiers_inside_exists_builder > super
void apply(T &result, const forall &x)
quantifiers_inside_forall_builder(const std::set< variable > &V_)
static data_expression make_forall_(const variable_list &vars, const data_expression &body)
const std::set< variable > & V
data_expression_builder< quantifiers_inside_forall_builder > super
data_expression apply_default(const T &x)
void apply(T &result, const data_expression &x)
An empty struct that is used to denote the absence of a substitution. Used for rewriters.
data_expression operator()(const data_expression &x) const
data_expression operator()(const 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
void apply(T &result, const forall &x)
void apply(T &result, const exists &x)
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)
pbes_system::detail::find_equalities_traverser< pbes_system::data_expression_traverser, find_equalities_traverser_inst > super
data::detail::find_equalities_traverser< Traverser, Derived > super
void apply(const propositional_variable_instantiation &)
void leave(const forall &x)
void leave(const exists &x)
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)
pbes_expression_builder< quantifiers_inside_builder > super
void apply(T &result, const forall &x)
void apply(T &result, const exists &x)
pbes_expression apply_default(const T &x)
quantifiers_inside_exists_builder(const std::set< data::variable > &V_)
void apply(T &result, const not_ &x)
void apply(T &result, const exists &x)
const std::set< data::variable > & V
static pbes_expression make_exists_(const data::variable_list &vars, const pbes_expression &body)
void apply(T &result, const or_ &x)
void apply(T &result, const propositional_variable_instantiation &x)
void apply(T &result, const imp &x)
void apply(T &result, const data::data_expression &x)
void apply(T &result, const forall &x)
void apply(T &result, const and_ &x)
pbes_expression_builder< quantifiers_inside_exists_builder > super
void apply(T &result, const exists &x)
const std::set< data::variable > & V
void apply(T &result, const imp &x)
static pbes_expression make_forall_(const data::variable_list &vars, const pbes_expression &body)
void apply(T &result, const or_ &x)
void apply(T &result, const data::data_expression &x)
void apply(T &result, const and_ &x)
quantifiers_inside_forall_builder(const std::set< data::variable > &V_)
void apply(T &result, const propositional_variable_instantiation &x)
pbes_expression apply_default(const T &x)
void apply(T &result, const not_ &x)
data_expression_builder< quantifiers_inside_forall_builder > super
void apply(T &result, const forall &x)
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_)
simplify_quantifiers_data_rewriter_builder(const DataRewriter &R, SubstitutionFunction &sigma)
add_data_rewriter< pbes_system::detail::simplify_quantifiers_builder, Derived, DataRewriter, SubstitutionFunction > super
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.
pbes_expression operator()(const pbes_expression &x, SubstitutionFunction &sigma) const
simplify_quantifiers_data_rewriter(const DataRewriter &R_)
pbes_expression operator()(const pbes_expression &x) const
data::variable variable_type
pbes_expression term_type
A rewriter that simplifies boolean expressions and quantifiers.
pbes_expression term_type
pbes_expression operator()(const pbes_expression &x) const
data::variable variable_type
std::size_t operator()(const atermpp::detail::reference_aterm< T > &t) const