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
f2d096c9
Commit
f2d096c9
authored
Feb 10, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improving CEX minimization.
parent
d335ee09
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
13 deletions
+24
-13
src/base/io/io.c
+1
-1
src/misc/util/utilCex.c
+18
-7
src/sat/bmc/bmc.h
+2
-2
src/sat/bmc/bmcCexCare.c
+0
-0
src/sat/bmc/bmcCexTools.c
+3
-3
No files found.
src/base/io/io.c
View file @
f2d096c9
...
...
@@ -2420,7 +2420,7 @@ int IoCommandWriteCex( Abc_Frame_t * pAbc, int argc, char **argv )
Bmc_CexCareVerify
(
pAig
,
pCex
,
pCare
,
fVerbose
);
}
else
pCare
=
Bmc_CexCareMinimize
(
pAig
,
pCex
,
fCheckCex
,
fVerbose
);
pCare
=
Bmc_CexCareMinimize
(
pAig
,
0
,
pCex
,
fCheckCex
,
fVerbose
);
Aig_ManStop
(
pAig
);
}
// output flop values (unaffected by the minimization)
...
...
src/misc/util/utilCex.c
View file @
f2d096c9
...
...
@@ -272,9 +272,9 @@ void Abc_CexPrintStats( Abc_Cex_t * p )
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
n
Input
s
)
void
Abc_CexPrintStatsInputs
(
Abc_Cex_t
*
p
,
int
n
RealPi
s
)
{
int
k
,
Counter
=
0
,
Counter
2
=
0
;
int
k
,
Counter
=
0
,
Counter
Pi
=
0
,
CounterPpi
=
0
;
if
(
p
==
NULL
)
{
printf
(
"The counter example is NULL.
\n
"
);
...
...
@@ -285,16 +285,27 @@ void Abc_CexPrintStatsInputs( Abc_Cex_t * p, int nInputs )
printf
(
"The counter example is present but not available (pointer has value
\"
1
\"
).
\n
"
);
return
;
}
assert
(
nRealPis
<=
p
->
nPis
);
for
(
k
=
0
;
k
<
p
->
nBits
;
k
++
)
{
Counter
+=
Abc_InfoHasBit
(
p
->
pData
,
k
);
if
(
(
k
-
p
->
nRegs
)
%
p
->
nPis
<
nInputs
)
Counter2
+=
Abc_InfoHasBit
(
p
->
pData
,
k
);
if
(
nRealPis
==
p
->
nPis
)
continue
;
if
(
(
k
-
p
->
nRegs
)
%
p
->
nPis
<
nRealPis
)
CounterPi
+=
Abc_InfoHasBit
(
p
->
pData
,
k
);
else
CounterPpi
+=
Abc_InfoHasBit
(
p
->
pData
,
k
);
}
printf
(
"CEX: Po =%4d Fr
ame =%4d FF = %d PI = %d Bit =%8d 1s =%8d (%5.2f %%) 1sIn =%8d (%5.2f %%)
\n
"
,
printf
(
"CEX: Po =%4d Fr
=%4d FF = %d PI = %d Bit =%7d 1 =%8d (%5.2f %%)
"
,
p
->
iPo
,
p
->
iFrame
,
p
->
nRegs
,
p
->
nPis
,
p
->
nBits
,
Counter
,
100
.
0
*
Counter
/
(
p
->
nBits
-
p
->
nRegs
),
Counter2
,
100
.
0
*
Counter2
/
(
p
->
nBits
-
p
->
nRegs
-
(
p
->
iFrame
+
1
)
*
(
p
->
nPis
-
nInputs
))
);
Counter
,
100
.
0
*
Counter
/
((
p
->
iFrame
+
1
)
*
p
->
nPis
)
);
if
(
nRealPis
<
p
->
nPis
)
{
printf
(
" 1pi =%8d (%5.2f %%) 1ppi =%8d (%5.2f %%)"
,
CounterPi
,
100
.
0
*
CounterPi
/
((
p
->
iFrame
+
1
)
*
nRealPis
),
CounterPpi
,
100
.
0
*
CounterPpi
/
((
p
->
iFrame
+
1
)
*
(
p
->
nPis
-
nRealPis
))
);
}
printf
(
"
\n
"
);
}
/**Function*************************************************************
...
...
src/sat/bmc/bmc.h
View file @
f2d096c9
...
...
@@ -164,7 +164,7 @@ extern int Saig_ManBmcScalable( Aig_Man_t * pAig, Saig_ParBmc_t *
extern
int
Gia_ManBmcPerform
(
Gia_Man_t
*
p
,
Bmc_AndPar_t
*
pPars
);
/*=== bmcCexCare.c ==========================================================*/
extern
Abc_Cex_t
*
Bmc_CexCareExtendToObjects
(
Gia_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
Abc_Cex_t
*
pCexCare
);
extern
Abc_Cex_t
*
Bmc_CexCareMinimize
(
Aig_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
fCheck
,
int
fVerbose
);
extern
Abc_Cex_t
*
Bmc_CexCareMinimize
(
Aig_Man_t
*
p
,
int
nPPis
,
Abc_Cex_t
*
pCex
,
int
fCheck
,
int
fVerbose
);
extern
void
Bmc_CexCareVerify
(
Aig_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
Abc_Cex_t
*
pCexMin
,
int
fVerbose
);
/*=== bmcCexCut.c ==========================================================*/
extern
Gia_Man_t
*
Bmc_GiaTargetStates
(
Gia_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrBeg
,
int
iFrEnd
,
int
fCombOnly
,
int
fGenAll
,
int
fAllFrames
,
int
fVerbose
);
...
...
@@ -172,7 +172,7 @@ extern Aig_Man_t * Bmc_AigTargetStates( Aig_Man_t * p, Abc_Cex_t * pCex, i
/*=== bmcCexMin.c ==========================================================*/
extern
Abc_Cex_t
*
Saig_ManCexMinPerform
(
Aig_Man_t
*
pAig
,
Abc_Cex_t
*
pCex
);
/*=== bmcCexTool.c ==========================================================*/
extern
void
Bmc_CexPrint
(
Abc_Cex_t
*
pCex
,
int
n
Input
s
,
int
fVerbose
);
extern
void
Bmc_CexPrint
(
Abc_Cex_t
*
pCex
,
int
n
RealPi
s
,
int
fVerbose
);
extern
int
Bmc_CexVerify
(
Gia_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
Abc_Cex_t
*
pCexCare
);
/*=== bmcICheck.c ==========================================================*/
extern
void
Bmc_PerformICheck
(
Gia_Man_t
*
p
,
int
nFramesMax
,
int
nTimeOut
,
int
fEmpty
,
int
fVerbose
);
...
...
src/sat/bmc/bmcCexCare.c
View file @
f2d096c9
This diff is collapsed.
Click to expand it.
src/sat/bmc/bmcCexTools.c
View file @
f2d096c9
...
...
@@ -304,10 +304,10 @@ void Bmc_CexBuildNetworkTest( Gia_Man_t * p, Abc_Cex_t * pCex )
SeeAlso []
***********************************************************************/
void
Bmc_CexPrint
(
Abc_Cex_t
*
pCex
,
int
n
Input
s
,
int
fVerbose
)
void
Bmc_CexPrint
(
Abc_Cex_t
*
pCex
,
int
n
RealPi
s
,
int
fVerbose
)
{
int
i
,
k
,
Count
,
iBit
=
pCex
->
nRegs
;
Abc_CexPrintStatsInputs
(
pCex
,
n
Input
s
);
Abc_CexPrintStatsInputs
(
pCex
,
n
RealPi
s
);
if
(
!
fVerbose
)
return
;
...
...
@@ -315,7 +315,7 @@ void Bmc_CexPrint( Abc_Cex_t * pCex, int nInputs, int fVerbose )
{
Count
=
0
;
printf
(
"%3d : "
,
i
);
for
(
k
=
0
;
k
<
n
Input
s
;
k
++
)
for
(
k
=
0
;
k
<
n
RealPi
s
;
k
++
)
{
Count
+=
Abc_InfoHasBit
(
pCex
->
pData
,
iBit
);
printf
(
"%d"
,
Abc_InfoHasBit
(
pCex
->
pData
,
iBit
++
)
);
...
...
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