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
3c4351ae
Commit
3c4351ae
authored
Jul 13, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debugging a proof error.
parent
8c162f05
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
12 deletions
+7
-12
src/sat/bsat/satProof.c
+3
-10
src/sat/bsat/satSolver2.c
+4
-2
No files found.
src/sat/bsat/satProof.c
View file @
3c4351ae
...
@@ -338,7 +338,6 @@ void Sat_ProofReduce2( sat_solver2 * s )
...
@@ -338,7 +338,6 @@ void Sat_ProofReduce2( sat_solver2 * s )
assert( s->hProofPivot >= 1 && s->hProofPivot <= Vec_SetHandCurrent(vProof) );
assert( s->hProofPivot >= 1 && s->hProofPivot <= Vec_SetHandCurrent(vProof) );
pPivot = Proof_NodeRead( vProof, s->hProofPivot );
pPivot = Proof_NodeRead( vProof, s->hProofPivot );
s->hProofPivot = Vec_SetHandCurrentS(vProof);
s->hProofPivot = Vec_SetHandCurrentS(vProof);
s->iProofPivot = Vec_IntSize(vUsed);
// compact the nodes
// compact the nodes
Proof_ForeachNodeVec( vUsed, vProof, pNode, i )
Proof_ForeachNodeVec( vUsed, vProof, pNode, i )
{
{
...
@@ -347,7 +346,6 @@ void Sat_ProofReduce2( sat_solver2 * s )
...
@@ -347,7 +346,6 @@ void Sat_ProofReduce2( sat_solver2 * s )
if ( pPivot && pPivot <= pNode )
if ( pPivot && pPivot <= pNode )
{
{
s->hProofPivot = hTemp;
s->hProofPivot = hTemp;
s->iProofPivot = i;
pPivot = NULL;
pPivot = NULL;
}
}
}
}
...
@@ -382,7 +380,6 @@ void Sat_ProofCheck0( Vec_Set_t * vProof )
...
@@ -382,7 +380,6 @@ void Sat_ProofCheck0( Vec_Set_t * vProof )
}
}
}
}
int
Sat_ProofReduce
(
Vec_Set_t
*
vProof
,
void
*
pRoots
,
int
hProofPivot
)
int
Sat_ProofReduce
(
Vec_Set_t
*
vProof
,
void
*
pRoots
,
int
hProofPivot
)
{
{
// Vec_Set_t * vProof = (Vec_Set_t *)&s->Proofs;
// Vec_Set_t * vProof = (Vec_Set_t *)&s->Proofs;
...
@@ -396,14 +393,12 @@ int Sat_ProofReduce( Vec_Set_t * vProof, void * pRoots, int hProofPivot )
...
@@ -396,14 +393,12 @@ int Sat_ProofReduce( Vec_Set_t * vProof, void * pRoots, int hProofPivot )
clock_t
clk
=
clock
();
clock_t
clk
=
clock
();
static
clock_t
TimeTotal
=
0
;
static
clock_t
TimeTotal
=
0
;
int
RetValue
;
int
RetValue
;
//Sat_ProofCheck0( vProof );
Sat_ProofCheck0
(
vProof
);
// collect visited nodes
// collect visited nodes
nSize
=
Proof_MarkUsedRec
(
vProof
,
vRoots
);
nSize
=
Proof_MarkUsedRec
(
vProof
,
vRoots
);
vUsed
=
Vec_PtrAlloc
(
nSize
);
vUsed
=
Vec_PtrAlloc
(
nSize
);
//Sat_ProofCheck0( vProof );
Sat_ProofCheck0
(
vProof
);
// relabel nodes to use smaller space
// relabel nodes to use smaller space
Vec_SetShrinkS
(
vProof
,
2
);
Vec_SetShrinkS
(
vProof
,
2
);
...
@@ -432,7 +427,6 @@ Sat_ProofCheck0( vProof );
...
@@ -432,7 +427,6 @@ Sat_ProofCheck0( vProof );
assert
(
hProofPivot
>=
1
&&
hProofPivot
<=
Vec_SetHandCurrent
(
vProof
)
);
assert
(
hProofPivot
>=
1
&&
hProofPivot
<=
Vec_SetHandCurrent
(
vProof
)
);
pPivot
=
Proof_NodeRead
(
vProof
,
hProofPivot
);
pPivot
=
Proof_NodeRead
(
vProof
,
hProofPivot
);
RetValue
=
Vec_SetHandCurrentS
(
vProof
);
RetValue
=
Vec_SetHandCurrentS
(
vProof
);
// s->iProofPivot = Vec_PtrSize(vUsed);
// compact the nodes
// compact the nodes
Vec_PtrForEachEntry
(
satset
*
,
vUsed
,
pNode
,
i
)
Vec_PtrForEachEntry
(
satset
*
,
vUsed
,
pNode
,
i
)
{
{
...
@@ -460,8 +454,7 @@ Sat_ProofCheck0( vProof );
...
@@ -460,8 +454,7 @@ Sat_ProofCheck0( vProof );
Vec_SetShrink
(
vProof
,
Vec_SetHandCurrentS
(
vProof
)
);
Vec_SetShrink
(
vProof
,
Vec_SetHandCurrentS
(
vProof
)
);
Vec_SetShrinkLimits
(
vProof
);
Vec_SetShrinkLimits
(
vProof
);
// Sat_ProofReduceCheck( s );
// Sat_ProofReduceCheck( s );
//Sat_ProofCheck0( vProof );
Sat_ProofCheck0
(
vProof
);
return
RetValue
;
return
RetValue
;
}
}
...
...
src/sat/bsat/satSolver2.c
View file @
3c4351ae
...
@@ -1571,8 +1571,10 @@ void sat_solver2_rollback( sat_solver2* s )
...
@@ -1571,8 +1571,10 @@ void sat_solver2_rollback( sat_solver2* s )
if
(
s
->
fProofLogging
)
if
(
s
->
fProofLogging
)
{
{
veci_resize
(
&
s
->
claProofs
,
s
->
stats
.
learnts
);
veci_resize
(
&
s
->
claProofs
,
s
->
stats
.
learnts
);
// Vec_SetShrink(&s->Proofs, s->hProofPivot); // past bug here
// Vec_SetShrink(&s->Proofs, s->hProofPivot);
Sat_ProofReduce
(
&
s
->
Proofs
,
&
s
->
claProofs
,
s
->
hProofPivot
);
// some weird bug here, which shows only on 64-bits!
// temporarily, perform more general proof reduction
Sat_ProofReduce
(
&
s
->
Proofs
,
&
s
->
claProofs
,
s
->
hProofPivot
);
}
}
// initialize other vars
// initialize other vars
...
...
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