GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/bags/inference_manager.cpp Lines: 12 15 80.0 %
Date: 2021-05-22 Branches: 13 28 46.4 %

Line Exec Source
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
9459
InferenceManager::InferenceManager(Theory& t,
28
                                   SolverState& s,
29
9459
                                   ProofNodeManager* pnm)
30
9459
    : InferenceManagerBuffered(t, s, pnm, "theory::bags::"), d_state(s)
31
{
32
9459
  d_true = NodeManager::currentNM()->mkConst(true);
33
9459
  d_false = NodeManager::currentNM()->mkConst(false);
34
9459
}
35
36
11992
void InferenceManager::doPending()
37
{
38
11992
  doPendingFacts();
39
11992
  if (d_state.isInConflict())
40
  {
41
    // just clear the pending vectors, nothing else to do
42
    clearPendingLemmas();
43
    clearPendingPhaseRequirements();
44
    return;
45
  }
46
11992
  doPendingLemmas();
47
11992
  doPendingPhaseRequirements();
48
}
49
50
}  // namespace bags
51
}  // namespace theory
52
28191
}  // namespace cvc5