CBMC
satcheck_minisat2_baset< T > Class Template Reference

#include <satcheck_minisat2.h>

+ Inheritance diagram for satcheck_minisat2_baset< T >:
+ Collaboration diagram for satcheck_minisat2_baset< T >:

Public Member Functions

 satcheck_minisat2_baset (message_handlert &message_handler)
 
 ~satcheck_minisat2_baset () override
 A default destructor defined in the .cpp is used to ensure the unique_ptr to the solver is correctly destroyed. More...
 
tvt l_get (literalt a) const override final
 
void lcnf (const bvt &bv) override final
 
void set_assignment (literalt a, bool value) override
 
void set_polarity (literalt a, bool value)
 
void interrupt ()
 
void clear_interrupt ()
 
bool is_in_conflict (literalt a) const override
 Returns true if an assumption is in the final conflict. More...
 
bool has_assumptions () const override final
 
bool has_is_in_conflict () const override final
 
void set_time_limit_seconds (uint32_t lim) override
 
- Public Member Functions inherited from cnf_solvert
 cnf_solvert (message_handlert &message_handler)
 
virtual size_t no_clauses () const override
 
- Public Member Functions inherited from cnft
 cnft (message_handlert &message_handler)
 
virtual ~cnft ()
 
virtual literalt land (literalt a, literalt b) override
 
virtual literalt lor (literalt a, literalt b) override
 
virtual literalt land (const bvt &bv) override
 Tseitin encoding of conjunction between multiple literals. More...
 
virtual literalt lor (const bvt &bv) override
 Tseitin encoding of disjunction between multiple literals. More...
 
virtual literalt lxor (const bvt &bv) override
 Tseitin encoding of XOR between multiple literals. More...
 
virtual literalt lxor (literalt a, literalt b) override
 
virtual literalt lnand (literalt a, literalt b) override
 
virtual literalt lnor (literalt a, literalt b) override
 
virtual literalt lequal (literalt a, literalt b) override
 
virtual literalt limplies (literalt a, literalt b) override
 
virtual literalt lselect (literalt a, literalt b, literalt c) override
 
virtual literalt new_variable () override
 Generate a new variable and return it as a literal. More...
 
bvt new_variables (std::size_t width) override
 Generate a vector of new variables. More...
 
virtual size_t no_variables () const override
 
virtual void set_no_variables (size_t no)
 
- Public Member Functions inherited from propt
 propt (message_handlert &message_handler)
 
virtual ~propt ()
 
virtual void set_equal (literalt a, literalt b)
 asserts a==b in the propositional formula More...
 
virtual void l_set_to (literalt a, bool value)
 
void l_set_to_true (literalt a)
 
void l_set_to_false (literalt a)
 
void lcnf (literalt l0, literalt l1)
 
void lcnf (literalt l0, literalt l1, literalt l2)
 
void lcnf (literalt l0, literalt l1, literalt l2, literalt l3)
 
virtual bool has_set_to () const
 
virtual bool cnf_handled_well () const
 
virtual void set_variable_name (literalt, const irep_idt &)
 
virtual std::string solver_text () const =0
 
resultt prop_solve ()
 
resultt prop_solve (const bvt &assumptions)
 
virtual void set_frozen (literalt)
 
std::size_t get_number_of_solver_calls () const
 

Protected Member Functions

resultt do_prop_solve (const bvt &) override
 
void add_variables ()
 
- Protected Member Functions inherited from cnft
void gate_and (literalt a, literalt b, literalt o)
 Tseitin encoding of conjunction of two literals. More...
 
void gate_or (literalt a, literalt b, literalt o)
 Tseitin encoding of disjunction of two literals. More...
 
void gate_xor (literalt a, literalt b, literalt o)
 Tseitin encoding of XOR of two literals. More...
 
void gate_nand (literalt a, literalt b, literalt o)
 Tseitin encoding of NAND of two literals. More...
 
void gate_nor (literalt a, literalt b, literalt o)
 Tseitin encoding of NOR of two literals. More...
 
void gate_equal (literalt a, literalt b, literalt o)
 Tseitin encoding of equality between two literals. More...
 
void gate_implies (literalt a, literalt b, literalt o)
 Tseitin encoding of implication between two literals. More...
 
bool process_clause (const bvt &bv, bvt &dest) const
 filter 'true' from clause, eliminate duplicates, recognise trivially satisfied clauses More...
 

Protected Attributes

std::unique_ptr< T > solver
 
uint32_t time_limit_seconds
 
- Protected Attributes inherited from cnf_solvert
statust status
 
size_t clause_counter
 
- Protected Attributes inherited from cnft
size_t _no_variables
 
