GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/smt/env_obj.cpp Lines: 17 17 100.0 %
Date: 2021-09-29 Branches: 7 14 50.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Aina Niemetz
4
 *
5
 * This file is part of the cvc5 project.
6
 *
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
 * ****************************************************************************
12
 *
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.
15
 */
16
17
#include "smt/env_obj.h"
18
19
#include "options/options.h"
20
#include "smt/env.h"
21
#include "theory/rewriter.h"
22
23
namespace cvc5 {
24
25
783071
EnvObj::EnvObj(Env& env) : d_env(env) {}
26
27
2189783
Node EnvObj::rewrite(TNode node) const
28
{
29
2189783
  return d_env.getRewriter()->rewrite(node);
30
}
31
32
180080
Node EnvObj::extendedRewrite(TNode node, bool aggr) const
33
{
34
180080
  return d_env.getRewriter()->extendedRewrite(node, aggr);
35
}
36
116795
Node EnvObj::evaluate(TNode n,
37
                      const std::vector<Node>& args,
38
                      const std::vector<Node>& vals,
39
                      bool useRewriter) const
40
{
41
116795
  return d_env.evaluate(n, args, vals, useRewriter);
42
}
43
16618
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
48
{
49
16618
  return d_env.evaluate(n, args, vals, visited, useRewriter);
50
}
51
52
3677133
const LogicInfo& EnvObj::logicInfo() const { return d_env.getLogicInfo(); }
53
54
22316209
const Options& EnvObj::options() const { return d_env.getOptions(); }
55
56
22575726
context::Context* EnvObj::context() const { return d_env.getContext(); }
57
58
520392
context::UserContext* EnvObj::userContext() const
59
{
60
520392
  return d_env.getUserContext();
61
}
62
63
733871
StatisticsRegistry& EnvObj::statisticsRegistry() const
64
{
65
733871
  return d_env.getStatisticsRegistry();
66
}
67
68
22746
}  // namespace cvc5