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
dc92f892
Commit
dc92f892
authored
Mar 14, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding silent mode to &splitprove.
parent
3146ff40
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
20 deletions
+33
-20
src/base/abci/abc.c
+9
-5
src/proof/cec/cecSplit.c
+17
-14
src/sat/bmc/bmcFault.c
+7
-1
No files found.
src/base/abci/abc.c
View file @
dc92f892
...
...
@@ -35609,10 +35609,10 @@ usage:
***********************************************************************/
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
,
int
fVeryVerbose
);
int
c
,
nProcs
=
1
,
nTimeOut
=
10
,
nIterMax
=
0
,
LookAhead
=
1
,
fVerbose
=
0
,
fVeryVerbose
=
0
;
extern
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
,
int
fSilent
);
int
c
,
nProcs
=
1
,
nTimeOut
=
10
,
nIterMax
=
0
,
LookAhead
=
1
,
fVerbose
=
0
,
fVeryVerbose
=
0
,
fSilent
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"PTILvwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"PTIL
s
vwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -35663,6 +35663,9 @@ int Abc_CommandAbc9SplitProve( Abc_Frame_t * pAbc, int argc, char ** argv )
goto
usage
;
}
break
;
case
's'
:
fSilent
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
...
...
@@ -35685,17 +35688,18 @@ int Abc_CommandAbc9SplitProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Abc_CommandAbc9SplitProve(): The problem is sequential.
\n
"
);
return
1
;
}
pAbc
->
Status
=
Cec_GiaSplitTest
(
pAbc
->
pGia
,
nProcs
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
,
fVeryVerbose
);
pAbc
->
Status
=
Cec_GiaSplitTest
(
pAbc
->
pGia
,
nProcs
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
,
fVeryVerbose
,
fSilent
);
pAbc
->
pCex
=
pAbc
->
pGia
->
pCexComb
;
pAbc
->
pGia
->
pCexComb
=
NULL
;
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &splitprove [-PTIL num] [-vwh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &splitprove [-PTIL num] [-
s
vwh]
\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
-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
-L num : maximum look-ahead during cofactoring [default = %d]
\n
"
,
LookAhead
);
Abc_Print
(
-
2
,
"
\t
-s : enable silent computation (no reporting) [default = %s]
\n
"
,
fSilent
?
"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
"
);
src/proof/cec/cecSplit.c
View file @
dc92f892
...
...
@@ -46,7 +46,7 @@ ABC_NAMESPACE_IMPL_START
#ifndef ABC_USE_PTHREADS
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
)
{
return
-
1
;
}
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
,
int
fSilent
)
{
return
-
1
;
}
#else // pthreads are used
...
...
@@ -564,7 +564,7 @@ void * Cec_GiaSplitWorkerThread( void * pArg )
assert
(
0
);
return
NULL
;
}
int
Cec_GiaSplitTestInt
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
)
int
Cec_GiaSplitTestInt
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
,
int
fSilent
)
{
abctime
clkTotal
=
Abc_Clock
();
Par_ThData_t
ThData
[
PAR_THR_MAX
];
...
...
@@ -715,19 +715,22 @@ finish:
}
// finish
Cec_GiaSplitClean
(
vStack
);
if
(
RetValue
==
0
)
printf
(
"Problem is SAT "
);
else
if
(
RetValue
==
1
)
printf
(
"Problem is UNSAT "
);
else
if
(
RetValue
==
-
1
)
printf
(
"Problem is UNDECIDED "
);
else
assert
(
0
);
printf
(
"after %d case-splits. "
,
nIter
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clkTotal
);
fflush
(
stdout
);
if
(
!
fSilent
)
{
if
(
RetValue
==
0
)
printf
(
"Problem is SAT "
);
else
if
(
RetValue
==
1
)
printf
(
"Problem is UNSAT "
);
else
if
(
RetValue
==
-
1
)
printf
(
"Problem is UNDECIDED "
);
else
assert
(
0
);
printf
(
"after %d case-splits. "
,
nIter
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clkTotal
);
fflush
(
stdout
);
}
return
RetValue
;
}
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
)
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
,
int
fSilent
)
{
Abc_Cex_t
*
pCex
=
NULL
;
Gia_Man_t
*
pOne
;
...
...
@@ -739,7 +742,7 @@ int Cec_GiaSplitTest( Gia_Man_t * p, int nProcs, int nTimeOut, int nIterMax, int
pOne
=
Gia_ManDupOutputGroup
(
p
,
i
,
i
+
1
);
if
(
fVerbose
)
printf
(
"
\n
Solving output %d:
\n
"
,
i
);
RetValue1
=
Cec_GiaSplitTestInt
(
pOne
,
nProcs
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
,
fVeryVerbose
);
RetValue1
=
Cec_GiaSplitTestInt
(
pOne
,
nProcs
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
,
fVeryVerbose
,
fSilent
);
Gia_ManStop
(
pOne
);
// collect the result
if
(
RetValue1
==
0
&&
RetValue
==
-
1
)
...
...
src/sat/bmc/bmcFault.c
View file @
dc92f892
...
...
@@ -674,12 +674,18 @@ void Gia_ManPrintResults( Gia_Man_t * p, sat_solver * pSat, int nIter, abctime c
***********************************************************************/
int
Gia_ManFaultAddOne
(
Gia_Man_t
*
pM
,
Cnf_Dat_t
*
pCnf
,
sat_solver
*
pSat
,
Vec_Int_t
*
vLits
,
int
nFuncVars
)
{
Gia_Man_t
*
pC
;
Gia_Man_t
*
pC
;
//, * pTemp;
Cnf_Dat_t
*
pCnf2
;
Gia_Obj_t
*
pObj
;
int
i
,
Lit
;
// derive the cofactor
pC
=
Gia_ManFaultCofactor
(
pM
,
vLits
);
// try synthesis
// printf( "\n" );
// Gia_ManPrintStats( pC, NULL );
// pC = Gia_ManAigSyn2( pTemp = pC, 0, 1, 0, 100, 0, 0, 0 );
// Gia_ManStop( pTemp );
// Gia_ManPrintStats( pC, NULL );
//Gia_AigerWrite( pC, "fftest_cof.aig", 0, 0 );
//printf( "Dumped cofactor circuit into file \"%s\".\n", "fftest_cof.aig" );
// derive new CNF
...
...
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