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
3c6def29
Commit
3c6def29
authored
Jun 07, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding print-out to &splitprove to see impact of cof variable on AIG size.
parent
2d38fc16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
src/base/abci/abc.c
+9
-5
src/proof/cec/cecSplit.c
+5
-5
No files found.
src/base/abci/abc.c
View file @
3c6def29
...
@@ -32892,10 +32892,10 @@ usage:
...
@@ -32892,10 +32892,10 @@ usage:
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9SplitProve
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9SplitProve
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
);
extern
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
);
int
c
,
nProcs
=
1
,
nTimeOut
=
10
,
nIterMax
=
0
,
LookAhead
=
1
,
fVerbose
=
0
;
int
c
,
nProcs
=
1
,
nTimeOut
=
10
,
nIterMax
=
0
,
LookAhead
=
1
,
fVerbose
=
0
,
fVeryVerbose
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"PTILvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"PTILv
w
h"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -32949,6 +32949,9 @@ int Abc_CommandAbc9SplitProve( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -32949,6 +32949,9 @@ int Abc_CommandAbc9SplitProve( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'v'
:
case
'v'
:
fVerbose
^=
1
;
fVerbose
^=
1
;
break
;
break
;
case
'w'
:
fVeryVerbose
^=
1
;
break
;
case
'h'
:
case
'h'
:
goto
usage
;
goto
usage
;
default:
default:
...
@@ -32965,18 +32968,19 @@ int Abc_CommandAbc9SplitProve( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -32965,18 +32968,19 @@ int Abc_CommandAbc9SplitProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Abc_CommandAbc9SplitProve(): The problem is sequential.
\n
"
);
Abc_Print
(
-
1
,
"Abc_CommandAbc9SplitProve(): The problem is sequential.
\n
"
);
return
1
;
return
1
;
}
}
pAbc
->
Status
=
Cec_GiaSplitTest
(
pAbc
->
pGia
,
nProcs
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
);
pAbc
->
Status
=
Cec_GiaSplitTest
(
pAbc
->
pGia
,
nProcs
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
,
fVeryVerbose
);
pAbc
->
pCex
=
pAbc
->
pGia
->
pCexComb
;
pAbc
->
pGia
->
pCexComb
=
NULL
;
pAbc
->
pCex
=
pAbc
->
pGia
->
pCexComb
;
pAbc
->
pGia
->
pCexComb
=
NULL
;
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &splitprove [-PTIL num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &splitprove [-PTIL num] [-v
w
h]
\n
"
);
Abc_Print
(
-
2
,
"
\t
proves CEC problem by case-splitting
\n
"
);
Abc_Print
(
-
2
,
"
\t
proves CEC problem by case-splitting
\n
"
);
Abc_Print
(
-
2
,
"
\t
-P num : the number of concurrent processes [default = %d]
\n
"
,
nProcs
);
Abc_Print
(
-
2
,
"
\t
-P num : the number of concurrent processes [default = %d]
\n
"
,
nProcs
);
Abc_Print
(
-
2
,
"
\t
-T num : runtime limit in seconds per subproblem [default = %d]
\n
"
,
nTimeOut
);
Abc_Print
(
-
2
,
"
\t
-T num : runtime limit in seconds per subproblem [default = %d]
\n
"
,
nTimeOut
);
Abc_Print
(
-
2
,
"
\t
-I num : the max number of iterations (0 = infinity) [default = %d]
\n
"
,
nIterMax
);
Abc_Print
(
-
2
,
"
\t
-I num : the max number of iterations (0 = infinity) [default = %d]
\n
"
,
nIterMax
);
Abc_Print
(
-
2
,
"
\t
-L num : maximum look-ahead during cofactoring [default = %d]
\n
"
,
LookAhead
);
Abc_Print
(
-
2
,
"
\t
-L num : maximum look-ahead during cofactoring [default = %d]
\n
"
,
LookAhead
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggle printing more verbose information [default = %s]
\n
"
,
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
}
}
src/proof/cec/cecSplit.c
View file @
3c6def29
...
@@ -397,7 +397,7 @@ void Cec_GiaSplitPrintRefs( Gia_Man_t * p )
...
@@ -397,7 +397,7 @@ void Cec_GiaSplitPrintRefs( Gia_Man_t * p )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Cec_GiaSplitTest2
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
)
int
Cec_GiaSplitTest2
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
)
{
{
abctime
clkTotal
=
Abc_Clock
();
abctime
clkTotal
=
Abc_Clock
();
Vec_Ptr_t
*
vStack
;
Vec_Ptr_t
*
vStack
;
...
@@ -438,7 +438,7 @@ int Cec_GiaSplitTest2( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, in
...
@@ -438,7 +438,7 @@ int Cec_GiaSplitTest2( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, in
if
(
pLast
->
vCofVars
==
NULL
)
if
(
pLast
->
vCofVars
==
NULL
)
pLast
->
vCofVars
=
Vec_IntAlloc
(
100
);
pLast
->
vCofVars
=
Vec_IntAlloc
(
100
);
// print results
// print results
if
(
fVerbose
)
if
(
fVer
yVer
bose
)
{
{
// Cec_GiaSplitPrintRefs( pLast );
// Cec_GiaSplitPrintRefs( pLast );
printf
(
"Var = %5d. Fanouts = %5d. Cost = %8d. AndBefore = %6d. AndAfter = %6d.
\n
"
,
printf
(
"Var = %5d. Fanouts = %5d. Cost = %8d. AndBefore = %6d. AndAfter = %6d.
\n
"
,
...
@@ -558,7 +558,7 @@ void * Cec_GiaSplitWorkerThread( void * pArg )
...
@@ -558,7 +558,7 @@ void * Cec_GiaSplitWorkerThread( void * pArg )
assert
(
0
);
assert
(
0
);
return
NULL
;
return
NULL
;
}
}
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
)
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
)
{
{
abctime
clkTotal
=
Abc_Clock
();
abctime
clkTotal
=
Abc_Clock
();
Par_ThData_t
ThData
[
PAR_THR_MAX
];
Par_ThData_t
ThData
[
PAR_THR_MAX
];
...
@@ -575,7 +575,7 @@ int Cec_GiaSplitTest( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, int
...
@@ -575,7 +575,7 @@ int Cec_GiaSplitTest( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, int
printf
(
"Processes = %d TimeOut = %d sec MaxIter = %d LookAhead = %d Verbose = %d.
\n
"
,
nProcs
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
);
printf
(
"Processes = %d TimeOut = %d sec MaxIter = %d LookAhead = %d Verbose = %d.
\n
"
,
nProcs
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
);
fflush
(
stdout
);
fflush
(
stdout
);
if
(
nProcs
==
1
)
if
(
nProcs
==
1
)
return
Cec_GiaSplitTest2
(
p
,
nProcs
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
);
return
Cec_GiaSplitTest2
(
p
,
nProcs
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
,
fVeryVerbose
);
// subtract manager thread
// subtract manager thread
nProcs
--
;
nProcs
--
;
assert
(
nProcs
>=
1
&&
nProcs
<=
PAR_THR_MAX
);
assert
(
nProcs
>=
1
&&
nProcs
<=
PAR_THR_MAX
);
...
@@ -650,7 +650,7 @@ int Cec_GiaSplitTest( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, int
...
@@ -650,7 +650,7 @@ int Cec_GiaSplitTest( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, int
Vec_IntPush
(
pPart
->
vCofVars
,
Abc_Var2Lit
(
iVar
,
1
)
);
Vec_IntPush
(
pPart
->
vCofVars
,
Abc_Var2Lit
(
iVar
,
1
)
);
Vec_PtrPush
(
vStack
,
pPart
);
Vec_PtrPush
(
vStack
,
pPart
);
// print results
// print results
if
(
fVerbose
)
if
(
fVer
yVer
bose
)
{
{
// Cec_GiaSplitPrintRefs( pLast );
// Cec_GiaSplitPrintRefs( pLast );
printf
(
"Var = %5d. Fanouts = %5d. Cost = %8d. AndBefore = %6d. AndAfter = %6d.
\n
"
,
printf
(
"Var = %5d. Fanouts = %5d. Cost = %8d. AndBefore = %6d. AndAfter = %6d.
\n
"
,
...
...
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