summaryrefslogtreecommitdiffstats
path: root/src/sat/cnf
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2017-04-02 21:51:47 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2017-04-02 21:51:47 -0700
commitf765e666ca4608f8dfe3ab2ecbacaf9966d25129 (patch)
tree6671beb24d849fee72e6a4254e207277ea52082a /src/sat/cnf
parent3898ba5486adc01e38199b5385d501e4ca58ddec (diff)
downloadabc-f765e666ca4608f8dfe3ab2ecbacaf9966d25129.tar.gz
abc-f765e666ca4608f8dfe3ab2ecbacaf9966d25129.tar.bz2
abc-f765e666ca4608f8dfe3ab2ecbacaf9966d25129.zip
Experiments with don't-cares.
Diffstat (limited to 'src/sat/cnf')
-rw-r--r--src/sat/cnf/cnf.h2
-rw-r--r--src/sat/cnf/cnfMan.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/sat/cnf/cnf.h b/src/sat/cnf/cnf.h
index 6c6cbeb3..01728c81 100644
--- a/src/sat/cnf/cnf.h
+++ b/src/sat/cnf/cnf.h
@@ -156,7 +156,7 @@ extern Cnf_Dat_t * Cnf_DataAlloc( Aig_Man_t * pAig, int nVars, int nClauses,
extern Cnf_Dat_t * Cnf_DataDup( Cnf_Dat_t * p );
extern void Cnf_DataFree( Cnf_Dat_t * p );
extern void Cnf_DataLift( Cnf_Dat_t * p, int nVarsPlus );
-extern Vec_Int_t * Cnf_DataCollectFlipLits( Cnf_Dat_t * p, int iFlipVar );
+extern void Cnf_DataCollectFlipLits( Cnf_Dat_t * p, int iFlipVar, Vec_Int_t * vFlips );
extern void Cnf_DataLiftAndFlipLits( Cnf_Dat_t * p, int nVarsPlus, Vec_Int_t * vLits );
extern void Cnf_DataPrint( Cnf_Dat_t * p, int fReadable );
extern void Cnf_DataWriteIntoFile( Cnf_Dat_t * p, char * pFileName, int fReadable, Vec_Int_t * vForAlls, Vec_Int_t * vExists );
diff --git a/src/sat/cnf/cnfMan.c b/src/sat/cnf/cnfMan.c
index d3a8aa9c..5a125ec3 100644
--- a/src/sat/cnf/cnfMan.c
+++ b/src/sat/cnf/cnfMan.c
@@ -215,14 +215,14 @@ void Cnf_DataLift( Cnf_Dat_t * p, int nVarsPlus )
for ( v = 0; v < p->nLiterals; v++ )
p->pClauses[0][v] += 2*nVarsPlus;
}
-Vec_Int_t * Cnf_DataCollectFlipLits( Cnf_Dat_t * p, int iFlipVar )
+void Cnf_DataCollectFlipLits( Cnf_Dat_t * p, int iFlipVar, Vec_Int_t * vFlips )
{
- Vec_Int_t * vLits = Vec_IntAlloc( 100 ); int v;
+ int v;
assert( p->pMan == NULL );
+ Vec_IntClear( vFlips );
for ( v = 0; v < p->nLiterals; v++ )
if ( Abc_Lit2Var(p->pClauses[0][v]) == iFlipVar )
- Vec_IntPush( vLits, v );
- return vLits;
+ Vec_IntPush( vFlips, v );
}
void Cnf_DataLiftAndFlipLits( Cnf_Dat_t * p, int nVarsPlus, Vec_Int_t * vLits )
{