1 /******************************************************************************
2 * Top contributors (to current version):
5 * This file is part of the cvc5 project.
7 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8 * in the top-level source directory and their institutional affiliations.
9 * All rights reserved. See the file COPYING in the top-level source
10 * directory for licensing information.
11 * ****************************************************************************
13 * The base class for everything that nees access to the environment (Env)
14 * instance, which gives access to global utilities available to internal code.
17 #include "smt/env_obj.h"
19 #include "options/options.h"
21 #include "theory/rewriter.h"
25 EnvObj::EnvObj(Env
& env
) : d_env(env
) {}
27 Node
EnvObj::rewrite(TNode node
) const
29 return d_env
.getRewriter()->rewrite(node
);
32 Node
EnvObj::extendedRewrite(TNode node
, bool aggr
) const
34 return d_env
.getRewriter()->extendedRewrite(node
, aggr
);
36 Node
EnvObj::evaluate(TNode n
,
37 const std::vector
<Node
>& args
,
38 const std::vector
<Node
>& vals
,
39 bool useRewriter
) const
41 return d_env
.evaluate(n
, args
, vals
, useRewriter
);
43 Node
EnvObj::evaluate(TNode n
,
44 const std::vector
<Node
>& args
,
45 const std::vector
<Node
>& vals
,
46 const std::unordered_map
<Node
, Node
>& visited
,
47 bool useRewriter
) const
49 return d_env
.evaluate(n
, args
, vals
, visited
, useRewriter
);
52 const Options
& EnvObj::options() const { return d_env
.getOptions(); }
54 context::Context
* EnvObj::context() const { return d_env
.getContext(); }
56 context::UserContext
* EnvObj::userContext() const
58 return d_env
.getUserContext();
61 const LogicInfo
& EnvObj::logicInfo() const { return d_env
.getLogicInfo(); }
63 ResourceManager
* EnvObj::resourceManager() const
65 return d_env
.getResourceManager();
68 StatisticsRegistry
& EnvObj::statisticsRegistry() const
70 return d_env
.getStatisticsRegistry();
73 bool EnvObj::isOutputOn(OutputTag tag
) const { return d_env
.isOutputOn(tag
); }
75 std::ostream
& EnvObj::output(OutputTag tag
) const { return d_env
.output(tag
); }
77 bool EnvObj::isVerboseOn(int64_t level
) const
79 return d_env
.isVerboseOn(level
);
82 std::ostream
& EnvObj::verbose(int64_t level
) const
84 return d_env
.verbose(level
);
87 std::ostream
& EnvObj::warning() const { return verbose(0); }