CBMC
pbs_dimacs_cnft Class Reference

#include <pbs_dimacs_cnf.h>

+ Inheritance diagram for pbs_dimacs_cnft:
+ Collaboration diagram for pbs_dimacs_cnft:

Public Member Functions

 pbs_dimacs_cnft (message_handlert &message_handler)
 
virtual ~pbs_dimacs_cnft ()
 
virtual void write_dimacs_pb (std::ostream &out)
 
bool pbs_solve ()
 
tvt l_get (literalt a) const override
 
std::string solver_text () const override
 
- Public Member Functions inherited from dimacs_cnft
 dimacs_cnft (message_handlert &)
 
virtual ~dimacs_cnft ()
 
virtual void write_dimacs_cnf (std::ostream &out) const
 
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
 
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
 
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 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
 

Public Attributes

bool optimize
 
bool maximize
 
bool binary_search
 
std::string pbs_path
 
int goal
 
int opt_sum
 
std::map< literalt, unsigned > pb_constraintmap
 

Protected Member Functions

resultt do_prop_solve (const bvt &assumptions) override
 
- 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 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::set< int > assigned
 
- 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
 

Additional Inherited Members

- 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)
 
- 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 pbs_dimacs_cnf.h.

Constructor & Destructor Documentation

◆ pbs_dimacs_cnft()

pbs_dimacs_cnft::pbs_dimacs_cnft ( message_handlert message_handler)
inlineexplicit

Definition at line 22 of file pbs_dimacs_cnf.h.

◆ ~pbs_dimacs_cnft()

virtual pbs_dimacs_cnft::~pbs_dimacs_cnft ( )
inlinevirtual

Definition at line 32 of file pbs_dimacs_cnf.h.

Member Function Documentation

◆ do_prop_solve()

propt::resultt pbs_dimacs_cnft::do_prop_solve ( const bvt assumptions)
overrideprotectedvirtual

Reimplemented from cnf_clause_listt.

Definition at line 208 of file pbs_dimacs_cnf.cpp.

◆ l_get()

tvt pbs_dimacs_cnft::l_get ( literalt  a) const
overridevirtual

Reimplemented from cnf_clause_listt.

Definition at line 247 of file pbs_dimacs_cnf.cpp.

◆ pbs_solve()

bool pbs_dimacs_cnft::pbs_solve ( )

Definition at line 61 of file pbs_dimacs_cnf.cpp.

◆ solver_text()

std::string pbs_dimacs_cnft::solver_text ( ) const
inlineoverridevirtual

Reimplemented from dimacs_cnft.

Definition at line 55 of file pbs_dimacs_cnf.h.

◆ write_dimacs_pb()

void pbs_dimacs_cnft::write_dimacs_pb ( std::ostream &  out)
virtual

Definition at line 19 of file pbs_dimacs_cnf.cpp.

Member Data Documentation

◆ assigned

std::set<int> pbs_dimacs_cnft::assigned
protected

Definition at line 63 of file pbs_dimacs_cnf.h.

◆ binary_search

bool pbs_dimacs_cnft::binary_search

Definition at line 40 of file pbs_dimacs_cnf.h.

◆ goal

int pbs_dimacs_cnft::goal

Definition at line 44 of file pbs_dimacs_cnf.h.

◆ maximize

bool pbs_dimacs_cnft::maximize

Definition at line 39 of file pbs_dimacs_cnf.h.

◆ opt_sum

int pbs_dimacs_cnft::opt_sum

Definition at line 45 of file pbs_dimacs_cnf.h.

◆ optimize

bool pbs_dimacs_cnft::optimize

Definition at line 38 of file pbs_dimacs_cnf.h.

◆ pb_constraintmap

std::map<literalt, unsigned> pbs_dimacs_cnft::pb_constraintmap

Definition at line 47 of file pbs_dimacs_cnf.h.

◆ pbs_path

std::string pbs_dimacs_cnft::pbs_path

Definition at line 42 of file pbs_dimacs_cnf.h.


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