abc/src/proof/fraig/fraigMan.c
/**Function*************************************************************

  Synopsis    [Adds clauses to the solver.]

  Description [This procedure is used to add external clauses to the solver.
  The clauses are given by sets of nodes. Each node stands for one literal.
  If the node is complemented, the literal is negated.]
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Adds clauses to the solver.]

Description [This procedure is used to add external clauses to the solver.
The clauses are given by sets of nodes. Each node stands for one literal.
If the node is complemented, the literal is negated.]




Function Synopsis [ Adds clauses to the solver . ] Description [ This procedure is used to add external clauses to the solver . The clauses are given by sets of nodes . Each node stands for one literal . If the node is complemented the literal is negated . ]
void Fraig_ManAddClause( Fraig_Man_t * p, Fraig_Node_t ** ppNodes, int nNodes )
{
    Fraig_Node_t * pNode;
    int i, fComp, RetValue;
    if ( p->pSat == NULL )
        Fraig_ManCreateSolver( p );
    Msat_IntVecClear( p->vProj );
    for ( i = 0; i < nNodes; i++ )
    {
        pNode = Fraig_Regular(ppNodes[i]);
        fComp = Fraig_IsComplement(ppNodes[i]);
        Msat_IntVecPush( p->vProj, MSAT_VAR2LIT(pNode->Num, fComp) );
    }
    RetValue = Msat_SolverAddClause( p->pSat, p->vProj );
    assert( RetValue );
}
void Fraig_ManAddClause ( Fraig_Man_t * p , Fraig_Node_t * * ppNodes , int nNodes ) { Fraig_Node_t * pNode ; int i , fComp , RetValue ; if ( p -> pSat == NULL ) Fraig_ManCreateSolver ( p ) ; Msat_IntVecClear ( p -> vProj ) ; for ( i = 0 ; i < nNodes ; i ++ ) { pNode = Fraig_Regular ( ppNodes [ i ] ) ; fComp = Fraig_IsComplement ( ppNodes [ i ] ) ; Msat_IntVecPush ( p -> vProj , MSAT_VAR2LIT ( pNode -> Num , fComp ) ) ; } RetValue = Msat_SolverAddClause ( p -> pSat , p -> vProj ) ; assert ( RetValue ) ; }
Function
Synopsis    [Adds clauses to the solver.]
Function Synopsis [ Adds clauses to the solver . ]
// create four clauses //        printf( "%d(%d) ", pNode->Num, fComp ); //    printf( "\n" );