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
ec95f569
Commit
ec95f569
authored
Sep 15, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected &gla -a to work as expected.
parent
152aaedc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
33 deletions
+52
-33
src/aig/gia/giaAbsGla2.c
+52
-33
No files found.
src/aig/gia/giaAbsGla2.c
View file @
ec95f569
...
...
@@ -1193,39 +1193,6 @@ static inline int Ga2_ObjSatValue( Ga2_Man_t * p, Gia_Obj_t * pObj, int f )
return
0
;
return
Abc_LitIsCompl
(
Lit
)
^
sat_solver2_var_value
(
p
->
pSat
,
Abc_Lit2Var
(
Lit
)
);
}
void
Ga2_GlaPrepareCexAndMap
(
Ga2_Man_t
*
p
,
Abc_Cex_t
**
ppCex
,
Vec_Int_t
**
pvMaps
)
{
Abc_Cex_t
*
pCex
;
Vec_Int_t
*
vMap
;
Gia_Obj_t
*
pObj
;
int
f
,
i
,
k
;
/*
Gia_ManForEachObj( p->pGia, pObj, i )
if ( Ga2_ObjId(p, pObj) >= 0 )
assert( Vec_IntEntry(p->vValues, Ga2_ObjId(p, pObj)) == i );
*/
// find PIs and PPIs
vMap
=
Vec_IntAlloc
(
1000
);
Gia_ManForEachObjVec
(
p
->
vValues
,
p
->
pGia
,
pObj
,
i
)
{
if
(
!
i
)
continue
;
if
(
Ga2_ObjIsAbs
(
p
,
pObj
)
)
continue
;
assert
(
pObj
->
fPhase
);
assert
(
Ga2_ObjIsLeaf
(
p
,
pObj
)
);
assert
(
Gia_ObjIsAnd
(
pObj
)
||
Gia_ObjIsCi
(
pObj
)
);
Vec_IntPush
(
vMap
,
Gia_ObjId
(
p
->
pGia
,
pObj
)
);
}
// derive counter-example
pCex
=
Abc_CexAlloc
(
0
,
Vec_IntSize
(
vMap
),
p
->
pPars
->
iFrame
+
1
);
pCex
->
iFrame
=
p
->
pPars
->
iFrame
;
for
(
f
=
0
;
f
<=
p
->
pPars
->
iFrame
;
f
++
)
Gia_ManForEachObjVec
(
vMap
,
p
->
pGia
,
pObj
,
k
)
if
(
Ga2_ObjSatValue
(
p
,
pObj
,
f
)
)
Abc_InfoSetBit
(
pCex
->
pData
,
f
*
Vec_IntSize
(
vMap
)
+
k
);
*
pvMaps
=
vMap
;
*
ppCex
=
pCex
;
}
Abc_Cex_t
*
Ga2_ManDeriveCex
(
Ga2_Man_t
*
p
,
Vec_Int_t
*
vPis
)
{
Abc_Cex_t
*
pCex
;
...
...
@@ -1307,12 +1274,64 @@ void Ga2_ManRefinePrintPPis( Ga2_Man_t * p )
}
void
Ga2_GlaPrepareCexAndMap
(
Ga2_Man_t
*
p
,
Abc_Cex_t
**
ppCex
,
Vec_Int_t
**
pvMaps
)
{
Abc_Cex_t
*
pCex
;
Vec_Int_t
*
vMap
;
Gia_Obj_t
*
pObj
;
int
f
,
i
,
k
;
/*
Gia_ManForEachObj( p->pGia, pObj, i )
if ( Ga2_ObjId(p, pObj) >= 0 )
assert( Vec_IntEntry(p->vValues, Ga2_ObjId(p, pObj)) == i );
*/
// find PIs and PPIs
vMap
=
Vec_IntAlloc
(
1000
);
Gia_ManForEachObjVec
(
p
->
vValues
,
p
->
pGia
,
pObj
,
i
)
{
if
(
!
i
)
continue
;
if
(
Ga2_ObjIsAbs
(
p
,
pObj
)
)
continue
;
assert
(
pObj
->
fPhase
);
assert
(
Ga2_ObjIsLeaf
(
p
,
pObj
)
);
assert
(
Gia_ObjIsAnd
(
pObj
)
||
Gia_ObjIsCi
(
pObj
)
);
Vec_IntPush
(
vMap
,
Gia_ObjId
(
p
->
pGia
,
pObj
)
);
}
// derive counter-example
pCex
=
Abc_CexAlloc
(
0
,
Vec_IntSize
(
vMap
),
p
->
pPars
->
iFrame
+
1
);
pCex
->
iFrame
=
p
->
pPars
->
iFrame
;
for
(
f
=
0
;
f
<=
p
->
pPars
->
iFrame
;
f
++
)
Gia_ManForEachObjVec
(
vMap
,
p
->
pGia
,
pObj
,
k
)
if
(
Ga2_ObjSatValue
(
p
,
pObj
,
f
)
)
Abc_InfoSetBit
(
pCex
->
pData
,
f
*
Vec_IntSize
(
vMap
)
+
k
);
*
pvMaps
=
vMap
;
*
ppCex
=
pCex
;
}
Vec_Int_t
*
Ga2_ManRefine
(
Ga2_Man_t
*
p
)
{
Abc_Cex_t
*
pCex
;
Vec_Int_t
*
vMap
,
*
vVec
;
Gia_Obj_t
*
pObj
;
int
i
,
k
;
if
(
p
->
pPars
->
fAddLayer
)
{
// use simplified refinement strategy, which adds logic near at PPI without finding important ones
vVec
=
Vec_IntAlloc
(
100
);
Gia_ManForEachObjVec
(
p
->
vValues
,
p
->
pGia
,
pObj
,
i
)
{
if
(
!
i
)
continue
;
if
(
Ga2_ObjIsAbs
(
p
,
pObj
)
)
continue
;
assert
(
pObj
->
fPhase
);
assert
(
Ga2_ObjIsLeaf
(
p
,
pObj
)
);
assert
(
Gia_ObjIsAnd
(
pObj
)
||
Gia_ObjIsCi
(
pObj
)
);
if
(
Gia_ObjIsPi
(
p
->
pGia
,
pObj
)
)
continue
;
Vec_IntPush
(
vVec
,
Gia_ObjId
(
p
->
pGia
,
pObj
)
);
}
p
->
nObjAdded
+=
Vec_IntSize
(
vVec
);
return
vVec
;
}
Ga2_GlaPrepareCexAndMap
(
p
,
&
pCex
,
&
vMap
);
// Rf2_ManRefine( p->pRf2, pCex, vMap, p->pPars->fPropFanout, 1 );
vVec
=
Rnm_ManRefine
(
p
->
pRnm
,
pCex
,
vMap
,
p
->
pPars
->
fPropFanout
,
1
,
1
);
...
...
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