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
c15137bd
Commit
c15137bd
authored
Sep 16, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improving printouts in &gla.
parent
ee436f93
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
+15
-11
src/proof/abs/absGla.c
+9
-5
src/proof/abs/absPth.c
+5
-5
src/proof/abs/absUtil.c
+1
-1
No files found.
src/proof/abs/absGla.c
View file @
c15137bd
...
@@ -50,6 +50,7 @@ struct Ga2_Man_t_
...
@@ -50,6 +50,7 @@ struct Ga2_Man_t_
int
LimAbs
;
// limit value for starting abstraction objects
int
LimAbs
;
// limit value for starting abstraction objects
int
LimPpi
;
// limit value for starting PPI objects
int
LimPpi
;
// limit value for starting PPI objects
int
nMarked
;
// total number of marked nodes and flops
int
nMarked
;
// total number of marked nodes and flops
int
fUseNewLine
;
// remember that you used new line
// refinement
// refinement
Rnm_Man_t
*
pRnm
;
// refinement manager
Rnm_Man_t
*
pRnm
;
// refinement manager
// Rf2_Man_t * pRf2; // refinement manager
// Rf2_Man_t * pRf2; // refinement manager
...
@@ -372,6 +373,7 @@ Ga2_Man_t * Ga2_ManStart( Gia_Man_t * pGia, Abs_Par_t * pPars )
...
@@ -372,6 +373,7 @@ Ga2_Man_t * Ga2_ManStart( Gia_Man_t * pGia, Abs_Par_t * pPars )
Ga2_Man_t
*
p
;
Ga2_Man_t
*
p
;
p
=
ABC_CALLOC
(
Ga2_Man_t
,
1
);
p
=
ABC_CALLOC
(
Ga2_Man_t
,
1
);
p
->
timeStart
=
clock
();
p
->
timeStart
=
clock
();
p
->
fUseNewLine
=
1
;
// user data
// user data
p
->
pGia
=
pGia
;
p
->
pGia
=
pGia
;
p
->
pPars
=
pPars
;
p
->
pPars
=
pPars
;
...
@@ -1387,8 +1389,10 @@ int Ga2_GlaAbsCount( Ga2_Man_t * p, int fRo, int fAnd )
...
@@ -1387,8 +1389,10 @@ int Ga2_GlaAbsCount( Ga2_Man_t * p, int fRo, int fAnd )
***********************************************************************/
***********************************************************************/
void
Ga2_ManAbsPrintFrame
(
Ga2_Man_t
*
p
,
int
nFrames
,
int
nConfls
,
int
nCexes
,
clock_t
Time
,
int
fFinal
)
void
Ga2_ManAbsPrintFrame
(
Ga2_Man_t
*
p
,
int
nFrames
,
int
nConfls
,
int
nCexes
,
clock_t
Time
,
int
fFinal
)
{
{
if
(
Abc_FrameIsBatchMode
()
&&
!
(((
fFinal
&&
nCexes
)
||
p
->
pPars
->
fVeryVerbose
))
)
int
fUseNewLine
=
((
fFinal
&&
nCexes
)
||
p
->
pPars
->
fVeryVerbose
);
if
(
Abc_FrameIsBatchMode
()
&&
!
fUseNewLine
)
return
;
return
;
p
->
fUseNewLine
=
fUseNewLine
;
Abc_Print
(
1
,
"%4d :"
,
nFrames
);
Abc_Print
(
1
,
"%4d :"
,
nFrames
);
Abc_Print
(
1
,
"%4d"
,
Abc_MinInt
(
100
,
100
*
Vec_IntSize
(
p
->
vAbs
)
/
p
->
nMarked
)
);
Abc_Print
(
1
,
"%4d"
,
Abc_MinInt
(
100
,
100
*
Vec_IntSize
(
p
->
vAbs
)
/
p
->
nMarked
)
);
Abc_Print
(
1
,
"%6d"
,
Vec_IntSize
(
p
->
vAbs
)
);
Abc_Print
(
1
,
"%6d"
,
Vec_IntSize
(
p
->
vAbs
)
);
...
@@ -1405,7 +1409,7 @@ void Ga2_ManAbsPrintFrame( Ga2_Man_t * p, int nFrames, int nConfls, int nCexes,
...
@@ -1405,7 +1409,7 @@ void Ga2_ManAbsPrintFrame( Ga2_Man_t * p, int nFrames, int nConfls, int nCexes,
Abc_PrintInt
(
sat_solver2_nlearnts
(
p
->
pSat
)
);
Abc_PrintInt
(
sat_solver2_nlearnts
(
p
->
pSat
)
);
Abc_Print
(
1
,
"%9.2f sec"
,
1
.
0
*
Time
/
CLOCKS_PER_SEC
);
Abc_Print
(
1
,
"%9.2f sec"
,
1
.
0
*
Time
/
CLOCKS_PER_SEC
);
Abc_Print
(
1
,
"%5.0f MB"
,
(
sat_solver2_memory_proof
(
p
->
pSat
)
+
sat_solver2_memory
(
p
->
pSat
,
0
))
/
(
1
<<
20
)
);
Abc_Print
(
1
,
"%5.0f MB"
,
(
sat_solver2_memory_proof
(
p
->
pSat
)
+
sat_solver2_memory
(
p
->
pSat
,
0
))
/
(
1
<<
20
)
);
Abc_Print
(
1
,
"%s"
,
((
fFinal
&&
nCexes
)
||
p
->
pPars
->
fVeryVerbose
)
?
"
\n
"
:
"
\r
"
);
Abc_Print
(
1
,
"%s"
,
fUseNewLine
?
"
\n
"
:
"
\r
"
);
fflush
(
stdout
);
fflush
(
stdout
);
}
}
...
@@ -1793,7 +1797,7 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
...
@@ -1793,7 +1797,7 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
if
(
iFrameTryToProve
>=
0
)
if
(
iFrameTryToProve
>=
0
)
Gia_GlaProveCancel
(
pPars
->
fVerbose
);
Gia_GlaProveCancel
(
pPars
->
fVerbose
);
// prove new one
// prove new one
Gia_GlaProveAbsracted
(
pAig
,
pPars
->
fVerbose
);
Gia_GlaProveAbsracted
(
pAig
,
pPars
->
fVer
yVer
bose
);
iFrameTryToProve
=
f
;
iFrameTryToProve
=
f
;
p
->
nPdrCalls
++
;
p
->
nPdrCalls
++
;
}
}
...
@@ -1826,6 +1830,8 @@ finish:
...
@@ -1826,6 +1830,8 @@ finish:
if
(
iFrameTryToProve
>=
0
)
if
(
iFrameTryToProve
>=
0
)
Gia_GlaProveCancel
(
pPars
->
fVerbose
);
Gia_GlaProveCancel
(
pPars
->
fVerbose
);
// analize the results
// analize the results
if
(
!
p
->
fUseNewLine
)
Abc_Print
(
1
,
"
\n
"
);
if
(
RetValue
==
1
)
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
)
else
if
(
pAig
->
pCexSeq
==
NULL
)
...
@@ -1836,8 +1842,6 @@ finish:
...
@@ -1836,8 +1842,6 @@ finish:
pAig
->
vGateClasses
=
Ga2_ManAbsTranslate
(
p
);
pAig
->
vGateClasses
=
Ga2_ManAbsTranslate
(
p
);
if
(
Status
==
l_Undef
)
if
(
Status
==
l_Undef
)
{
{
if
(
p
->
pPars
->
fVerbose
)
Abc_Print
(
1
,
"
\n
"
);
if
(
p
->
pPars
->
nTimeOut
&&
clock
()
>=
p
->
pSat
->
nRuntimeLimit
)
if
(
p
->
pPars
->
nTimeOut
&&
clock
()
>=
p
->
pSat
->
nRuntimeLimit
)
Abc_Print
(
1
,
"Timeout %d sec in frame %d with a %d-stable abstraction. "
,
p
->
pPars
->
nTimeOut
,
p
->
pPars
->
iFrameProved
+
1
,
p
->
pPars
->
nFramesNoChange
);
Abc_Print
(
1
,
"Timeout %d sec in frame %d with a %d-stable abstraction. "
,
p
->
pPars
->
nTimeOut
,
p
->
pPars
->
iFrameProved
+
1
,
p
->
pPars
->
nFramesNoChange
);
else
if
(
pPars
->
nConfLimit
&&
sat_solver2_nconflicts
(
p
->
pSat
)
>=
pPars
->
nConfLimit
)
else
if
(
pPars
->
nConfLimit
&&
sat_solver2_nconflicts
(
p
->
pSat
)
>=
pPars
->
nConfLimit
)
...
...
src/proof/abs/absPth.c
View file @
c15137bd
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
// to compile on Linux, add -lpthread to LIBS in Makefile
// to compile on Linux, add -lpthread to LIBS in Makefile
// uncomment this line to enable pthreads
// uncomment this line to enable pthreads
//
#define ABC_USE_PTHREADS
#define ABC_USE_PTHREADS
#ifdef ABC_USE_PTHREADS
#ifdef ABC_USE_PTHREADS
...
@@ -118,11 +118,11 @@ void * Abs_ProverThread( void * pArg )
...
@@ -118,11 +118,11 @@ void * Abs_ProverThread( void * pArg )
if
(
pThData
->
fVerbose
)
if
(
pThData
->
fVerbose
)
{
{
if
(
RetValue
==
1
)
if
(
RetValue
==
1
)
Abc_Print
(
1
,
"
\n
Proved abstraction %d.
\n
"
,
pThData
->
RunId
);
Abc_Print
(
1
,
"Proved abstraction %d.
\n
"
,
pThData
->
RunId
);
else
if
(
RetValue
==
0
)
else
if
(
RetValue
==
0
)
Abc_Print
(
1
,
"
\n
Disproved abstraction %d.
\n
"
,
pThData
->
RunId
);
Abc_Print
(
1
,
"Disproved abstraction %d.
\n
"
,
pThData
->
RunId
);
else
if
(
RetValue
==
-
1
)
else
if
(
RetValue
==
-
1
)
Abc_Print
(
1
,
"
\n
Cancelled abstraction %d.
\n
"
,
pThData
->
RunId
);
Abc_Print
(
1
,
"Cancelled abstraction %d.
\n
"
,
pThData
->
RunId
);
else
assert
(
0
);
else
assert
(
0
);
}
}
// free memory
// free memory
...
@@ -141,7 +141,7 @@ void Gia_GlaProveAbsracted( Gia_Man_t * pGia, int fVerbose )
...
@@ -141,7 +141,7 @@ void Gia_GlaProveAbsracted( Gia_Man_t * pGia, int fVerbose )
pthread_t
ProverThread
;
pthread_t
ProverThread
;
int
status
;
int
status
;
// disable verbosity
// disable verbosity
fVerbose
=
0
;
//
fVerbose = 0;
// create abstraction
// create abstraction
assert
(
pGia
->
vGateClasses
!=
NULL
);
assert
(
pGia
->
vGateClasses
!=
NULL
);
pAbs
=
Gia_ManDupAbsGates
(
pGia
,
pGia
->
vGateClasses
);
pAbs
=
Gia_ManDupAbsGates
(
pGia
,
pGia
->
vGateClasses
);
...
...
src/proof/abs/absUtil.c
View file @
c15137bd
...
@@ -61,7 +61,7 @@ void Abs_ParSetDefaults( Abs_Par_t * p )
...
@@ -61,7 +61,7 @@ void Abs_ParSetDefaults( Abs_Par_t * p )
p
->
fVerbose
=
0
;
// verbose flag
p
->
fVerbose
=
0
;
// verbose flag
p
->
iFrame
=
-
1
;
// the number of frames covered
p
->
iFrame
=
-
1
;
// the number of frames covered
p
->
iFrameProved
=
-
1
;
// the number of frames proved
p
->
iFrameProved
=
-
1
;
// the number of frames proved
p
->
nFramesNoChangeLim
=
1
;
// the number of frames without change to dump abstraction
p
->
nFramesNoChangeLim
=
2
;
// the number of frames without change to dump abstraction
}
}
/**Function*************************************************************
/**Function*************************************************************
...
...
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