GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/bv/bv_solver_simple.h Lines: 2 3 66.7 %
Date: 2021-05-22 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
 * Simple bit-blast solver that sends bit-blast lemmas directly to MiniSat.
14
 */
15
16
#include "cvc5_private.h"
17
18
#ifndef CVC5__THEORY__BV__BV_SOLVER_SIMPLE_H
19
#define CVC5__THEORY__BV__BV_SOLVER_SIMPLE_H
20
21
#include "theory/bv/bitblast/proof_bitblaster.h"
22
#include "theory/bv/bv_solver.h"
23
#include "theory/bv/proof_checker.h"
24
25
namespace cvc5 {
26
27
class TConvProofGenerator;
28
29
namespace theory {
30
namespace bv {
31
32
/**
33
 * Simple bit-blasting solver that sends bit-blasting lemmas directly to the
34
 * internal MiniSat. It is also ablo to handle atoms of kind
35
 * BITVECTOR_EAGER_ATOM.
36
 *
37
 * Sends lemmas atom <=> bb(atom) to MiniSat on preNotifyFact().
38
 */
39
class BVSolverSimple : public BVSolver
40
{
41
 public:
42
  BVSolverSimple(TheoryState* state,
43
                 TheoryInferenceManager& inferMgr,
44
                 ProofNodeManager* pnm);
45
30
  ~BVSolverSimple() = default;
46
47
592
  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
  std::string identify() const override { return "BVSolverSimple"; };
56
57
  bool collectModelValues(TheoryModel* m,
58
                          const std::set<Node>& termSet) override;
59
60
  /** get the proof checker of this theory */
61
  BVProofRuleChecker* getProofChecker();
62
63
 private:
64
  /**
65
   * Sends a bit-blasting lemma fact <=> d_bitblaster.bbAtom(fact) to the
66
   * inference manager.
67
   */
68
  void addBBLemma(TNode fact);
69
70
  /** Proof generator. */
71
  std::unique_ptr<TConvProofGenerator> d_tcpg;
72
  /** Bit-blaster used to bit-blast atoms/terms. */
73
  std::unique_ptr<BBProof> d_bitblaster;
74
  /** Proof rule checker */
75
  BVProofRuleChecker d_checker;
76
};
77
78
}  // namespace bv
79
}  // namespace theory
80
}  // namespace cvc5
81
82
#endif