From 0058cefee35e08eaa5740c0febf3829c89781a3c Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 9 Dec 2012 00:19:18 -0800 Subject: Deriving CEX after phase/tempor/reparam. --- src/misc/util/utilCex.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/misc/util/utilCex.c') 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; } -- cgit v1.2.3