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
bcc6d268
Commit
bcc6d268
authored
Feb 15, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing missing sat_solver APIs in 'iprove'.
parent
7811f1bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
3 deletions
+40
-3
src/sat/bsat/satSolver.c
+40
-3
No files found.
src/sat/bsat/satSolver.c
View file @
bcc6d268
...
...
@@ -328,12 +328,49 @@ static inline void act_var_bump(sat_solver* s, int v)
}
static
inline
void
act_var_bump_global
(
sat_solver
*
s
,
int
v
)
{
assert
(
0
);
if
(
!
s
->
pGlobalVars
)
return
;
if
(
s
->
VarActType
==
0
)
{
s
->
activity
[
v
]
+=
(
int
)((
unsigned
)
s
->
var_inc
*
3
*
s
->
pGlobalVars
[
v
]);
if
(
s
->
activity
[
v
]
&
0x80000000
)
act_var_rescale
(
s
);
if
(
s
->
orderpos
[
v
]
!=
-
1
)
order_update
(
s
,
v
);
}
else
if
(
s
->
VarActType
==
1
)
{
s
->
activity
[
v
]
+=
(
unsigned
)(
Abc_Word2Dbl
(
s
->
var_inc
)
*
3
.
0
*
s
->
pGlobalVars
[
v
]);
if
(
Abc_Word2Dbl
(
s
->
activity
[
v
])
>
1e100
)
act_var_rescale
(
s
);
if
(
s
->
orderpos
[
v
]
!=
-
1
)
order_update
(
s
,
v
);
}
else
assert
(
0
);
}
static
inline
void
act_var_bump_factor
(
sat_solver
*
s
,
int
v
)
{
assert
(
0
);
if
(
!
s
->
factors
)
return
;
if
(
s
->
VarActType
==
0
)
{
s
->
activity
[
v
]
+=
(
int
)((
unsigned
)
s
->
var_inc
*
(
float
)
s
->
factors
[
v
]);
if
(
s
->
activity
[
v
]
&
0x80000000
)
act_var_rescale
(
s
);
if
(
s
->
orderpos
[
v
]
!=
-
1
)
order_update
(
s
,
v
);
}
else
if
(
s
->
VarActType
==
1
)
{
s
->
activity
[
v
]
+=
(
unsigned
)(
Abc_Word2Dbl
(
s
->
var_inc
)
*
s
->
factors
[
v
]);
if
(
Abc_Word2Dbl
(
s
->
activity
[
v
])
>
1e100
)
act_var_rescale
(
s
);
if
(
s
->
orderpos
[
v
]
!=
-
1
)
order_update
(
s
,
v
);
}
else
assert
(
0
);
}
static
inline
void
act_var_decay
(
sat_solver
*
s
)
{
if
(
s
->
VarActType
==
0
)
...
...
@@ -1234,7 +1271,7 @@ void sat_solver_setnvars(sat_solver* s,int n)
else
if
(
s
->
VarActType
==
1
)
s
->
activity
[
var
]
=
0
;
else
if
(
s
->
VarActType
==
2
)
s
->
activity
[
var
]
=
Xdbl_Const1
()
;
s
->
activity
[
var
]
=
0
;
else
assert
(
0
);
s
->
pFreqs
[
var
]
=
0
;
...
...
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