GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/smt/env_obj.h Lines: 2 2 100.0 %
Date: 2021-09-18 Branches: 0 0 0.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 "cvc5_private.h"
18
19
#ifndef CVC5__SMT__ENV_OBJ_H
20
#define CVC5__SMT__ENV_OBJ_H
21
22
#include <memory>
23
24
#include "expr/node.h"
25
26
namespace cvc5 {
27
28
class Env;
29
class LogicInfo;
30
class NodeManager;
31
class Options;
32
class StatisticsRegistry;
33
34
namespace context {
35
class Context;
36
class UserContext;
37
}  // namespace context
38
39
61
class EnvObj
40
{
41
 protected:
42
  /** Constructor. */
43
  EnvObj(Env& env);
44
  EnvObj() = delete;
45
  /** Destructor.  */
46
1162693
  virtual ~EnvObj() {}
47
48
  /**
49
   * Rewrite a node.
50
   * This is a wrapper around theory::Rewriter::rewrite via Env.
51
   */
52
  Node rewrite(TNode node) const;
53
  /**
54
   * Extended rewrite a node.
55
   * This is a wrapper around theory::Rewriter::extendedRewrite via Env.
56
   */
57
  Node extendedRewrite(TNode node, bool aggr = true) const;
58
59
  /** Get the current logic information. */
60
  const LogicInfo& logicInfo() const;
61
62
  /** Get the options object (const version only) via Env. */
63
  const Options& options() const;
64
65
  /** Get a pointer to the Context via Env. */
66
  context::Context* context() const;
67
68
  /** Get a pointer to the UserContext via Env. */
69
  context::UserContext* userContext() const;
70
71
  /** Get the statistics registry via Env. */
72
  StatisticsRegistry& statisticsRegistry() const;
73
74
  /** The associated environment. */
75
  Env& d_env;
76
};
77
78
}  // namespace cvc5
79
#endif