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 "smt/env.h" |
24 |
|
#include "theory/arith/nl/ext/monomial.h" |
25 |
|
|
26 |
|
namespace cvc5 { |
27 |
|
|
28 |
|
class CDProof; |
29 |
|
|
30 |
|
namespace theory { |
31 |
|
namespace arith { |
32 |
|
|
33 |
|
class InferenceManager; |
34 |
|
|
35 |
|
namespace nl { |
36 |
|
|
37 |
|
class NlModel; |
38 |
|
|
39 |
5206 |
struct ExtState |
40 |
|
{ |
41 |
|
ExtState(InferenceManager& im, NlModel& model, Env& env); |
42 |
|
|
43 |
|
void init(const std::vector<Node>& xts); |
44 |
|
|
45 |
|
/** |
46 |
|
* Checks whether proofs are enabled. |
47 |
|
*/ |
48 |
|
bool isProofEnabled() const; |
49 |
|
/** |
50 |
|
* Creates and returns a new LazyCDProof that can be used to prove some lemma. |
51 |
|
*/ |
52 |
|
CDProof* getProof(); |
53 |
|
|
54 |
|
Node d_false; |
55 |
|
Node d_true; |
56 |
|
Node d_zero; |
57 |
|
Node d_one; |
58 |
|
Node d_neg_one; |
59 |
|
|
60 |
|
/** The inference manager that we push conflicts and lemmas to. */ |
61 |
|
InferenceManager& d_im; |
62 |
|
/** Reference to the non-linear model object */ |
63 |
|
NlModel& d_model; |
64 |
|
/** Reference to the environment */ |
65 |
|
Env& d_env; |
66 |
|
/** |
67 |
|
* A CDProofSet that hands out CDProof objects for lemmas. |
68 |
|
*/ |
69 |
|
std::unique_ptr<CDProofSet<CDProof>> d_proof; |
70 |
|
|
71 |
|
// information about monomials |
72 |
|
std::vector<Node> d_ms; |
73 |
|
std::vector<Node> d_ms_vars; |
74 |
|
std::vector<Node> d_mterms; |
75 |
|
|
76 |
|
/** Context-independent database of monomial information */ |
77 |
|
MonomialDb d_mdb; |
78 |
|
|
79 |
|
// ( x*y, x*z, y ) for each pair of monomials ( x*y, x*z ) with common factors |
80 |
|
std::map<Node, std::map<Node, Node> > d_mono_diff; |
81 |
|
/** the set of monomials we should apply tangent planes to */ |
82 |
|
std::unordered_set<Node> d_tplane_refine; |
83 |
|
}; |
84 |
|
|
85 |
|
} // namespace nl |
86 |
|
} // namespace arith |
87 |
|
} // namespace theory |
88 |
|
} // namespace cvc5 |
89 |
|
|
90 |
|
#endif |