CBMC
qbf_squolem_coret Class Reference

#include <qbf_squolem_core.h>

+ Inheritance diagram for qbf_squolem_coret:
+ Collaboration diagram for qbf_squolem_coret:

Public Member Functions

 qbf_squolem_coret ()
 
 ~qbf_squolem_coret () override
 
std::string solver_text () const override
 
resultt prop_solve () override
 
tvt l_get (literalt a) const override
 
bool is_in_core (literalt l) const override
 
void set_debug_filename (const std::string &str)
 
void lcnf (const bvt &bv) override
 
void add_quantifier (const quantifiert &quantifier) override
 
void set_quantifier (const quantifiert::typet type, const literalt l) override
 
void set_no_variables (size_t no) override
 
virtual size_t no_clauses () const
 
modeltypet m_get (literalt a) const override
 
void write_qdimacs_cnf (std::ostream &out) override
 
void reset (void)
 
const exprt f_get (literalt l) override
 
- Public Member Functions inherited from qdimacs_coret
 qdimacs_coret (message_handlert &message_handler)
 
void simplify_extractbits (exprt &expr) const
 
- Public Member Functions inherited from qdimacs_cnft
 qdimacs_cnft (message_handlert &message_handler)
 
std::string solver_text () const override
 
void add_quantifier (const quantifiert::typet type, const literalt l)
 
void add_existential_quantifier (const literalt l)
 
void add_universal_quantifier (const literalt l)
 
bool is_quantified (const literalt l) const
 
bool find_quantifier (const literalt l, quantifiert &q) const
 
virtual void set_quantifier (const quantifiert::typet type, const literalt l)
 
void copy_to (qdimacs_cnft &cnf) const
 
bool operator== (const qdimacs_cnft &other) const
 
size_t hash () const
 
- Public Member Functions inherited from dimacs_cnft
 dimacs_cnft (message_handlert &)
 
virtual ~dimacs_cnft ()
 
virtual void write_dimacs_cnf (std::ostream &out) const
 
std::string solver_text () const override
 
void set_assignment (literalt a, bool value) override
 
bool is_in_conflict (literalt l) const override
 Returns true if an assumption is in the final conflict. More...
 
- Public Member Functions inherited from cnf_clause_listt
 cnf_clause_listt (message_handlert &message_handler)
 
virtual ~cnf_clause_listt ()
 
void lcnf (const bvt &bv) override
 
tvt l_get (literalt) const override
 
size_t no_clauses () const override
 
clausestget_clauses ()
 
void copy_to (cnft &cnf) const
 
size_t hash () const
 
- 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
 
- 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 bool has_assumptions () const
 
virtual void set_variable_name (literalt, const irep_idt &)
 
resultt prop_solve ()
 
resultt prop_solve (const bvt &assumptions)
 
virtual bool has_is_in_conflict () const
 
virtual void set_frozen (literalt)
 
virtual void set_time_limit_seconds (uint32_t)
 
std::size_t get_number_of_solver_calls () const
 

Protected Attributes

Squolem2 * squolem
 
bool early_decision
 
- Protected Attributes inherited from dimacs_cnft
bool break_lines
 
- Protected Attributes inherited from cnf_clause_listt
clausest clauses
 
- 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
 

Private Types

typedef std::unordered_map< unsigned, exprtfunction_cachet
 

Private Member Functions

const exprt f_get_cnf (WitnessStack *wsp)
 
const exprt f_get_dnf (WitnessStack *wsp)
 
void setup (void)
 

Private Attributes

function_cachet function_cache
 

Additional Inherited Members

- Public Types inherited from qdimacs_coret
enum  modeltypet { M_TRUE , M_FALSE , M_DONTCARE , M_COMPLEX }
 
typedef std::pair< exprt, unsigned > symbol_mapt
 
typedef std::map< unsigned, symbol_maptvariable_mapt
 
- Public Types inherited from qdimacs_cnft
typedef std::vector< quantifiertquantifierst
 
- Public Types inherited from cnf_clause_listt
typedef std::list< bvtclausest
 
- Public Types inherited from propt
enum class  resultt { P_SATISFIABLE , P_UNSATISFIABLE , P_ERROR }
 
- Static Public Member Functions inherited from dimacs_cnft
static void write_dimacs_clause (const bvt &, std::ostream &, bool break_lines)
 
- Static Public Member Functions inherited from cnf_clause_listt
static size_t hash_clause (const bvt &bv)
 
- Public Attributes inherited from qdimacs_coret
variable_mapt variable_map
 
- Public Attributes inherited from qdimacs_cnft
quantifierst quantifiers
 
- Protected Member Functions inherited from qdimacs_cnft
void write_prefix (std::ostream &out) const
 
