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
528c8e0b
Commit
528c8e0b
authored
Aug 10, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabling -S <num> for &gla to not check the first <num> frames.
parent
d22b3d05
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
9 deletions
+19
-9
src/aig/gia/giaAbsGla2.c
+19
-9
src/aig/gia/giaAbsRef.c
+0
-0
No files found.
src/aig/gia/giaAbsGla2.c
View file @
528c8e0b
...
@@ -661,7 +661,7 @@ static inline void Ga2_ManCnfAddDynamic( Ga2_Man_t * p, int uTruth, int Lits[],
...
@@ -661,7 +661,7 @@ static inline void Ga2_ManCnfAddDynamic( Ga2_Man_t * p, int uTruth, int Lits[],
}
}
}
}
}
}
static
inline
void
Ga2_ManCnfAddStatic
(
Ga2_Man_t
*
p
,
Vec_Int_t
*
vCnf0
,
Vec_Int_t
*
vCnf1
,
int
Lits
[],
int
iLitOut
,
int
ProofId
)
void
Ga2_ManCnfAddStatic
(
sat_solver2
*
pSat
,
Vec_Int_t
*
vCnf0
,
Vec_Int_t
*
vCnf1
,
int
Lits
[],
int
iLitOut
,
int
ProofId
)
{
{
Vec_Int_t
*
vCnf
;
Vec_Int_t
*
vCnf
;
int
i
,
k
,
b
,
Cube
,
Literal
,
nClaLits
,
ClaLits
[
6
];
int
i
,
k
,
b
,
Cube
,
Literal
,
nClaLits
,
ClaLits
[
6
];
...
@@ -688,12 +688,11 @@ static inline void Ga2_ManCnfAddStatic( Ga2_Man_t * p, Vec_Int_t * vCnf0, Vec_In
...
@@ -688,12 +688,11 @@ static inline void Ga2_ManCnfAddStatic( Ga2_Man_t * p, Vec_Int_t * vCnf0, Vec_In
else
if
(
Literal
!=
0
)
else
if
(
Literal
!=
0
)
assert
(
0
);
assert
(
0
);
}
}
sat_solver2_addclause
(
p
->
p
Sat
,
ClaLits
,
ClaLits
+
nClaLits
,
ProofId
);
sat_solver2_addclause
(
pSat
,
ClaLits
,
ClaLits
+
nClaLits
,
ProofId
);
}
}
}
}
}
}
/**Function*************************************************************
/**Function*************************************************************
Synopsis []
Synopsis []
...
@@ -795,7 +794,7 @@ static inline void Ga2_ManAddToAbsOneStatic( Ga2_Man_t * p, Gia_Obj_t * pObj, in
...
@@ -795,7 +794,7 @@ static inline void Ga2_ManAddToAbsOneStatic( Ga2_Man_t * p, Gia_Obj_t * pObj, in
fUseStatic
=
0
;
fUseStatic
=
0
;
}
}
if
(
fUseStatic
||
Gia_ObjIsRo
(
p
->
pGia
,
pObj
)
)
if
(
fUseStatic
||
Gia_ObjIsRo
(
p
->
pGia
,
pObj
)
)
Ga2_ManCnfAddStatic
(
p
,
Ga2_ObjCnf0
(
p
,
pObj
),
Ga2_ObjCnf1
(
p
,
pObj
),
Vec_IntArray
(
p
->
vLits
),
iLitOut
,
Gia_ObjId
(
p
->
pGia
,
pObj
)
);
Ga2_ManCnfAddStatic
(
p
->
pSat
,
Ga2_ObjCnf0
(
p
,
pObj
),
Ga2_ObjCnf1
(
p
,
pObj
),
Vec_IntArray
(
p
->
vLits
),
iLitOut
,
Gia_ObjId
(
p
->
pGia
,
pObj
)
);
else
else
{
{
unsigned
uTruth
=
Ga2_ObjComputeTruthSpecial
(
p
->
pGia
,
pObj
,
vLeaves
,
p
->
vLits
);
unsigned
uTruth
=
Ga2_ObjComputeTruthSpecial
(
p
->
pGia
,
pObj
,
vLeaves
,
p
->
vLits
);
...
@@ -899,7 +898,7 @@ static inline void Ga2_ManAddToAbsOneDynamic( Ga2_Man_t * p, Gia_Obj_t * pObj, i
...
@@ -899,7 +898,7 @@ static inline void Ga2_ManAddToAbsOneDynamic( Ga2_Man_t * p, Gia_Obj_t * pObj, i
Gia_ManForEachObjVec
(
vLeaves
,
p
->
pGia
,
pLeaf
,
i
)
Gia_ManForEachObjVec
(
vLeaves
,
p
->
pGia
,
pLeaf
,
i
)
Vec_IntPush
(
p
->
vLits
,
Ga2_ObjFindOrAddLit
(
p
,
pLeaf
,
f
)
);
Vec_IntPush
(
p
->
vLits
,
Ga2_ObjFindOrAddLit
(
p
,
pLeaf
,
f
)
);
Lit
=
Ga2_ObjFindOrAddLit
(
p
,
pObj
,
f
);
Lit
=
Ga2_ObjFindOrAddLit
(
p
,
pObj
,
f
);
Ga2_ManCnfAddStatic
(
p
,
Ga2_ObjCnf0
(
p
,
pObj
),
Ga2_ObjCnf1
(
p
,
pObj
),
Vec_IntArray
(
p
->
vLits
),
Lit
,
-
1
);
Ga2_ManCnfAddStatic
(
p
->
pSat
,
Ga2_ObjCnf0
(
p
,
pObj
),
Ga2_ObjCnf1
(
p
,
pObj
),
Vec_IntArray
(
p
->
vLits
),
Lit
,
-
1
);
}
}
else
else
{
{
...
@@ -1222,7 +1221,7 @@ Vec_Int_t * Ga2_ManRefine( Ga2_Man_t * p )
...
@@ -1222,7 +1221,7 @@ Vec_Int_t * Ga2_ManRefine( Ga2_Man_t * p )
Abc_Cex_t
*
pCex
;
Abc_Cex_t
*
pCex
;
Vec_Int_t
*
vMap
,
*
vVec
;
Vec_Int_t
*
vMap
,
*
vVec
;
Gia_Obj_t
*
pObj
;
Gia_Obj_t
*
pObj
;
int
i
;
int
i
,
k
;
Ga2_GlaPrepareCexAndMap
(
p
,
&
pCex
,
&
vMap
);
Ga2_GlaPrepareCexAndMap
(
p
,
&
pCex
,
&
vMap
);
// Rf2_ManRefine( p->pRf2, pCex, vMap, p->pPars->fPropFanout, 1 );
// Rf2_ManRefine( p->pRf2, pCex, vMap, p->pPars->fPropFanout, 1 );
vVec
=
Rnm_ManRefine
(
p
->
pRnm
,
pCex
,
vMap
,
p
->
pPars
->
fPropFanout
,
1
);
vVec
=
Rnm_ManRefine
(
p
->
pRnm
,
pCex
,
vMap
,
p
->
pPars
->
fPropFanout
,
1
);
...
@@ -1237,9 +1236,16 @@ Vec_Int_t * Ga2_ManRefine( Ga2_Man_t * p )
...
@@ -1237,9 +1236,16 @@ Vec_Int_t * Ga2_ManRefine( Ga2_Man_t * p )
return
NULL
;
return
NULL
;
}
}
Vec_IntFree
(
vMap
);
Vec_IntFree
(
vMap
);
// remove those already added
k
=
0
;
Gia_ManForEachObjVec
(
vVec
,
p
->
pGia
,
pObj
,
i
)
if
(
!
Ga2_ObjIsAbs
(
p
,
pObj
)
)
Vec_IntWriteEntry
(
vVec
,
k
++
,
Gia_ObjId
(
p
->
pGia
,
pObj
)
);
Vec_IntShrink
(
vVec
,
k
);
// these objects should be PPIs that are not abstracted yet
// these objects should be PPIs that are not abstracted yet
Gia_ManForEachObjVec
(
vVec
,
p
->
pGia
,
pObj
,
i
)
Gia_ManForEachObjVec
(
vVec
,
p
->
pGia
,
pObj
,
i
)
assert
(
pObj
->
fPhase
&&
Ga2_ObjIsLeaf
(
p
,
pObj
)
);
assert
(
pObj
->
fPhase
);
//
&& Ga2_ObjIsLeaf(p, pObj) );
p
->
nObjAdded
+=
Vec_IntSize
(
vVec
);
p
->
nObjAdded
+=
Vec_IntSize
(
vVec
);
return
vVec
;
return
vVec
;
}
}
...
@@ -1450,6 +1456,12 @@ int Ga2_ManPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1450,6 +1456,12 @@ int Ga2_ManPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
p
->
pPars
->
iFrame
=
f
;
p
->
pPars
->
iFrame
=
f
;
// add static clauses to this timeframe
// add static clauses to this timeframe
Ga2_ManAddAbsClauses
(
p
,
f
);
Ga2_ManAddAbsClauses
(
p
,
f
);
// skip checking if skipcheck is enabled (&gla -s)
if
(
p
->
pPars
->
fUseSkip
&&
f
<=
iFrameProved
)
continue
;
// skip checking if we need to skip several starting frames (&gla -S <num>)
if
(
p
->
pPars
->
nFramesStart
&&
f
<=
p
->
pPars
->
nFramesStart
)
continue
;
// get the output literal
// get the output literal
// Lit = Ga2_ManUnroll_rec( p, Gia_ManPo(pAig,0), f );
// Lit = Ga2_ManUnroll_rec( p, Gia_ManPo(pAig,0), f );
Lit
=
Ga2_ObjFindLit
(
p
,
Gia_ObjFanin0
(
Gia_ManPo
(
pAig
,
0
)),
f
);
Lit
=
Ga2_ObjFindLit
(
p
,
Gia_ObjFanin0
(
Gia_ManPo
(
pAig
,
0
)),
f
);
...
@@ -1457,8 +1469,6 @@ int Ga2_ManPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1457,8 +1469,6 @@ int Ga2_ManPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
Lit
=
Abc_LitNotCond
(
Lit
,
Gia_ObjFaninC0
(
Gia_ManPo
(
pAig
,
0
))
);
Lit
=
Abc_LitNotCond
(
Lit
,
Gia_ObjFaninC0
(
Gia_ManPo
(
pAig
,
0
))
);
if
(
Lit
==
0
)
if
(
Lit
==
0
)
continue
;
continue
;
if
(
p
->
pPars
->
fUseSkip
&&
f
<=
iFrameProved
)
continue
;
assert
(
Lit
>
1
);
assert
(
Lit
>
1
);
// check for counter-examples
// check for counter-examples
if
(
p
->
nSatVars
>
sat_solver2_nvars
(
p
->
pSat
)
)
if
(
p
->
nSatVars
>
sat_solver2_nvars
(
p
->
pSat
)
)
...
...
src/aig/gia/giaAbsRef.c
View file @
528c8e0b
This diff is collapsed.
Click to expand it.
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