1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Gereon Kremer, Andrew Reynolds, Tim King |
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 |
|
* Common data shared by multiple checks. |
14 |
|
*/ |
15 |
|
|
16 |
|
#ifndef CVC5__THEORY__ARITH__NL__EXT__SHARED_CHECK_DATA_H |
17 |
|
#define CVC5__THEORY__ARITH__NL__EXT__SHARED_CHECK_DATA_H |
18 |
|
|
19 |
|
#include <vector> |
20 |
|
|
21 |
|
#include "expr/node.h" |
22 |
|
#include "proof/proof_set.h" |
23 |
|
#include "theory/arith/nl/ext/monomial.h" |
24 |
|
|
25 |
|
namespace cvc5 { |
26 |
|
|
27 |
|
class CDProof; |
28 |
|
|
29 |
|
namespace theory { |
30 |
|
namespace arith { |
31 |
|
|
32 |
|
class InferenceManager; |
33 |
|
|
34 |
|
namespace nl { |
35 |
|
|
36 |
|
class NlModel; |
37 |
|
|
38 |
5134 |
struct ExtState |
39 |
|
{ |
40 |
|
ExtState(InferenceManager& im, |
41 |
|
NlModel& model, |
42 |
|
ProofNodeManager* pnm, |
43 |
|
context::UserContext* c); |
44 |
|
|
45 |
|
void init(const std::vector<Node>& xts); |
46 |
|
|
47 |
|
/** |
48 |
|
* Checks whether proofs are enabled. |
49 |
|
*/ |
50 |
|
bool isProofEnabled() const; |
51 |
|
/** |
52 |
|
* Creates and returns a new LazyCDProof that can be used to prove some lemma. |
53 |
|
*/ |
54 |
|
CDProof* getProof(); |
55 |
|
|
56 |
|
Node d_false; |
57 |
|
Node d_true; |
58 |
|
Node d_zero; |
59 |
|
Node d_one; |
60 |
|
Node d_neg_one; |
61 |
|
|
62 |
|
/** The inference manager that we push conflicts and lemmas to. */ |
63 |
|
InferenceManager& d_im; |
64 |
|
/** Reference to the non-linear model object */ |
65 |
|
NlModel& d_model; |
66 |
|
/** |
67 |
|
* Pointer to the current proof node manager. nullptr, if proofs are |
68 |
|
* disabled. |
69 |
|
*/ |
70 |
|
ProofNodeManager* d_pnm; |
71 |
|
/** The user context. */ |
72 |
|
context::UserContext* d_ctx; |
73 |
|
/** |
74 |
|
* A CDProofSet that hands out CDProof objects for lemmas. |
75 |
|
*/ |
76 |
|
std::unique_ptr<CDProofSet<CDProof>> d_proof; |
77 |
|
|
78 |
|
// information about monomials |
79 |
|
std::vector<Node> d_ms; |
80 |
|
std::vector<Node> d_ms_vars; |
81 |
|
std::vector<Node> d_mterms; |
82 |
|
|
83 |
|
/** Context-independent database of monomial information */ |
84 |
|
MonomialDb d_mdb; |
85 |
|
|
86 |
|
// ( x*y, x*z, y ) for each pair of monomials ( x*y, x*z ) with common factors |
87 |
|
std::map<Node, std::map<Node, Node> > d_mono_diff; |
88 |
|
/** the set of monomials we should apply tangent planes to */ |
89 |
|
std::unordered_set<Node> d_tplane_refine; |
90 |
|
}; |
91 |
|
|
92 |
|
} // namespace nl |
93 |
|
} // namespace arith |
94 |
|
} // namespace theory |
95 |
|
} // namespace cvc5 |
96 |
|
|
97 |
|
#endif |