diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-04-22 19:14:22 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-04-22 19:14:22 -0700 |
commit | 74d0ffee6977c24ee8f3c4fa1471f98f6455d5bb (patch) | |
tree | 56cadb3a4e68e4dbcf02858880a53984a0e9c10d /src/aig/gia/gia.h | |
parent | c4911370bbcf09e675e61ff49117bc91cc92ebc1 (diff) | |
download | abc-74d0ffee6977c24ee8f3c4fa1471f98f6455d5bb.tar.gz abc-74d0ffee6977c24ee8f3c4fa1471f98f6455d5bb.tar.bz2 abc-74d0ffee6977c24ee8f3c4fa1471f98f6455d5bb.zip |
Misc changes.
Diffstat (limited to 'src/aig/gia/gia.h')
-rw-r--r-- | src/aig/gia/gia.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index 1d7bf625..376488bd 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -439,6 +439,8 @@ static inline int Gia_ManAppendCi( Gia_Man_t * p ) static inline int Gia_ManAppendAnd( Gia_Man_t * p, int iLit0, int iLit1 ) { Gia_Obj_t * pObj = Gia_ManAppendObj( p ); + assert( iLit0 >= 0 && Abc_Lit2Var(iLit0) < Gia_ManObjNum(p) ); + assert( iLit1 >= 0 && Abc_Lit2Var(iLit1) < Gia_ManObjNum(p) ); assert( iLit0 != iLit1 ); if ( iLit0 < iLit1 ) { @@ -463,7 +465,9 @@ static inline int Gia_ManAppendAnd( Gia_Man_t * p, int iLit0, int iLit1 ) } static inline int Gia_ManAppendCo( Gia_Man_t * p, int iLit0 ) { - Gia_Obj_t * pObj = Gia_ManAppendObj( p ); + Gia_Obj_t * pObj; + assert( iLit0 >= 0 && Abc_Lit2Var(iLit0) < Gia_ManObjNum(p) ); + pObj = Gia_ManAppendObj( p ); pObj->fTerm = 1; pObj->iDiff0 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit0); pObj->fCompl0 = Abc_LitIsCompl(iLit0); |