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
ce0e8caf
Commit
ce0e8caf
authored
Jan 27, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Variable timeframe abstraction.
parent
c7e85561
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
18 deletions
+33
-18
src/aig/gia/giaAbsVta.c
+0
-0
src/aig/saig/saigGlaPba2.c
+3
-3
src/base/abci/abc.c
+1
-1
src/sat/bsat/satProof.c
+25
-10
src/sat/bsat/satSolver2.c
+0
-0
src/sat/bsat/satSolver2.h
+4
-4
No files found.
src/aig/gia/giaAbsVta.c
View file @
ce0e8caf
This diff is collapsed.
Click to expand it.
src/aig/saig/saigGlaPba2.c
View file @
ce0e8caf
...
...
@@ -308,7 +308,7 @@ int Aig_Gla3CreateSatSolver( Aig_Gla3Man_t * p )
Vec_IntPush
(
p
->
vCla2Fra
,
0
);
assert
(
Vec_IntSize
(
p
->
vCla2Fra
)
==
Vec_IntSize
(
p
->
vCla2Obj
)
);
assert
(
nVars
==
Vec_IntSize
(
p
->
vVar2Inf
)
);
assert
(
Vec_IntSize
(
p
->
vCla2Obj
)
==
(
int
)
p
->
pSat
->
stats
.
clauses
);
assert
(
Vec_IntSize
(
p
->
vCla2Obj
)
==
(
int
)
p
->
pSat
->
stats
.
clauses
+
1
);
if
(
p
->
fVerbose
)
printf
(
"The resulting SAT problem contains %d variables and %d clauses.
\n
"
,
p
->
pSat
->
size
,
p
->
pSat
->
stats
.
clauses
);
...
...
@@ -337,8 +337,8 @@ Aig_Gla3Man_t * Aig_Gla3ManStart( Aig_Man_t * pAig, int nStart, int nFramesMax,
p
->
vObj2Vec
=
Vec_IntStart
(
Aig_ManObjNumMax
(
pAig
)
);
p
->
vVec2Var
=
Vec_IntAlloc
(
1
<<
20
);
p
->
vVar2Inf
=
Vec_IntAlloc
(
1
<<
20
);
p
->
vCla2Obj
=
Vec_IntAlloc
(
1
<<
20
);
p
->
vCla2Fra
=
Vec_IntAlloc
(
1
<<
20
);
p
->
vCla2Obj
=
Vec_IntAlloc
(
1
<<
20
);
Vec_IntPush
(
p
->
vCla2Obj
,
-
1
);
p
->
vCla2Fra
=
Vec_IntAlloc
(
1
<<
20
);
Vec_IntPush
(
p
->
vCla2Fra
,
-
1
);
// skip first vector ID
p
->
nStart
=
nStart
;
...
...
src/base/abci/abc.c
View file @
ce0e8caf
...
...
@@ -26234,7 +26234,7 @@ int Abc_CommandAbc9GlaCba( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
1
,
"The number of frames should be a positive integer.
\n
"
);
return
0
;
}
if
(
pPars
->
nStart
>
0
&&
pPars
->
nStart
>=
pPars
->
nFramesMax
)
if
(
pPars
->
nStart
>
0
&&
pPars
->
n
FramesMax
>
0
&&
pPars
->
n
Start
>=
pPars
->
nFramesMax
)
{
Abc_Print
(
1
,
"The starting frame is larger than the max number of frames.
\n
"
);
return
0
;
...
...
src/sat/bsat/satProof.c
View file @
ce0e8caf
...
...
@@ -447,9 +447,13 @@ void Sat_ProofCheck( sat_solver2 * s )
Vec_Int_t
*
vUsed
,
*
vTemp
;
satset
*
pSet
,
*
pSet0
,
*
pSet1
;
int
i
,
k
,
hRoot
,
Handle
,
Counter
=
0
,
clk
=
clock
();
if
(
s
->
hLearntLast
<
0
)
// if ( s->hLearntLast < 0 )
// return;
// hRoot = veci_begin(&s->claProofs)[satset_read(&s->learnts, s->hLearntLast>>1)->Id];
hRoot
=
s
->
hProofLast
;
if
(
hRoot
==
-
1
)
return
;
hRoot
=
veci_begin
(
&
s
->
claProofs
)[
satset_read
(
&
s
->
learnts
,
s
->
hLearntLast
>>
1
)
->
Id
];
// collect visited clauses
vUsed
=
Proof_CollectUsedIter
(
vProof
,
NULL
,
hRoot
);
Proof_CleanCollected
(
vProof
,
vUsed
);
...
...
@@ -490,7 +494,7 @@ void Sat_ProofCheck( sat_solver2 * s )
Synopsis [Collects nodes belonging to the UNSAT core.]
Description [The resulting array contains
0
-based IDs of root clauses.]
Description [The resulting array contains
1
-based IDs of root clauses.]
SideEffects []
...
...
@@ -518,7 +522,8 @@ Vec_Int_t * Sat_ProofCollectCore( Vec_Int_t * vClauses, Vec_Int_t * vProof, Vec_
{
pNode
->
mark
=
0
;
if
(
fUseIds
)
Vec_IntWriteEntry
(
vCore
,
i
,
pNode
->
Id
-
1
);
// Vec_IntWriteEntry( vCore, i, pNode->Id - 1 );
Vec_IntWriteEntry
(
vCore
,
i
,
pNode
->
Id
);
}
return
vCore
;
}
...
...
@@ -592,9 +597,12 @@ void * Sat_ProofInterpolant( sat_solver2 * s, void * pGloVars )
Aig_Man_t
*
pAig
;
Aig_Obj_t
*
pObj
;
int
i
,
k
,
iVar
,
Lit
,
Entry
,
hRoot
;
if
(
s
->
hLearntLast
<
0
)
// if ( s->hLearntLast < 0 )
// return NULL;
// hRoot = veci_begin(&s->claProofs)[satset_read(&s->learnts, s->hLearntLast>>1)->Id];
hRoot
=
s
->
hProofLast
;
if
(
hRoot
==
-
1
)
return
NULL
;
hRoot
=
veci_begin
(
&
s
->
claProofs
)[
satset_read
(
&
s
->
learnts
,
s
->
hLearntLast
>>
1
)
->
Id
];
Sat_ProofInterpolantCheckVars
(
s
,
vGlobVars
);
...
...
@@ -693,9 +701,12 @@ word * Sat_ProofInterpolantTruth( sat_solver2 * s, void * pGloVars )
word
*
pRes
=
ABC_ALLOC
(
word
,
nWords
);
int
i
,
k
,
iVar
,
Lit
,
Entry
,
hRoot
;
assert
(
nVars
>
0
&&
nVars
<=
16
);
if
(
s
->
hLearntLast
<
0
)
// if ( s->hLearntLast < 0 )
// return NULL;
// hRoot = veci_begin(&s->claProofs)[satset_read(&s->learnts, s->hLearntLast>>1)->Id];
hRoot
=
s
->
hProofLast
;
if
(
hRoot
==
-
1
)
return
NULL
;
hRoot
=
veci_begin
(
&
s
->
claProofs
)[
satset_read
(
&
s
->
learnts
,
s
->
hLearntLast
>>
1
)
->
Id
];
Sat_ProofInterpolantCheckVars
(
s
,
vGlobVars
);
...
...
@@ -794,9 +805,13 @@ void * Sat_ProofCore( sat_solver2 * s )
Vec_Int_t
*
vProof
=
(
Vec_Int_t
*
)
&
s
->
proofs
;
Vec_Int_t
*
vCore
,
*
vUsed
;
int
hRoot
;
if
(
s
->
hLearntLast
<
0
)
// if ( s->hLearntLast < 0 )
// return NULL;
// hRoot = veci_begin(&s->claProofs)[satset_read(&s->learnts, s->hLearntLast>>1)->Id];
hRoot
=
s
->
hProofLast
;
if
(
hRoot
==
-
1
)
return
NULL
;
hRoot
=
veci_begin
(
&
s
->
claProofs
)[
satset_read
(
&
s
->
learnts
,
s
->
hLearntLast
>>
1
)
->
Id
];
// collect visited clauses
vUsed
=
Proof_CollectUsedIter
(
vProof
,
NULL
,
hRoot
);
// collect core clauses
...
...
src/sat/bsat/satSolver2.c
View file @
ce0e8caf
This diff is collapsed.
Click to expand it.
src/sat/bsat/satSolver2.h
View file @
ce0e8caf
...
...
@@ -85,8 +85,6 @@ struct sat_solver2_t
int
qtail
;
// Tail index of queue.
int
root_level
;
// Level of first proper decision.
int
simpdb_assigns
;
// Number of top-level assignments at last 'simplifyDB()'.
int
simpdb_props
;
// Number of propagations before next 'simplifyDB()'.
double
random_seed
;
double
progress_estimate
;
int
verbosity
;
// Verbosity level. 0=silent, 1=some progress report, 2=everything // activities
...
...
@@ -111,9 +109,10 @@ struct sat_solver2_t
veci
clauses
;
// clause memory
veci
learnts
;
// learnt memory
veci
*
wlists
;
// watcher lists (for each literal)
int
hLearntLast
;
// in proof-logging mode, the ID of the final conflict clause (conf_final)
int
hProofLast
;
// in proof-logging mode, the ID of the final conflict clause (conf_final)
int
hClausePivot
;
// the pivot among problem clause
int
hLearntPivot
;
// the pivot among learned clause
int
hLearntLast
;
// in proof-logging mode, the ID of the final conflict clause (conf_final)
int
iVarPivot
;
// the pivot among the variables
int
iSimpPivot
;
// marker of unit-clauses
...
...
@@ -247,10 +246,11 @@ static inline int sat_solver2_set_random(sat_solver2* s, int fNotUseRandom)
static
inline
void
sat_solver2_bookmark
(
sat_solver2
*
s
)
{
assert
(
s
->
qhead
==
s
->
qtail
);
s
->
hLearntPivot
=
veci_size
(
&
s
->
learnts
);
s
->
hClausePivot
=
veci_size
(
&
s
->
clauses
);
s
->
iVarPivot
=
s
->
size
;
s
->
iSimpPivot
=
s
->
simpdb_assigns
;
s
->
iSimpPivot
=
s
->
qhead
;
}
static
inline
int
sat_solver2_add_const
(
sat_solver2
*
pSat
,
int
iVar
,
int
fCompl
,
int
fMark
)
...
...
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