1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Mudathir Mohamed, Gereon Kremer, 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 |
|
* Implementation of the inference manager for the theory of bags. |
14 |
|
*/ |
15 |
|
|
16 |
|
#include "theory/bags/inference_manager.h" |
17 |
|
|
18 |
|
#include "theory/bags/solver_state.h" |
19 |
|
|
20 |
|
using namespace std; |
21 |
|
using namespace cvc5::kind; |
22 |
|
|
23 |
|
namespace cvc5 { |
24 |
|
namespace theory { |
25 |
|
namespace bags { |
26 |
|
|
27 |
9940 |
InferenceManager::InferenceManager(Env& env, |
28 |
|
Theory& t, |
29 |
|
SolverState& s, |
30 |
9940 |
ProofNodeManager* pnm) |
31 |
9940 |
: InferenceManagerBuffered(env, t, s, pnm, "theory::bags::"), d_state(s) |
32 |
|
{ |
33 |
9940 |
d_true = NodeManager::currentNM()->mkConst(true); |
34 |
9940 |
d_false = NodeManager::currentNM()->mkConst(false); |
35 |
9940 |
} |
36 |
|
|
37 |
15481 |
void InferenceManager::doPending() |
38 |
|
{ |
39 |
15481 |
doPendingFacts(); |
40 |
15481 |
if (d_state.isInConflict()) |
41 |
|
{ |
42 |
|
// just clear the pending vectors, nothing else to do |
43 |
|
clearPendingLemmas(); |
44 |
|
clearPendingPhaseRequirements(); |
45 |
|
return; |
46 |
|
} |
47 |
15481 |
doPendingLemmas(); |
48 |
15481 |
doPendingPhaseRequirements(); |
49 |
|
} |
50 |
|
|
51 |
|
} // namespace bags |
52 |
|
} // namespace theory |
53 |
29574 |
} // namespace cvc5 |