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
cd39fd6b
Commit
cd39fd6b
authored
Jul 30, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing performance bug with old proof-logging (adding clauses multiple times).
parent
401aa699
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
17 deletions
+32
-17
src/aig/gia/giaAbsGla.c
+9
-17
src/misc/vec/vecInt.h
+22
-0
src/sat/bsat/satProof.c
+1
-0
No files found.
src/aig/gia/giaAbsGla.c
View file @
cd39fd6b
...
@@ -1180,7 +1180,8 @@ Gla_Man_t * Gla_ManStart( Gia_Man_t * pGia0, Gia_ParVta_t * pPars )
...
@@ -1180,7 +1180,8 @@ Gla_Man_t * Gla_ManStart( Gia_Man_t * pGia0, Gia_ParVta_t * pPars )
Vec_IntPush
(
p
->
vAbs
,
Gla_ObjId
(
p
,
pGla
)
);
Vec_IntPush
(
p
->
vAbs
,
Gla_ObjId
(
p
,
pGla
)
);
}
}
// other
// other
p
->
pSat
=
sat_solver2_new
();
p
->
pSat
=
sat_solver2_new
();
// p->pSat->pPrf1 = Vec_SetAlloc( 20 );
// p->pSat->fVerbose = p->pPars->fVerbose;
// p->pSat->fVerbose = p->pPars->fVerbose;
// sat_solver2_set_learntmax( p->pSat, pPars->nLearnedMax );
// sat_solver2_set_learntmax( p->pSat, pPars->nLearnedMax );
p
->
pSat
->
nLearntStart
=
p
->
pPars
->
nLearnedStart
;
p
->
pSat
->
nLearntStart
=
p
->
pPars
->
nLearnedStart
;
...
@@ -1574,7 +1575,7 @@ void Gia_GlaAddToCounters( Gla_Man_t * p, Vec_Int_t * vCore )
...
@@ -1574,7 +1575,7 @@ void Gia_GlaAddToCounters( Gla_Man_t * p, Vec_Int_t * vCore )
void
Gia_GlaAddToAbs
(
Gla_Man_t
*
p
,
Vec_Int_t
*
vAbsAdd
,
int
fCheck
)
void
Gia_GlaAddToAbs
(
Gla_Man_t
*
p
,
Vec_Int_t
*
vAbsAdd
,
int
fCheck
)
{
{
Gla_Obj_t
*
pGla
;
Gla_Obj_t
*
pGla
;
int
i
,
Counter
=
0
;
int
i
,
k
=
0
;
Gla_ManForEachObjAbsVec
(
vAbsAdd
,
p
,
pGla
,
i
)
Gla_ManForEachObjAbsVec
(
vAbsAdd
,
p
,
pGla
,
i
)
{
{
if
(
fCheck
)
if
(
fCheck
)
...
@@ -1585,18 +1586,12 @@ void Gia_GlaAddToAbs( Gla_Man_t * p, Vec_Int_t * vAbsAdd, int fCheck )
...
@@ -1585,18 +1586,12 @@ void Gia_GlaAddToAbs( Gla_Man_t * p, Vec_Int_t * vAbsAdd, int fCheck )
}
}
if
(
pGla
->
fAbs
)
if
(
pGla
->
fAbs
)
continue
;
continue
;
if
(
!
fCheck
)
{
Counter
++
;
// printf( "%d ", Gla_ObjId(p, pGla) );
}
pGla
->
fAbs
=
1
;
pGla
->
fAbs
=
1
;
Vec_IntPush
(
p
->
vAbs
,
Gla_ObjId
(
p
,
pGla
)
);
Vec_IntPush
(
p
->
vAbs
,
Gla_ObjId
(
p
,
pGla
)
);
// filter clauses to remove those contained in the abstraction
Vec_IntWriteEntry
(
vAbsAdd
,
k
++
,
Gla_ObjId
(
p
,
pGla
)
);
}
}
// if ( Counter )
Vec_IntShrink
(
vAbsAdd
,
k
);
// printf( " Total = %d\n", Counter );
}
}
void
Gia_GlaAddTimeFrame
(
Gla_Man_t
*
p
,
int
f
)
void
Gia_GlaAddTimeFrame
(
Gla_Man_t
*
p
,
int
f
)
{
{
...
@@ -1951,16 +1946,14 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
...
@@ -1951,16 +1946,14 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
// assert( (vCore != NULL) == (Status == 1) );
// assert( (vCore != NULL) == (Status == 1) );
if
(
Status
==
-
1
||
(
p
->
pSat
->
nRuntimeLimit
&&
clock
()
>
p
->
pSat
->
nRuntimeLimit
)
)
// resource limit is reached
if
(
Status
==
-
1
||
(
p
->
pSat
->
nRuntimeLimit
&&
clock
()
>
p
->
pSat
->
nRuntimeLimit
)
)
// resource limit is reached
{
{
if
(
p
->
pSat
->
pPrf2
)
Prf_ManStopP
(
&
p
->
pSat
->
pPrf2
);
Prf_ManStopP
(
&
p
->
pSat
->
pPrf2
);
if
(
Gia_ManRegNum
(
p
->
pGia
)
>
1
)
// for comb cases, return the abstration
if
(
Gia_ManRegNum
(
p
->
pGia
)
>
1
)
// for comb cases, return the abstration
Gla_ManRollBack
(
p
);
Gla_ManRollBack
(
p
);
goto
finish
;
goto
finish
;
}
}
if
(
Status
==
1
)
if
(
Status
==
1
)
{
{
if
(
p
->
pSat
->
pPrf2
)
Prf_ManStopP
(
&
p
->
pSat
->
pPrf2
);
Prf_ManStopP
(
&
p
->
pSat
->
pPrf2
);
p
->
timeUnsat
+=
clock
()
-
clk2
;
p
->
timeUnsat
+=
clock
()
-
clk2
;
break
;
break
;
}
}
...
@@ -1987,8 +1980,7 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
...
@@ -1987,8 +1980,7 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
vPPis
=
Gla_ManRefinement
(
p
);
vPPis
=
Gla_ManRefinement
(
p
);
if
(
vPPis
==
NULL
)
if
(
vPPis
==
NULL
)
{
{
if
(
p
->
pSat
->
pPrf2
)
Prf_ManStopP
(
&
p
->
pSat
->
pPrf2
);
Prf_ManStopP
(
&
p
->
pSat
->
pPrf2
);
pCex
=
p
->
pGia
->
pCexSeq
;
p
->
pGia
->
pCexSeq
=
NULL
;
pCex
=
p
->
pGia
->
pCexSeq
;
p
->
pGia
->
pCexSeq
=
NULL
;
break
;
break
;
}
}
...
...
src/misc/vec/vecInt.h
View file @
cd39fd6b
...
@@ -1055,6 +1055,28 @@ static inline int Vec_IntCountPositive( Vec_Int_t * p )
...
@@ -1055,6 +1055,28 @@ static inline int Vec_IntCountPositive( Vec_Int_t * p )
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Checks if two vectors are equal.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
int
Vec_IntEqual
(
Vec_Int_t
*
p1
,
Vec_Int_t
*
p2
)
{
int
i
;
if
(
p1
->
nSize
!=
p2
->
nSize
)
return
0
;
for
(
i
=
0
;
i
<
p1
->
nSize
;
i
++
)
if
(
p1
->
pArray
[
i
]
!=
p2
->
pArray
[
i
]
)
return
0
;
return
1
;
}
/**Function*************************************************************
Synopsis [Counts the number of common entries.]
Synopsis [Counts the number of common entries.]
Description [Assumes that the entries are non-negative integers that
Description [Assumes that the entries are non-negative integers that
...
...
src/sat/bsat/satProof.c
View file @
cd39fd6b
...
@@ -921,6 +921,7 @@ void * Proof_DeriveCore( Vec_Set_t * vProof, int hRoot )
...
@@ -921,6 +921,7 @@ void * Proof_DeriveCore( Vec_Set_t * vProof, int hRoot )
// collect core clauses
// collect core clauses
vCore
=
Sat_ProofCollectCore
(
vProof
,
vUsed
);
vCore
=
Sat_ProofCollectCore
(
vProof
,
vUsed
);
Vec_IntFree
(
vUsed
);
Vec_IntFree
(
vUsed
);
Vec_IntSort
(
vCore
,
1
);
return
vCore
;
return
vCore
;
}
}
...
...
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