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
cea41303
Commit
cea41303
authored
Feb 15, 2022
by
Claire Xenia Wolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes and more cleanups in write_cex output code
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
parent
db7ebfb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
34 deletions
+27
-34
src/base/io/io.c
+27
-34
No files found.
src/base/io/io.c
View file @
cea41303
...
@@ -2465,17 +2465,17 @@ void Abc_NtkDumpOneCex( FILE * pFile, Abc_Ntk_t * pNtk, Abc_Cex_t * pCex,
...
@@ -2465,17 +2465,17 @@ void Abc_NtkDumpOneCex( FILE * pFile, Abc_Ntk_t * pNtk, Abc_Cex_t * pCex,
fprintf
(
pFile
,
"%s@%d=%c "
,
Abc_ObjName
(
pObj
),
f
,
'0'
+
Abc_InfoHasBit
(
pCexFull
->
pData
,
Abc_NtkCiNum
(
pNtk
)
*
f
+
i
)
);
fprintf
(
pFile
,
"%s@%d=%c "
,
Abc_ObjName
(
pObj
),
f
,
'0'
+
Abc_InfoHasBit
(
pCexFull
->
pData
,
Abc_NtkCiNum
(
pNtk
)
*
f
+
i
)
);
Abc_CexFreeP
(
&
pCexFull
);
Abc_CexFreeP
(
&
pCexFull
);
}
}
else
if
(
fNames
||
fMinimize
)
else
{
{
if
(
fNames
)
{
fprintf
(
pFile
,
"# FALSIFYING OUTPUTS:"
);
fprintf
(
pFile
,
" %s"
,
Abc_ObjName
(
Abc_NtkCo
(
pNtk
,
pCex
->
iPo
))
);
}
if
(
fMinimize
)
if
(
fMinimize
)
{
{
extern
Aig_Man_t
*
Abc_NtkToDar
(
Abc_Ntk_t
*
pNtk
,
int
fExors
,
int
fRegisters
);
extern
Aig_Man_t
*
Abc_NtkToDar
(
Abc_Ntk_t
*
pNtk
,
int
fExors
,
int
fRegisters
);
Aig_Man_t
*
pAig
=
Abc_NtkToDar
(
pNtk
,
0
,
1
);
Aig_Man_t
*
pAig
=
Abc_NtkToDar
(
pNtk
,
0
,
1
);
if
(
fNames
)
{
fprintf
(
pFile
,
"# FALSIFYING OUTPUTS:"
);
fprintf
(
pFile
,
" %s"
,
Abc_ObjName
(
Abc_NtkCo
(
pNtk
,
pCex
->
iPo
))
);
}
if
(
fUseOldMin
)
if
(
fUseOldMin
)
{
{
pCare
=
Saig_ManCbaFindCexCareBits
(
pAig
,
pCex
,
0
,
fVerbose
);
pCare
=
Saig_ManCbaFindCexCareBits
(
pAig
,
pCex
,
0
,
fVerbose
);
...
@@ -2510,19 +2510,15 @@ void Abc_NtkDumpOneCex( FILE * pFile, Abc_Ntk_t * pNtk, Abc_Cex_t * pCex,
...
@@ -2510,19 +2510,15 @@ void Abc_NtkDumpOneCex( FILE * pFile, Abc_Ntk_t * pNtk, Abc_Cex_t * pCex,
else
else
pCare
=
Bmc_CexCareMinimize
(
pAig
,
Saig_ManPiNum
(
pAig
),
pCex
,
4
,
fCheckCex
,
fVerbose
);
pCare
=
Bmc_CexCareMinimize
(
pAig
,
Saig_ManPiNum
(
pAig
),
pCex
,
4
,
fCheckCex
,
fVerbose
);
Aig_ManStop
(
pAig
);
Aig_ManStop
(
pAig
);
if
(
pCare
==
NULL
)
if
(
pCare
==
NULL
)
printf
(
"Counter-example minimization has failed.
\n
"
);
printf
(
"Counter-example minimization has failed.
\n
"
);
if
(
!
fNames
)
goto
no_names
;
}
}
else
if
(
fNames
)
{
{
fprintf
(
pFile
,
"# FALSIFYING OUTPUTS:"
);
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
" %s"
,
Abc_ObjName
(
Abc_NtkCo
(
pNtk
,
pCex
->
iPo
))
);
fprintf
(
pFile
,
"# COUNTEREXAMPLE LENGTH: %u
\n
"
,
pCex
->
iFrame
+
1
);
}
}
fprintf
(
pFile
,
"
\n
"
);
if
(
fNames
&&
fUseFfNames
&&
Abc_NtkCheckSpecialPi
(
pNtk
)
)
fprintf
(
pFile
,
"# COUNTEREXAMPLE LENGTH: %u
\n
"
,
pCex
->
iFrame
+
1
);
if
(
fUseFfNames
&&
Abc_NtkCheckSpecialPi
(
pNtk
)
)
{
{
int
*
pValues
;
int
*
pValues
;
int
nXValues
=
0
,
iFlop
=
0
,
iPivotPi
=
-
1
;
int
nXValues
=
0
,
iFlop
=
0
,
iPivotPi
=
-
1
;
...
@@ -2564,29 +2560,26 @@ void Abc_NtkDumpOneCex( FILE * pFile, Abc_Ntk_t * pNtk, Abc_Cex_t * pCex,
...
@@ -2564,29 +2560,26 @@ void Abc_NtkDumpOneCex( FILE * pFile, Abc_Ntk_t * pNtk, Abc_Cex_t * pCex,
{
{
// output flop values (unaffected by the minimization)
// output flop values (unaffected by the minimization)
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
fprintf
(
pFile
,
"%s@0=%c
\n
"
,
Abc_ObjName
(
Abc_ObjFanout0
(
pObj
)),
'0'
+!
Abc_LatchIsInit0
(
pObj
)
);
if
(
fNames
)
fprintf
(
pFile
,
"%s@0=%c
\n
"
,
Abc_ObjName
(
Abc_ObjFanout0
(
pObj
)),
'0'
+!
Abc_LatchIsInit0
(
pObj
)
);
else
fprintf
(
pFile
,
"%c"
,
'0'
+!
Abc_LatchIsInit0
(
pObj
)
);
if
(
!
fNames
)
fprintf
(
pFile
,
"
\n
"
);
// output PI values (while skipping the minimized ones)
// output PI values (while skipping the minimized ones)
for
(
f
=
0
;
f
<=
pCex
->
iFrame
;
f
++
)
for
(
f
=
0
;
f
<=
pCex
->
iFrame
;
f
++
)
{
Abc_NtkForEachPi
(
pNtk
,
pObj
,
i
)
Abc_NtkForEachPi
(
pNtk
,
pObj
,
i
)
if
(
!
pCare
||
Abc_InfoHasBit
(
pCare
->
pData
,
pCare
->
nRegs
+
pCare
->
nPis
*
f
+
i
)
)
if
(
!
pCare
||
Abc_InfoHasBit
(
pCare
->
pData
,
pCare
->
nRegs
+
pCare
->
nPis
*
f
+
i
)
)
fprintf
(
pFile
,
"%s@%d=%c
\n
"
,
Abc_ObjName
(
pObj
),
f
,
'0'
+
Abc_InfoHasBit
(
pCex
->
pData
,
pCex
->
nRegs
+
pCex
->
nPis
*
f
+
i
)
);
if
(
fNames
)
}
fprintf
(
pFile
,
"%s@%d=%c
\n
"
,
Abc_ObjName
(
pObj
),
f
,
'0'
+
Abc_InfoHasBit
(
pCex
->
pData
,
pCex
->
nRegs
+
pCex
->
nPis
*
f
+
i
)
);
Abc_CexFreeP
(
&
pCare
);
else
}
fprintf
(
pFile
,
"%c"
,
'0'
+
Abc_InfoHasBit
(
pCex
->
pData
,
pCex
->
nRegs
+
pCex
->
nPis
*
f
+
i
)
);
else
else
if
(
!
fNames
)
{
fprintf
(
pFile
,
"x"
);
no_names:
if
(
!
fNames
)
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"%c"
,
'0'
+!
Abc_LatchIsInit0
(
pObj
)
);
}
for
(
i
=
pCex
->
nRegs
;
i
<
pCex
->
nBits
;
i
++
)
{
if
(
fAiger
&&
(
i
-
pCex
->
nRegs
)
%
pCex
->
nPis
==
0
)
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"%c"
,
(
pCare
&&
!
Abc_InfoHasBit
(
pCare
->
pData
,
i
))
?
'x'
:
'0'
+
Abc_InfoHasBit
(
pCex
->
pData
,
i
)
);
}
}
if
(
fAiger
)
fprintf
(
pFile
,
"
\n
"
);
Abc_CexFreeP
(
&
pCare
);
Abc_CexFreeP
(
&
pCare
);
}
}
}
}
...
...
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