summaryrefslogtreecommitdiffstats
path: root/src/misc/extra/extraBddMisc.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-04-30 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2008-04-30 08:01:00 -0700
commitde81a1a1fb5d2cfff636a237a0a7008dcf196bcd (patch)
tree0ae940cc977896662e60a9050fe743ba5cd7b438 /src/misc/extra/extraBddMisc.c
parent2b98b81837011f26d130ad0f44d4bc7b298f9cd7 (diff)
downloadabc-de81a1a1fb5d2cfff636a237a0a7008dcf196bcd.tar.gz
abc-de81a1a1fb5d2cfff636a237a0a7008dcf196bcd.tar.bz2
abc-de81a1a1fb5d2cfff636a237a0a7008dcf196bcd.zip
Version abc80430
Diffstat (limited to 'src/misc/extra/extraBddMisc.c')
-rw-r--r--src/misc/extra/extraBddMisc.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/misc/extra/extraBddMisc.c b/src/misc/extra/extraBddMisc.c
index e4790325..023a9841 100644
--- a/src/misc/extra/extraBddMisc.c
+++ b/src/misc/extra/extraBddMisc.c
@@ -961,6 +961,34 @@ void Extra_bddPermuteArray( DdManager * manager, DdNode ** bNodesIn, DdNode ** b
} /* end of Extra_bddPermuteArray */
+/**Function********************************************************************
+
+ Synopsis [Computes the positive polarty cube composed of the first vars in the array.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+******************************************************************************/
+DdNode * Extra_bddComputeCube( DdManager * dd, DdNode ** bXVars, int nVars )
+{
+ DdNode * bRes;
+ DdNode * bTemp;
+ int i;
+
+ bRes = b1; Cudd_Ref( bRes );
+ for ( i = 0; i < nVars; i++ )
+ {
+ bRes = Cudd_bddAnd( dd, bTemp = bRes, bXVars[i] ); Cudd_Ref( bRes );
+ Cudd_RecursiveDeref( dd, bTemp );
+ }
+
+ Cudd_Deref( bRes );
+ return bRes;
+}
+
/*---------------------------------------------------------------------------*/
/* Definition of internal functions */
/*---------------------------------------------------------------------------*/