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
2340d279
Commit
2340d279
authored
Jun 15, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding support of multi-output problems in &splitprove.
parent
3d338486
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
2 deletions
+137
-2
src/aig/gia/giaDup.c
+81
-0
src/base/abci/abc.c
+25
-1
src/proof/cec/cecSplit.c
+31
-1
No files found.
src/aig/gia/giaDup.c
View file @
2340d279
...
...
@@ -2749,6 +2749,87 @@ Gia_Man_t * Gia_ManDupSliced( Gia_Man_t * p, int nSuppMax )
}
/**Function*************************************************************
Synopsis [Extract constraints.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Gia_ManDupWithConstrCollectAnd_rec
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
Vec_Int_t
*
vSuper
)
{
if
(
Gia_IsComplement
(
pObj
)
||
!
Gia_ObjIsAnd
(
pObj
)
)
{
Vec_IntPushUnique
(
vSuper
,
Gia_ObjToLit
(
p
,
pObj
)
);
return
;
}
Gia_ManDupWithConstrCollectAnd_rec
(
p
,
Gia_ObjChild0
(
pObj
),
vSuper
);
Gia_ManDupWithConstrCollectAnd_rec
(
p
,
Gia_ObjChild1
(
pObj
),
vSuper
);
}
Gia_Man_t
*
Gia_ManDupWithConstr
(
Gia_Man_t
*
p
)
{
Vec_Int_t
*
vSuper
;
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
;
int
i
,
iDriver
,
iLit
,
iLitBest
=
-
1
,
LevelBest
=
-
1
;
assert
(
Gia_ManPoNum
(
p
)
==
1
);
assert
(
Gia_ManRegNum
(
p
)
==
0
);
pObj
=
Gia_ManPo
(
p
,
0
);
if
(
Gia_ObjFaninC0
(
pObj
)
)
{
printf
(
"The miter's output is not AND-decomposable.
\n
"
);
return
NULL
;
}
vSuper
=
Vec_IntAlloc
(
100
);
Gia_ManDupWithConstrCollectAnd_rec
(
p
,
Gia_ObjChild0
(
pObj
),
vSuper
);
assert
(
Vec_IntSize
(
vSuper
)
>
1
);
// find the highest level
Gia_ManLevelNum
(
p
);
Vec_IntForEachEntry
(
vSuper
,
iLit
,
i
)
if
(
LevelBest
<
Gia_ObjLevelId
(
p
,
Abc_Lit2Var
(
iLit
))
)
LevelBest
=
Gia_ObjLevelId
(
p
,
Abc_Lit2Var
(
iLit
)),
iLitBest
=
iLit
;
assert
(
iLitBest
!=
-
1
);
// create new manager
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
Gia_ManConst0
(
p
)
->
Value
=
0
;
Gia_ManHashAlloc
(
pNew
);
Gia_ManForEachObj1
(
p
,
pObj
,
i
)
{
if
(
Gia_ObjIsAnd
(
pObj
)
)
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
else
if
(
Gia_ObjIsCi
(
pObj
)
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
}
// create AND of nodes
iDriver
=
-
1
;
Vec_IntForEachEntry
(
vSuper
,
iLit
,
i
)
{
if
(
iLit
==
iLitBest
)
continue
;
if
(
iDriver
==
-
1
)
iDriver
=
Gia_ObjLitCopy
(
p
,
iLit
);
else
iDriver
=
Gia_ManHashAnd
(
pNew
,
iDriver
,
Gia_ObjLitCopy
(
p
,
iLit
)
);
}
// create the main PO
Gia_ManAppendCo
(
pNew
,
Gia_ObjLitCopy
(
p
,
iLitBest
)
);
// create the constraint PO
Gia_ManAppendCo
(
pNew
,
Abc_LitNot
(
iDriver
)
);
pNew
->
nConstrs
=
1
;
// rehash
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
Gia_ManStop
(
pTemp
);
Vec_IntFree
(
vSuper
);
return
pNew
;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
src/base/abci/abc.c
View file @
2340d279
...
...
@@ -23072,9 +23072,33 @@ int Abc_CommandUnfold( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Empty network.
\n
"
);
return
1
;
}
if
(
Abc_NtkIsComb
(
pNtk
)
&&
Abc_NtkPoNum
(
pNtk
)
>
1
)
{
Abc_Print
(
-
1
,
"Combinational miter has more than one PO.
\n
"
);
return
0
;
}
if
(
Abc_NtkIsComb
(
pNtk
)
)
{
Abc_Print
(
-
1
,
"The network is combinational.
\n
"
);
extern
Gia_Man_t
*
Gia_ManDupWithConstr
(
Gia_Man_t
*
p
);
Gia_Man_t
*
pNew
;
Aig_Man_t
*
pAig
=
Abc_NtkToDar
(
pNtk
,
0
,
0
);
Gia_Man_t
*
pGia
=
Gia_ManFromAigSimple
(
pAig
);
Aig_ManStop
(
pAig
);
pNew
=
Gia_ManDupWithConstr
(
pGia
);
if
(
pNew
==
NULL
)
{
Abc_Print
(
-
1
,
"Cannot extract constrains from the miter.
\n
"
);
return
0
;
}
Gia_ManStop
(
pGia
);
pAig
=
Gia_ManToAigSimple
(
pNew
);
Gia_ManStop
(
pNew
);
pNtkRes
=
Abc_NtkFromAigPhase
(
pAig
);
Aig_ManStop
(
pAig
);
ABC_FREE
(
pNtkRes
->
pName
);
pNtkRes
->
pName
=
Extra_UtilStrsav
(
pNtk
->
pName
);
// replace the current network
Abc_FrameReplaceCurrentNetwork
(
pAbc
,
pNtkRes
);
return
0
;
}
if
(
!
Abc_NtkIsStrash
(
pNtk
)
)
src/proof/cec/cecSplit.c
View file @
2340d279
...
...
@@ -558,7 +558,7 @@ void * Cec_GiaSplitWorkerThread( void * pArg )
assert
(
0
);
return
NULL
;
}
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
)
int
Cec_GiaSplitTest
Int
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
)
{
abctime
clkTotal
=
Abc_Clock
();
Par_ThData_t
ThData
[
PAR_THR_MAX
];
...
...
@@ -721,6 +721,36 @@ finish:
fflush
(
stdout
);
return
RetValue
;
}
int
Cec_GiaSplitTest
(
Gia_Man_t
*
p
,
int
nProcs
,
int
nTimeOut
,
int
nIterMax
,
int
LookAhead
,
int
fVerbose
,
int
fVeryVerbose
)
{
Abc_Cex_t
*
pCex
=
NULL
;
Gia_Man_t
*
pOne
;
Gia_Obj_t
*
pObj
;
int
i
,
RetValue1
,
fOneUndef
=
0
,
RetValue
=
-
1
;
Abc_CexFreeP
(
&
p
->
pCexComb
);
Gia_ManForEachPo
(
p
,
pObj
,
i
)
{
pOne
=
Gia_ManDupOutputGroup
(
p
,
i
,
i
+
1
);
if
(
fVerbose
)
printf
(
"
\n
Solving output %d:
\n
"
,
i
);
RetValue1
=
Cec_GiaSplitTestInt
(
pOne
,
nProcs
,
nTimeOut
,
nIterMax
,
LookAhead
,
fVerbose
,
fVeryVerbose
);
Gia_ManStop
(
pOne
);
// collect the result
if
(
RetValue1
==
0
&&
RetValue
==
-
1
)
{
pCex
=
pOne
->
pCexComb
;
pOne
->
pCexComb
=
NULL
;
pCex
->
iPo
=
i
;
RetValue
=
0
;
}
if
(
RetValue1
==
-
1
)
fOneUndef
=
1
;
}
if
(
RetValue
==
-
1
)
RetValue
=
fOneUndef
?
-
1
:
1
;
else
p
->
pCexComb
=
pCex
;
return
RetValue
;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
...
...
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