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
b844433a
Commit
b844433a
authored
Jun 04, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding CEC command &splitprove.
parent
f2818ddb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
116 additions
and
53 deletions
+116
-53
abclib.dsp
+4
-0
src/aig/gia/gia.h
+1
-0
src/aig/gia/giaDup.c
+94
-0
src/base/abci/abc.c
+17
-5
src/proof/cec/cecSplit.c
+0
-0
src/sat/bmc/bmcCexDepth.c
+0
-48
No files found.
abclib.dsp
View file @
b844433a
...
...
@@ -4219,6 +4219,10 @@ SOURCE=.\src\proof\cec\cecSolve.c
# End Source File
# Begin Source File
SOURCE=.\src\proof\cec\cecSplit.c
# End Source File
# Begin Source File
SOURCE=.\src\proof\cec\cecSweep.c
# End Source File
# Begin Source File
...
...
src/aig/gia/gia.h
View file @
b844433a
...
...
@@ -1015,6 +1015,7 @@ extern Gia_Man_t * Gia_ManDupMarked( Gia_Man_t * p );
extern
Gia_Man_t
*
Gia_ManDupTimes
(
Gia_Man_t
*
p
,
int
nTimes
);
extern
Gia_Man_t
*
Gia_ManDupDfs
(
Gia_Man_t
*
p
);
extern
Gia_Man_t
*
Gia_ManDupCofactor
(
Gia_Man_t
*
p
,
int
iVar
,
int
Value
);
extern
Gia_Man_t
*
Gia_ManDupExist
(
Gia_Man_t
*
p
,
int
iVar
);
extern
Gia_Man_t
*
Gia_ManDupDfsSkip
(
Gia_Man_t
*
p
);
extern
Gia_Man_t
*
Gia_ManDupDfsCone
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
);
extern
Gia_Man_t
*
Gia_ManDupDfsLitArray
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vLits
);
...
...
src/aig/gia/giaDup.c
View file @
b844433a
...
...
@@ -1239,6 +1239,100 @@ Gia_Man_t * Gia_ManDupCofactor( Gia_Man_t * p, int iVar, int Value )
/**Function*************************************************************
Synopsis [Existentially quantified given variable.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_ManDupExist
(
Gia_Man_t
*
p
,
int
iVar
)
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
;
int
i
;
assert
(
iVar
>=
0
&&
iVar
<
Gia_ManPiNum
(
p
)
);
assert
(
Gia_ManPoNum
(
p
)
==
1
);
assert
(
Gia_ManRegNum
(
p
)
==
0
);
Gia_ManFillValue
(
p
);
// find the cofactoring variable
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
Gia_ManHashAlloc
(
pNew
);
// compute negative cofactor
Gia_ManConst0
(
p
)
->
Value
=
0
;
Gia_ManForEachCi
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
Gia_ManPi
(
p
,
iVar
)
->
Value
=
Abc_Var2Lit
(
0
,
0
);
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
Gia_ManForEachPo
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ObjFanin0Copy
(
pObj
);
// compute the positive cofactor
Gia_ManPi
(
p
,
iVar
)
->
Value
=
Abc_Var2Lit
(
0
,
1
);
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
// create OR gate
Gia_ManForEachPo
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCo
(
pNew
,
Gia_ManHashOr
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
pObj
->
Value
)
);
Gia_ManHashStop
(
pNew
);
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
Gia_ManStop
(
pTemp
);
return
pNew
;
}
/**Function*************************************************************
Synopsis [Existentially quantifies the given variable.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_ManDupExist2
(
Gia_Man_t
*
p
,
int
iVar
)
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
;
int
i
;
assert
(
iVar
>=
0
&&
iVar
<
Gia_ManPiNum
(
p
)
);
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
Gia_ManFillValue
(
p
);
Gia_ManHashAlloc
(
pNew
);
Gia_ManConst0
(
p
)
->
Value
=
0
;
Gia_ManForEachCi
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
// first part
Gia_ManPi
(
p
,
iVar
)
->
Value
=
0
;
// modification!
Gia_ManForEachCo
(
p
,
pObj
,
i
)
Gia_ManDupCofactor_rec
(
pNew
,
p
,
Gia_ObjFanin0
(
pObj
)
);
Gia_ManForEachCo
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ObjFanin0Copy
(
pObj
);
// second part
Gia_ManPi
(
p
,
iVar
)
->
Value
=
1
;
// modification!
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
pObj
->
Value
=
~
0
;
Gia_ManForEachCo
(
p
,
pObj
,
i
)
Gia_ManDupCofactor_rec
(
pNew
,
p
,
Gia_ObjFanin0
(
pObj
)
);
// combination
Gia_ManForEachCo
(
p
,
pObj
,
i
)
Gia_ManAppendCo
(
pNew
,
Gia_ManHashOr
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
pObj
->
Value
)
);
Gia_ManSetRegNum
(
pNew
,
Gia_ManRegNum
(
p
)
);
pNew
->
nConstrs
=
p
->
nConstrs
;
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
Gia_ManStop
(
pTemp
);
return
pNew
;
}
/**Function*************************************************************
Synopsis [Duplicates AIG in the DFS order while putting CIs first.]
Description []
...
...
src/base/abci/abc.c
View file @
b844433a
...
...
@@ -32876,13 +32876,24 @@ usage:
***********************************************************************/
int
Abc_CommandAbc9SplitProve
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Gia_Man_t
*
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
);
int
c
,
nTimeOut
=
1
,
nIterMax
=
0
,
LookAhead
=
1
,
fVerbose
=
0
;
extern
Gia_Man_t
*
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
n
Procs
,
int
n
TimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
);
int
c
,
n
Procs
=
1
,
n
TimeOut
=
1
,
nIterMax
=
0
,
LookAhead
=
1
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"TILvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
P
TILvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'P'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-P
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
nProcs
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nProcs
<=
0
)
goto
usage
;
break
;
case
'T'
:
if
(
globalUtilOptind
>=
argc
)
{
...
...
@@ -32938,12 +32949,13 @@ int Abc_CommandAbc9SplitProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Abc_CommandAbc9SplitProve(): The problem is sequential.
\n
"
);
return
1
;
}
Cec_GiaSplitTest
(
pAbc
->
pGia
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
);
Cec_GiaSplitTest
(
pAbc
->
pGia
,
n
Procs
,
n
TimeOut
,
nIterMax
,
LookAhead
,
fVerbose
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &splitprove [-TIL num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &splitprove [-
P
TIL num] [-vh]
\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
);
src/proof/cec/cecSplit.c
View file @
b844433a
This diff is collapsed.
Click to expand it.
src/sat/bmc/bmcCexDepth.c
View file @
b844433a
...
...
@@ -35,54 +35,6 @@ extern int Bmc_CexVerify( Gia_Man_t * p, Abc_Cex_t * pCex, Abc_Cex_t * pCexCare
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis [Existentially quantified given variable.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_ManDupExist
(
Gia_Man_t
*
p
,
int
iVar
)
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
;
int
i
;
assert
(
iVar
>=
0
&&
iVar
<
Gia_ManPiNum
(
p
)
);
assert
(
Gia_ManPoNum
(
p
)
==
1
);
assert
(
Gia_ManRegNum
(
p
)
==
0
);
Gia_ManFillValue
(
p
);
// find the cofactoring variable
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
Gia_ManHashAlloc
(
pNew
);
// compute negative cofactor
Gia_ManConst0
(
p
)
->
Value
=
0
;
Gia_ManForEachCi
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
Gia_ManPi
(
p
,
iVar
)
->
Value
=
Abc_Var2Lit
(
0
,
1
);
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
Gia_ManForEachPo
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ObjFanin0Copy
(
pObj
);
// compute the positive cofactor
Gia_ManPi
(
p
,
iVar
)
->
Value
=
Abc_Var2Lit
(
0
,
0
);
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
// create OR gate
Gia_ManForEachPo
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCo
(
pNew
,
Gia_ManHashOr
(
pNew
,
pObj
->
Value
,
Gia_ObjFanin0Copy
(
pObj
))
);
Gia_ManHashStop
(
pNew
);
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
Gia_ManStop
(
pTemp
);
return
pNew
;
}
/**Function*************************************************************
Synopsis [Performs targe enlargement of the given size.]
...
...
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