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
6234e18d
Commit
6234e18d
authored
May 06, 2022
by
Miodrag Milanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give more reasonable error on read_cex and handle status
parent
c84323b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/base/io/io.c
+7
-4
No files found.
src/base/io/io.c
View file @
6234e18d
...
@@ -686,7 +686,7 @@ int Abc_NtkReadCexFile( char * pFileName, Abc_Ntk_t * pNtk, Abc_Cex_t ** ppCex,
...
@@ -686,7 +686,7 @@ int Abc_NtkReadCexFile( char * pFileName, Abc_Ntk_t * pNtk, Abc_Cex_t ** ppCex,
FILE
*
pFile
;
FILE
*
pFile
;
Abc_Cex_t
*
pCex
;
Abc_Cex_t
*
pCex
;
Vec_Int_t
*
vNums
;
Vec_Int_t
*
vNums
;
int
c
,
nRegs
=
-
1
,
nFrames
=
-
1
,
Status
=
0
;
int
c
,
nRegs
=
-
1
,
nFrames
=
-
1
;
pFile
=
fopen
(
pFileName
,
"r"
);
pFile
=
fopen
(
pFileName
,
"r"
);
if
(
pFile
==
NULL
)
if
(
pFile
==
NULL
)
{
{
...
@@ -804,7 +804,10 @@ int Abc_NtkReadCexFile( char * pFileName, Abc_Ntk_t * pNtk, Abc_Cex_t ** ppCex,
...
@@ -804,7 +804,10 @@ int Abc_NtkReadCexFile( char * pFileName, Abc_Ntk_t * pNtk, Abc_Cex_t ** ppCex,
Abc_NtkForEachPo
(
pNtk
,
pObj
,
i
)
nPoNtk
++
;
Abc_NtkForEachPo
(
pNtk
,
pObj
,
i
)
nPoNtk
++
;
if
(
nRegs
<
0
)
if
(
nRegs
<
0
)
{
{
printf
(
"ERROR: Cannot read register number.
\n
"
);
if
(
status
==
1
)
printf
(
"ERROR: Cannot read register number.
\n
"
);
else
printf
(
"Counter-example is not available.
\n
"
);
Vec_IntFree
(
vNums
);
Vec_IntFree
(
vNums
);
return
-
1
;
return
-
1
;
}
}
...
@@ -866,7 +869,7 @@ int Abc_NtkReadCexFile( char * pFileName, Abc_Ntk_t * pNtk, Abc_Cex_t ** ppCex,
...
@@ -866,7 +869,7 @@ int Abc_NtkReadCexFile( char * pFileName, Abc_Ntk_t * pNtk, Abc_Cex_t ** ppCex,
if
(
pnFrames
)
if
(
pnFrames
)
*
pnFrames
=
nFrames
;
*
pnFrames
=
nFrames
;
return
S
tatus
;
return
s
tatus
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -927,7 +930,7 @@ int IoCommandReadCex( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -927,7 +930,7 @@ int IoCommandReadCex( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_FrameClearVerifStatus
(
pAbc
);
Abc_FrameClearVerifStatus
(
pAbc
);
pAbc
->
Status
=
Abc_NtkReadCexFile
(
pFileName
,
pNtk
,
&
pAbc
->
pCex
,
&
pAbc
->
nFrames
,
&
fOldFormat
);
pAbc
->
Status
=
Abc_NtkReadCexFile
(
pFileName
,
pNtk
,
&
pAbc
->
pCex
,
&
pAbc
->
nFrames
,
&
fOldFormat
);
if
(
fCheck
)
{
if
(
fCheck
&&
pAbc
->
Status
==
1
)
{
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
);
Bmc_CexCareVerify
(
pAig
,
pAbc
->
pCex
,
pAbc
->
pCex
,
false
);
Bmc_CexCareVerify
(
pAig
,
pAbc
->
pCex
,
pAbc
->
pCex
,
false
);
...
...
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