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
c48e3c7a
Commit
c48e3c7a
authored
Nov 29, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Counter-example analysis and optimization.
parent
66126598
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
src/misc/util/utilCex.c
+19
-0
src/misc/util/utilCex.h
+1
-0
src/sat/bmc/bmcCexTools.c
+0
-0
No files found.
src/misc/util/utilCex.c
View file @
c48e3c7a
...
...
@@ -264,6 +264,25 @@ void Abc_CexPrintStats( Abc_Cex_t * p )
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
-
p
->
nRegs
)
);
}
void
Abc_CexPrintStatsInputs
(
Abc_Cex_t
*
p
,
int
nInputs
)
{
int
k
,
Counter
=
0
,
Counter2
=
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
);
if
(
(
k
-
p
->
nRegs
)
%
p
->
nPis
<
nInputs
)
Counter2
+=
Abc_InfoHasBit
(
p
->
pData
,
k
);
}
printf
(
"CEX: iPo = %d iFrame = %d nRegs = %d nPis = %d nBits = %d nOnes = %5d (%5.2f %%) nOnesIn = %5d (%5.2f %%)
\n
"
,
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
))
);
}
/**Function*************************************************************
...
...
src/misc/util/utilCex.h
View file @
c48e3c7a
...
...
@@ -64,6 +64,7 @@ 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_CexMerge
(
Abc_Cex_t
*
pCex
,
Abc_Cex_t
*
pPart
,
int
iFrBeg
,
int
iFrEnd
);
extern
void
Abc_CexPrintStats
(
Abc_Cex_t
*
p
);
extern
void
Abc_CexPrintStatsInputs
(
Abc_Cex_t
*
p
,
int
nInputs
);
extern
void
Abc_CexPrint
(
Abc_Cex_t
*
p
);
extern
void
Abc_CexFreeP
(
Abc_Cex_t
**
p
);
extern
void
Abc_CexFree
(
Abc_Cex_t
*
p
);
...
...
src/sat/bmc/bmcCexTools.c
0 → 100644
View file @
c48e3c7a
This diff is collapsed.
Click to expand it.
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