CVC3
Public Member Functions | Protected Attributes

CDatabase Class Reference

#include <xchaff_dbase.h>

Inherited by CSolver.

Collaboration diagram for CDatabase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Protected Attributes


Detailed Description

Class**********************************************************************

Synopsis [Definition of clause database ]

Description [Clause Database is the place where the information of the SAT problem are stored. it is a parent class of CSolver ]

SeeAlso [CSolver]

Definition at line 90 of file xchaff_dbase.h.


Constructor & Destructor Documentation

CDatabase::CDatabase ( )
CDatabase::~CDatabase ( ) [inline]

Definition at line 109 of file xchaff_dbase.h.

References _lit_pool_start.


Member Function Documentation

void CDatabase::init ( void  ) [inline]

Reimplemented in CSolver.

Definition at line 112 of file xchaff_dbase.h.

References init_num_clauses(), init_num_literals(), num_clauses(), and num_literals().

vector<CVariable>& CDatabase::variables ( void  ) [inline]
vector<CClause>& CDatabase::clauses ( void  ) [inline]
CVariable& CDatabase::variable ( int  idx) [inline]
CClause& CDatabase::clause ( ClauseIdx  idx) [inline]
CDatabaseStats& CDatabase::stats ( void  ) [inline]

Definition at line 129 of file xchaff_dbase.h.

References _stats.

void CDatabase::set_mem_limit ( int  n) [inline]

Reimplemented in CSolver.

Definition at line 132 of file xchaff_dbase.h.

References _mem_limit.

int& CDatabase::init_num_clauses ( ) [inline]
int& CDatabase::init_num_literals ( ) [inline]

Definition at line 137 of file xchaff_dbase.h.

References _stats, and CDatabaseStats::init_num_literals.

Referenced by init().

int& CDatabase::num_added_clauses ( ) [inline]

Definition at line 138 of file xchaff_dbase.h.

References _stats, and CDatabaseStats::num_added_clauses.

int& CDatabase::num_added_literals ( ) [inline]

Definition at line 139 of file xchaff_dbase.h.

References _stats, and CDatabaseStats::num_added_literals.

int& CDatabase::num_deleted_clauses ( ) [inline]
int& CDatabase::num_deleted_literals ( ) [inline]
CLitPoolElement* CDatabase::lit_pool_begin ( void  ) [inline]

Definition at line 144 of file xchaff_dbase.h.

References _lit_pool_start.

Referenced by compact_lit_pool().

CLitPoolElement* CDatabase::lit_pool_end ( void  ) [inline]

Definition at line 147 of file xchaff_dbase.h.

References _lit_pool_finish.

Referenced by CSolver::add_clause().

void CDatabase::lit_pool_push_back ( int  value) [inline]

Definition at line 150 of file xchaff_dbase.h.

References _lit_pool_end_storage, _lit_pool_finish, and CLitPoolElement::val().

Referenced by CSolver::add_clause(), and CDatabase().

int CDatabase::lit_pool_size ( void  ) [inline]
int CDatabase::lit_pool_free_space ( void  ) [inline]
CLitPoolElement& CDatabase::lit_pool ( int  i) [inline]

Definition at line 161 of file xchaff_dbase.h.

References _lit_pool_start.

Referenced by compact_lit_pool(), estimate_mem_usage(), and mem_usage().

void CDatabase::output_lit_pool_state ( void  )
bool CDatabase::enlarge_lit_pool ( void  )
void CDatabase::compact_lit_pool ( void  )
int CDatabase::estimate_mem_usage ( void  ) [inline]

Reimplemented in CSolver.

Definition at line 172 of file xchaff_dbase.h.

References _unused_clause_idx_queue, clauses(), lit_pool(), lit_pool_free_space(), lit_pool_size(), and variables().

Referenced by enlarge_lit_pool().

int CDatabase::mem_usage ( void  ) [inline]
void CDatabase::set_variable_number ( int  n) [inline]

Definition at line 203 of file xchaff_dbase.h.

References variables().

int CDatabase::add_variable ( void  ) [inline]

Definition at line 206 of file xchaff_dbase.h.

References variables().

int CDatabase::num_variables ( void  ) [inline]
int CDatabase::num_clauses ( void  ) [inline]
int CDatabase::num_literals ( void  ) [inline]
void CDatabase::mark_clause_deleted ( CClause cl) [inline]
void CDatabase::mark_var_in_new_cl ( int  v_idx,
int  phase 
) [inline]

Definition at line 231 of file xchaff_dbase.h.

References _num_var_in_new_cl, CVariable::set_in_new_cl(), and variable().

int CDatabase::literal_value ( CLitPoolElement  l) [inline]
int CDatabase::find_unit_literal ( ClauseIdx  cl)
bool CDatabase::is_conflict ( ClauseIdx  cl)
bool CDatabase::is_satisfied ( ClauseIdx  cl)

Definition at line 488 of file xchaff_solver.cpp.

References clause(), literal_value(), and CClause::literals().

void CDatabase::detail_dump_cl ( ClauseIdx  cl_idx,
ostream &  os = cout 
)
void CDatabase::dump ( ostream &  os = cout)

Reimplemented in CSolver.

Definition at line 197 of file xchaff_dbase.cpp.

References _clauses, _variables, detail_dump_cl(), std::endl(), and variable().


Member Data Documentation

vector<CVariable> CDatabase::_variables [protected]
vector<CClause> CDatabase::_clauses [protected]

Definition at line 101 of file xchaff_dbase.h.

Referenced by CSolver::add_clause(), clause(), clauses(), dump(), and num_clauses().

Definition at line 104 of file xchaff_dbase.h.

Referenced by mark_var_in_new_cl().

int CDatabase::_mem_limit [protected]

Definition at line 105 of file xchaff_dbase.h.

Referenced by CDatabase(), enlarge_lit_pool(), and set_mem_limit().


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