abc/src/base/acb/acbMfs.c
/**Function*************************************************************

  Synopsis    [Constructs CNF for the window.]

  Description [The window for the pivot node is represented as a DFS ordered array 
  of objects (vWinObjs) whose indexes are used as SAT variable IDs (stored in p->vCopies).
  PivotVar is the index of the pivot node in array vWinObjs.
  The nodes before (after) PivotVar are TFI (TFO) nodes.
  The leaf (root) nodes are labeled with Abc_LitIsCompl().
  If fQbf is 1, returns the instance meant for QBF solving. It uses the last 
  variable (LastVar) as the placeholder for the second copy of the pivot node.]
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Constructs CNF for the window.]

Description [The window for the pivot node is represented as a DFS ordered array
of objects (vWinObjs) whose indexes are used as SAT variable IDs (stored in p->vCopies).
PivotVar is the index of the pivot node in array vWinObjs.
The nodes before (after) PivotVar are TFI (TFO) nodes.
The leaf (root) nodes are labeled with Abc_LitIsCompl().
If fQbf is 1, returns the instance meant for QBF solving. It uses the last
variable (LastVar) as the placeholder for the second copy of the pivot node.]




Function Synopsis [ Constructs CNF for the window . ] Description [ The window for the pivot node is represented as a DFS ordered array of objects ( vWinObjs ) whose indexes are used as SAT variable IDs ( stored in p - > vCopies ) . PivotVar is the index of the pivot node in array vWinObjs . The nodes before ( after ) PivotVar are TFI ( TFO ) nodes . The leaf ( root ) nodes are labeled with Abc_LitIsCompl () . If fQbf is 1 returns the instance meant for QBF solving . It uses the last variable ( LastVar ) as the placeholder for the second copy of the pivot node . ]
void Acb_TranslateCnf( Vec_Int_t * vClas, Vec_Int_t * vLits, Vec_Str_t * vCnf, Vec_Int_t * vSatVars, int iPivotVar )
{
    signed char Entry;
    int i, Lit;
    Vec_StrForEachEntry( vCnf, Entry, i )
    {
        if ( (int)Entry == -1 )
        {
            Vec_IntPush( vClas, Vec_IntSize(vLits) );
            continue;
        }
        Lit = Abc_Lit2LitV( Vec_IntArray(vSatVars), (int)Entry );
        Lit = Abc_LitNotCond( Lit, Abc_Lit2Var(Lit) == iPivotVar );
        Vec_IntPush( vLits, Lit );
    }
}
void Acb_TranslateCnf ( Vec_Int_t * vClas , Vec_Int_t * vLits , Vec_Str_t * vCnf , Vec_Int_t * vSatVars , int iPivotVar ) { signed char Entry ; int i , Lit ; Vec_StrForEachEntry ( vCnf , Entry , i ) { if ( ( int ) Entry == -1 ) { Vec_IntPush ( vClas , Vec_IntSize ( vLits ) ) ; continue ; } Lit = Abc_Lit2LitV ( Vec_IntArray ( vSatVars ) , ( int ) Entry ) ; Lit = Abc_LitNotCond ( Lit , Abc_Lit2Var ( Lit ) == iPivotVar ) ; Vec_IntPush ( vLits , Lit ) ; } }
Function
Synopsis    [Constructs CNF for the window.]
Function Synopsis [ Constructs CNF for the window . ]