Public Member Functions | Protected Attributes | Friends

CLitPoolElement Class Reference

#include <xchaff_base.h>

List of all members.

Public Member Functions

Protected Attributes


Detailed Description


Synopsis [Definition of a literal]

Description [A literal is a variable with phase. Two thing determing a lteral: it's "sign", and the variable index. One bit is used to mark it's sign. 0->positive, 1->negative.

For every clause with literal count larger than 1, there are two special literals which are designated ht_literal (stands for head/tail literal to imitate SATO) It is specially marked with 2 bits: 00->not ht; dir = 1; or dir = -1; 10 is not valid. Each literal is represented by a 32 bit integer, with one bit representing it's phase and 2 bits indicate h/t property.

All the literals are collected in a storage space called literal pool. An element in a literal pool can be a literal or special spacing element to indicate the termination of a clause. The spacing element has negative value of the clause index.]

SeeAlso [CDatabase, CClause]

Definition at line 81 of file xchaff_base.h.

Constructor & Destructor Documentation

CLitPoolElement::CLitPoolElement ( void  ) [inline]

Definition at line 87 of file xchaff_base.h.

CLitPoolElement::CLitPoolElement ( int  val) [inline]

Definition at line 90 of file xchaff_base.h.

Member Function Documentation

int& CLitPoolElement::val ( void  ) [inline]
int CLitPoolElement::s_var ( void  ) [inline]
int CLitPoolElement::var_index ( void  ) [inline]
bool CLitPoolElement::var_sign ( void  ) [inline]
void CLitPoolElement::set ( int  s_var) [inline]

Definition at line 104 of file xchaff_base.h.

void CLitPoolElement::set ( int  v,
int  s 
) [inline]

Definition at line 107 of file xchaff_base.h.

int CLitPoolElement::direction ( void  ) [inline]
bool CLitPoolElement::is_ht ( void  ) [inline]

Definition at line 114 of file xchaff_base.h.

Referenced by CDatabase::compact_lit_pool().

void CLitPoolElement::unset_ht ( void  ) [inline]
void CLitPoolElement::set_ht ( int  dir) [inline]

Definition at line 120 of file xchaff_base.h.

Referenced by CSolver::add_clause().

bool CLitPoolElement::is_literal ( void  ) [inline]

Definition at line 125 of file xchaff_base.h.

Referenced by find_clause_idx().

void CLitPoolElement::set_clause_index ( int  cl_idx) [inline]

Definition at line 128 of file xchaff_base.h.

int CLitPoolElement::get_clause_index ( void  ) [inline]

Definition at line 131 of file xchaff_base.h.

Referenced by find_clause_idx().

int CLitPoolElement::find_clause_idx ( void  ) [inline]

Definition at line 135 of file xchaff_base.h.

References get_clause_index(), and is_literal().

void CLitPoolElement::dump ( ostream &  os = cout) [inline]

Definition at line 141 of file xchaff_base.h.

Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
CLitPoolElement l 
) [friend]

Definition at line 145 of file xchaff_base.h.

Member Data Documentation

int CLitPoolElement::_val [protected]

Definition at line 84 of file xchaff_base.h.

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