#include "theory/builtin/proof_checker.h"
#include "expr/skolem_manager.h"
+#include "smt/env.h"
#include "smt/term_formula_removal.h"
#include "theory/evaluator.h"
#include "theory/rewriter.h"
namespace theory {
namespace builtin {
+BuiltinProofRuleChecker::BuiltinProofRuleChecker(Env& env) : d_env(env) {}
+
void BuiltinProofRuleChecker::registerTo(ProofChecker* pc)
{
pc->registerChecker(PfRule::ASSUME, this);
}
if (idr == MethodId::RW_REWRITE_EQ_EXT)
{
- return Rewriter::rewriteEqualityExt(n);
+ return d_env.getRewriter()->rewriteEqualityExt(n);
}
if (idr == MethodId::RW_EVALUATE)
{
#include "theory/quantifiers/extended_rewrite.h"
namespace cvc5 {
+
+class Env;
+
namespace theory {
namespace builtin {
class BuiltinProofRuleChecker : public ProofRuleChecker
{
public:
- BuiltinProofRuleChecker() {}
+ /** Constructor. */
+ BuiltinProofRuleChecker(Env& env);
+ /** Destructor. */
~BuiltinProofRuleChecker() {}
/**
* Apply rewrite on n (in skolem form). This encapsulates the exact behavior
/** extended rewriter object */
quantifiers::ExtendedRewriter d_ext_rewriter;
+
+ private:
+ /** Reference to the environment. */
+ Env& d_env;
};
} // namespace builtin
TheoryBuiltin::TheoryBuiltin(Env& env, OutputChannel& out, Valuation valuation)
: Theory(THEORY_BUILTIN, env, out, valuation),
+ d_checker(env),
d_state(env, valuation),
d_im(*this, d_state, d_pnm, "theory::builtin::")
{
Node extendedRewrite(Node n) const;
private:
- /**
- * Whether this extended rewriter applies aggressive rewriting techniques,
- * which are more expensive. Examples of aggressive rewriting include:
- * - conditional rewriting,
- * - condition merging,
- * - sorting childing of commutative operators with more than 5 children.
- *
- * Aggressive rewriting is applied for SyGuS, whereas non-aggressive rewriting
- * may be applied as a preprocessing step.
- */
- bool d_aggr;
- /** true/false nodes */
- Node d_true;
- Node d_false;
/** cache that the extended rewritten form of n is ret */
void setCache(Node n, Node ret) const;
/** get the cache for n */
*/
Node extendedRewriteStrings(Node ret) const;
//--------------------------------------end theory-specific top-level calls
+
+ /**
+ * Whether this extended rewriter applies aggressive rewriting techniques,
+ * which are more expensive. Examples of aggressive rewriting include:
+ * - conditional rewriting,
+ * - condition merging,
+ * - sorting childing of commutative operators with more than 5 children.
+ *
+ * Aggressive rewriting is applied for SyGuS, whereas non-aggressive rewriting
+ * may be applied as a preprocessing step.
+ */
+ bool d_aggr;
+ /** true/false nodes */
+ Node d_true;
+ Node d_false;
};
} // namespace quantifiers
{
Assert(node.getKind() == kind::EQUAL);
// note we don't force caching of this method currently
- return getInstance()->d_theoryRewriters[theoryOf(node)]->rewriteEqualityExt(
- node);
+ return d_theoryRewriters[theoryOf(node)]->rewriteEqualityExt(node);
}
void Rewriter::registerTheoryRewriter(theory::TheoryId tid,
* combination, which needs to guarantee that equalities between terms
* can be communicated for all pairs of terms.
*/
- static Node rewriteEqualityExt(TNode node);
+ Node rewriteEqualityExt(TNode node);
/**
* Rewrite with proof production, which is managed by the term conversion