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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
27 deletions
+20
-27
src/base/io/io.c
+20
-27
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,
fprintf
(
pFile
,
"%s@%d=%c "
,
Abc_ObjName
(
pObj
),
f
,
'0'
+
Abc_InfoHasBit
(
pCexFull
->
pData
,
Abc_NtkCiNum
(
pNtk
)
*
f
+
i
)
);
Abc_CexFreeP
(
&
pCexFull
);
}
else
if
(
fNames
||
fMinimize
)
{
if
(
fMinimize
)
else
{
extern
Aig_Man_t
*
Abc_NtkToDar
(
Abc_Ntk_t
*
pNtk
,
int
fExors
,
int
fRegisters
);
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
(
fMinimize
)
{
extern
Aig_Man_t
*
Abc_NtkToDar
(
Abc_Ntk_t
*
pNtk
,
int
fExors
,
int
fRegisters
);
Aig_Man_t
*
pAig
=
Abc_NtkToDar
(
pNtk
,
0
,
1
);
if
(
fUseOldMin
)
{
pCare
=
Saig_ManCbaFindCexCareBits
(
pAig
,
pCex
,
0
,
fVerbose
);
...
...
@@ -2512,17 +2512,13 @@ void Abc_NtkDumpOneCex( FILE * pFile, Abc_Ntk_t * pNtk, Abc_Cex_t * pCex,
Aig_ManStop
(
pAig
);
if
(
pCare
==
NULL
)
printf
(
"Counter-example minimization has failed.
\n
"
);
if
(
!
fNames
)
goto
no_names
;
}
else
if
(
fNames
)
{
fprintf
(
pFile
,
"# FALSIFYING OUTPUTS:"
);
fprintf
(
pFile
,
" %s"
,
Abc_ObjName
(
Abc_NtkCo
(
pNtk
,
pCex
->
iPo
))
);
}
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"# COUNTEREXAMPLE LENGTH: %u
\n
"
,
pCex
->
iFrame
+
1
);
if
(
fUseFfNames
&&
Abc_NtkCheckSpecialPi
(
pNtk
)
)
}
if
(
fNames
&&
fUseFfNames
&&
Abc_NtkCheckSpecialPi
(
pNtk
)
)
{
int
*
pValues
;
int
nXValues
=
0
,
iFlop
=
0
,
iPivotPi
=
-
1
;
...
...
@@ -2564,29 +2560,26 @@ void Abc_NtkDumpOneCex( FILE * pFile, Abc_Ntk_t * pNtk, Abc_Cex_t * pCex,
{
// output flop values (unaffected by the minimization)
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
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)
for
(
f
=
0
;
f
<=
pCex
->
iFrame
;
f
++
)
for
(
f
=
0
;
f
<=
pCex
->
iFrame
;
f
++
)
{
Abc_NtkForEachPi
(
pNtk
,
pObj
,
i
)
if
(
!
pCare
||
Abc_InfoHasBit
(
pCare
->
pData
,
pCare
->
nRegs
+
pCare
->
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
{
no_names:
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
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
,
"%c"
,
'0'
+
Abc_InfoHasBit
(
pCex
->
pData
,
pCex
->
nRegs
+
pCex
->
nPis
*
f
+
i
)
);
else
if
(
!
fNames
)
fprintf
(
pFile
,
"x"
);
if
(
!
fNames
)
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
);
}
}
...
...
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