abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
intInter.c File Reference
#include "intInt.h"

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START
Aig_Man_t
Inter_ManDupExpand (Aig_Man_t *pInter, Aig_Man_t *pOther)
 DECLARATIONS ///. More...
 
void Inter_ManVerifyInterpolant1 (Inta_Man_t *pMan, Sto_Man_t *pCnf, Aig_Man_t *pInter)
 
void Inter_ManVerifyInterpolant2 (Intb_Man_t *pMan, Sto_Man_t *pCnf, Aig_Man_t *pInter)
 

Function Documentation

ABC_NAMESPACE_IMPL_START Aig_Man_t* Inter_ManDupExpand ( Aig_Man_t pInter,
Aig_Man_t pOther 
)

DECLARATIONS ///.

CFile****************************************************************

FileName [intInter.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Interpolation engine.]

Synopsis [Experimental procedures to derive and compare interpolants.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 24, 2008.]

Revision [

Id:
intInter.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file intInter.c.

46 {
47  Aig_Man_t * pInterC;
48  assert( Aig_ManCiNum(pInter) <= Aig_ManCiNum(pOther) );
49  pInterC = Aig_ManDupSimple( pInter );
50  Aig_IthVar( pInterC, Aig_ManCiNum(pOther)-1 );
51  assert( Aig_ManCiNum(pInterC) == Aig_ManCiNum(pOther) );
52  return pInterC;
53 }
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
Aig_Obj_t * Aig_IthVar(Aig_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
Definition: aigOper.c:63
static int Aig_ManCiNum(Aig_Man_t *p)
Definition: aig.h:251
#define assert(ex)
Definition: util_old.h:213
Aig_Man_t * Aig_ManDupSimple(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigDup.c:46
void Inter_ManVerifyInterpolant1 ( Inta_Man_t pMan,
Sto_Man_t pCnf,
Aig_Man_t pInter 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 66 of file intInter.c.

67 {
68  extern Aig_Man_t * Inta_ManDeriveClauses( Inta_Man_t * pMan, Sto_Man_t * pCnf, int fClausesA );
69  Aig_Man_t * pLower, * pUpper, * pInterC;
70  int RetValue1, RetValue2;
71 
72  pLower = Inta_ManDeriveClauses( pMan, pCnf, 1 );
73  pUpper = Inta_ManDeriveClauses( pMan, pCnf, 0 );
74  Aig_ManFlipFirstPo( pUpper );
75 
76  pInterC = Inter_ManDupExpand( pInter, pLower );
77  RetValue1 = Inter_ManCheckContainment( pLower, pInterC );
78  Aig_ManStop( pInterC );
79 
80  pInterC = Inter_ManDupExpand( pInter, pUpper );
81  RetValue2 = Inter_ManCheckContainment( pInterC, pUpper );
82  Aig_ManStop( pInterC );
83 
84  if ( RetValue1 && RetValue2 )
85  printf( "Im is correct.\n" );
86  if ( !RetValue1 )
87  printf( "Property A => Im fails.\n" );
88  if ( !RetValue2 )
89  printf( "Property Im => !B fails.\n" );
90 
91  Aig_ManStop( pLower );
92  Aig_ManStop( pUpper );
93 }
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
void Aig_ManFlipFirstPo(Aig_Man_t *p)
Definition: aigMan.c:457
Aig_Man_t * Inta_ManDeriveClauses(Inta_Man_t *pMan, Sto_Man_t *pCnf, int fClausesA)
Definition: satInterA.c:1050
ABC_NAMESPACE_IMPL_START Aig_Man_t * Inter_ManDupExpand(Aig_Man_t *pInter, Aig_Man_t *pOther)
DECLARATIONS ///.
Definition: intInter.c:45
int Inter_ManCheckContainment(Aig_Man_t *pNew, Aig_Man_t *pOld)
FUNCTION DEFINITIONS ///.
Definition: intContain.c:47
void Inter_ManVerifyInterpolant2 ( Intb_Man_t pMan,
Sto_Man_t pCnf,
Aig_Man_t pInter 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 106 of file intInter.c.

107 {
108  extern Aig_Man_t * Intb_ManDeriveClauses( Intb_Man_t * pMan, Sto_Man_t * pCnf, int fClausesA );
109  Aig_Man_t * pLower, * pUpper, * pInterC;
110  int RetValue1, RetValue2;
111 
112  pLower = Intb_ManDeriveClauses( pMan, pCnf, 1 );
113  pUpper = Intb_ManDeriveClauses( pMan, pCnf, 0 );
114  Aig_ManFlipFirstPo( pUpper );
115 
116  pInterC = Inter_ManDupExpand( pInter, pLower );
117 //Aig_ManPrintStats( pLower );
118 //Aig_ManPrintStats( pUpper );
119 //Aig_ManPrintStats( pInterC );
120 //Aig_ManDumpBlif( pInterC, "inter_c.blif", NULL, NULL );
121  RetValue1 = Inter_ManCheckContainment( pLower, pInterC );
122  Aig_ManStop( pInterC );
123 
124  pInterC = Inter_ManDupExpand( pInter, pUpper );
125  RetValue2 = Inter_ManCheckContainment( pInterC, pUpper );
126  Aig_ManStop( pInterC );
127 
128  if ( RetValue1 && RetValue2 )
129  printf( "Ip is correct.\n" );
130  if ( !RetValue1 )
131  printf( "Property A => Ip fails.\n" );
132  if ( !RetValue2 )
133  printf( "Property Ip => !B fails.\n" );
134 
135  Aig_ManStop( pLower );
136  Aig_ManStop( pUpper );
137 }
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
void Aig_ManFlipFirstPo(Aig_Man_t *p)
Definition: aigMan.c:457
Aig_Man_t * Intb_ManDeriveClauses(Intb_Man_t *pMan, Sto_Man_t *pCnf, int fClausesA)
Definition: satInterB.c:1076
ABC_NAMESPACE_IMPL_START Aig_Man_t * Inter_ManDupExpand(Aig_Man_t *pInter, Aig_Man_t *pOther)
DECLARATIONS ///.
Definition: intInter.c:45
int Inter_ManCheckContainment(Aig_Man_t *pNew, Aig_Man_t *pOld)
FUNCTION DEFINITIONS ///.
Definition: intContain.c:47