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
8430b6da
Commit
8430b6da
authored
Sep 10, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New API to return the set of all reachable states as an AIG.
parent
9d01c98e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
2 deletions
+97
-2
src/base/abci/abc.c
+4
-1
src/proof/llb/llb4Nonlin.c
+93
-1
No files found.
src/base/abci/abc.c
View file @
8430b6da
...
@@ -33183,7 +33183,7 @@ usage:
...
@@ -33183,7 +33183,7 @@ usage:
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9Test
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9Test
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
//
Gia_Man_t * pTemp = NULL;
Gia_Man_t
*
pTemp
=
NULL
;
int
c
,
fVerbose
=
0
;
int
c
,
fVerbose
=
0
;
int
nFrames
=
10
;
int
nFrames
=
10
;
int
fSwitch
=
0
;
int
fSwitch
=
0
;
...
@@ -33204,6 +33204,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -33204,6 +33204,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// extern void Gia_ManMuxProfiling( Gia_Man_t * p );
// extern void Gia_ManMuxProfiling( Gia_Man_t * p );
// extern Gia_Man_t * Mig_ManTest( Gia_Man_t * pGia );
// extern Gia_Man_t * Mig_ManTest( Gia_Man_t * pGia );
// extern Gia_Man_t * Gia_ManInterTest( Gia_Man_t * p );
// extern Gia_Man_t * Gia_ManInterTest( Gia_Man_t * p );
extern
Gia_Man_t
*
Llb_ReachableStatesGia
(
Gia_Man_t
*
p
);
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Fsvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Fsvh"
)
)
!=
EOF
)
...
@@ -33277,6 +33278,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -33277,6 +33278,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// Abc_FrameUpdateGia( pAbc, pTemp );
// Abc_FrameUpdateGia( pAbc, pTemp );
// pTemp = Gia_ManInterTest( pAbc->pGia );
// pTemp = Gia_ManInterTest( pAbc->pGia );
// Abc_FrameUpdateGia( pAbc, pTemp );
// Abc_FrameUpdateGia( pAbc, pTemp );
pTemp
=
Llb_ReachableStatesGia
(
pAbc
->
pGia
);
Abc_FrameUpdateGia
(
pAbc
,
pTemp
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &test [-F num] [-svh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &test [-F num] [-svh]
\n
"
);
src/proof/llb/llb4Nonlin.c
View file @
8430b6da
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
***********************************************************************/
***********************************************************************/
#include "llbInt.h"
#include "llbInt.h"
#include "base/abc/abc.h"
#include "aig/gia/giaAig.h"
ABC_NAMESPACE_IMPL_START
ABC_NAMESPACE_IMPL_START
...
@@ -888,8 +890,9 @@ printf( "Before = %d. After = %d.\n", Cudd_DagSize(bAux), Cudd_DagSize(p->bCurr
...
@@ -888,8 +890,9 @@ printf( "Before = %d. After = %d.\n", Cudd_DagSize(bAux), Cudd_DagSize(p->bCurr
// report
// report
if
(
!
p
->
pPars
->
fSilent
)
if
(
!
p
->
pPars
->
fSilent
)
printf
(
"The miter is proved unreachable after %d iterations. "
,
nIters
);
printf
(
"The miter is proved unreachable after %d iterations. "
,
nIters
);
p
->
pPars
->
iFrame
=
nIters
-
1
;
if
(
!
p
->
pPars
->
fSilent
)
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
p
->
pPars
->
iFrame
=
nIters
-
1
;
return
1
;
// unreachable
return
1
;
// unreachable
}
}
...
@@ -1084,6 +1087,95 @@ int Llb_Nonlin4CoreReach( Aig_Man_t * pAig, Gia_ParLlb_t * pPars )
...
@@ -1084,6 +1087,95 @@ int Llb_Nonlin4CoreReach( Aig_Man_t * pAig, Gia_ParLlb_t * pPars )
return
RetValue
;
return
RetValue
;
}
}
/**Function*************************************************************
Synopsis [Takes an AIG and returns an AIG representing reachable states.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Aig_Man_t
*
Llb_ReachableStates
(
Aig_Man_t
*
pAig
)
{
extern
Aig_Man_t
*
Abc_NtkToDar
(
Abc_Ntk_t
*
pNtk
,
int
fExors
,
int
fRegisters
);
Vec_Int_t
*
vPermute
;
Vec_Ptr_t
*
vNames
;
Gia_ParLlb_t
Pars
,
*
pPars
=
&
Pars
;
DdManager
*
dd
;
DdNode
*
bReached
;
Llb_Mnx_t
*
pMnn
;
Abc_Ntk_t
*
pNtk
,
*
pNtkMuxes
;
Aig_Obj_t
*
pObj
;
int
i
,
RetValue
;
abctime
clk
=
Abc_Clock
();
// create parameters
Llb_ManSetDefaultParams
(
pPars
);
pPars
->
fSkipOutCheck
=
1
;
pPars
->
fCluster
=
0
;
pPars
->
fReorder
=
0
;
pPars
->
fSilent
=
1
;
pPars
->
nBddMax
=
100
;
pPars
->
nClusterMax
=
500
;
// run reachability
pMnn
=
Llb_MnxStart
(
pAig
,
pPars
);
RetValue
=
Llb_Nonlin4Reachability
(
pMnn
);
assert
(
RetValue
==
1
);
// print BDD
// Extra_bddPrint( pMnn->dd, pMnn->bReached );
// Extra_bddPrintSupport( pMnn->dd, pMnn->bReached );
// printf( "\n" );
// collect flop output variables
vPermute
=
Vec_IntStartFull
(
Cudd_ReadSize
(
pMnn
->
dd
)
);
Saig_ManForEachLo
(
pAig
,
pObj
,
i
)
Vec_IntWriteEntry
(
vPermute
,
Llb_ObjBddVar
(
pMnn
->
vOrder
,
pObj
),
i
);
// transfer the reached state BDD into the new manager
dd
=
Cudd_Init
(
Saig_ManRegNum
(
pAig
),
0
,
CUDD_UNIQUE_SLOTS
,
CUDD_CACHE_SLOTS
,
0
);
Cudd_AutodynEnable
(
dd
,
CUDD_REORDER_SYMM_SIFT
);
bReached
=
Extra_TransferPermute
(
pMnn
->
dd
,
dd
,
pMnn
->
bReached
,
Vec_IntArray
(
vPermute
)
);
Cudd_Ref
(
bReached
);
Vec_IntFree
(
vPermute
);
assert
(
Cudd_ReadSize
(
dd
)
==
Saig_ManRegNum
(
pAig
)
);
// quit reachability engine
pMnn
->
timeTotal
=
Abc_Clock
()
-
clk
;
Llb_MnxStop
(
pMnn
);
// derive the network
vNames
=
Abc_NodeGetFakeNames
(
Saig_ManRegNum
(
pAig
)
);
pNtk
=
Abc_NtkDeriveFromBdd
(
dd
,
bReached
,
"reached"
,
vNames
);
Abc_NodeFreeNames
(
vNames
);
Cudd_RecursiveDeref
(
dd
,
bReached
);
Cudd_Quit
(
dd
);
// convert
pNtkMuxes
=
Abc_NtkBddToMuxes
(
pNtk
);
Abc_NtkDelete
(
pNtk
);
pNtk
=
Abc_NtkStrash
(
pNtkMuxes
,
0
,
1
,
0
);
Abc_NtkDelete
(
pNtkMuxes
);
pAig
=
Abc_NtkToDar
(
pNtk
,
0
,
0
);
Abc_NtkDelete
(
pNtk
);
return
pAig
;
}
Gia_Man_t
*
Llb_ReachableStatesGia
(
Gia_Man_t
*
p
)
{
Gia_Man_t
*
pNew
;
Aig_Man_t
*
pAig
,
*
pReached
;
pAig
=
Gia_ManToAigSimple
(
p
);
pReached
=
Llb_ReachableStates
(
pAig
);
Aig_ManStop
(
pAig
);
pNew
=
Gia_ManFromAigSimple
(
pReached
);
Aig_ManStop
(
pReached
);
return
pNew
;
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// 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