12#ifndef MCRL2_DATA_DETAIL_REWR_PROVER_H
13#define MCRL2_DATA_DETAIL_REWR_PROVER_H
15#include "mcrl2/data/detail/prover/bdd_prover.h"
40 switch (prover_obj.rewriter_strategy())
42 case data::rewrite_strategy::jitty:
43 return data::rewrite_strategy::jitty_prover;
44#ifdef MCRL2_ENABLE_JITTYC
45 case data::rewrite_strategy::jitty_compiling:
46 return data::rewrite_strategy::jitty_compiling_prover;
49 throw mcrl2::runtime_error(
"invalid rewrite strategy");
62 prover_obj.set_substitution(sigma);
63 prover_obj.set_formula(t);
64 result=prover_obj.get_bdd();
71 rewrite(result,t,sigma);
78 prover_obj.thread_initialise();
98 return std::shared_ptr<Rewriter>(
new RewriterProver(*
this,prover_obj.clone()));
A unordered_map class in which aterms can be stored.
An abstraction expression.
const variable_list & variables() const
const data_expression & body() const
const data_expression & lhs() const
const variable_list & variables() const
data_expression & operator=(const data_expression &) noexcept=default
RewriterProver(const data_specification &data_spec, mcrl2::data::rewriter::strategy strat, const used_data_equation_selector &equations_selector)
RewriterProver(const RewriterProver &other)=delete
data_expression rewrite(const data_expression &t, substitution_type &sigma) override
Rewrite an mCRL2 data term.
rewrite_strategy getStrategy() override
Get rewriter strategy that is used.
void rewrite(data_expression &result, const data_expression &t, substitution_type &sigma) override
Rewrite an mCRL2 data term.
~RewriterProver() override=default
RewriterProver(const RewriterProver &rewr, BDD_Prover prover_obj_)
void thread_initialise() override
std::shared_ptr< Rewriter > clone() override
Clone a rewriter.
Rewriter interface class.
void rewrite_where(data_expression &result, const where_clause &term, substitution_type &sigma)
virtual void thread_initialise()
Rewriter(const data_specification &data_spec, const used_data_equation_selector &eq_selector)
Constructor. Do not use directly; use createRewriter() function instead.
An enumerator algorithm that generates solutions of a condition.
The default element for the todo list of the enumerator.
Component for selecting a subset of equations that are actually used in an encompassing specification...
variable(const variable &) noexcept=default
Move semantics.
\brief A where expression
const assignment_list & assignments() const
const data_expression & body() const
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
void CheckRewriteRule(const data_equation &data_eqn)
Check that an mCRL2 data equation is a valid rewrite rule. If not, an runtime_error is thrown indicat...
static void checkPattern(const data_expression &p)
static void check_vars(application::const_iterator begin, const application::const_iterator &end, const std::set< variable > &vars, std::set< variable > &used_vars)
void set_enumerator_iteration_limit(std::size_t size)
bool isValidRewriteRule(const data_equation &data_eqn)
Check whether or not an mCRL2 data equation is a valid rewrite rule.
static bool occur_check(const variable &v, const atermpp::aterm &e)
static void checkPattern(application::const_iterator begin, const application::const_iterator &end)
static void check_vars(const data_expression &expr, const std::set< variable > &vars, std::set< variable > &used_vars)
bool is_application(const data_expression &t)
Returns true if the term t is an application.
bool is_forall(const atermpp::aterm &x)
Returns true if the term t is a universal quantification.
bool is_exists(const atermpp::aterm &x)
Returns true if the term t is an existential quantification.
bool is_lambda(const atermpp::aterm &x)
Returns true if the term t is a lambda abstraction.
bool is_variable(const atermpp::aterm &x)
Returns true if the term t is a variable.
static std::size_t max_enumerator_iterations
bool operator()(const atermpp::aterm &t) const
rewriter_wrapper(Rewriter *r)