ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
intInter.c
Go to the documentation of this file.
1
20
21#include "intInt.h"
22
24
25
29
33
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}
54
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}
94
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}
138
142
143
145
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
Aig_Man_t * Aig_ManDupSimple(Aig_Man_t *p)
DECLARATIONS ///.
Definition aigDup.c:46
void Aig_ManStop(Aig_Man_t *p)
Definition aigMan.c:187
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition aig.h:50
void Aig_ManFlipFirstPo(Aig_Man_t *p)
Definition aigMan.c:457
Aig_Obj_t * Aig_IthVar(Aig_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
Definition aigOper.c:63
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)
Definition intInter.c:106
ABC_NAMESPACE_IMPL_START Aig_Man_t * Inter_ManDupExpand(Aig_Man_t *pInter, Aig_Man_t *pOther)
DECLARATIONS ///.
Definition intInter.c:45
void Inter_ManVerifyInterpolant1(Inta_Man_t *pMan, Sto_Man_t *pCnf, Aig_Man_t *pInter)
Definition intInter.c:66
Aig_Man_t * Inta_ManDeriveClauses(Inta_Man_t *pMan, Sto_Man_t *pCnf, int fClausesA)
Definition satInterA.c:1051
Aig_Man_t * Intb_ManDeriveClauses(Intb_Man_t *pMan, Sto_Man_t *pCnf, int fClausesA)
Definition satInterB.c:1076
struct Intb_Man_t_ Intb_Man_t
Definition satStore.h:136
struct Sto_Man_t_ Sto_Man_t
Definition satStore.h:81
struct Inta_Man_t_ Inta_Man_t
Definition satStore.h:130
#define assert(ex)
Definition util_old.h:213