#include "theory/datatypes/sygus_datatype_utils.h"
#include "theory/quantifiers/quantifiers_attributes.h"
#include "theory/quantifiers/sygus/sygus_grammar_cons.h"
-#include "theory/rewriter.h"
#include "theory/smt_engine_subsolver.h"
namespace cvc5 {
namespace theory {
namespace quantifiers {
-SygusInterpol::SygusInterpol(Env& env) : d_env(env) {}
+SygusInterpol::SygusInterpol(Env& env) : EnvObj(env) {}
void SygusInterpol::collectSymbols(const std::vector<Node>& axioms,
const Node& conj)
constraint = constraint.substitute(
d_syms.begin(), d_syms.end(), d_vars.begin(), d_vars.end());
Trace("sygus-interpol-debug") << constraint << "...finish" << std::endl;
- constraint = Rewriter::rewrite(constraint);
+ constraint = rewrite(constraint);
d_sygusConj = constraint;
Trace("sygus-interpol") << "Generate: " << d_sygusConj << std::endl;
#include "expr/node.h"
#include "expr/type_node.h"
+#include "smt/env_obj.h"
namespace cvc5 {
* of the SMT engine can be further queried for information regarding further
* solutions.
*/
-class SygusInterpol
+class SygusInterpol : protected EnvObj
{
public:
SygusInterpol(Env& env);
* @param itp the interpolation predicate.
*/
bool findInterpol(SmtEngine* subsolver, Node& interpol, Node itp);
- /** Reference to the env */
- Env& d_env;
/**
* symbols from axioms and conjecture.
*/
#include "expr/node_algorithm.h"
#include "expr/skolem_manager.h"
#include "theory/quantifiers/single_inv_partition.h"
-#include "theory/rewriter.h"
#include "theory/smt_engine_subsolver.h"
using namespace cvc5::kind;
namespace theory {
namespace quantifiers {
-SygusQePreproc::SygusQePreproc(Env& env) : d_env(env) {}
+SygusQePreproc::SygusQePreproc(Env& env) : EnvObj(env) {}
Node SygusQePreproc::preprocess(Node q)
{
qeRes = nm->mkNode(FORALL, q[0], qeRes, q[2]);
Trace("cegqi-qep") << "Converted conjecture after QE : " << qeRes
<< std::endl;
- qeRes = Rewriter::rewrite(qeRes);
+ qeRes = rewrite(qeRes);
Node nq = qeRes;
// must assert it is equivalent to the original
Node lem = q.eqNode(nq);
#define CVC5__THEORY__QUANTIFIERS__SYGUS__SYGUS_QE_PREPROC_H
#include "expr/node.h"
+#include "smt/env_obj.h"
namespace cvc5 {
* exists f. forall x. Q[ f(x), x ]
* For more details, see Example 6 of Reynolds et al. SYNT 2017.
*/
-class SygusQePreproc
+class SygusQePreproc : protected EnvObj
{
public:
SygusQePreproc(Env& env);
* by the quantifier elimination technique outlined above.
*/
Node preprocess(Node q);
-
- private:
- /** Reference to the env */
- Env& d_env;
};
} // namespace quantifiers
namespace quantifiers {
SygusRepairConst::SygusRepairConst(Env& env, TermDbSygus* tds)
- : d_env(env), d_tds(tds), d_allow_constant_grammar(false)
+ : EnvObj(env), d_tds(tds), d_allow_constant_grammar(false)
{
}
// check whether it is not in the current logic, e.g. non-linear arithmetic.
// if so, undo replacements until it is in the current logic.
- const LogicInfo& logic = d_env.getLogicInfo();
+ const LogicInfo& logic = getLogicInfo();
if (logic.isTheoryEnabled(THEORY_ARITH) && logic.isLinear())
{
fo_body = fitToLogic(sygusBody,
#define CVC5__THEORY__QUANTIFIERS__SYGUS_REPAIR_CONST_H
#include <unordered_set>
+
#include "expr/node.h"
+#include "smt/env_obj.h"
namespace cvc5 {
* within repairSolution(...) below, which if satisfiable gives us the
* valuation for c'.
*/
-class SygusRepairConst
+class SygusRepairConst : protected EnvObj
{
public:
SygusRepairConst(Env& env, TermDbSygus* tds);
static bool mustRepair(Node n);
private:
- /** Reference to the env */
- Env& d_env;
/** pointer to the sygus term database of d_qe */
TermDbSygus* d_tds;
/**