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
fd0ff017
Commit
fd0ff017
authored
Feb 15, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added 'gap timeout' to bmc3 and sim3.
parent
8866a1aa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
25 deletions
+86
-25
src/base/abci/abc.c
+59
-19
src/base/abci/abcDar.c
+2
-2
src/proof/ssw/ssw.h
+1
-1
src/proof/ssw/sswRarity.c
+12
-3
src/sat/bmc/bmc.h
+2
-0
src/sat/bmc/bmcBmc3.c
+10
-0
No files found.
src/base/abci/abc.c
View file @
fd0ff017
This diff is collapsed.
Click to expand it.
src/base/abci/abcDar.c
View file @
fd0ff017
...
...
@@ -3273,7 +3273,7 @@ int Abc_NtkDarSeqSim( Abc_Ntk_t * pNtk, int nFrames, int nWords, int TimeOut, in
SeeAlso []
***********************************************************************/
int
Abc_NtkDarSeqSim3
(
Abc_Ntk_t
*
pNtk
,
int
nFrames
,
int
nWords
,
int
nBinSize
,
int
nRounds
,
int
nRestart
,
int
nRandSeed
,
int
TimeOut
,
int
fSolveAll
,
int
fVerbose
,
int
fNotVerbose
)
int
Abc_NtkDarSeqSim3
(
Abc_Ntk_t
*
pNtk
,
int
nFrames
,
int
nWords
,
int
nBinSize
,
int
nRounds
,
int
nRestart
,
int
nRandSeed
,
int
TimeOut
,
int
TimeOutGap
,
int
fSolveAll
,
int
fVerbose
,
int
fNotVerbose
)
{
Aig_Man_t
*
pMan
;
int
status
,
RetValue
=
-
1
;
...
...
@@ -3284,7 +3284,7 @@ int Abc_NtkDarSeqSim3( Abc_Ntk_t * pNtk, int nFrames, int nWords, int nBinSize,
Abc_AigCleanup
((
Abc_Aig_t
*
)
pNtk
->
pManFunc
);
}
pMan
=
Abc_NtkToDar
(
pNtk
,
0
,
1
);
if
(
Ssw_RarSimulate
(
pMan
,
nFrames
,
nWords
,
nBinSize
,
nRounds
,
nRestart
,
nRandSeed
,
TimeOut
,
fSolveAll
,
fVerbose
,
fNotVerbose
)
==
0
)
if
(
Ssw_RarSimulate
(
pMan
,
nFrames
,
nWords
,
nBinSize
,
nRounds
,
nRestart
,
nRandSeed
,
TimeOut
,
TimeOutGap
,
fSolveAll
,
fVerbose
,
fNotVerbose
)
==
0
)
{
if
(
pMan
->
pSeqModel
)
{
...
...
src/proof/ssw/ssw.h
View file @
fd0ff017
...
...
@@ -118,7 +118,7 @@ extern int Ssw_SecGeneral( Aig_Man_t * pAig1, Aig_Man_t * pAig2, Ssw_P
extern
int
Ssw_SecGeneralMiter
(
Aig_Man_t
*
pMiter
,
Ssw_Pars_t
*
pPars
);
/*=== sswRarity.c ===================================================*/
extern
int
Ssw_RarSignalFilter
(
Aig_Man_t
*
pAig
,
int
nFrames
,
int
nWords
,
int
nBinSize
,
int
nRounds
,
int
nRestart
,
int
nRandSeed
,
int
TimeOut
,
int
fMiter
,
Abc_Cex_t
*
pCex
,
int
fLatchOnly
,
int
fVerbose
);
extern
int
Ssw_RarSimulate
(
Aig_Man_t
*
pAig
,
int
nFrames
,
int
nWords
,
int
nBinSize
,
int
nRounds
,
int
nRestart
,
int
nRandSeed
,
int
TimeOut
,
int
fSolveAll
,
int
fVerbose
,
int
fNotVerbose
);
extern
int
Ssw_RarSimulate
(
Aig_Man_t
*
pAig
,
int
nFrames
,
int
nWords
,
int
nBinSize
,
int
nRounds
,
int
nRestart
,
int
nRandSeed
,
int
TimeOut
,
int
TimeOutGap
,
int
fSolveAll
,
int
fVerbose
,
int
fNotVerbose
);
/*=== sswSim.c ===================================================*/
extern
Ssw_Sml_t
*
Ssw_SmlSimulateComb
(
Aig_Man_t
*
pAig
,
int
nWords
);
extern
Ssw_Sml_t
*
Ssw_SmlSimulateSeq
(
Aig_Man_t
*
pAig
,
int
nPref
,
int
nFrames
,
int
nWords
);
...
...
src/proof/ssw/sswRarity.c
View file @
fd0ff017
...
...
@@ -941,7 +941,7 @@ int Ssw_RarCheckTrivial( Aig_Man_t * pAig, int fVerbose )
SeeAlso []
***********************************************************************/
int
Ssw_RarSimulate
(
Aig_Man_t
*
pAig
,
int
nFrames
,
int
nWords
,
int
nBinSize
,
int
nRounds
,
int
nRestart
,
int
nRandSeed
,
int
TimeOut
,
int
fSolveAll
,
int
fVerbose
,
int
fNotVerbose
)
int
Ssw_RarSimulate
(
Aig_Man_t
*
pAig
,
int
nFrames
,
int
nWords
,
int
nBinSize
,
int
nRounds
,
int
nRestart
,
int
nRandSeed
,
int
TimeOut
,
int
TimeOutGap
,
int
fSolveAll
,
int
fVerbose
,
int
fNotVerbose
)
{
int
fTryBmc
=
0
;
int
fMiter
=
1
;
...
...
@@ -949,6 +949,7 @@ int Ssw_RarSimulate( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize, in
int
r
,
f
=
-
1
;
clock_t
clk
,
clkTotal
=
clock
();
clock_t
nTimeToStop
=
TimeOut
?
TimeOut
*
CLOCKS_PER_SEC
+
clock
()
:
0
;
clock_t
timeLastSolved
=
0
;
int
nNumRestart
=
0
;
int
nSavedSeed
=
nRandSeed
;
int
RetValue
=
-
1
;
...
...
@@ -1005,6 +1006,7 @@ int Ssw_RarSimulate( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize, in
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clkTotal
);
goto
finish
;
}
timeLastSolved
=
clock
();
}
// check timeout
if
(
TimeOut
&&
clock
()
>
nTimeToStop
)
...
...
@@ -1014,6 +1016,13 @@ int Ssw_RarSimulate( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize, in
Abc_Print
(
1
,
"Reached timeout (%d sec).
\n
"
,
TimeOut
);
goto
finish
;
}
if
(
TimeOutGap
&&
timeLastSolved
&&
clock
()
>
timeLastSolved
+
TimeOutGap
*
CLOCKS_PER_SEC
)
{
if
(
fVerbose
&&
!
fSolveAll
)
Abc_Print
(
1
,
"
\n
"
);
Abc_Print
(
1
,
"Simulated %d frames for %d rounds with %d restarts. "
,
nFrames
,
nNumRestart
*
nRestart
+
r
,
nNumRestart
);
Abc_Print
(
1
,
"Reached gap timeout (%d sec).
\n
"
,
TimeOutGap
);
goto
finish
;
}
// check if all outputs are solved by now
if
(
fSolveAll
&&
p
->
vCexes
&&
Vec_PtrCountZero
(
p
->
vCexes
)
==
0
)
goto
finish
;
...
...
@@ -1070,14 +1079,14 @@ finish:
SeeAlso []
***********************************************************************/
int
Ssw_RarSimulateGia
(
Gia_Man_t
*
p
,
int
nFrames
,
int
nWords
,
int
nBinSize
,
int
nRounds
,
int
nRestart
,
int
nRandSeed
,
int
TimeOut
,
int
fVerbose
)
int
Ssw_RarSimulateGia
(
Gia_Man_t
*
p
,
int
nFrames
,
int
nWords
,
int
nBinSize
,
int
nRounds
,
int
nRestart
,
int
nRandSeed
,
int
TimeOut
,
int
TimeOutGap
,
int
fVerbose
)
{
int
fSolveAll
=
0
;
int
fNotVerbose
=
0
;
Aig_Man_t
*
pAig
;
int
RetValue
;
pAig
=
Gia_ManToAigSimple
(
p
);
RetValue
=
Ssw_RarSimulate
(
pAig
,
nFrames
,
nWords
,
nBinSize
,
nRounds
,
nRestart
,
nRandSeed
,
TimeOut
,
fSolveAll
,
fVerbose
,
fNotVerbose
);
RetValue
=
Ssw_RarSimulate
(
pAig
,
nFrames
,
nWords
,
nBinSize
,
nRounds
,
nRestart
,
nRandSeed
,
TimeOut
,
TimeOutGap
,
fSolveAll
,
fVerbose
,
fNotVerbose
);
// save counter-example
Abc_CexFree
(
p
->
pCexSeq
);
p
->
pCexSeq
=
pAig
->
pSeqModel
;
pAig
->
pSeqModel
=
NULL
;
...
...
src/sat/bmc/bmc.h
View file @
fd0ff017
...
...
@@ -48,6 +48,7 @@ struct Saig_ParBmc_t_
int
nConfLimitJump
;
// maximum number of conflicts after jumping
int
nFramesJump
;
// the number of tiemframes to jump
int
nTimeOut
;
// approximate timeout in seconds
int
nTimeOutGap
;
// approximate timeout in seconds since the last change
int
nPisAbstract
;
// the number of PIs to abstract
int
fSolveAll
;
// does not stop at the first SAT output
int
fDropSatOuts
;
// replace sat outputs by constant 0
...
...
@@ -57,6 +58,7 @@ struct Saig_ParBmc_t_
int
fNotVerbose
;
// skip line-by-line print-out
int
iFrame
;
// explored up to this frame
int
nFailOuts
;
// the number of failed outputs
clock_t
timeLastSolved
;
// the time when the last output was solved
};
...
...
src/sat/bmc/bmcBmc3.c
View file @
fd0ff017
...
...
@@ -1301,6 +1301,7 @@ void Saig_ParBmcSetDefaultParams( Saig_ParBmc_t * p )
p
->
nConfLimitJump
=
0
;
// maximum number of conflicts after jumping
p
->
nFramesJump
=
0
;
// the number of tiemframes to jump
p
->
nTimeOut
=
0
;
// approximate timeout in seconds
p
->
nTimeOutGap
=
0
;
// time since the last CEX found
p
->
nPisAbstract
=
0
;
// the number of PIs to abstract
p
->
fSolveAll
=
0
;
// stops on the first SAT instance
p
->
fDropSatOuts
=
0
;
// replace sat outputs by constant 0
...
...
@@ -1308,6 +1309,7 @@ void Saig_ParBmcSetDefaultParams( Saig_ParBmc_t * p )
p
->
fNotVerbose
=
0
;
// skip line-by-line print-out
p
->
iFrame
=
-
1
;
// explored up to this frame
p
->
nFailOuts
=
0
;
// the number of failed outputs
p
->
timeLastSolved
=
0
;
// time when the last one was solved
}
/**Function*************************************************************
...
...
@@ -1405,6 +1407,12 @@ int Saig_ManBmcScalable( Aig_Man_t * pAig, Saig_ParBmc_t * pPars )
Saig_Bmc3ManStop
(
p
);
return
RetValue
;
}
if
(
pPars
->
nTimeOutGap
&&
pPars
->
timeLastSolved
&&
clock
()
>
pPars
->
timeLastSolved
+
pPars
->
nTimeOutGap
*
CLOCKS_PER_SEC
)
{
printf
(
"Reached gap timeout (%d seconds).
\n
"
,
pPars
->
nTimeOutGap
);
Saig_Bmc3ManStop
(
p
);
return
RetValue
;
}
// skip solved outputs
if
(
p
->
vCexes
&&
Vec_PtrEntry
(
p
->
vCexes
,
i
)
)
continue
;
...
...
@@ -1433,6 +1441,7 @@ clkOther += clock() - clk2;
p
->
vCexes
=
Vec_PtrStart
(
Saig_ManPoNum
(
pAig
)
);
Vec_PtrWriteEntry
(
p
->
vCexes
,
i
,
pCex
);
RetValue
=
0
;
pPars
->
timeLastSolved
=
clock
();
continue
;
}
// solve th is output
...
...
@@ -1507,6 +1516,7 @@ clkOther += clock() - clk2;
p
->
vCexes
=
Vec_PtrStart
(
Saig_ManPoNum
(
pAig
)
);
Vec_PtrWriteEntry
(
p
->
vCexes
,
i
,
pCex
);
RetValue
=
0
;
pPars
->
timeLastSolved
=
clock
();
}
else
{
...
...
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