diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-12-09 00:19:18 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-12-09 00:19:18 -0800 |
commit | 0058cefee35e08eaa5740c0febf3829c89781a3c (patch) | |
tree | 27ade1097da4221ecd9d6934f298d08199fc3133 /src/misc/util/utilCex.c | |
parent | a68593c4f2b79b4adaf76dfe6b5dfc3bc63bb323 (diff) | |
download | abc-0058cefee35e08eaa5740c0febf3829c89781a3c.tar.gz abc-0058cefee35e08eaa5740c0febf3829c89781a3c.tar.bz2 abc-0058cefee35e08eaa5740c0febf3829c89781a3c.zip |
Deriving CEX after phase/tempor/reparam.
Diffstat (limited to 'src/misc/util/utilCex.c')
-rw-r--r-- | src/misc/util/utilCex.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/misc/util/utilCex.c b/src/misc/util/utilCex.c index d8ed84b8..2f205d2e 100644 --- a/src/misc/util/utilCex.c +++ b/src/misc/util/utilCex.c @@ -452,16 +452,15 @@ Abc_Cex_t * Abc_CexPermute( Abc_Cex_t * p, Vec_Int_t * vMapOld2New ) ***********************************************************************/ Abc_Cex_t * Abc_CexPermuteTwo( Abc_Cex_t * p, Vec_Int_t * vPermOld, Vec_Int_t * vPermNew ) { - Vec_Int_t * vPermInv = Vec_IntInvert( vPermNew, -1 ); - Vec_Int_t * vPerm = Vec_IntAlloc( Vec_IntSize(vPermOld) ); Abc_Cex_t * pCex; - int i, Entry; + Vec_Int_t * vPerm; + int i, eOld, eNew; assert( Vec_IntSize(vPermOld) == p->nPis ); assert( Vec_IntSize(vPermNew) == p->nPis ); - Vec_IntForEachEntry( vPerm, Entry, i ) - Vec_IntEntry( vPerm, Vec_IntEntry(vPermInv, Vec_IntEntry(vPermOld, Entry)) ); + vPerm = Vec_IntStartFull( p->nPis ); + Vec_IntForEachEntryTwo( vPermOld, vPermNew, eOld, eNew, i ) + Vec_IntWriteEntry( vPerm, eOld, eNew ); pCex = Abc_CexPermute( p, vPerm ); - Vec_IntFree( vPermInv ); Vec_IntFree( vPerm ); return pCex; } |