Env& env,
const std::vector<Theory*>& paraTheories,
ProofNodeManager* pnm)
- : d_te(te),
- d_env(env),
+ : EnvObj(env),
+ d_te(te),
d_valuation(&te),
d_pnm(pnm),
d_logicInfo(te.getLogicInfo()),
#ifndef CVC5__THEORY__COMBINATION_ENGINE__H
#define CVC5__THEORY__COMBINATION_ENGINE__H
-#include <vector>
#include <memory>
+#include <vector>
+#include "smt/env_obj.h"
#include "theory/ee_manager.h"
#include "theory/valuation.h"
* mode, and
* (2) Implementing the main combination method (combineTheories).
*/
-class CombinationEngine
+class CombinationEngine : protected EnvObj
{
public:
CombinationEngine(TheoryEngine& te,
virtual eq::EqualityEngineNotify* getModelEqualityEngineNotify();
/** Reference to the theory engine */
TheoryEngine& d_te;
- /** Reference to the environment */
- Env& d_env;
/** Valuation for the engine */
Valuation d_valuation;
/** The proof node manager */
namespace theory {
ModelManager::ModelManager(TheoryEngine& te, Env& env, EqEngineManager& eem)
- : d_te(te),
- d_env(env),
+ : EnvObj(env),
+ d_te(te),
d_eem(eem),
d_modelEqualityEngine(nullptr),
d_modelEqualityEngineAlloc(nullptr),
#include <memory>
+#include "smt/env_obj.h"
#include "theory/ee_manager.h"
#include "theory/logic_info.h"
* method is a manager-specific way for setting up the equality engine of the
* model in preparation for model building.
*/
-class ModelManager
+class ModelManager : protected EnvObj
{
public:
ModelManager(TheoryEngine& te, Env& env, EqEngineManager& eem);
/** Reference to the theory engine */
TheoryEngine& d_te;
- /** Reference to the environment */
- Env& d_env;
/** The equality engine manager */
EqEngineManager& d_eem;
/**
#include "expr/node.h"
#include "expr/type_node.h"
+#include "smt/env_obj.h"
namespace cvc5 {
* "Sort it out with Monotonicity" Claessen 2011
* "Non-Cyclic Sorts for First-Order Satisfiability" Korovin 2013.
*/
-class SortInference {
-private:
+class SortInference : protected EnvObj
+{
+ private:
//all subsorts
std::vector< int > d_sub_sorts;
std::map< int, bool > d_non_monotonic_sorts;
};
private:
- /** Reference to the env */
- Env& d_env;
/** the id count for all subsorts we have allocated */
int d_sortCount;
UnionFind d_type_union_find;
void reset();
public:
- SortInference(Env& env) : d_env(env), d_sortCount(1) {}
+ SortInference(Env& env) : EnvObj(env), d_sortCount(1) {}
~SortInference(){}
/** initialize
}
TheoryEngine::TheoryEngine(Env& env)
- : d_propEngine(nullptr),
- d_env(env),
+ : EnvObj(env),
+ d_propEngine(nullptr),
d_logicInfo(env.getLogicInfo()),
d_pnm(d_env.isTheoryProofProducing() ? d_env.getProofNodeManager()
: nullptr),
#include "expr/node.h"
#include "options/theory_options.h"
#include "proof/trust_node.h"
+#include "smt/env_obj.h"
#include "theory/atom_requests.h"
#include "theory/engine_output_channel.h"
#include "theory/interrupted.h"
* T-solvers look like a single unit to the propositional part of
* cvc5.
*/
-class TheoryEngine
+class TheoryEngine : protected EnvObj
{
/** Shared terms database can use the internals notify the theories */
friend class SharedTermsDatabase;
/** Associated PropEngine engine */
prop::PropEngine* d_propEngine;
- /**
- * Reference to the environment.
- */
- Env& d_env;
-
/**
* A table of from theory IDs to theory pointers. Never use this table
* directly, use theoryOf() instead.
namespace theory {
TheoryModel::TheoryModel(Env& env, std::string name, bool enableFuncModels)
- : d_env(env),
+ : EnvObj(env),
d_name(name),
d_equalityEngine(nullptr),
d_using_model_core(false),
#include <unordered_map>
#include <unordered_set>
+#include "smt/env_obj.h"
#include "theory/ee_setup_info.h"
#include "theory/rep_set.h"
#include "theory/type_enumerator.h"
* above functions such as getRepresentative() when assigning total
* interpretations for uninterpreted functions.
*/
-class TheoryModel
+class TheoryModel : protected EnvObj
{
friend class TheoryEngineModelBuilder;
std::string debugPrintModelEqc() const;
protected:
- /** Reference to the environmanet */
- Env& d_env;
/** Unique name of this model */
std::string d_name;
/** equality engine containing all known equalities/disequalities */
namespace cvc5 {
namespace theory {
-TheoryEngineModelBuilder::TheoryEngineModelBuilder(Env& env) : d_env(env) {}
+TheoryEngineModelBuilder::TheoryEngineModelBuilder(Env& env) : EnvObj(env) {}
void TheoryEngineModelBuilder::Assigner::initialize(
TypeNode tn, TypeEnumeratorProperties* tep, const std::vector<Node>& aes)
#include <unordered_map>
#include <unordered_set>
+#include "smt/env_obj.h"
#include "theory/theory_model.h"
namespace cvc5 {
* this will set up the data structures in TheoryModel to represent
* a model for the current set of assertions.
*/
-class TheoryEngineModelBuilder
+class TheoryEngineModelBuilder : protected EnvObj
{
typedef std::unordered_map<Node, Node> NodeMap;
typedef std::unordered_set<Node> NodeSet;
Node v,
std::map<Node, bool>& visited);
//---------------------------------end for debugging finite model finding
- /** Reference to the env */
- Env& d_env;
-
}; /* class TheoryEngineModelBuilder */
} // namespace theory
namespace theory {
TheoryState::TheoryState(Env& env, Valuation val)
- : d_env(env),
+ : EnvObj(env),
d_valuation(val),
d_ee(nullptr),
d_conflict(d_env.getContext(), false)
#include "context/cdo.h"
#include "expr/node.h"
#include "smt/env.h"
+#include "smt/env_obj.h"
#include "theory/valuation.h"
namespace cvc5 {
class EqualityEngine;
}
-class TheoryState
+class TheoryState : protected EnvObj
{
public:
TheoryState(Env& env,
Valuation& getValuation();
protected:
- /** Reference to the environment. */
- Env& d_env;
/**
* The valuation proxy for the Theory to communicate back with the
* theory engine (and other theories).