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
06ae1644
Commit
06ae1644
authored
Feb 17, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing the problem with writing/reading bug-free depth in status files.
parent
5b4ef503
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
src/base/abci/abcLog.c
+13
-6
No files found.
src/base/abci/abcLog.c
View file @
06ae1644
...
...
@@ -84,13 +84,16 @@ void Abc_NtkWriteLogFile( char * pFileName, Abc_Cex_t * pCex, int Status, int nF
else
printf
(
"Abc_NtkWriteLogFile(): Cannot recognize solving status.
\n
"
);
fprintf
(
pFile
,
" "
);
// write <
cyc
>
fprintf
(
pFile
,
"%d"
,
pCex
?
pCex
->
iFrame
:
nFrames
);
// write <
bug_free_depth
>
fprintf
(
pFile
,
"%d"
,
nFrames
);
fprintf
(
pFile
,
" "
);
// write <engine_name>
fprintf
(
pFile
,
"%s"
,
pCommand
?
pCommand
:
"unknown"
);
if
(
Status
==
0
)
fprintf
(
pFile
,
" %d"
,
pCex
->
iPo
);
// write <cyc>
if
(
pCex
&&
pCex
->
iFrame
!=
nFrames
)
fprintf
(
pFile
,
" %d"
,
pCex
->
iFrame
);
fprintf
(
pFile
,
"
\n
"
);
// write <INIT_STATE>
if
(
pCex
==
NULL
)
...
...
@@ -131,7 +134,7 @@ int Abc_NtkReadLogFile( char * pFileName, Abc_Cex_t ** ppCex, int * pnFrames )
Abc_Cex_t
*
pCex
;
Vec_Int_t
*
vNums
;
char
Buffer
[
1000
],
*
pToken
;
int
c
,
nRegs
=
-
1
,
nFrames
=
-
1
,
iPo
=
-
1
,
Status
=
-
1
;
int
c
,
nRegs
=
-
1
,
nFrames
=
-
1
,
iPo
=
-
1
,
Status
=
-
1
,
nFrames2
=
-
1
;
pFile
=
fopen
(
pFileName
,
"r"
);
if
(
pFile
==
NULL
)
{
...
...
@@ -153,6 +156,9 @@ int Abc_NtkReadLogFile( char * pFileName, Abc_Cex_t ** ppCex, int * pnFrames )
pToken
=
strtok
(
NULL
,
"
\t\n
"
);
pToken
=
strtok
(
NULL
,
"
\t\n
"
);
iPo
=
atoi
(
pToken
);
pToken
=
strtok
(
NULL
,
"
\t\n
"
);
if
(
pToken
)
nFrames2
=
atoi
(
pToken
);
}
else
if
(
!
strncmp
(
Buffer
,
"snl_UNK"
,
strlen
(
"snl_UNK"
)
)
)
{
...
...
@@ -182,6 +188,7 @@ int Abc_NtkReadLogFile( char * pFileName, Abc_Cex_t ** ppCex, int * pnFrames )
fclose
(
pFile
);
if
(
Vec_IntSize
(
vNums
)
)
{
int
iFrameCex
=
(
nFrames2
==
-
1
)
?
nFrames
:
nFrames2
;
if
(
nRegs
==
0
)
{
printf
(
"Cannot read register number.
\n
"
);
...
...
@@ -192,14 +199,14 @@ int Abc_NtkReadLogFile( char * pFileName, Abc_Cex_t ** ppCex, int * pnFrames )
printf
(
"Cannot read counter example.
\n
"
);
return
-
1
;
}
if
(
(
Vec_IntSize
(
vNums
)
-
nRegs
)
%
nFrames
!=
0
)
if
(
(
Vec_IntSize
(
vNums
)
-
nRegs
)
%
(
iFrameCex
+
1
)
!=
0
)
{
printf
(
"Incorrect number of bits.
\n
"
);
return
-
1
;
}
pCex
=
Abc_CexAlloc
(
nRegs
,
(
Vec_IntSize
(
vNums
)
-
nRegs
)
/
nFrames
,
nFrames
);
pCex
=
Abc_CexAlloc
(
nRegs
,
(
Vec_IntSize
(
vNums
)
-
nRegs
)
/
(
iFrameCex
+
1
),
iFrameCex
+
1
);
pCex
->
iPo
=
iPo
;
pCex
->
iFrame
=
nFrames
-
1
;
pCex
->
iFrame
=
iFrameCex
;
assert
(
Vec_IntSize
(
vNums
)
==
pCex
->
nBits
);
for
(
c
=
0
;
c
<
pCex
->
nBits
;
c
++
)
if
(
Vec_IntEntry
(
vNums
,
c
)
)
...
...
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