CBMC
satcheck_minisat.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
9 
10 #ifndef CPROVER_SOLVERS_SAT_SATCHECK_MINISAT_H
11 #define CPROVER_SOLVERS_SAT_SATCHECK_MINISAT_H
12 
13 #include <vector>
14 
15 #include "cnf.h"
16 #include "resolution_proof.h"
17 
19 {
20 public:
22  {
23  }
24 
25  virtual ~satcheck_minisat1_baset();
26 
27  std::string solver_text() const override;
28  tvt l_get(literalt a) const override;
29 
30  void lcnf(const bvt &bv) final;
31 
32  void set_assignment(literalt a, bool value) override;
33 
34  // features
35  bool has_assumptions() const override
36  {
37  return true;
38  }
39  bool has_is_in_conflict() const override
40  {
41  return true;
42  }
43 
44  bool is_in_conflict(literalt l) const override;
45 
46 protected:
47  resultt do_prop_solve(const bvt &assumptions) override;
48 
49  // NOLINTNEXTLINE(readability/identifiers)
50  class Solver *solver;
51  void add_variables();
53 };
54 
56 {
57 public:
59 };
60 
62 {
63 public:
66 
67  std::string solver_text() const override;
69  // void set_partition_id(unsigned p_id);
70 
71 protected:
72  // NOLINTNEXTLINE(readability/identifiers)
73  class Proof *proof;
75 };
76 
78 {
79 public:
82 
83  std::string solver_text() const override;
84 
85  bool has_in_core() const
86  {
87  return true;
88  }
89 
90  bool is_in_core(literalt l) const
91  {
92  PRECONDITION(l.var_no() < in_core.size());
93  return in_core[l.var_no()];
94  }
95 
96 protected:
97  std::vector<bool> in_core;
98 
99  resultt do_prop_solve(const bvt &assumptions) override;
100 };
101 #endif // CPROVER_SOLVERS_SAT_SATCHECK_MINISAT_H
var_not var_no() const
Definition: literal.h:83
resultt
Definition: prop.h:101
bool has_assumptions() const override
resultt do_prop_solve(const bvt &assumptions) override
void set_assignment(literalt a, bool value) override
std::string solver_text() const override
bool is_in_conflict(literalt l) const override
Returns true if an assumption is in the final conflict.
void lcnf(const bvt &bv) final
bool has_is_in_conflict() const override
tvt l_get(literalt a) const override
std::string solver_text() const override
resultt do_prop_solve(const bvt &assumptions) override
std::vector< bool > in_core
bool is_in_core(literalt l) const
std::string solver_text() const override
class minisat_prooft * minisat_proof
simple_prooft & get_resolution_proof()
Definition: threeval.h:20
CNF Generation, via Tseitin.
std::vector< literalt > bvt
Definition: literal.h:201
resultt
The result of goto verifying.
Definition: properties.h:45
#define PRECONDITION(CONDITION)
Definition: invariant.h:463