1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Mudathir Mohamed, Gereon Kremer |
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 inference manager for the theory of bags. |
14 |
|
*/ |
15 |
|
|
16 |
|
#include "cvc5_private.h" |
17 |
|
|
18 |
|
#ifndef CVC5__THEORY__BAGS__INFERENCE_MANAGER_H |
19 |
|
#define CVC5__THEORY__BAGS__INFERENCE_MANAGER_H |
20 |
|
|
21 |
|
#include "theory/inference_manager_buffered.h" |
22 |
|
|
23 |
|
namespace cvc5 { |
24 |
|
namespace theory { |
25 |
|
namespace bags { |
26 |
|
|
27 |
|
class SolverState; |
28 |
|
|
29 |
|
/** Inference manager |
30 |
|
* |
31 |
|
* This class manages inferences produced by the theory of bags. It manages |
32 |
|
* whether inferences are processed as external lemmas on the output channel |
33 |
|
* of theory of bags or internally as literals asserted to the equality engine |
34 |
|
* of theory of bags. The latter literals are referred to as "facts". |
35 |
|
*/ |
36 |
9853 |
class InferenceManager : public InferenceManagerBuffered |
37 |
|
{ |
38 |
|
typedef context::CDHashSet<Node> NodeSet; |
39 |
|
|
40 |
|
public: |
41 |
|
InferenceManager(Theory& t, SolverState& s, ProofNodeManager* pnm); |
42 |
|
|
43 |
|
/** |
44 |
|
* Do pending method. This processes all pending facts, lemmas and pending |
45 |
|
* phase requests based on the policy of this manager. This means that |
46 |
|
* we process the pending facts first and abort if in conflict. Otherwise, we |
47 |
|
* process the pending lemmas and then the pending phase requirements. |
48 |
|
* Notice that we process the pending lemmas even if there were facts. |
49 |
|
*/ |
50 |
|
// TODO issue #78: refactor this with theory of strings |
51 |
|
void doPending(); |
52 |
|
|
53 |
|
private: |
54 |
|
/** constants */ |
55 |
|
Node d_true; |
56 |
|
Node d_false; |
57 |
|
/** |
58 |
|
* Reference to the state object for the theory of bags. We store the |
59 |
|
* (derived) state here, since it has additional methods required in this |
60 |
|
* class. |
61 |
|
*/ |
62 |
|
SolverState& d_state; |
63 |
|
}; |
64 |
|
|
65 |
|
} // namespace bags |
66 |
|
} // namespace theory |
67 |
|
} // namespace cvc5 |
68 |
|
|
69 |
|
#endif /* CVC5__THEORY__BAGS__INFERENCE_MANAGER_H */ |