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
bdae7c62
Commit
bdae7c62
authored
Apr 17, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding callback to bmc3, sim3, pdr in the multi-output mode.
parent
7808ee8e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
8 deletions
+35
-8
src/proof/pdr/pdr.h
+1
-0
src/proof/pdr/pdrCore.c
+18
-0
src/proof/ssw/ssw.h
+2
-0
src/proof/ssw/sswRarity.c
+0
-0
src/sat/bmc/bmc.h
+1
-0
src/sat/bmc/bmcBmc3.c
+13
-8
No files found.
src/proof/pdr/pdr.h
View file @
bdae7c62
...
...
@@ -62,6 +62,7 @@ struct Pdr_Par_t_
int
iFrame
;
// explored up to this frame
int
RunId
;
// PDR id in this run
int
(
*
pFuncStop
)(
int
);
// callback to terminate
int
(
*
pFuncOnFail
)(
int
,
Abc_Cex_t
*
);
// called for a failed output in MO mode
clock_t
timeLastSolved
;
// the time when the last output was solved
};
...
...
src/proof/pdr/pdrCore.c
View file @
bdae7c62
...
...
@@ -591,6 +591,15 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
p
->
vCexes
=
Vec_PtrStart
(
Saig_ManPoNum
(
p
->
pAig
)
);
assert
(
Vec_PtrEntry
(
p
->
vCexes
,
p
->
iOutCur
)
==
NULL
);
Vec_PtrWriteEntry
(
p
->
vCexes
,
p
->
iOutCur
,
p
->
pPars
->
fStoreCex
?
Pdr_ManDeriveCex
(
p
)
:
(
void
*
)(
ABC_PTRINT_T
)
1
);
if
(
p
->
pPars
->
pFuncOnFail
&&
p
->
pPars
->
pFuncOnFail
(
p
->
iOutCur
,
p
->
pPars
->
fStoreCex
?
(
Abc_Cex_t
*
)
Vec_PtrEntry
(
p
->
vCexes
,
p
->
iOutCur
)
:
NULL
)
)
{
if
(
p
->
pPars
->
fVerbose
)
Pdr_ManPrintProgress
(
p
,
1
,
clock
()
-
clkStart
);
if
(
!
p
->
pPars
->
fSilent
)
Abc_Print
(
1
,
"Quitting due to callback on fail.
\n
"
);
p
->
pPars
->
iFrame
=
k
;
return
-
1
;
}
if
(
p
->
pPars
->
nFailOuts
==
Saig_ManPoNum
(
p
->
pAig
)
)
return
0
;
// all SAT
p
->
pPars
->
timeLastSolved
=
clock
();
...
...
@@ -659,6 +668,15 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
p
->
vCexes
=
Vec_PtrStart
(
Saig_ManPoNum
(
p
->
pAig
)
);
assert
(
Vec_PtrEntry
(
p
->
vCexes
,
p
->
iOutCur
)
==
NULL
);
Vec_PtrWriteEntry
(
p
->
vCexes
,
p
->
iOutCur
,
p
->
pPars
->
fStoreCex
?
Pdr_ManDeriveCex
(
p
)
:
(
void
*
)(
ABC_PTRINT_T
)
1
);
if
(
p
->
pPars
->
pFuncOnFail
&&
p
->
pPars
->
pFuncOnFail
(
p
->
iOutCur
,
p
->
pPars
->
fStoreCex
?
(
Abc_Cex_t
*
)
Vec_PtrEntry
(
p
->
vCexes
,
p
->
iOutCur
)
:
NULL
)
)
{
if
(
p
->
pPars
->
fVerbose
)
Pdr_ManPrintProgress
(
p
,
1
,
clock
()
-
clkStart
);
if
(
!
p
->
pPars
->
fSilent
)
Abc_Print
(
1
,
"Quitting due to callback on fail.
\n
"
);
p
->
pPars
->
iFrame
=
k
;
return
-
1
;
}
if
(
!
p
->
pPars
->
fNotVerbose
)
Abc_Print
(
1
,
"Output %*d was asserted in frame %2d (%2d) (solved %*d out of %*d outputs).
\n
"
,
nOutDigits
,
p
->
iOutCur
,
k
,
k
,
nOutDigits
,
p
->
pPars
->
nFailOuts
,
nOutDigits
,
Saig_ManPoNum
(
p
->
pAig
)
);
...
...
src/proof/ssw/ssw.h
View file @
bdae7c62
...
...
@@ -105,7 +105,9 @@ struct Ssw_RarPars_t_
int
fMiter
;
int
fUseCex
;
int
fLatchOnly
;
int
nSolved
;
Abc_Cex_t
*
pCex
;
int
(
*
pFuncOnFail
)(
int
,
Abc_Cex_t
*
);
// called for a failed output in MO mode
};
typedef
struct
Ssw_Sml_t_
Ssw_Sml_t
;
// sequential simulation manager
...
...
src/proof/ssw/sswRarity.c
View file @
bdae7c62
This diff is collapsed.
Click to expand it.
src/sat/bmc/bmc.h
View file @
bdae7c62
...
...
@@ -60,6 +60,7 @@ struct Saig_ParBmc_t_
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
int
(
*
pFuncOnFail
)(
int
,
Abc_Cex_t
*
);
// called for a failed output in MO mode
};
...
...
src/sat/bmc/bmcBmc3.c
View file @
bdae7c62
...
...
@@ -1477,13 +1477,13 @@ clkOther += clock() - clk2;
continue
;
if
(
Lit
==
1
)
{
RetValue
=
0
;
if
(
!
pPars
->
fSolveAll
)
{
Abc_Cex_t
*
pCex
=
Abc_CexMakeTriv
(
Aig_ManRegNum
(
pAig
),
Saig_ManPiNum
(
pAig
),
Saig_ManPoNum
(
pAig
),
f
*
Saig_ManPoNum
(
pAig
)
+
i
);
printf
(
"Output %d is trivially SAT in frame %d.
\n
"
,
i
,
f
);
ABC_FREE
(
pAig
->
pSeqModel
);
pAig
->
pSeqModel
=
pCex
;
RetValue
=
0
;
goto
finish
;
}
pPars
->
nFailOuts
++
;
...
...
@@ -1492,11 +1492,12 @@ clkOther += clock() - clk2;
nOutDigits
,
i
,
f
,
nOutDigits
,
pPars
->
nFailOuts
,
nOutDigits
,
Saig_ManPoNum
(
pAig
)
);
if
(
p
->
vCexes
==
NULL
)
p
->
vCexes
=
Vec_PtrStart
(
Saig_ManPoNum
(
pAig
)
);
if
(
pPars
->
fStoreCex
)
Vec_PtrWriteEntry
(
p
->
vCexes
,
i
,
Abc_CexMakeTriv
(
Aig_ManRegNum
(
pAig
),
Saig_ManPiNum
(
pAig
),
Saig_ManPoNum
(
pAig
),
f
*
Saig_ManPoNum
(
pAig
)
+
i
)
);
else
Vec_PtrWriteEntry
(
p
->
vCexes
,
i
,
(
void
*
)(
ABC_PTRINT_T
)
1
);
RetValue
=
0
;
Vec_PtrWriteEntry
(
p
->
vCexes
,
i
,
pPars
->
fStoreCex
?
Abc_CexMakeTriv
(
Aig_ManRegNum
(
pAig
),
Saig_ManPiNum
(
pAig
),
Saig_ManPoNum
(
pAig
),
f
*
Saig_ManPoNum
(
pAig
)
+
i
)
:
(
void
*
)(
ABC_PTRINT_T
)
1
);
if
(
pPars
->
pFuncOnFail
&&
pPars
->
pFuncOnFail
(
i
,
pPars
->
fStoreCex
?
(
Abc_Cex_t
*
)
Vec_PtrEntry
(
p
->
vCexes
,
i
)
:
NULL
)
)
{
Abc_Print
(
1
,
"Quitting due to callback on fail.
\n
"
);
goto
finish
;
}
// reset the timeout
pPars
->
timeLastSolved
=
clock
();
nTimeToStop
=
Saig_ManBmcTimeToStop
(
pPars
,
nTimeToStopNG
);
...
...
@@ -1533,6 +1534,7 @@ nTimeUnsat += clock() - clk2;
else
if
(
status
==
l_True
)
{
nTimeSat
+=
clock
()
-
clk2
;
RetValue
=
0
;
fFirst
=
0
;
if
(
!
pPars
->
fSolveAll
)
{
...
...
@@ -1558,7 +1560,6 @@ nTimeSat += clock() - clk2;
}
ABC_FREE
(
pAig
->
pSeqModel
);
pAig
->
pSeqModel
=
Saig_ManGenerateCex
(
p
,
f
,
i
);
RetValue
=
0
;
goto
finish
;
}
pPars
->
nFailOuts
++
;
...
...
@@ -1568,7 +1569,11 @@ nTimeSat += clock() - clk2;
if
(
p
->
vCexes
==
NULL
)
p
->
vCexes
=
Vec_PtrStart
(
Saig_ManPoNum
(
pAig
)
);
Vec_PtrWriteEntry
(
p
->
vCexes
,
i
,
pPars
->
fStoreCex
?
Saig_ManGenerateCex
(
p
,
f
,
i
)
:
(
void
*
)(
ABC_PTRINT_T
)
1
);
RetValue
=
0
;
if
(
pPars
->
pFuncOnFail
&&
pPars
->
pFuncOnFail
(
i
,
pPars
->
fStoreCex
?
(
Abc_Cex_t
*
)
Vec_PtrEntry
(
p
->
vCexes
,
i
)
:
NULL
)
)
{
Abc_Print
(
1
,
"Quitting due to callback on fail.
\n
"
);
goto
finish
;
}
// reset the timeout
pPars
->
timeLastSolved
=
clock
();
nTimeToStop
=
Saig_ManBmcTimeToStop
(
pPars
,
nTimeToStopNG
);
...
...
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