Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
58d4012a
Commit
58d4012a
authored
Dec 09, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabling multi-output solving in 'pdr'.
parent
9f396a0d
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
90 additions
and
84 deletions
+90
-84
src/base/abci/abc.c
+24
-27
src/base/abci/abcDar.c
+17
-28
src/misc/util/utilCex.c
+4
-3
src/proof/abs/absOldRef.c
+5
-5
src/proof/abs/absPth.c
+1
-2
src/proof/fra/fraSec.c
+3
-7
src/proof/pdr/pdr.h
+1
-1
src/proof/pdr/pdrCore.c
+14
-11
src/proof/pdr/pdrInt.h
+1
-0
src/proof/pdr/pdrMan.c
+2
-0
src/proof/pdr/pdrUtil.c
+18
-0
No files found.
src/base/abci/abc.c
View file @
58d4012a
...
@@ -2292,13 +2292,21 @@ int Abc_CommandPrintStatus( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -2292,13 +2292,21 @@ int Abc_CommandPrintStatus( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
}
}
Abc_Print
(
1
,
"Status = %d Frames = %d "
,
pAbc
->
Status
,
pAbc
->
nFrames
);
Abc_Print
(
1
,
"Status = %d Frames = %d "
,
pAbc
->
Status
,
pAbc
->
nFrames
);
if
(
pAbc
->
pCex
==
NULL
)
if
(
pAbc
->
pCex
==
NULL
&&
pAbc
->
vCexVec
==
NULL
)
Abc_Print
(
1
,
"Cex is not defined.
\n
"
);
Abc_Print
(
1
,
"Cex is not defined.
\n
"
);
else
else
Abc_Print
(
1
,
"Cex: PIs = %d Regs = %d PO = %d Frame = %d Bits = %d
\n
"
,
{
pAbc
->
pCex
->
nPis
,
pAbc
->
pCex
->
nRegs
,
if
(
pAbc
->
pCex
)
pAbc
->
pCex
->
iPo
,
pAbc
->
pCex
->
iFrame
,
Abc_CexPrintStats
(
pAbc
->
pCex
);
pAbc
->
pCex
->
nBits
);
if
(
pAbc
->
vCexVec
)
{
Abc_Cex_t
*
pTemp
;
printf
(
"
\n
"
);
Vec_PtrForEachEntry
(
Abc_Cex_t
*
,
pAbc
->
vCexVec
,
pTemp
,
c
)
if
(
pTemp
)
Abc_CexPrintStats
(
pTemp
);
}
}
return
0
;
return
0
;
usage:
usage:
...
@@ -20920,7 +20928,10 @@ int Abc_CommandBmc3( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -20920,7 +20928,10 @@ int Abc_CommandBmc3( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
}
}
if
(
pNtk
->
vSeqModelVec
)
if
(
pNtk
->
vSeqModelVec
)
{
Abc_FrameReplaceCexVec
(
pAbc
,
&
pNtk
->
vSeqModelVec
);
Abc_FrameReplaceCexVec
(
pAbc
,
&
pNtk
->
vSeqModelVec
);
pAbc
->
nFrames
=
-
1
;
}
return
0
;
return
0
;
usage:
usage:
...
@@ -22314,10 +22325,9 @@ usage:
...
@@ -22314,10 +22325,9 @@ usage:
***********************************************************************/
***********************************************************************/
int
Abc_CommandPdr
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandPdr
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
int
Abc_NtkDarPdr
(
Abc_Ntk_t
*
pNtk
,
Pdr_Par_t
*
pPars
,
Abc_Cex_t
**
ppCex
);
extern
int
Abc_NtkDarPdr
(
Abc_Ntk_t
*
pNtk
,
Pdr_Par_t
*
pPars
);
Pdr_Par_t
Pars
,
*
pPars
=
&
Pars
;
Pdr_Par_t
Pars
,
*
pPars
=
&
Pars
;
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Abc_Cex_t
*
pCex
=
NULL
;
int
c
;
int
c
;
Pdr_ManSetDefaultParams
(
pPars
);
Pdr_ManSetDefaultParams
(
pPars
);
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
...
@@ -22437,28 +22447,15 @@ int Abc_CommandPdr( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -22437,28 +22447,15 @@ int Abc_CommandPdr( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
2
,
"The current network is not an AIG (run
\"
strash
\"
).
\n
"
);
Abc_Print
(
-
2
,
"The current network is not an AIG (run
\"
strash
\"
).
\n
"
);
return
0
;
return
0
;
}
}
/*
if ( pPars->iOutput != -1 && (pPars->iOutput < 0 || pPars->iOutput >= Abc_NtkPoNum(pNtk)) )
{
Abc_Print( -2, "Output index (%d) is incorrect (can be 0 through %d).\n",
pPars->iOutput, Abc_NtkPoNum(pNtk)-1 );
return 0;
}
*/
/*
if ( Abc_NtkPoNum(pNtk) != 1 && pPars->fVerbose )
{
if ( pPars->iOutput == -1 )
Abc_Print( -2, "The %d property outputs are ORed together.\n", Abc_NtkPoNum(pNtk) );
else
Abc_Print( -2, "Working on the primary output with zero-based number %d (out of %d).\n",
pPars->iOutput, Abc_NtkPoNum(pNtk) );
}
*/
// run the procedure
// run the procedure
pAbc
->
Status
=
Abc_NtkDarPdr
(
pNtk
,
pPars
,
&
pCex
);
pAbc
->
Status
=
Abc_NtkDarPdr
(
pNtk
,
pPars
);
pAbc
->
nFrames
=
pPars
->
iFrame
;
pAbc
->
nFrames
=
pPars
->
iFrame
;
Abc_FrameReplaceCex
(
pAbc
,
&
pCex
);
Abc_FrameReplaceCex
(
pAbc
,
&
pNtk
->
pSeqModel
);
if
(
pNtk
->
vSeqModelVec
)
{
Abc_FrameReplaceCexVec
(
pAbc
,
&
pNtk
->
vSeqModelVec
);
pAbc
->
nFrames
=
-
1
;
}
return
0
;
return
0
;
usage:
usage:
...
...
src/base/abci/abcDar.c
View file @
58d4012a
...
@@ -2705,57 +2705,46 @@ int Abc_NtkDarSec( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, Fra_Sec_t * pSecPar )
...
@@ -2705,57 +2705,46 @@ int Abc_NtkDarSec( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, Fra_Sec_t * pSecPar )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Abc_NtkDarPdr
(
Abc_Ntk_t
*
pNtk
,
Pdr_Par_t
*
pPars
,
Abc_Cex_t
**
ppCex
)
int
Abc_NtkDarPdr
(
Abc_Ntk_t
*
pNtk
,
Pdr_Par_t
*
pPars
)
{
{
int
RetValue
=
-
1
;
int
RetValue
=
-
1
;
clock_t
clk
=
clock
();
clock_t
clk
=
clock
();
Aig_Man_t
*
pMan
;
Aig_Man_t
*
pMan
;
*
ppCex
=
NULL
;
pMan
=
Abc_NtkToDar
(
pNtk
,
0
,
1
);
pMan
=
Abc_NtkToDar
(
pNtk
,
0
,
1
);
if
(
pMan
==
NULL
)
if
(
pMan
==
NULL
)
{
{
Abc_Print
(
1
,
"Converting network into AIG has failed.
\n
"
);
Abc_Print
(
1
,
"Converting network into AIG has failed.
\n
"
);
return
-
1
;
return
-
1
;
}
}
/*
RetValue
=
Pdr_ManSolve
(
pMan
,
pPars
);
// perform ORing the primary outputs
if ( pPars->iOutput == -1 )
{
Aig_Man_t * pTemp = Saig_ManDupOrpos( pMan );
RetValue = Pdr_ManSolve( pTemp, pPars, ppCex );
if ( RetValue == 0 )
(*ppCex)->iPo = Saig_ManFindFailedPoCex( pMan, *ppCex );
Aig_ManStop( pTemp );
}
else
RetValue = Pdr_ManSolve( pMan, pPars, ppCex );
*/
RetValue
=
Pdr_ManSolve
(
pMan
,
pPars
,
ppCex
);
// output the result
if
(
!
pPars
->
fSilent
)
if
(
!
pPars
->
fSilent
)
{
{
if
(
RetValue
==
1
)
if
(
RetValue
==
1
)
Abc_Print
(
1
,
"Property proved. "
);
Abc_Print
(
1
,
"Property proved. "
);
else
if
(
RetValue
==
0
)
else
if
(
RetValue
==
0
)
{
if
(
pMan
->
pSeqModel
==
NULL
)
Abc_Print
(
1
,
"Abc_NtkDarPdr(): Counter-example is not available.
\n
"
);
else
{
Abc_Print
(
1
,
"Output %d of miter
\"
%s
\"
was asserted in frame %d. "
,
pMan
->
pSeqModel
->
iPo
,
pNtk
->
pName
,
pMan
->
pSeqModel
->
iFrame
);
Abc_Print
(
1
,
"Output %d of miter
\"
%s
\"
was asserted in frame %d. "
,
pMan
->
pSeqModel
->
iPo
,
pNtk
->
pName
,
pMan
->
pSeqModel
->
iFrame
);
if
(
!
Saig_ManVerifyCex
(
pMan
,
pMan
->
pSeqModel
)
)
Abc_Print
(
1
,
"Abc_NtkDarPdr(): Counter-example verification has FAILED.
\n
"
);
}
}
else
if
(
RetValue
==
-
1
)
else
if
(
RetValue
==
-
1
)
Abc_Print
(
1
,
"Property UNDECIDED. "
);
Abc_Print
(
1
,
"Property UNDECIDED. "
);
else
else
assert
(
0
);
assert
(
0
);
ABC_PRT
(
"Time"
,
clock
()
-
clk
);
ABC_PRT
(
"Time"
,
clock
()
-
clk
);
}
}
ABC_FREE
(
pNtk
->
pSeqModel
);
// ABC_FREE( pNtk->pSeqModel );
pNtk
->
pSeqModel
=
pMan
->
pSeqModel
;
// pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL;
if
(
ppCex
)
*
ppCex
=
pMan
->
pSeqModel
;
else
ABC_FREE
(
pMan
->
pSeqModel
);
pMan
->
pSeqModel
=
NULL
;
pMan
->
pSeqModel
=
NULL
;
if
(
pNtk
->
vSeqModelVec
)
if
(
*
ppCex
&&
!
Saig_ManVerifyCex
(
pMan
,
*
ppCex
)
)
Vec_PtrFreeFree
(
pNtk
->
vSeqModelVec
);
Abc_Print
(
1
,
"Abc_NtkDarPdr(): Counter-example verification has FAILED.
\n
"
);
pNtk
->
vSeqModelVec
=
pMan
->
vSeqModelVec
;
pMan
->
vSeqModelVec
=
NULL
;
Aig_ManStop
(
pMan
);
Aig_ManStop
(
pMan
);
return
RetValue
;
return
RetValue
;
}
}
...
...
src/misc/util/utilCex.c
View file @
58d4012a
...
@@ -261,8 +261,9 @@ void Abc_CexPrintStats( Abc_Cex_t * p )
...
@@ -261,8 +261,9 @@ void Abc_CexPrintStats( Abc_Cex_t * p )
}
}
for
(
k
=
0
;
k
<
p
->
nBits
;
k
++
)
for
(
k
=
0
;
k
<
p
->
nBits
;
k
++
)
Counter
+=
Abc_InfoHasBit
(
p
->
pData
,
k
);
Counter
+=
Abc_InfoHasBit
(
p
->
pData
,
k
);
printf
(
"CEX: iPo = %d iFrame = %d nRegs = %d nPis = %d nBits =%8d nOnes =%8d (%5.2f %%)
\n
"
,
printf
(
"CEX: Po =%4d Frame =%4d FF = %d PI = %d Bit =%8d 1s =%8d (%5.2f %%)
\n
"
,
p
->
iPo
,
p
->
iFrame
,
p
->
nRegs
,
p
->
nPis
,
p
->
nBits
,
Counter
,
100
.
0
*
Counter
/
(
p
->
nBits
-
p
->
nRegs
)
);
p
->
iPo
,
p
->
iFrame
,
p
->
nRegs
,
p
->
nPis
,
p
->
nBits
,
Counter
,
100
.
0
*
Counter
/
(
p
->
nBits
-
p
->
nRegs
)
);
}
}
void
Abc_CexPrintStatsInputs
(
Abc_Cex_t
*
p
,
int
nInputs
)
void
Abc_CexPrintStatsInputs
(
Abc_Cex_t
*
p
,
int
nInputs
)
{
{
...
@@ -278,7 +279,7 @@ void Abc_CexPrintStatsInputs( Abc_Cex_t * p, int nInputs )
...
@@ -278,7 +279,7 @@ void Abc_CexPrintStatsInputs( Abc_Cex_t * p, int nInputs )
if
(
(
k
-
p
->
nRegs
)
%
p
->
nPis
<
nInputs
)
if
(
(
k
-
p
->
nRegs
)
%
p
->
nPis
<
nInputs
)
Counter2
+=
Abc_InfoHasBit
(
p
->
pData
,
k
);
Counter2
+=
Abc_InfoHasBit
(
p
->
pData
,
k
);
}
}
printf
(
"CEX:
iPo = %d iFrame = %d nRegs = %d nPis = %d nBits =%8d nOnes =%8d (%5.2f %%) nOne
sIn =%8d (%5.2f %%)
\n
"
,
printf
(
"CEX:
Po =%4d Frame =%4d FF = %d PI = %d Bit =%8d 1s =%8d (%5.2f %%) 1
sIn =%8d (%5.2f %%)
\n
"
,
p
->
iPo
,
p
->
iFrame
,
p
->
nRegs
,
p
->
nPis
,
p
->
nBits
,
p
->
iPo
,
p
->
iFrame
,
p
->
nRegs
,
p
->
nPis
,
p
->
nBits
,
Counter
,
100
.
0
*
Counter
/
(
p
->
nBits
-
p
->
nRegs
),
Counter
,
100
.
0
*
Counter
/
(
p
->
nBits
-
p
->
nRegs
),
Counter2
,
100
.
0
*
Counter2
/
(
p
->
nBits
-
p
->
nRegs
-
(
p
->
iFrame
+
1
)
*
(
p
->
nPis
-
nInputs
))
);
Counter2
,
100
.
0
*
Counter2
/
(
p
->
nBits
-
p
->
nRegs
-
(
p
->
iFrame
+
1
)
*
(
p
->
nPis
-
nInputs
))
);
...
...
src/proof/abs/absOldRef.c
View file @
58d4012a
...
@@ -134,7 +134,6 @@ Aig_Man_t * Saig_ManCexRefine( Aig_Man_t * p, Aig_Man_t * pAbs, Vec_Int_t * vFlo
...
@@ -134,7 +134,6 @@ Aig_Man_t * Saig_ManCexRefine( Aig_Man_t * p, Aig_Man_t * pAbs, Vec_Int_t * vFlo
pSecPar->fVerbose = fVerbose;
pSecPar->fVerbose = fVerbose;
RetValue = Fra_FraigSec( pAbs, pSecPar, NULL );
RetValue = Fra_FraigSec( pAbs, pSecPar, NULL );
*/
*/
Abc_Cex_t
*
pCex
=
NULL
;
Aig_Man_t
*
pAbsOrpos
=
Saig_ManDupOrpos
(
pAbs
);
Aig_Man_t
*
pAbsOrpos
=
Saig_ManDupOrpos
(
pAbs
);
Pdr_Par_t
Pars
,
*
pPars
=
&
Pars
;
Pdr_Par_t
Pars
,
*
pPars
=
&
Pars
;
Pdr_ManSetDefaultParams
(
pPars
);
Pdr_ManSetDefaultParams
(
pPars
);
...
@@ -142,11 +141,12 @@ Aig_Man_t * Saig_ManCexRefine( Aig_Man_t * p, Aig_Man_t * pAbs, Vec_Int_t * vFlo
...
@@ -142,11 +141,12 @@ Aig_Man_t * Saig_ManCexRefine( Aig_Man_t * p, Aig_Man_t * pAbs, Vec_Int_t * vFlo
pPars
->
fVerbose
=
fVerbose
;
pPars
->
fVerbose
=
fVerbose
;
if
(
pPars
->
fVerbose
)
if
(
pPars
->
fVerbose
)
printf
(
"Running property directed reachability...
\n
"
);
printf
(
"Running property directed reachability...
\n
"
);
RetValue
=
Pdr_ManSolve
(
pAbsOrpos
,
pPars
,
&
pCex
);
RetValue
=
Pdr_ManSolve
(
pAbsOrpos
,
pPars
);
if
(
pCex
)
if
(
pAbsOrpos
->
pSeqModel
)
pCex
->
iPo
=
Saig_ManFindFailedPoCex
(
pAbs
,
pCex
);
pAbsOrpos
->
pSeqModel
->
iPo
=
Saig_ManFindFailedPoCex
(
pAbs
,
pAbsOrpos
->
pSeqModel
);
pAbs
->
pSeqModel
=
pAbsOrpos
->
pSeqModel
;
pAbsOrpos
->
pSeqModel
=
NULL
;
Aig_ManStop
(
pAbsOrpos
);
Aig_ManStop
(
pAbsOrpos
);
pAbs
->
pSeqModel
=
pCex
;
if
(
RetValue
)
if
(
RetValue
)
*
piRetValue
=
1
;
*
piRetValue
=
1
;
...
...
src/proof/abs/absPth.c
View file @
58d4012a
...
@@ -107,8 +107,7 @@ void * Abs_ProverThread( void * pArg )
...
@@ -107,8 +107,7 @@ void * Abs_ProverThread( void * pArg )
pPars
->
fSilent
=
1
;
pPars
->
fSilent
=
1
;
pPars
->
RunId
=
pThData
->
RunId
;
pPars
->
RunId
=
pThData
->
RunId
;
pPars
->
pFuncStop
=
Abs_CallBackToStop
;
pPars
->
pFuncStop
=
Abs_CallBackToStop
;
RetValue
=
Pdr_ManSolve
(
pThData
->
pAig
,
pPars
,
NULL
);
RetValue
=
Pdr_ManSolve
(
pThData
->
pAig
,
pPars
);
// RetValue = Pdr_ManSolve_test( pAig, pPars, NULL );
// update the result
// update the result
if
(
RetValue
==
1
)
if
(
RetValue
==
1
)
{
{
...
...
src/proof/fra/fraSec.c
View file @
58d4012a
...
@@ -589,19 +589,15 @@ ABC_PRT( "Time", clock() - clk );
...
@@ -589,19 +589,15 @@ ABC_PRT( "Time", clock() - clk );
// try PDR
// try PDR
if
(
pParSec
->
fUsePdr
&&
RetValue
==
-
1
&&
Aig_ManRegNum
(
pNew
)
>
0
)
if
(
pParSec
->
fUsePdr
&&
RetValue
==
-
1
&&
Aig_ManRegNum
(
pNew
)
>
0
)
{
{
Abc_Cex_t
*
pCex
=
NULL
;
Aig_Man_t
*
pNewOrpos
=
Saig_ManDupOrpos
(
pNew
);
Pdr_Par_t
Pars
,
*
pPars
=
&
Pars
;
Pdr_Par_t
Pars
,
*
pPars
=
&
Pars
;
Pdr_ManSetDefaultParams
(
pPars
);
Pdr_ManSetDefaultParams
(
pPars
);
pPars
->
nTimeOut
=
pParSec
->
nPdrTimeout
;
pPars
->
nTimeOut
=
pParSec
->
nPdrTimeout
;
pPars
->
fVerbose
=
pParSec
->
fVerbose
;
pPars
->
fVerbose
=
pParSec
->
fVerbose
;
if
(
pParSec
->
fVerbose
)
if
(
pParSec
->
fVerbose
)
printf
(
"Running property directed reachability...
\n
"
);
printf
(
"Running property directed reachability...
\n
"
);
RetValue
=
Pdr_ManSolve
(
pNewOrpos
,
pPars
,
&
pCex
);
RetValue
=
Pdr_ManSolve
(
pNew
,
pPars
);
if
(
pCex
)
if
(
pNew
->
pSeqModel
)
pCex
->
iPo
=
Saig_ManFindFailedPoCex
(
pNew
,
pCex
);
pNew
->
pSeqModel
->
iPo
=
Saig_ManFindFailedPoCex
(
pNew
,
pNew
->
pSeqModel
);
Aig_ManStop
(
pNewOrpos
);
pNew
->
pSeqModel
=
pCex
;
}
}
finish
:
finish
:
...
...
src/proof/pdr/pdr.h
View file @
58d4012a
...
@@ -71,7 +71,7 @@ struct Pdr_Par_t_
...
@@ -71,7 +71,7 @@ struct Pdr_Par_t_
/*=== pdrCore.c ==========================================================*/
/*=== pdrCore.c ==========================================================*/
extern
void
Pdr_ManSetDefaultParams
(
Pdr_Par_t
*
pPars
);
extern
void
Pdr_ManSetDefaultParams
(
Pdr_Par_t
*
pPars
);
extern
int
Pdr_ManSolve
(
Aig_Man_t
*
p
,
Pdr_Par_t
*
pPars
,
Abc_Cex_t
**
ppCex
);
extern
int
Pdr_ManSolve
(
Aig_Man_t
*
p
,
Pdr_Par_t
*
pPars
);
ABC_NAMESPACE_HEADER_END
ABC_NAMESPACE_HEADER_END
...
...
src/proof/pdr/pdrCore.c
View file @
58d4012a
...
@@ -635,7 +635,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
...
@@ -635,7 +635,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
if
(
!
p
->
pPars
->
fSolveAll
)
if
(
!
p
->
pPars
->
fSolveAll
)
{
{
p
->
pAig
->
pSeqModel
=
Pdr_ManDeriveCex
(
p
);
p
->
pAig
->
pSeqModel
=
Pdr_ManDeriveCex
(
p
);
return
0
;
// SAT
return
0
;
// SAT
}
}
p
->
pPars
->
nFailOuts
++
;
p
->
pPars
->
nFailOuts
++
;
...
@@ -647,6 +647,9 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
...
@@ -647,6 +647,9 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
Vec_PtrWriteEntry
(
p
->
vCexes
,
p
->
iOutCur
,
Pdr_ManDeriveCex
(
p
)
);
Vec_PtrWriteEntry
(
p
->
vCexes
,
p
->
iOutCur
,
Pdr_ManDeriveCex
(
p
)
);
if
(
p
->
pPars
->
nFailOuts
==
Saig_ManPoNum
(
p
->
pAig
)
)
if
(
p
->
pPars
->
nFailOuts
==
Saig_ManPoNum
(
p
->
pAig
)
)
return
0
;
// all SAT
return
0
;
// all SAT
Pdr_QueueClean
(
p
);
pCube
=
NULL
;
break
;
// keep solving
}
}
if
(
p
->
pPars
->
fVerbose
)
if
(
p
->
pPars
->
fVerbose
)
Pdr_ManPrintProgress
(
p
,
0
,
clock
()
-
clkStart
);
Pdr_ManPrintProgress
(
p
,
0
,
clock
()
-
clkStart
);
...
@@ -735,7 +738,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
...
@@ -735,7 +738,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Pdr_ManSolve
(
Aig_Man_t
*
pAig
,
Pdr_Par_t
*
pPars
,
Abc_Cex_t
**
ppCex
)
int
Pdr_ManSolve
(
Aig_Man_t
*
pAig
,
Pdr_Par_t
*
pPars
)
{
{
Pdr_Man_t
*
p
;
Pdr_Man_t
*
p
;
int
RetValue
;
int
RetValue
;
...
@@ -743,16 +746,19 @@ int Pdr_ManSolve( Aig_Man_t * pAig, Pdr_Par_t * pPars, Abc_Cex_t ** ppCex )
...
@@ -743,16 +746,19 @@ int Pdr_ManSolve( Aig_Man_t * pAig, Pdr_Par_t * pPars, Abc_Cex_t ** ppCex )
if
(
pPars
->
fVerbose
)
if
(
pPars
->
fVerbose
)
{
{
// Abc_Print( 1, "Running PDR by Niklas Een (aka IC3 by Aaron Bradley) with these parameters:\n" );
// Abc_Print( 1, "Running PDR by Niklas Een (aka IC3 by Aaron Bradley) with these parameters:\n" );
Abc_Print
(
1
,
"VarMax = %d. FrameMax = %d. QueueMax = %d. TimeMax = %d. "
,
Abc_Print
(
1
,
"VarMax = %d. FrameMax = %d. QueMax = %d. TimeMax = %d. "
,
pPars
->
nRecycle
,
pPars
->
nFrameMax
,
pPars
->
nRestLimit
,
pPars
->
nTimeOut
);
pPars
->
nRecycle
,
Abc_Print
(
1
,
"MonoCNF = %s. SkipGen = %s.
\n
"
,
pPars
->
nFrameMax
,
pPars
->
fMonoCnf
?
"yes"
:
"no"
,
pPars
->
fSkipGeneral
?
"yes"
:
"no"
);
pPars
->
nRestLimit
,
pPars
->
nTimeOut
);
Abc_Print
(
1
,
"MonoCNF = %s. SkipGen = %s. SolveAll = %s.
\n
"
,
pPars
->
fMonoCnf
?
"yes"
:
"no"
,
pPars
->
fSkipGeneral
?
"yes"
:
"no"
,
pPars
->
fSolveAll
?
"yes"
:
"no"
);
}
}
ABC_FREE
(
pAig
->
pSeqModel
);
ABC_FREE
(
pAig
->
pSeqModel
);
p
=
Pdr_ManStart
(
pAig
,
pPars
,
NULL
);
p
=
Pdr_ManStart
(
pAig
,
pPars
,
NULL
);
RetValue
=
Pdr_ManSolveInt
(
p
);
RetValue
=
Pdr_ManSolveInt
(
p
);
// if ( ppCex )
// *ppCex = RetValue ? NULL : Pdr_ManDeriveCex( p );
if
(
RetValue
==
0
)
if
(
RetValue
==
0
)
assert
(
pAig
->
pSeqModel
!=
NULL
||
p
->
vCexes
!=
NULL
);
assert
(
pAig
->
pSeqModel
!=
NULL
||
p
->
vCexes
!=
NULL
);
if
(
p
->
vCexes
)
if
(
p
->
vCexes
)
...
@@ -763,9 +769,6 @@ int Pdr_ManSolve( Aig_Man_t * pAig, Pdr_Par_t * pPars, Abc_Cex_t ** ppCex )
...
@@ -763,9 +769,6 @@ int Pdr_ManSolve( Aig_Man_t * pAig, Pdr_Par_t * pPars, Abc_Cex_t ** ppCex )
}
}
if
(
p
->
pPars
->
fDumpInv
)
if
(
p
->
pPars
->
fDumpInv
)
Pdr_ManDumpClauses
(
p
,
(
char
*
)
"inv.pla"
,
RetValue
==
1
);
Pdr_ManDumpClauses
(
p
,
(
char
*
)
"inv.pla"
,
RetValue
==
1
);
// if ( *ppCex && pPars->fVerbose )
// Abc_Print( 1, "Found counter-example in frame %d after exploring %d frames.\n",
// (*ppCex)->iFrame, p->nFrames );
p
->
tTotal
+=
clock
()
-
clk
;
p
->
tTotal
+=
clock
()
-
clk
;
Pdr_ManStop
(
p
);
Pdr_ManStop
(
p
);
pPars
->
iFrame
--
;
pPars
->
iFrame
--
;
...
...
src/proof/pdr/pdrInt.h
View file @
58d4012a
...
@@ -187,6 +187,7 @@ extern void Pdr_OblDeref( Pdr_Obl_t * p );
...
@@ -187,6 +187,7 @@ extern void Pdr_OblDeref( Pdr_Obl_t * p );
extern
int
Pdr_QueueIsEmpty
(
Pdr_Man_t
*
p
);
extern
int
Pdr_QueueIsEmpty
(
Pdr_Man_t
*
p
);
extern
Pdr_Obl_t
*
Pdr_QueueHead
(
Pdr_Man_t
*
p
);
extern
Pdr_Obl_t
*
Pdr_QueueHead
(
Pdr_Man_t
*
p
);
extern
Pdr_Obl_t
*
Pdr_QueuePop
(
Pdr_Man_t
*
p
);
extern
Pdr_Obl_t
*
Pdr_QueuePop
(
Pdr_Man_t
*
p
);
extern
void
Pdr_QueueClean
(
Pdr_Man_t
*
p
);
extern
void
Pdr_QueuePush
(
Pdr_Man_t
*
p
,
Pdr_Obl_t
*
pObl
);
extern
void
Pdr_QueuePush
(
Pdr_Man_t
*
p
,
Pdr_Obl_t
*
pObl
);
extern
void
Pdr_QueuePrint
(
Pdr_Man_t
*
p
);
extern
void
Pdr_QueuePrint
(
Pdr_Man_t
*
p
);
extern
void
Pdr_QueueStop
(
Pdr_Man_t
*
p
);
extern
void
Pdr_QueueStop
(
Pdr_Man_t
*
p
);
...
...
src/proof/pdr/pdrMan.c
View file @
58d4012a
...
@@ -188,6 +188,8 @@ Abc_Cex_t * Pdr_ManDeriveCex( Pdr_Man_t * p )
...
@@ -188,6 +188,8 @@ Abc_Cex_t * Pdr_ManDeriveCex( Pdr_Man_t * p )
Abc_InfoSetBit
(
pCex
->
pData
,
pCex
->
nRegs
+
f
*
pCex
->
nPis
+
lit_var
(
Lit
)
);
Abc_InfoSetBit
(
pCex
->
pData
,
pCex
->
nRegs
+
f
*
pCex
->
nPis
+
lit_var
(
Lit
)
);
}
}
assert
(
f
==
nFrames
);
assert
(
f
==
nFrames
);
if
(
!
Saig_ManVerifyCex
(
p
->
pAig
,
pCex
)
)
printf
(
"CEX for output %d is not valid.
\n
"
,
p
->
iOutCur
);
return
pCex
;
return
pCex
;
}
}
...
...
src/proof/pdr/pdrUtil.c
View file @
58d4012a
...
@@ -510,6 +510,24 @@ Pdr_Obl_t * Pdr_QueuePop( Pdr_Man_t * p )
...
@@ -510,6 +510,24 @@ Pdr_Obl_t * Pdr_QueuePop( Pdr_Man_t * p )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Pdr_QueueClean
(
Pdr_Man_t
*
p
)
{
Pdr_Obl_t
*
pThis
;
while
(
(
pThis
=
Pdr_QueuePop
(
p
))
)
Pdr_OblDeref
(
pThis
);
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Pdr_QueuePush
(
Pdr_Man_t
*
p
,
Pdr_Obl_t
*
pObl
)
void
Pdr_QueuePush
(
Pdr_Man_t
*
p
,
Pdr_Obl_t
*
pObl
)
{
{
Pdr_Obl_t
*
pTemp
,
**
ppPrev
;
Pdr_Obl_t
*
pTemp
,
**
ppPrev
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment