GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/bv/bv_solver_bitblast_internal.h Lines: 3 4 75.0 %
Date: 2021-09-10 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(Env& env,
41
                           TheoryState* state,
42
                           TheoryInferenceManager& inferMgr,
43
                           ProofNodeManager* pnm);
44
7528
  ~BVSolverBitblastInternal() = default;
45
46
3764
  bool needsEqualityEngine(EeSetupInfo& esi) override { return true; }
47
48
190141
  void preRegisterTerm(TNode n) override {}
49
50
  bool preNotifyFact(TNode atom,
51
                     bool pol,
52
                     TNode fact,
53
                     bool isPrereg,
54
                     bool isInternal) override;
55
56
  TrustNode explain(TNode n) override;
57
58
  std::string identify() const override { return "BVSolverBitblastInternal"; };
59
60
  bool collectModelValues(TheoryModel* m,
61
                          const std::set<Node>& termSet) override;
62
63
  Node getValue(TNode node, bool initialize) override;
64
65
  /** get the proof checker of this theory */
66
  BVProofRuleChecker* getProofChecker();
67
68
 private:
69
  /**
70
   * Sends a bit-blasting lemma fact <=> d_bitblaster.bbAtom(fact) to the
71
   * inference manager.
72
   */
73
  void addBBLemma(TNode fact);
74
75
  /** Proof node manager. */
76
  ProofNodeManager* d_pnm;
77
  /** Bit-blaster used to bit-blast atoms/terms. */
78
  std::unique_ptr<BBProof> d_bitblaster;
79
  /** Proof rule checker */
80
  BVProofRuleChecker d_checker;
81
};
82
83
}  // namespace bv
84
}  // namespace theory
85
}  // namespace cvc5
86
87
#endif