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
67e84b71
Commit
67e84b71
authored
Jul 25, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enhancing printing of counter-examples.
parent
c4dd8067
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
src/misc/util/utilCex.c
+32
-3
src/misc/util/utilCex.h
+1
-0
No files found.
src/misc/util/utilCex.c
View file @
67e84b71
...
@@ -185,18 +185,47 @@ Abc_Cex_t * Abc_CexDeriveFromCombModel( int * pModel, int nPis, int nRegs, int i
...
@@ -185,18 +185,47 @@ Abc_Cex_t * Abc_CexDeriveFromCombModel( int * pModel, int nPis, int nRegs, int i
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Abc_CexPrintStats
(
Abc_Cex_t
*
p
)
{
int
k
,
Counter
=
0
;
if
(
p
==
NULL
)
{
printf
(
"The counter example is NULL.
\n
"
);
return
;
}
for
(
k
=
0
;
k
<
p
->
nBits
;
k
++
)
Counter
+=
Abc_InfoHasBit
(
p
->
pData
,
k
);
printf
(
"CEX: iPo = %d iFrame = %d nRegs = %d nPis = %d nBits = %d nOnes = %5d (%5.2f %%)
\n
"
,
p
->
iPo
,
p
->
iFrame
,
p
->
nRegs
,
p
->
nPis
,
p
->
nBits
,
Counter
,
100
.
0
*
Counter
/
p
->
nBits
);
}
/**Function*************************************************************
Synopsis [Prints out the counter-example.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_CexPrint
(
Abc_Cex_t
*
p
)
void
Abc_CexPrint
(
Abc_Cex_t
*
p
)
{
{
int
i
,
f
,
k
;
int
i
,
f
,
k
;
printf
(
"Counter-example: iPo = %d iFrame = %d nRegs = %d nPis = %d nBits = %d
\n
"
,
if
(
p
==
NULL
)
p
->
iPo
,
p
->
iFrame
,
p
->
nRegs
,
p
->
nPis
,
p
->
nBits
);
{
printf
(
"The counter example is NULL.
\n
"
);
return
;
}
Abc_CexPrintStats
(
p
);
printf
(
"State : "
);
printf
(
"State : "
);
for
(
k
=
0
;
k
<
p
->
nRegs
;
k
++
)
for
(
k
=
0
;
k
<
p
->
nRegs
;
k
++
)
printf
(
"%d"
,
Abc_InfoHasBit
(
p
->
pData
,
k
)
);
printf
(
"%d"
,
Abc_InfoHasBit
(
p
->
pData
,
k
)
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
for
(
f
=
0
;
f
<=
p
->
iFrame
;
f
++
)
for
(
f
=
0
;
f
<=
p
->
iFrame
;
f
++
)
{
{
printf
(
"Frame %
2
d : "
,
f
);
printf
(
"Frame %
3
d : "
,
f
);
for
(
i
=
0
;
i
<
p
->
nPis
;
i
++
)
for
(
i
=
0
;
i
<
p
->
nPis
;
i
++
)
printf
(
"%d"
,
Abc_InfoHasBit
(
p
->
pData
,
k
++
)
);
printf
(
"%d"
,
Abc_InfoHasBit
(
p
->
pData
,
k
++
)
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
...
...
src/misc/util/utilCex.h
View file @
67e84b71
...
@@ -61,6 +61,7 @@ extern Abc_Cex_t * Abc_CexMakeTriv( int nRegs, int nTruePis, int nTruePos, int
...
@@ -61,6 +61,7 @@ extern Abc_Cex_t * Abc_CexMakeTriv( int nRegs, int nTruePis, int nTruePos, int
extern
Abc_Cex_t
*
Abc_CexCreate
(
int
nRegs
,
int
nTruePis
,
int
*
pArray
,
int
iFrame
,
int
iPo
,
int
fSkipRegs
);
extern
Abc_Cex_t
*
Abc_CexCreate
(
int
nRegs
,
int
nTruePis
,
int
*
pArray
,
int
iFrame
,
int
iPo
,
int
fSkipRegs
);
extern
Abc_Cex_t
*
Abc_CexDup
(
Abc_Cex_t
*
p
,
int
nRegsNew
);
extern
Abc_Cex_t
*
Abc_CexDup
(
Abc_Cex_t
*
p
,
int
nRegsNew
);
extern
Abc_Cex_t
*
Abc_CexDeriveFromCombModel
(
int
*
pModel
,
int
nPis
,
int
nRegs
,
int
iPo
);
extern
Abc_Cex_t
*
Abc_CexDeriveFromCombModel
(
int
*
pModel
,
int
nPis
,
int
nRegs
,
int
iPo
);
extern
void
Abc_CexPrintStats
(
Abc_Cex_t
*
p
);
extern
void
Abc_CexPrint
(
Abc_Cex_t
*
p
);
extern
void
Abc_CexPrint
(
Abc_Cex_t
*
p
);
extern
void
Abc_CexFree
(
Abc_Cex_t
*
p
);
extern
void
Abc_CexFree
(
Abc_Cex_t
*
p
);
...
...
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