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
0f778405
Commit
0f778405
authored
Oct 25, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New proof-based abstraction code.
parent
f7fd3297
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
178 additions
and
13 deletions
+178
-13
abclib.dsp
+8
-4
src/aig/gia/gia.h
+2
-1
src/aig/gia/giaAbs.c
+38
-2
src/aig/saig/module.make
+2
-1
src/aig/saig/saigGlaCba.c
+0
-0
src/aig/saig/saigGlaPba.c
+0
-0
src/base/abci/abc.c
+128
-5
No files found.
abclib.dsp
View file @
0f778405
...
...
@@ -3503,10 +3503,6 @@ SOURCE=.\src\aig\saig\saigAbsCba.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\saig\saigAbsGla.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\saig\saigAbsPba.c
# End Source File
# Begin Source File
...
...
@@ -3551,6 +3547,14 @@ SOURCE=.\src\aig\saig\saigDup.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\saig\saigGlaCba.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\saig\saigGlaPba.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\saig\saigHaig.c
# End Source File
# Begin Source File
...
...
src/aig/gia/gia.h
View file @
0f778405
...
...
@@ -603,7 +603,8 @@ Gia_Man_t * Gia_ManCexAbstractionDerive( Gia_Man_t * pGia );
int
Gia_ManCexAbstractionRefine
(
Gia_Man_t
*
pGia
,
Abc_Cex_t
*
pCex
,
int
nFfToAddMax
,
int
fTryFour
,
int
fSensePath
,
int
fVerbose
);
extern
int
Gia_ManPbaPerform
(
Gia_Man_t
*
pGia
,
int
nStart
,
int
nFrames
,
int
nConfLimit
,
int
nTimeLimit
,
int
fVerbose
,
int
*
piFrame
);
extern
int
Gia_ManCbaPerform
(
Gia_Man_t
*
pGia
,
void
*
pPars
);
extern
int
Gia_ManGlaCbaPerform
(
Gia_Man_t
*
pGia
,
void
*
pPars
,
int
fUseCnf
);
extern
int
Gia_ManGlaCbaPerform
(
Gia_Man_t
*
pGia
,
void
*
pPars
,
int
fNaiveCnf
);
extern
int
Gia_ManGlaPbaPerform
(
Gia_Man_t
*
pGia
,
void
*
pPars
);
/*=== giaAiger.c ===========================================================*/
extern
int
Gia_FileSize
(
char
*
pFileName
);
extern
Gia_Man_t
*
Gia_ReadAigerFromMemory
(
char
*
pContents
,
int
nFileSize
,
int
fCheck
);
...
...
src/aig/gia/giaAbs.c
View file @
0f778405
...
...
@@ -379,7 +379,7 @@ int Gia_ManPbaPerform( Gia_Man_t * pGia, int nStart, int nFrames, int nConfLimit
***********************************************************************/
int
Gia_ManGlaCbaPerform
(
Gia_Man_t
*
pGia
,
void
*
pPars
,
int
fNaiveCnf
)
{
extern
Vec_Int_t
*
Aig_GlaManTest
(
Aig_Man_t
*
pAig
,
int
nFramesMax
,
int
nConfLimit
,
int
TimeLimit
,
int
fNaiveCnf
,
int
fVerbose
);
extern
Vec_Int_t
*
Aig_Gla
1
ManTest
(
Aig_Man_t
*
pAig
,
int
nFramesMax
,
int
nConfLimit
,
int
TimeLimit
,
int
fNaiveCnf
,
int
fVerbose
);
Saig_ParBmc_t
*
p
=
(
Saig_ParBmc_t
*
)
pPars
;
Vec_Int_t
*
vGateClasses
;
Aig_Man_t
*
pAig
;
...
...
@@ -393,7 +393,43 @@ int Gia_ManGlaCbaPerform( Gia_Man_t * pGia, void * pPars, int fNaiveCnf )
*/
// perform abstraction
pAig
=
Gia_ManToAigSimple
(
pGia
);
vGateClasses
=
Aig_GlaManTest
(
pAig
,
p
->
nFramesMax
,
p
->
nConfLimit
,
p
->
nTimeOut
,
fNaiveCnf
,
p
->
fVerbose
);
vGateClasses
=
Aig_Gla1ManTest
(
pAig
,
p
->
nFramesMax
,
p
->
nConfLimit
,
p
->
nTimeOut
,
fNaiveCnf
,
p
->
fVerbose
);
Aig_ManStop
(
pAig
);
// update the map
Vec_IntFreeP
(
&
pGia
->
vGateClasses
);
pGia
->
vGateClasses
=
vGateClasses
;
return
1
;
}
/**Function*************************************************************
Synopsis [Derive unrolled timeframes.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Gia_ManGlaPbaPerform
(
Gia_Man_t
*
pGia
,
void
*
pPars
)
{
extern
Vec_Int_t
*
Aig_Gla2ManTest
(
Aig_Man_t
*
pAig
,
int
nFramesMax
,
int
nConfLimit
,
int
TimeLimit
,
int
fVerbose
);
Saig_ParBmc_t
*
p
=
(
Saig_ParBmc_t
*
)
pPars
;
Vec_Int_t
*
vGateClasses
;
Aig_Man_t
*
pAig
;
/*
// check if flop classes are given
if ( pGia->vGateClasses == NULL )
{
Abc_Print( 0, "Initial gate map is not given. Trivial abstraction is assumed.\n" );
pGia->vGateClasses = Vec_IntStart( Gia_ManObjNum(pGia) );
}
*/
// perform abstraction
pAig
=
Gia_ManToAigSimple
(
pGia
);
vGateClasses
=
Aig_Gla2ManTest
(
pAig
,
p
->
nFramesMax
,
p
->
nConfLimit
,
p
->
nTimeOut
,
p
->
fVerbose
);
Aig_ManStop
(
pAig
);
// update the map
...
...
src/aig/saig/module.make
View file @
0f778405
SRC
+=
src/aig/saig/saigAbs.c
\
src/aig/saig/saigAbsCba.c
\
src/aig/saig/saigAbsGla.c
\
src/aig/saig/saigAbsPba.c
\
src/aig/saig/saigAbsStart.c
\
src/aig/saig/saigAbsVfa.c
\
...
...
@@ -12,6 +11,8 @@ SRC += src/aig/saig/saigAbs.c \
src/aig/saig/saigConstr.c
\
src/aig/saig/saigConstr2.c
\
src/aig/saig/saigDup.c
\
src/aig/saig/saigGlaCba.c
\
src/aig/saig/saigGlaPba.c
\
src/aig/saig/saigHaig.c
\
src/aig/saig/saigInd.c
\
src/aig/saig/saigIoa.c
\
...
...
src/aig/saig/saig
AbsGl
a.c
→
src/aig/saig/saig
GlaCb
a.c
View file @
0f778405
This diff is collapsed.
Click to expand it.
src/aig/saig/saigGlaPba.c
0 → 100644
View file @
0f778405
This diff is collapsed.
Click to expand it.
src/base/abci/abc.c
View file @
0f778405
...
...
@@ -379,6 +379,7 @@ static int Abc_CommandAbc9AbsCba ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9AbsPba
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9GlaDerive
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9GlaCba
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9GlaPba
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Reparam
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Posplit
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9ReachM
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
...
@@ -832,6 +833,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&abs_pba"
,
Abc_CommandAbc9AbsPba
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_derive"
,
Abc_CommandAbc9GlaDerive
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_cba"
,
Abc_CommandAbc9GlaCba
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_pba"
,
Abc_CommandAbc9GlaPba
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reparam"
,
Abc_CommandAbc9Reparam
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&posplit"
,
Abc_CommandAbc9Posplit
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reachm"
,
Abc_CommandAbc9ReachM
,
0
);
...
...
@@ -28714,12 +28716,12 @@ int Abc_CommandAbc9AbsCba( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &abs_cba [-SFC
M
T num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &abs_cba [-SFCT num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
refines abstracted flop map with CEX-based abstraction
\n
"
);
Abc_Print
(
-
2
,
"
\t
-S num : the starting time frame [default = %d]
\n
"
,
pPars
->
nStart
);
Abc_Print
(
-
2
,
"
\t
-F num : the max number of timeframes to unroll [default = %d]
\n
"
,
pPars
->
nFramesMax
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of SAT solver conflicts [default = %d]
\n
"
,
pPars
->
nConfLimit
);
Abc_Print
(
-
2
,
"
\t
-M num : the max number of flops to add (0 = not used) [default = %d]
\n
"
,
pPars
->
nFfToAddMax
);
//
Abc_Print( -2, "\t-M num : the max number of flops to add (0 = not used) [default = %d]\n", pPars->nFfToAddMax );
Abc_Print
(
-
2
,
"
\t
-T num : an approximate timeout, in seconds [default = %d]
\n
"
,
pPars
->
nTimeOut
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
...
...
@@ -29020,6 +29022,11 @@ int Abc_CommandAbc9GlaCba( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
1
,
"The network is more than one PO (run
\"
orpos
\"
).
\n
"
);
return
0
;
}
if
(
pPars
->
nFramesMax
<
1
)
{
Abc_Print
(
1
,
"The number of frames should be a positive integer.
\n
"
);
return
0
;
}
pAbc
->
Status
=
Gia_ManGlaCbaPerform
(
pAbc
->
pGia
,
pPars
,
fNaiveCnf
);
if
(
pPars
->
nStart
==
0
)
pAbc
->
nFrames
=
pPars
->
iFrame
;
...
...
@@ -29028,12 +29035,12 @@ int Abc_CommandAbc9GlaCba( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &gla_cba [-
SFCM
T num] [-cvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &gla_cba [-
FC
T num] [-cvh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
refines abstracted object map with CEX-based abstraction
\n
"
);
Abc_Print
(
-
2
,
"
\t
-S num : the starting time frame [default = %d]
\n
"
,
pPars
->
nStart
);
//
Abc_Print( -2, "\t-S num : the starting time frame [default = %d]\n", pPars->nStart );
Abc_Print
(
-
2
,
"
\t
-F num : the max number of timeframes to unroll [default = %d]
\n
"
,
pPars
->
nFramesMax
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of SAT solver conflicts [default = %d]
\n
"
,
pPars
->
nConfLimit
);
Abc_Print
(
-
2
,
"
\t
-M num : the max number of flops to add (0 = not used) [default = %d]
\n
"
,
pPars
->
nFfToAddMax
);
//
Abc_Print( -2, "\t-M num : the max number of flops to add (0 = not used) [default = %d]\n", pPars->nFfToAddMax );
Abc_Print
(
-
2
,
"
\t
-T num : an approximate timeout, in seconds [default = %d]
\n
"
,
pPars
->
nTimeOut
);
Abc_Print
(
-
2
,
"
\t
-c : toggle using naive CNF computation [default = %s]
\n
"
,
fNaiveCnf
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
...
...
@@ -29052,6 +29059,122 @@ usage:
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9GlaPba
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
Saig_ParBmc_t
Pars
,
*
pPars
=
&
Pars
;
int
c
;
Saig_ParBmcSetDefaultParams
(
pPars
);
pPars
->
nStart
=
0
;
//(pAbc->nFrames >= 0) ? pAbc->nFrames : 0;
pPars
->
nFramesMax
=
10
;
//pPars->nStart + 10;
pPars
->
nConfLimit
=
1000000
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"SFCTcvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'S'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-S
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
pPars
->
nStart
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nStart
<
0
)
goto
usage
;
break
;
case
'F'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-F
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
pPars
->
nFramesMax
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nFramesMax
<
0
)
goto
usage
;
break
;
case
'C'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-C
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
pPars
->
nConfLimit
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nConfLimit
<
0
)
goto
usage
;
break
;
case
'T'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-T
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
pPars
->
nTimeOut
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nTimeOut
<
0
)
goto
usage
;
break
;
case
'v'
:
pPars
->
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9AbsCba(): There is no AIG.
\n
"
);
return
1
;
}
if
(
Gia_ManRegNum
(
pAbc
->
pGia
)
==
0
)
{
Abc_Print
(
-
1
,
"The network is combinational.
\n
"
);
return
0
;
}
if
(
Gia_ManPoNum
(
pAbc
->
pGia
)
>
1
)
{
Abc_Print
(
1
,
"The network is more than one PO (run
\"
orpos
\"
).
\n
"
);
return
0
;
}
if
(
pPars
->
nFramesMax
<
1
)
{
Abc_Print
(
1
,
"The number of frames should be a positive integer.
\n
"
);
return
0
;
}
pAbc
->
Status
=
Gia_ManGlaPbaPerform
(
pAbc
->
pGia
,
pPars
);
if
(
pPars
->
nStart
==
0
)
pAbc
->
nFrames
=
pPars
->
iFrame
;
Abc_FrameReplaceCex
(
pAbc
,
&
pAbc
->
pGia
->
pCexSeq
);
// printf( "This command is currently not enabled.\n" );
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &gla_pba [-FCT num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
refines abstracted object map with proof-based abstraction
\n
"
);
// Abc_Print( -2, "\t-S num : the starting time frame [default = %d]\n", pPars->nStart );
Abc_Print
(
-
2
,
"
\t
-F num : the max number of timeframes to unroll [default = %d]
\n
"
,
pPars
->
nFramesMax
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of SAT solver conflicts [default = %d]
\n
"
,
pPars
->
nConfLimit
);
Abc_Print
(
-
2
,
"
\t
-T num : an approximate timeout, in seconds [default = %d]
\n
"
,
pPars
->
nTimeOut
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Reparam
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
Gia_Man_t
*
pTemp
=
NULL
;
...
...
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