GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/smt/env_obj.h Lines: 2 2 100.0 %
Date: 2021-09-10 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
33
namespace context {
34
class Context;
35
class UserContext;
36
}  // namespace context
37
38
61
class EnvObj
39
{
40
 protected:
41
  /** Constructor. */
42
  EnvObj(Env& env);
43
  EnvObj() = delete;
44
  /** Destructor.  */
45
1007641
  virtual ~EnvObj() {}
46
47
  /**
48
   * Rewrite a node.
49
   * This is a wrapper around theory::Rewriter::rewrite via Env.
50
   */
51
  Node rewrite(TNode node) const;
52
  /**
53
   * Extended rewrite a node.
54
   * This is a wrapper around theory::Rewriter::extendedRewrite via Env.
55
   */
56
  Node extendedRewrite(TNode node, bool aggr = true) const;
57
58
  /** Get the current logic information. */
59
  const LogicInfo& logicInfo() const;
60
61
  /** Get the options object (const version only) via Env. */
62
  const Options& options() const;
63
64
  /** Get a pointer to the Context via Env. */
65
  context::Context* context() const;
66
67
  /** Get a pointer to the UserContext via Env. */
68
  context::UserContext* userContext() const;
69
70
  /** The associated environment. */
71
  Env& d_env;
72
};
73
74
}  // namespace cvc5
75
#endif