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
aed9a872
Commit
aed9a872
authored
Feb 06, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding specialized flop ordering before generalization in 'pdr'.
parent
89e8e500
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
3 deletions
+38
-3
src/base/abci/abc.c
+6
-2
src/proof/pdr/pdr.h
+1
-0
src/proof/pdr/pdrCore.c
+31
-1
No files found.
src/base/abci/abc.c
View file @
aed9a872
...
...
@@ -26008,7 +26008,7 @@ int Abc_CommandPdr( Abc_Frame_t * pAbc, int argc, char ** argv )
int
c
;
Pdr_ManSetDefaultParams
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"MFCDRTHGSaxrmuysipdegoncvwzh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"MFCDRTHGSaxrmuy
f
sipdegoncvwzh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -26129,6 +26129,9 @@ int Abc_CommandPdr( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'y'
:
pPars
->
fFlopPrio
^=
1
;
break
;
case
'f'
:
pPars
->
fFlopOrder
^=
1
;
break
;
case
's'
:
pPars
->
fShortest
^=
1
;
break
;
...
...
@@ -26197,7 +26200,7 @@ int Abc_CommandPdr( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: pdr [-MFCDRTHGS <num>] [-axrmuysipdegoncvwzh]
\n
"
);
Abc_Print
(
-
2
,
"usage: pdr [-MFCDRTHGS <num>] [-axrmuy
f
sipdegoncvwzh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
model checking using property directed reachability (aka IC3)
\n
"
);
Abc_Print
(
-
2
,
"
\t
pioneered by Aaron R. Bradley (http://theory.stanford.edu/~arbrad/)
\n
"
);
Abc_Print
(
-
2
,
"
\t
with improvements by Niklas Een (http://een.se/niklas/)
\n
"
);
...
...
@@ -26216,6 +26219,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-m : toggle using monolythic CNF computation [default = %s]
\n
"
,
pPars
->
fMonoCnf
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-u : toggle updated X-valued simulation [default = %s]
\n
"
,
pPars
->
fNewXSim
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-y : toggle using structural flop priorities [default = %s]
\n
"
,
pPars
->
fFlopPrio
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-f : toggle ordering flops by cost before generalization [default = %s]
\n
"
,
pPars
->
fFlopOrder
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle creating only shortest counter-examples [default = %s]
\n
"
,
pPars
->
fShortest
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-i : toggle clause pushing from an intermediate timeframe [default = %s]
\n
"
,
pPars
->
fShiftStart
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-p : toggle reusing proof-obligations in the last timeframe [default = %s]
\n
"
,
pPars
->
fReuseProofOblig
?
"yes"
:
"no"
);
src/proof/pdr/pdr.h
View file @
aed9a872
...
...
@@ -54,6 +54,7 @@ struct Pdr_Par_t_
int
fMonoCnf
;
// monolythic CNF
int
fNewXSim
;
// updated X-valued simulation
int
fFlopPrio
;
// use structural flop priorities
int
fFlopOrder
;
// order flops for 'analyze_final' during generalization
int
fDumpInv
;
// dump inductive invariant
int
fUseSupp
;
// use support in the invariant
int
fShortest
;
// forces bug traces to be shortest
...
...
src/proof/pdr/pdrCore.c
View file @
aed9a872
...
...
@@ -63,8 +63,9 @@ void Pdr_ManSetDefaultParams( Pdr_Par_t * pPars )
pPars
->
fSkipDown
=
1
;
// apply down in generalization
pPars
->
fCtgs
=
0
;
// handle CTGs in down
pPars
->
fMonoCnf
=
0
;
// monolythic CNF
pPars
->
fFlopPrio
=
0
;
// use structural flop priorities
pPars
->
fNewXSim
=
0
;
// updated X-valued simulation
pPars
->
fFlopPrio
=
0
;
// use structural flop priorities
pPars
->
fFlopOrder
=
0
;
// order flops for 'analyze_final' during generalization
pPars
->
fDumpInv
=
0
;
// dump inductive invariant
pPars
->
fUseSupp
=
1
;
// using support variables in the invariant
pPars
->
fShortest
=
0
;
// forces bug traces to be shortest
...
...
@@ -479,6 +480,31 @@ int ZPdr_ManDown( Pdr_Man_t * p, int k, Pdr_Set_t ** ppCube, Pdr_Set_t * pPred,
}
return
1
;
}
/**Function*************************************************************
Synopsis [Specialized sorting of flops based on cost.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
void
Vec_IntSelectSortCostReverseLit
(
int
*
pArray
,
int
nSize
,
Vec_Int_t
*
vCosts
)
{
int
i
,
j
,
best_i
;
for
(
i
=
0
;
i
<
nSize
-
1
;
i
++
)
{
best_i
=
i
;
for
(
j
=
i
+
1
;
j
<
nSize
;
j
++
)
if
(
Vec_IntEntry
(
vCosts
,
Abc_Lit2Var
(
pArray
[
j
]))
>
Vec_IntEntry
(
vCosts
,
Abc_Lit2Var
(
pArray
[
best_i
]))
)
best_i
=
j
;
ABC_SWAP
(
int
,
pArray
[
i
],
pArray
[
best_i
]
);
}
}
/**Function*************************************************************
Synopsis [Returns 1 if the state could be blocked.]
...
...
@@ -500,7 +526,11 @@ int Pdr_ManGeneralize( Pdr_Man_t * p, int k, Pdr_Set_t * pCube, Pdr_Set_t ** ppP
Hash_Int_t
*
keep
=
NULL
;
// if there is no induction, return
*
ppCubeMin
=
NULL
;
if
(
p
->
pPars
->
fFlopOrder
)
Vec_IntSelectSortCostReverseLit
(
pCube
->
Lits
,
pCube
->
nLits
,
p
->
vPrio
);
RetValue
=
Pdr_ManCheckCube
(
p
,
k
,
pCube
,
ppPred
,
p
->
pPars
->
nConfLimit
,
0
);
if
(
p
->
pPars
->
fFlopOrder
)
Vec_IntSelectSort
(
pCube
->
Lits
,
pCube
->
nLits
);
if
(
RetValue
==
-
1
)
return
-
1
;
if
(
RetValue
==
0
)
...
...
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