summaryrefslogtreecommitdiffstats
path: root/src/aig/cnf/cnfUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/cnf/cnfUtil.c')
-rw-r--r--src/aig/cnf/cnfUtil.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/aig/cnf/cnfUtil.c b/src/aig/cnf/cnfUtil.c
index 3738fee5..7da9fb47 100644
--- a/src/aig/cnf/cnfUtil.c
+++ b/src/aig/cnf/cnfUtil.c
@@ -182,6 +182,50 @@ Vec_Ptr_t * Cnf_ManScanMapping( Cnf_Man_t * p, int fCollect, int fPreorder )
return vMapped;
}
+/**Function*************************************************************
+
+ Synopsis [Returns the array of CI IDs.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+Vec_Int_t * Cnf_DataCollectCiSatNums( Cnf_Dat_t * pCnf, Aig_Man_t * p )
+{
+ Vec_Int_t * vCiIds;
+ Aig_Obj_t * pObj;
+ int i;
+ vCiIds = Vec_IntAlloc( Aig_ManPiNum(p) );
+ Aig_ManForEachPi( p, pObj, i )
+ Vec_IntPush( vCiIds, pCnf->pVarNums[pObj->Id] );
+ return vCiIds;
+}
+
+/**Function*************************************************************
+
+ Synopsis [Returns the array of CI IDs.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+Vec_Int_t * Cnf_DataCollectCoSatNums( Cnf_Dat_t * pCnf, Aig_Man_t * p )
+{
+ Vec_Int_t * vCoIds;
+ Aig_Obj_t * pObj;
+ int i;
+ vCoIds = Vec_IntAlloc( Aig_ManPoNum(p) );
+ Aig_ManForEachPo( p, pObj, i )
+ Vec_IntPush( vCoIds, pCnf->pVarNums[pObj->Id] );
+ return vCoIds;
+}
+
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////