smt/dump_manager.h
smt/env.cpp
smt/env.h
+ smt/env_obj.cpp
+ smt/env_obj.h
smt/expand_definitions.cpp
smt/expand_definitions.h
smt/listeners.cpp
* internal code
*/
-#include "cvc5_public.h"
+#include "cvc5_private.h"
#ifndef CVC5__SMT__ENV_H
#define CVC5__SMT__ENV_H
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The base class for everything that nees access to the environment (Env)
+ * instance, which gives access to global utilities available to internal code.
+ */
+
+#include "smt/env_obj.h"
+
+#include "options/options.h"
+#include "smt/env.h"
+#include "theory/rewriter.h"
+
+namespace cvc5 {
+
+EnvObj::EnvObj(Env& env) : d_env(env) {}
+
+Node EnvObj::rewrite(TNode node) { return d_env.getRewriter()->rewrite(node); }
+
+} // namespace cvc5
--- /dev/null
+/******************************************************************************
+ * Top contributors (to current version):
+ * Aina Niemetz
+ *
+ * This file is part of the cvc5 project.
+ *
+ * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
+ * in the top-level source directory and their institutional affiliations.
+ * All rights reserved. See the file COPYING in the top-level source
+ * directory for licensing information.
+ * ****************************************************************************
+ *
+ * The base class for everything that nees access to the environment (Env)
+ * instance, which gives access to global utilities available to internal code.
+ */
+
+#include "cvc5_private.h"
+
+#ifndef CVC5__SMT__ENV_OBJ_H
+#define CVC5__SMT__ENV_OBJ_H
+
+#include <memory>
+
+#include "expr/node.h"
+
+namespace cvc5 {
+
+class Env;
+class NodeManager;
+class Options;
+
+class EnvObj
+{
+ public:
+ /** Constructor. */
+ EnvObj(Env& env);
+ EnvObj() = delete;
+ /** Destructor. */
+ ~EnvObj() {}
+
+ /**
+ * Rewrite a node.
+ * This is a wrapper around theory::Rewriter::rewrite via Env.
+ */
+ Node rewrite(TNode node);
+
+ protected:
+ /** The associated environment. */
+ Env& d_env;
+};
+
+} // namespace cvc5
+#endif