summaryrefslogtreecommitdiffstats
path: root/src/aig/cnf
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-07-19 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2008-07-19 08:01:00 -0700
commitde978ced7b754706efaf18ae588e18eb05624faf (patch)
tree0180f1b83fe9a3492a754a91e1aa152024affc54 /src/aig/cnf
parent13f52980dae9821b3d7bec9ff6a0fa4e544607d7 (diff)
downloadabc-de978ced7b754706efaf18ae588e18eb05624faf.tar.gz
abc-de978ced7b754706efaf18ae588e18eb05624faf.tar.bz2
abc-de978ced7b754706efaf18ae588e18eb05624faf.zip
Version abc80719
Diffstat (limited to 'src/aig/cnf')
-rw-r--r--src/aig/cnf/cnf.h1
-rw-r--r--src/aig/cnf/cnfMan.c16
2 files changed, 17 insertions, 0 deletions
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
@@ -213,6 +213,22 @@ void Cnf_DataLift( Cnf_Dat_t * p, int nVarsPlus )
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.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
void Cnf_DataPrint( Cnf_Dat_t * p, int fReadable )
{
FILE * pFile = stdout;