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
65b652fa
Commit
65b652fa
authored
Aug 10, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added purification of UNSAT core in &gla.
parent
409ce39b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
7 deletions
+49
-7
src/aig/gia/giaAbsGla2.c
+43
-1
src/misc/util/abc_global.h
+6
-6
No files found.
src/aig/gia/giaAbsGla2.c
View file @
65b652fa
...
...
@@ -1383,6 +1383,7 @@ void Gia_Ga2SendCancel( Ga2_Man_t * p, int fVerbose )
***********************************************************************/
int
Ga2_ManPerform
(
Gia_Man_t
*
pAig
,
Gia_ParVta_t
*
pPars
)
{
int
fUseSecondCore
=
1
;
Ga2_Man_t
*
p
;
Vec_Int_t
*
vCore
,
*
vPPis
;
clock_t
clk2
,
clk
=
clock
();
...
...
@@ -1526,7 +1527,7 @@ int Ga2_ManPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
goto
finish
;
if
(
p
->
pSat
->
nRuntimeLimit
&&
clock
()
>
p
->
pSat
->
nRuntimeLimit
)
// timeout
goto
finish
;
assert
(
RetValue
==
l_False
);
//
assert( RetValue == l_False );
if
(
c
==
0
)
{
if
(
p
->
pPars
->
nFramesNoChange
>=
0
)
...
...
@@ -1543,6 +1544,47 @@ int Ga2_ManPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
sat_solver2_rollback
(
p
->
pSat
);
// reduce abstraction
Ga2_ManShrinkAbs
(
p
,
nAbs
,
nValues
,
nVarsOld
);
// purify UNSAT core
if
(
fUseSecondCore
)
{
int
nOldCore
=
Vec_IntSize
(
vCore
);
Vec_IntSort
(
vCore
,
0
);
// Vec_IntPrint( vCore );
// create bookmark to be used for rollback
assert
(
nVarsOld
==
p
->
pSat
->
size
);
sat_solver2_bookmark
(
p
->
pSat
);
// start incremental proof manager
assert
(
p
->
pSat
->
pPrf2
==
NULL
);
p
->
pSat
->
pPrf2
=
Prf_ManAlloc
();
if
(
p
->
pSat
->
pPrf2
)
{
p
->
nProofIds
=
0
;
Vec_IntFill
(
p
->
vProofIds
,
Gia_ManObjNum
(
p
->
pGia
),
-
1
);
Prf_ManRestart
(
p
->
pSat
->
pPrf2
,
p
->
vProofIds
,
sat_solver2_nlearnts
(
p
->
pSat
),
Vec_IntSize
(
vCore
)
);
Ga2_ManAddToAbs
(
p
,
vCore
);
Vec_IntFree
(
vCore
);
// if ( pPars->fVerbose )
// Ga2_ManAbsPrintFrame( p, f, sat_solver2_nconflicts(p->pSat)-nConflsBeg, c+1, clock() - clk, 0 );
}
// run SAT solver
clk2
=
clock
();
Status
=
sat_solver2_solve
(
p
->
pSat
,
&
Lit
,
&
Lit
+
1
,
(
ABC_INT64_T
)
pPars
->
nConfLimit
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
);
assert
(
Status
==
l_False
);
p
->
timeUnsat
+=
clock
()
-
clk2
;
// derive the core
assert
(
p
->
pSat
->
pPrf2
!=
NULL
);
vCore
=
(
Vec_Int_t
*
)
Sat_ProofCore
(
p
->
pSat
);
Prf_ManStopP
(
&
p
->
pSat
->
pPrf2
);
// update the SAT solver
sat_solver2_rollback
(
p
->
pSat
);
// reduce abstraction
Ga2_ManShrinkAbs
(
p
,
nAbs
,
nValues
,
nVarsOld
);
// printf( "\n%4d -> %4d\n", nOldCore, Vec_IntSize(vCore) );
}
Ga2_ManAddToAbs
(
p
,
vCore
);
Vec_IntFree
(
vCore
);
// verify
...
...
src/misc/util/abc_global.h
View file @
65b652fa
...
...
@@ -296,18 +296,18 @@ static inline void Abc_PrintInt( int i )
Abc_Print
(
1
,
" %4d"
,
i
);
else
if
(
v3
>
-
9
.
995
&&
v3
<
9
.
995
)
Abc_Print
(
1
,
"%4.2fk"
,
v3
,
v3
);
Abc_Print
(
1
,
"%4.2fk"
,
v3
);
else
if
(
v3
>
-
99
.
95
&&
v3
<
99
.
95
)
Abc_Print
(
1
,
"%4.1fk"
,
v3
,
v3
);
Abc_Print
(
1
,
"%4.1fk"
,
v3
);
else
if
(
v3
>
-
999
.
5
&&
v3
<
999
.
5
)
Abc_Print
(
1
,
"%4.0fk"
,
v3
,
v3
);
Abc_Print
(
1
,
"%4.0fk"
,
v3
);
else
if
(
v6
>
-
9
.
995
&&
v6
<
9
.
995
)
Abc_Print
(
1
,
"%4.2fm"
,
v6
,
v6
);
Abc_Print
(
1
,
"%4.2fm"
,
v6
);
else
if
(
v6
>
-
99
.
95
&&
v6
<
99
.
95
)
Abc_Print
(
1
,
"%4.1fm"
,
v6
,
v6
);
Abc_Print
(
1
,
"%4.1fm"
,
v6
);
else
if
(
v6
>
-
999
.
5
&&
v6
<
999
.
5
)
Abc_Print
(
1
,
"%4.0fm"
,
v6
,
v6
);
Abc_Print
(
1
,
"%4.0fm"
,
v6
);
}
static
inline
void
Abc_PrintTime
(
int
level
,
const
char
*
pStr
,
clock_t
time
)
...
...
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