- Protected Member Functions inherited from dimacs_cnft
void write_problem_line (std::ostream &out) const
 
void write_clauses (std::ostream &out) const
 
- Protected Member Functions inherited from cnf_clause_listt
resultt do_prop_solve (const bvt &) override
 
- 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...
 
- 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

Definition at line 19 of file qbf_squolem_core.h.

Member Typedef Documentation

◆ function_cachet

typedef std::unordered_map<unsigned, exprt> qbf_squolem_coret::function_cachet
private

Definition at line 52 of file qbf_squolem_core.h.

Constructor & Destructor Documentation

◆ qbf_squolem_coret()

qbf_squolem_coret::qbf_squolem_coret ( )

Definition at line 21 of file qbf_squolem_core.cpp.

◆ ~qbf_squolem_coret()

qbf_squolem_coret::~qbf_squolem_coret ( )
override

Definition at line 55 of file qbf_squolem_core.cpp.

Member Function Documentation

◆ add_quantifier()

void qbf_squolem_coret::add_quantifier ( const quantifiert quantifier)
overridevirtual

Reimplemented from qdimacs_cnft.

Definition at line 155 of file qbf_squolem_core.cpp.

◆ f_get()

const exprt qbf_squolem_coret::f_get ( literalt  l)
overridevirtual

Implements qdimacs_coret.

Definition at line 188 of file qbf_squolem_core.cpp.

◆ f_get_cnf()

const exprt qbf_squolem_coret::f_get_cnf ( WitnessStack *  wsp)
private

Definition at line 246 of file qbf_squolem_core.cpp.

◆ f_get_dnf()

const exprt qbf_squolem_coret::f_get_dnf ( WitnessStack *  wsp)
private

Definition at line 288 of file qbf_squolem_core.cpp.

◆ is_in_core()

bool qbf_squolem_coret::is_in_core ( literalt  l) const
overridevirtual

Implements qdimacs_coret.

Definition at line 109 of file qbf_squolem_core.cpp.

◆ l_get()

tvt qbf_squolem_coret::l_get ( literalt  a) const
overridevirtual

Implements qdimacs_coret.

Definition at line 62 of file qbf_squolem_core.cpp.

◆ lcnf()

void qbf_squolem_coret::lcnf ( const bvt bv)
overridevirtual

Implements propt.

Definition at line 126 of file qbf_squolem_core.cpp.

◆ m_get()

qbf_squolem_coret::modeltypet qbf_squolem_coret::m_get ( literalt  a) const
overridevirtual

Implements qdimacs_coret.

Definition at line 114 of file qbf_squolem_core.cpp.

◆ no_clauses()

virtual size_t qbf_squolem_coret::no_clauses ( ) const
inlinevirtual

Implements cnft.

Definition at line 41 of file qbf_squolem_core.h.

◆ prop_solve()

propt::resultt qbf_squolem_coret::prop_solve ( )
override

Definition at line 82 of file qbf_squolem_core.cpp.

◆ reset()

void qbf_squolem_coret::reset ( void  )

Definition at line 47 of file qbf_squolem_core.cpp.

◆ set_debug_filename()

void qbf_squolem_coret::set_debug_filename ( const std::string &  str)

Definition at line 178 of file qbf_squolem_core.cpp.

◆ set_no_variables()

void qbf_squolem_coret::set_no_variables ( size_t  no)
overridevirtual

Reimplemented from cnft.

Definition at line 164 of file qbf_squolem_core.cpp.

◆ set_quantifier()

void qbf_squolem_coret::set_quantifier ( const quantifiert::typet  type,
const literalt  l 
)
override

Definition at line 170 of file qbf_squolem_core.cpp.

◆ setup()

void qbf_squolem_coret::setup ( void  )
private

Definition at line 26 of file qbf_squolem_core.cpp.

◆ solver_text()

std::string qbf_squolem_coret::solver_text ( ) const
overridevirtual

Implements propt.

Definition at line 77 of file qbf_squolem_core.cpp.

◆ write_qdimacs_cnf()

void qbf_squolem_coret::write_qdimacs_cnf ( std::ostream &  out)
overridevirtual

Reimplemented from qdimacs_cnft.

Definition at line 183 of file qbf_squolem_core.cpp.

Member Data Documentation

◆ early_decision

bool qbf_squolem_coret::early_decision
protected

Definition at line 23 of file qbf_squolem_core.h.

◆ function_cache

function_cachet qbf_squolem_coret::function_cache
private

Definition at line 53 of file qbf_squolem_core.h.

◆ squolem

Squolem2* qbf_squolem_coret::squolem
protected

Definition at line 22 of file qbf_squolem_core.h.


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