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
790ea654
Commit
790ea654
authored
Sep 17, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving binary IO streams to the vector package.
parent
7e843d64
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
116 additions
and
116 deletions
+116
-116
src/map/scl/sclFile.c
+0
-115
src/misc/vec/vecStr.h
+115
-0
src/proof/abs/absGla.c
+1
-1
No files found.
src/map/scl/sclFile.c
View file @
790ea654
...
...
@@ -35,121 +35,6 @@ extern void Extra_PrintHex( FILE * pFile, unsigned Sign[], int nBits );
/**Function*************************************************************
Synopsis [Binary I/O for numbers (int/float/etc) and strings (char *).]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
void
Vec_StrPutI_ne
(
Vec_Str_t
*
vOut
,
int
Val
)
{
int
i
;
for
(
i
=
0
;
i
<
4
;
i
++
)
Vec_StrPush
(
vOut
,
(
char
)(
Val
>>
(
8
*
i
))
);
}
static
inline
int
Vec_StrGetI_ne
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
int
i
;
int
Val
=
0
;
for
(
i
=
0
;
i
<
4
;
i
++
)
Val
|=
(
int
)(
unsigned
char
)
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
)
<<
(
8
*
i
);
return
Val
;
}
static
inline
void
Vec_StrPutI
(
Vec_Str_t
*
vOut
,
int
Val
)
{
for
(
;
Val
>=
0x80
;
Val
>>=
7
)
Vec_StrPush
(
vOut
,
(
unsigned
char
)(
Val
|
0x80
)
);
Vec_StrPush
(
vOut
,
(
unsigned
char
)
Val
);
}
static
inline
int
Vec_StrGetI
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
unsigned
char
ch
;
int
i
=
0
,
Val
=
0
;
while
(
(
ch
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
))
&
0x80
)
Val
|=
(
ch
&
0x7f
)
<<
(
7
*
i
++
);
return
Val
|
(
ch
<<
(
7
*
i
));
}
static
inline
void
Vec_StrPutW
(
Vec_Str_t
*
vOut
,
word
Val
)
{
int
i
;
for
(
i
=
0
;
i
<
8
;
i
++
)
Vec_StrPush
(
vOut
,
(
char
)(
Val
>>
(
8
*
i
))
);
}
static
inline
word
Vec_StrGetW
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
int
i
;
word
Val
=
0
;
for
(
i
=
0
;
i
<
8
;
i
++
)
Val
|=
(
word
)(
unsigned
char
)
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
)
<<
(
8
*
i
);
return
Val
;
}
static
inline
void
Vec_StrPutF
(
Vec_Str_t
*
vOut
,
float
Val
)
{
union
{
float
num
;
unsigned
char
data
[
4
];
}
tmp
;
tmp
.
num
=
Val
;
Vec_StrPush
(
vOut
,
tmp
.
data
[
0
]
);
Vec_StrPush
(
vOut
,
tmp
.
data
[
1
]
);
Vec_StrPush
(
vOut
,
tmp
.
data
[
2
]
);
Vec_StrPush
(
vOut
,
tmp
.
data
[
3
]
);
}
static
inline
float
Vec_StrGetF
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
union
{
float
num
;
unsigned
char
data
[
4
];
}
tmp
;
tmp
.
data
[
0
]
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
tmp
.
data
[
1
]
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
tmp
.
data
[
2
]
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
tmp
.
data
[
3
]
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
return
tmp
.
num
;
}
static
inline
void
Vec_StrPutD
(
Vec_Str_t
*
vOut
,
double
Val
)
{
union
{
double
num
;
unsigned
char
data
[
8
];
}
tmp
;
int
i
,
Lim
=
sizeof
(
double
);
tmp
.
num
=
Val
;
for
(
i
=
0
;
i
<
Lim
;
i
++
)
Vec_StrPush
(
vOut
,
tmp
.
data
[
i
]
);
}
static
inline
double
Vec_StrGetD
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
union
{
double
num
;
unsigned
char
data
[
8
];
}
tmp
;
int
i
,
Lim
=
sizeof
(
double
);
for
(
i
=
0
;
i
<
Lim
;
i
++
)
tmp
.
data
[
i
]
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
return
tmp
.
num
;
}
static
inline
void
Vec_StrPutS
(
Vec_Str_t
*
vOut
,
char
*
pStr
)
{
while
(
*
pStr
)
Vec_StrPush
(
vOut
,
*
pStr
++
);
Vec_StrPush
(
vOut
,
(
char
)
0
);
}
static
inline
char
*
Vec_StrGetS
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
char
*
pStr
=
Vec_StrEntryP
(
vOut
,
*
pPos
);
while
(
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
)
);
return
Abc_UtilStrsav
(
pStr
);
}
static
inline
void
Vec_StrPutC
(
Vec_Str_t
*
vOut
,
char
c
)
{
Vec_StrPush
(
vOut
,
c
);
}
static
inline
char
Vec_StrGetC
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
return
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
}
/**Function*************************************************************
Synopsis [Reading library from file.]
Description []
...
...
src/misc/vec/vecStr.h
View file @
790ea654
...
...
@@ -720,6 +720,121 @@ static inline int Vec_StrCompareVec( Vec_Str_t * p1, Vec_Str_t * p2 )
}
/**Function*************************************************************
Synopsis [Binary I/O for numbers (int/float/etc) and strings (char *).]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
void
Vec_StrPutI_ne
(
Vec_Str_t
*
vOut
,
int
Val
)
{
int
i
;
for
(
i
=
0
;
i
<
4
;
i
++
)
Vec_StrPush
(
vOut
,
(
char
)(
Val
>>
(
8
*
i
))
);
}
static
inline
int
Vec_StrGetI_ne
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
int
i
;
int
Val
=
0
;
for
(
i
=
0
;
i
<
4
;
i
++
)
Val
|=
(
int
)(
unsigned
char
)
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
)
<<
(
8
*
i
);
return
Val
;
}
static
inline
void
Vec_StrPutI
(
Vec_Str_t
*
vOut
,
int
Val
)
{
for
(
;
Val
>=
0x80
;
Val
>>=
7
)
Vec_StrPush
(
vOut
,
(
unsigned
char
)(
Val
|
0x80
)
);
Vec_StrPush
(
vOut
,
(
unsigned
char
)
Val
);
}
static
inline
int
Vec_StrGetI
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
unsigned
char
ch
;
int
i
=
0
,
Val
=
0
;
while
(
(
ch
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
))
&
0x80
)
Val
|=
(
ch
&
0x7f
)
<<
(
7
*
i
++
);
return
Val
|
(
ch
<<
(
7
*
i
));
}
static
inline
void
Vec_StrPutW
(
Vec_Str_t
*
vOut
,
word
Val
)
{
int
i
;
for
(
i
=
0
;
i
<
8
;
i
++
)
Vec_StrPush
(
vOut
,
(
char
)(
Val
>>
(
8
*
i
))
);
}
static
inline
word
Vec_StrGetW
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
int
i
;
word
Val
=
0
;
for
(
i
=
0
;
i
<
8
;
i
++
)
Val
|=
(
word
)(
unsigned
char
)
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
)
<<
(
8
*
i
);
return
Val
;
}
static
inline
void
Vec_StrPutF
(
Vec_Str_t
*
vOut
,
float
Val
)
{
union
{
float
num
;
unsigned
char
data
[
4
];
}
tmp
;
tmp
.
num
=
Val
;
Vec_StrPush
(
vOut
,
tmp
.
data
[
0
]
);
Vec_StrPush
(
vOut
,
tmp
.
data
[
1
]
);
Vec_StrPush
(
vOut
,
tmp
.
data
[
2
]
);
Vec_StrPush
(
vOut
,
tmp
.
data
[
3
]
);
}
static
inline
float
Vec_StrGetF
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
union
{
float
num
;
unsigned
char
data
[
4
];
}
tmp
;
tmp
.
data
[
0
]
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
tmp
.
data
[
1
]
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
tmp
.
data
[
2
]
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
tmp
.
data
[
3
]
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
return
tmp
.
num
;
}
static
inline
void
Vec_StrPutD
(
Vec_Str_t
*
vOut
,
double
Val
)
{
union
{
double
num
;
unsigned
char
data
[
8
];
}
tmp
;
int
i
,
Lim
=
sizeof
(
double
);
tmp
.
num
=
Val
;
for
(
i
=
0
;
i
<
Lim
;
i
++
)
Vec_StrPush
(
vOut
,
tmp
.
data
[
i
]
);
}
static
inline
double
Vec_StrGetD
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
union
{
double
num
;
unsigned
char
data
[
8
];
}
tmp
;
int
i
,
Lim
=
sizeof
(
double
);
for
(
i
=
0
;
i
<
Lim
;
i
++
)
tmp
.
data
[
i
]
=
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
return
tmp
.
num
;
}
static
inline
void
Vec_StrPutS
(
Vec_Str_t
*
vOut
,
char
*
pStr
)
{
while
(
*
pStr
)
Vec_StrPush
(
vOut
,
*
pStr
++
);
Vec_StrPush
(
vOut
,
(
char
)
0
);
}
static
inline
char
*
Vec_StrGetS
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
char
*
pStr
=
Vec_StrEntryP
(
vOut
,
*
pPos
);
while
(
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
)
);
return
Abc_UtilStrsav
(
pStr
);
}
static
inline
void
Vec_StrPutC
(
Vec_Str_t
*
vOut
,
char
c
)
{
Vec_StrPush
(
vOut
,
c
);
}
static
inline
char
Vec_StrGetC
(
Vec_Str_t
*
vOut
,
int
*
pPos
)
{
return
Vec_StrEntry
(
vOut
,
(
*
pPos
)
++
);
}
ABC_NAMESPACE_HEADER_END
...
...
src/proof/abs/absGla.c
View file @
790ea654
...
...
@@ -1833,7 +1833,7 @@ finish:
if
(
!
p
->
fUseNewLine
)
Abc_Print
(
1
,
"
\n
"
);
if
(
RetValue
==
1
)
Abc_Print
(
1
,
"GLA completed %d frames and proved abstraction derived in frame %d
.
"
,
p
->
pPars
->
iFrameProved
+
1
,
iFrameTryToProve
);
Abc_Print
(
1
,
"GLA completed %d frames and proved abstraction derived in frame %d "
,
p
->
pPars
->
iFrameProved
+
1
,
iFrameTryToProve
);
else
if
(
pAig
->
pCexSeq
==
NULL
)
{
Vec_IntFreeP
(
&
pAig
->
vGateClasses
);
...
...
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