summaryrefslogtreecommitdiffstats
path: root/src/aig/cnf
diff options
context:
space:
mode:
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;