- Protected Attributes inherited from propt
bvt lcnf_bv
 
messaget log
 
std::size_t number_of_solver_calls = 0
 

Additional Inherited Members

- Public Types inherited from propt
enum class  resultt { P_SATISFIABLE , P_UNSATISFIABLE , P_ERROR }
 
- Public Attributes inherited from hardness_collectort
std::unique_ptr< clause_hardness_collectortsolver_hardness
 
- Protected Types inherited from cnf_solvert
enum class  statust { INIT , SAT , UNSAT , ERROR }
 
- Static Protected Member Functions inherited from cnft
static bvt eliminate_duplicates (const bvt &)
 eliminate duplicates from given vector of literals More...
 
static bool is_all (const bvt &bv, literalt l)
 

Detailed Description

template<typename T>
class satcheck_minisat2_baset< T >

Definition at line 33 of file satcheck_minisat2.h.

Constructor & Destructor Documentation

◆ satcheck_minisat2_baset()

template<typename T >
satcheck_minisat2_baset< T >::satcheck_minisat2_baset ( message_handlert message_handler)
explicit

Definition at line 329 of file satcheck_minisat2.cpp.

◆ ~satcheck_minisat2_baset()

template<typename T >
satcheck_minisat2_baset< T >::~satcheck_minisat2_baset ( )
overridedefault

A default destructor defined in the .cpp is used to ensure the unique_ptr to the solver is correctly destroyed.

Member Function Documentation

◆ add_variables()

template<typename T >
void satcheck_minisat2_baset< T >::add_variables
protected

Definition at line 131 of file satcheck_minisat2.cpp.

◆ clear_interrupt()

template<typename T >
void satcheck_minisat2_baset< T >::clear_interrupt

Definition at line 115 of file satcheck_minisat2.cpp.

◆ do_prop_solve()

template<typename T >
propt::resultt satcheck_minisat2_baset< T >::do_prop_solve ( const bvt assumptions)
overrideprotectedvirtual

Implements propt.

Definition at line 207 of file satcheck_minisat2.cpp.

◆ has_assumptions()

template<typename T >
bool satcheck_minisat2_baset< T >::has_assumptions ( ) const
inlinefinaloverridevirtual

Reimplemented from propt.

Definition at line 56 of file satcheck_minisat2.h.

◆ has_is_in_conflict()

template<typename T >
bool satcheck_minisat2_baset< T >::has_is_in_conflict ( ) const
inlinefinaloverridevirtual

Reimplemented from propt.

Definition at line 60 of file satcheck_minisat2.h.

◆ interrupt()

template<typename T >
void satcheck_minisat2_baset< T >::interrupt

Definition at line 109 of file satcheck_minisat2.cpp.

◆ is_in_conflict()

template<typename T >
bool satcheck_minisat2_baset< T >::is_in_conflict ( literalt  l) const
overridevirtual

Returns true if an assumption is in the final conflict.

Note that only literals that are assumptions (see set_assumptions) may be queried.

Returns
true iff the given literal is part of the final conflict

Implements propt.

Definition at line 341 of file satcheck_minisat2.cpp.

◆ l_get()

template<typename T >
tvt satcheck_minisat2_baset< T >::l_get ( literalt  a) const
finaloverridevirtual

Implements propt.

Definition at line 61 of file satcheck_minisat2.cpp.

◆ lcnf()

template<typename T >
void satcheck_minisat2_baset< T >::lcnf ( const bvt bv)
finaloverridevirtual

Implements propt.

Definition at line 138 of file satcheck_minisat2.cpp.

◆ set_assignment()

template<typename T >
void satcheck_minisat2_baset< T >::set_assignment ( literalt  a,
bool  value 
)
overridevirtual

Implements propt.

Definition at line 306 of file satcheck_minisat2.cpp.

◆ set_polarity()

template<typename T >
void satcheck_minisat2_baset< T >::set_polarity ( literalt  a,
bool  value 
)

Definition at line 89 of file satcheck_minisat2.cpp.

◆ set_time_limit_seconds()

template<typename T >
void satcheck_minisat2_baset< T >::set_time_limit_seconds ( uint32_t  lim)
inlineoverridevirtual

Reimplemented from propt.

Definition at line 65 of file satcheck_minisat2.h.

Member Data Documentation

◆ solver

template<typename T >
std::unique_ptr<T> satcheck_minisat2_baset< T >::solver
protected

Definition at line 73 of file satcheck_minisat2.h.

◆ time_limit_seconds

template<typename T >
uint32_t satcheck_minisat2_baset< T >::time_limit_seconds
protected

Definition at line 74 of file satcheck_minisat2.h.


The documentation for this class was generated from the following files: