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 |
|
class EnvObj |
39 |
|
{ |
40 |
|
protected: |
41 |
|
/** Constructor. */ |
42 |
|
EnvObj(Env& env); |
43 |
|
EnvObj() = delete; |
44 |
|
/** Destructor. */ |
45 |
711593 |
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); |
52 |
|
|
53 |
|
/** Get the current logic information. */ |
54 |
|
const LogicInfo& logicInfo() const; |
55 |
|
|
56 |
|
/** Get the options object (const version only) via Env. */ |
57 |
|
const Options& options() const; |
58 |
|
|
59 |
|
/** Get a pointer to the Context via Env. */ |
60 |
|
context::Context* context() const; |
61 |
|
|
62 |
|
/** Get a pointer to the UserContext via Env. */ |
63 |
|
context::UserContext* userContext() const; |
64 |
|
|
65 |
|
/** The associated environment. */ |
66 |
|
Env& d_env; |
67 |
|
}; |
68 |
|
|
69 |
|
} // namespace cvc5 |
70 |
|
#endif |