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
70511b00
Commit
70511b00
authored
Mar 09, 2017
by
Yen-Sheng Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
%pdra: added an option -i for weaker proof-based refinement
parent
566beb9c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
6 deletions
+24
-6
src/base/wlc/wlc.h
+1
-0
src/base/wlc/wlcAbs.c
+16
-4
src/base/wlc/wlcCom.c
+6
-2
src/base/wlc/wlcNtk.c
+1
-0
No files found.
src/base/wlc/wlc.h
View file @
70511b00
...
@@ -179,6 +179,7 @@ struct Wlc_Par_t_
...
@@ -179,6 +179,7 @@ struct Wlc_Par_t_
int
fHybrid
;
// Use a hybrid of CBR and PBR
int
fHybrid
;
// Use a hybrid of CBR and PBR
int
fCheckCombUnsat
;
// Check if ABS becomes comb. unsat
int
fCheckCombUnsat
;
// Check if ABS becomes comb. unsat
int
fAbs2
;
// Use UFAR style createAbs
int
fAbs2
;
// Use UFAR style createAbs
int
fProofUsePPI
;
// Use PPI values in PBR
int
fVerbose
;
// verbose output
int
fVerbose
;
// verbose output
int
fPdrVerbose
;
// verbose output
int
fPdrVerbose
;
// verbose output
};
};
...
...
src/base/wlc/wlcAbs.c
View file @
70511b00
...
@@ -148,7 +148,7 @@ static Vec_Int_t * Wlc_NtkGetCoreSels( Gia_Man_t * pFrames, int nFrames, int num
...
@@ -148,7 +148,7 @@ static Vec_Int_t * Wlc_NtkGetCoreSels( Gia_Man_t * pFrames, int nFrames, int num
return
vCores
;
return
vCores
;
}
}
static
Gia_Man_t
*
Wlc_NtkUnrollWithCex
(
Wlc_Ntk_t
*
pChoice
,
Abc_Cex_t
*
pCex
,
int
nbits_old_pis
,
int
num_sel_pis
,
int
*
p_num_ppis
,
int
sel_pi_first
)
static
Gia_Man_t
*
Wlc_NtkUnrollWithCex
(
Wlc_Ntk_t
*
pChoice
,
Abc_Cex_t
*
pCex
,
int
nbits_old_pis
,
int
num_sel_pis
,
int
*
p_num_ppis
,
int
sel_pi_first
,
int
fUsePPI
)
{
{
Gia_Man_t
*
pGiaChoice
=
Wlc_NtkBitBlast
(
pChoice
,
NULL
,
-
1
,
0
,
0
,
0
,
0
);
Gia_Man_t
*
pGiaChoice
=
Wlc_NtkBitBlast
(
pChoice
,
NULL
,
-
1
,
0
,
0
,
0
,
0
);
int
nbits_new_pis
=
Wlc_NtkNumPiBits
(
pChoice
);
int
nbits_new_pis
=
Wlc_NtkNumPiBits
(
pChoice
);
...
@@ -179,8 +179,15 @@ static Gia_Man_t * Wlc_NtkUnrollWithCex(Wlc_Ntk_t * pChoice, Abc_Cex_t * pCex, i
...
@@ -179,8 +179,15 @@ static Gia_Man_t * Wlc_NtkUnrollWithCex(Wlc_Ntk_t * pChoice, Abc_Cex_t * pCex, i
if
(
i
>=
nbits_old_pis
&&
i
<
nbits_old_pis
+
num_ppis
+
num_sel_pis
)
if
(
i
>=
nbits_old_pis
&&
i
<
nbits_old_pis
+
num_ppis
+
num_sel_pis
)
{
{
is_sel_pi
=
sel_pi_first
?
(
i
<
nbits_old_pis
+
num_sel_pis
)
:
(
i
>=
nbits_old_pis
+
num_ppis
);
is_sel_pi
=
sel_pi_first
?
(
i
<
nbits_old_pis
+
num_sel_pis
)
:
(
i
>=
nbits_old_pis
+
num_ppis
);
if
(
f
==
0
||
!
is_sel_pi
)
if
(
f
==
0
&&
is_sel_pi
)
Gia_ManPi
(
pGiaChoice
,
i
)
->
Value
=
Gia_ManAppendCi
(
pFrames
);
Gia_ManPi
(
pGiaChoice
,
i
)
->
Value
=
Gia_ManAppendCi
(
pFrames
);
if
(
!
is_sel_pi
)
{
if
(
!
fUsePPI
)
Gia_ManPi
(
pGiaChoice
,
i
)
->
Value
=
Gia_ManAppendCi
(
pFrames
);
else
Gia_ManPi
(
pGiaChoice
,
i
)
->
Value
=
Abc_InfoHasBit
(
pCex
->
pData
,
pCex
->
nRegs
+
pCex
->
nPis
*
f
+
i
+
num_undc_pis
);
}
}
}
else
if
(
i
<
nbits_old_pis
)
else
if
(
i
<
nbits_old_pis
)
{
{
...
@@ -446,8 +453,13 @@ static int Wlc_NtkProofRefine( Wlc_Ntk_t * p, Wlc_Par_t * pPars, Abc_Cex_t * pCe
...
@@ -446,8 +453,13 @@ static int Wlc_NtkProofRefine( Wlc_Ntk_t * p, Wlc_Par_t * pPars, Abc_Cex_t * pCe
}
}
pNtkWithChoices
=
vBlacks
?
Wlc_NtkIntroduceChoices
(
p
,
vBlacks
)
:
NULL
;
pNtkWithChoices
=
vBlacks
?
Wlc_NtkIntroduceChoices
(
p
,
vBlacks
)
:
NULL
;
pGiaFrames
=
Wlc_NtkUnrollWithCex
(
pNtkWithChoices
,
pCex
,
Wlc_NtkNumPiBits
(
p
),
Vec_IntSize
(
vBlacks
),
&
num_ppis
,
0
);
pGiaFrames
=
Wlc_NtkUnrollWithCex
(
pNtkWithChoices
,
pCex
,
Wlc_NtkNumPiBits
(
p
),
Vec_IntSize
(
vBlacks
),
&
num_ppis
,
0
,
pPars
->
fProofUsePPI
);
vCoreSels
=
Wlc_NtkGetCoreSels
(
pGiaFrames
,
pCex
->
iFrame
+
1
,
Vec_IntSize
(
vBlacks
),
num_ppis
,
vChoiceMark
,
0
,
0
,
pPars
);
if
(
!
pPars
->
fProofUsePPI
)
vCoreSels
=
Wlc_NtkGetCoreSels
(
pGiaFrames
,
pCex
->
iFrame
+
1
,
Vec_IntSize
(
vBlacks
),
num_ppis
,
vChoiceMark
,
0
,
0
,
pPars
);
else
vCoreSels
=
Wlc_NtkGetCoreSels
(
pGiaFrames
,
pCex
->
iFrame
+
1
,
Vec_IntSize
(
vBlacks
),
0
,
vChoiceMark
,
0
,
0
,
pPars
);
Wlc_NtkFree
(
pNtkWithChoices
);
Wlc_NtkFree
(
pNtkWithChoices
);
Gia_ManStop
(
pGiaFrames
);
Gia_ManStop
(
pGiaFrames
);
Vec_BitFree
(
vUnmark
);
Vec_BitFree
(
vUnmark
);
...
...
src/base/wlc/wlcCom.c
View file @
70511b00
...
@@ -462,7 +462,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -462,7 +462,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
int
c
;
int
c
;
Wlc_ManSetDefaultParams
(
pPars
);
Wlc_ManSetDefaultParams
(
pPars
);
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"AMXFILabrcdpmuxvwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"AMXFILabrcd
i
pmuxvwh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -550,6 +550,9 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -550,6 +550,9 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'd'
:
case
'd'
:
pPars
->
fAbs2
^=
1
;
pPars
->
fAbs2
^=
1
;
break
;
break
;
case
'i'
:
pPars
->
fProofUsePPI
^=
1
;
break
;
case
'p'
:
case
'p'
:
pPars
->
fPushClauses
^=
1
;
pPars
->
fPushClauses
^=
1
;
break
;
break
;
...
@@ -579,7 +582,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -579,7 +582,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
Wlc_NtkPdrAbs
(
pNtk
,
pPars
);
Wlc_NtkPdrAbs
(
pNtk
,
pPars
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: %%pdra [-AMXFIL num] [-abrcdpmxuvwh]
\n
"
);
Abc_Print
(
-
2
,
"usage: %%pdra [-AMXFIL num] [-abrcd
i
pmxuvwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
abstraction for word-level networks
\n
"
);
Abc_Print
(
-
2
,
"
\t
abstraction for word-level networks
\n
"
);
Abc_Print
(
-
2
,
"
\t
-A num : minimum bit-width of an adder/subtractor to abstract [default = %d]
\n
"
,
pPars
->
nBitsAdd
);
Abc_Print
(
-
2
,
"
\t
-A num : minimum bit-width of an adder/subtractor to abstract [default = %d]
\n
"
,
pPars
->
nBitsAdd
);
Abc_Print
(
-
2
,
"
\t
-M num : minimum bit-width of a multiplier to abstract [default = %d]
\n
"
,
pPars
->
nBitsMul
);
Abc_Print
(
-
2
,
"
\t
-M num : minimum bit-width of a multiplier to abstract [default = %d]
\n
"
,
pPars
->
nBitsMul
);
...
@@ -593,6 +596,7 @@ usage:
...
@@ -593,6 +596,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-r : toggle using both cex-based and proof-based refinement [default = %s]
\n
"
,
pPars
->
fHybrid
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-r : toggle using both cex-based and proof-based refinement [default = %s]
\n
"
,
pPars
->
fHybrid
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggle checking clauses in the reloaded trace [default = %s]
\n
"
,
pPars
->
fCheckClauses
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggle checking clauses in the reloaded trace [default = %s]
\n
"
,
pPars
->
fCheckClauses
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle using another way of creating abstractions [default = %s]
\n
"
,
pPars
->
fAbs2
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle using another way of creating abstractions [default = %s]
\n
"
,
pPars
->
fAbs2
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-i : toggle using PPI values in proof-based refinement [default = %s]
\n
"
,
pPars
->
fProofUsePPI
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-u : toggle checking combinationally unsat [default = %s]
\n
"
,
pPars
->
fCheckCombUnsat
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-u : toggle checking combinationally unsat [default = %s]
\n
"
,
pPars
->
fCheckCombUnsat
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-p : toggle pushing clauses in the reloaded trace [default = %s]
\n
"
,
pPars
->
fPushClauses
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-p : toggle pushing clauses in the reloaded trace [default = %s]
\n
"
,
pPars
->
fPushClauses
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-m : toggle refining the whole MFFC of a PPI [default = %s]
\n
"
,
pPars
->
fMFFC
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-m : toggle refining the whole MFFC of a PPI [default = %s]
\n
"
,
pPars
->
fMFFC
?
"yes"
:
"no"
);
...
...
src/base/wlc/wlcNtk.c
View file @
70511b00
...
@@ -123,6 +123,7 @@ void Wlc_ManSetDefaultParams( Wlc_Par_t * pPars )
...
@@ -123,6 +123,7 @@ void Wlc_ManSetDefaultParams( Wlc_Par_t * pPars )
pPars
->
fHybrid
=
1
;
// Use a hybrid of CBR and PBR
pPars
->
fHybrid
=
1
;
// Use a hybrid of CBR and PBR
pPars
->
fCheckCombUnsat
=
0
;
// Check if ABS becomes comb. unsat
pPars
->
fCheckCombUnsat
=
0
;
// Check if ABS becomes comb. unsat
pPars
->
fAbs2
=
0
;
// Use UFAR style createAbs
pPars
->
fAbs2
=
0
;
// Use UFAR style createAbs
pPars
->
fProofUsePPI
=
0
;
// Use PPI values in PBR
pPars
->
fVerbose
=
0
;
// verbose output`
pPars
->
fVerbose
=
0
;
// verbose output`
pPars
->
fPdrVerbose
=
0
;
// show verbose PDR output
pPars
->
fPdrVerbose
=
0
;
// show verbose PDR output
}
}
...
...
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