From de978ced7b754706efaf18ae588e18eb05624faf Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 19 Jul 2008 08:01:00 -0700 Subject: Version abc80719 --- src/aig/cnf/cnf.h | 1 + src/aig/cnf/cnfMan.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'src/aig/cnf') diff --git a/src/aig/cnf/cnf.h b/src/aig/cnf/cnf.h index 5c742f5d..f4f782df 100644 --- a/src/aig/cnf/cnf.h +++ b/src/aig/cnf/cnf.h @@ -136,6 +136,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 void Cnf_DataFlipLastLiteral( Cnf_Dat_t * p ); extern void Cnf_DataPrint( Cnf_Dat_t * p, int fReadable ); extern void Cnf_DataWriteIntoFile( Cnf_Dat_t * p, char * pFileName, int fReadable ); extern void * Cnf_DataWriteIntoSolver( Cnf_Dat_t * p, int nFrames, int fInit ); diff --git a/src/aig/cnf/cnfMan.c b/src/aig/cnf/cnfMan.c index f1c446fe..1e650a05 100644 --- a/src/aig/cnf/cnfMan.c +++ b/src/aig/cnf/cnfMan.c @@ -202,6 +202,22 @@ void Cnf_DataLift( Cnf_Dat_t * p, int nVarsPlus ) p->pClauses[0][v] += 2*nVarsPlus; } +/**Function************************************************************* + + Synopsis [Writes CNF into a file.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Cnf_DataFlipLastLiteral( Cnf_Dat_t * p ) +{ + p->pClauses[0][p->nLiterals-1] = lit_neg( p->pClauses[0][p->nLiterals-1] ); +} + /**Function************************************************************* Synopsis [Writes CNF into a file.] -- cgit v1.2.3