summaryrefslogtreecommitdiffstats
path: root/src/misc
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2022-10-09 23:51:40 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2022-10-09 23:51:40 -0700
commit813a0f1ff1ae7512cb7947f54cd3f2ab252848c8 (patch)
treef2feba384a1cbfaa2c18c7d00c31335f2a97c73b /src/misc
parent5fb4912559380dfcb55e76c23d3fa69c0da454f8 (diff)
downloadabc-813a0f1ff1ae7512cb7947f54cd3f2ab252848c8.tar.gz
abc-813a0f1ff1ae7512cb7947f54cd3f2ab252848c8.tar.bz2
abc-813a0f1ff1ae7512cb7947f54cd3f2ab252848c8.zip
Updating features of &if mapper.
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/util/utilTruth.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/misc/util/utilTruth.h b/src/misc/util/utilTruth.h
index bc8ac3f0..1a771afa 100644
--- a/src/misc/util/utilTruth.h
+++ b/src/misc/util/utilTruth.h
@@ -1589,7 +1589,31 @@ static inline int Abc_Tt6SupportAndSize( word t, int nVars, int * pSuppSize )
Supp |= (1 << v), (*pSuppSize)++;
return Supp;
}
-
+static inline int Abc_Tt6Check1( word t, int nVars )
+{
+ int n, v, u;
+ for ( n = 0; n < 2; n++ )
+ for ( v = 0; v < nVars; v++ )
+ {
+ word Cof = n ? Abc_Tt6Cofactor1(t, v) : Abc_Tt6Cofactor0(t, v);
+ for ( u = 0; u < nVars; u++ )
+ if ( v != u && !Abc_Tt6HasVar(Cof, u) )
+ return 1;
+ }
+ return 0;
+}
+static inline int Abc_Tt6Check2( word t, int nVars )
+{
+ int n, v;
+ for ( n = 0; n < 2; n++ )
+ for ( v = 0; v < nVars; v++ )
+ {
+ word Cof = n ? Abc_Tt6Cofactor1(t, v) : Abc_Tt6Cofactor0(t, v);
+ if ( Cof == 0 || ~Cof == 0 )
+ return 1;
+ }
+ return 0;
+}
/**Function*************************************************************
Synopsis [Checks if there is a var whose both cofs have supp <= nSuppLim.]