GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/bv/bv_solver_bitblast_internal.h Lines: 3 4 75.0 %
Date: 2021-08-06 Branches: 0 2 0.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Mathias Preiner, Haniel Barbosa, Andrew Reynolds
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
 * Bit-blast solver that sends bit-blast lemmas directly to the internal
14
 * MiniSat.
15
 */
16
17
#include "cvc5_private.h"
18
19
#ifndef CVC5__THEORY__BV__BV_SOLVER_BITBLAST_INTERNAL_H
20
#define CVC5__THEORY__BV__BV_SOLVER_BITBLAST_INTERNAL_H
21
22
#include "theory/bv/bitblast/proof_bitblaster.h"
23
#include "theory/bv/bv_solver.h"
24
#include "theory/bv/proof_checker.h"
25
26
namespace cvc5 {
27
namespace theory {
28
namespace bv {
29
30
/**
31
 * Bit-blasting solver that sends bit-blasting lemmas directly to the
32
 * internal MiniSat. It is also ablo to handle atoms of kind
33
 * BITVECTOR_EAGER_ATOM.
34
 *
35
 * Sends lemmas atom <=> bb(atom) to MiniSat on preNotifyFact().
36
 */
37
class BVSolverBitblastInternal : public BVSolver
38
{
39
 public:
40
  BVSolverBitblastInternal(TheoryState* state,
41
                           TheoryInferenceManager& inferMgr,
42
                           ProofNodeManager* pnm);
43
7502
  ~BVSolverBitblastInternal() = default;
44
45
3751
  bool needsEqualityEngine(EeSetupInfo& esi) override { return true; }
46
47
190096
  void preRegisterTerm(TNode n) override {}
48
49
  bool preNotifyFact(TNode atom,
50
                     bool pol,
51
                     TNode fact,
52
                     bool isPrereg,
53
                     bool isInternal) override;
54
55
  TrustNode explain(TNode n) override;
56
57
  std::string identify() const override { return "BVSolverBitblastInternal"; };
58
59
  bool collectModelValues(TheoryModel* m,
60
                          const std::set<Node>& termSet) override;
61
62
  Node getValue(TNode node, bool initialize) override;
63
64
  /** get the proof checker of this theory */
65
  BVProofRuleChecker* getProofChecker();
66
67
 private:
68
  /**
69
   * Sends a bit-blasting lemma fact <=> d_bitblaster.bbAtom(fact) to the
70
   * inference manager.
71
   */
72
  void addBBLemma(TNode fact);
73
74
  /** Proof node manager. */
75
  ProofNodeManager* d_pnm;
76
  /** Bit-blaster used to bit-blast atoms/terms. */
77
  std::unique_ptr<BBProof> d_bitblaster;
78
  /** Proof rule checker */
79
  BVProofRuleChecker d_checker;
80
};
81
82
}  // namespace bv
83
}  // namespace theory
84
}  // namespace cvc5
85
86
#endif