1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Andrew Reynolds, Mathias Preiner |
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 |
|
* Quantifiers representative bound utility. |
14 |
|
*/ |
15 |
|
|
16 |
|
#include "cvc5_private.h" |
17 |
|
|
18 |
|
#ifndef CVC5__THEORY__QUANTIFIERS__QUANT_REP_BOUND_EXT_H |
19 |
|
#define CVC5__THEORY__QUANTIFIERS__QUANT_REP_BOUND_EXT_H |
20 |
|
|
21 |
|
#include <map> |
22 |
|
|
23 |
|
#include "expr/node.h" |
24 |
|
#include "theory/rep_set.h" |
25 |
|
#include "theory/theory_model.h" |
26 |
|
|
27 |
|
namespace cvc5 { |
28 |
|
namespace theory { |
29 |
|
namespace quantifiers { |
30 |
|
|
31 |
|
class QuantifiersBoundInference; |
32 |
|
class FirstOrderModel; |
33 |
|
|
34 |
|
/** Quantifiers representative bound |
35 |
|
* |
36 |
|
* This class is used for computing (finite) bounds for the domain of a |
37 |
|
* quantifier in the context of a RepSetIterator (see theory/rep_set.h) |
38 |
|
* based on modules from the quantifiers engine. |
39 |
|
*/ |
40 |
|
class QRepBoundExt : public RepBoundExt |
41 |
|
{ |
42 |
|
public: |
43 |
|
QRepBoundExt(QuantifiersBoundInference& qbi, FirstOrderModel* m); |
44 |
4859 |
virtual ~QRepBoundExt() {} |
45 |
|
/** set bound */ |
46 |
|
RsiEnumType setBound(Node owner, |
47 |
|
unsigned i, |
48 |
|
std::vector<Node>& elements) override; |
49 |
|
/** reset index */ |
50 |
|
bool resetIndex(RepSetIterator* rsi, |
51 |
|
Node owner, |
52 |
|
unsigned i, |
53 |
|
bool initial, |
54 |
|
std::vector<Node>& elements) override; |
55 |
|
/** initialize representative set for type */ |
56 |
|
bool initializeRepresentativesForType(TypeNode tn) override; |
57 |
|
/** get variable order */ |
58 |
|
bool getVariableOrder(Node owner, std::vector<unsigned>& varOrder) override; |
59 |
|
|
60 |
|
private: |
61 |
|
/** Reference to the quantifiers bound inference */ |
62 |
|
QuantifiersBoundInference& d_qbi; |
63 |
|
/** Pointer to the quantifiers model */ |
64 |
|
FirstOrderModel* d_model; |
65 |
|
/** indices that are bound integer enumeration */ |
66 |
|
std::map<unsigned, bool> d_bound_int; |
67 |
|
}; |
68 |
|
|
69 |
|
} // namespace quantifiers |
70 |
|
} // namespace theory |
71 |
|
} // namespace cvc5 |
72 |
|
|
73 |
|
#endif /* CVC5__FIRST_ORDER_MODEL_H */ |