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
6d6bf874
Commit
6d6bf874
authored
Feb 16, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing missing sat_solver APIs in 'iprove'.
parent
632ca7ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
src/sat/bsat/satSolver.c
+24
-6
No files found.
src/sat/bsat/satSolver.c
View file @
6d6bf874
...
...
@@ -328,11 +328,11 @@ static inline void act_var_bump(sat_solver* s, int v)
}
static
inline
void
act_var_bump_global
(
sat_solver
*
s
,
int
v
)
{
if
(
!
s
->
pGlobalVars
)
if
(
!
s
->
pGlobalVars
||
!
s
->
pGlobalVars
[
v
]
)
return
;
if
(
s
->
VarActType
==
0
)
{
s
->
activity
[
v
]
+=
(
int
)((
unsigned
)
s
->
var_inc
*
3
*
s
->
pGlobalVars
[
v
]
);
s
->
activity
[
v
]
+=
(
int
)((
unsigned
)
s
->
var_inc
*
3
);
if
(
s
->
activity
[
v
]
&
0x80000000
)
act_var_rescale
(
s
);
if
(
s
->
orderpos
[
v
]
!=
-
1
)
...
...
@@ -340,8 +340,17 @@ static inline void act_var_bump_global(sat_solver* s, int 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
)
double
act
=
Abc_Word2Dbl
(
s
->
activity
[
v
])
+
Abc_Word2Dbl
(
s
->
var_inc
)
*
3
.
0
;
s
->
activity
[
v
]
=
Abc_Dbl2Word
(
act
);
if
(
act
>
1e100
)
act_var_rescale
(
s
);
if
(
s
->
orderpos
[
v
]
!=
-
1
)
order_update
(
s
,
v
);
}
else
if
(
s
->
VarActType
==
2
)
{
s
->
activity
[
v
]
=
Xdbl_Add
(
s
->
activity
[
v
],
Xdbl_Mul
(
s
->
var_inc
,
Xdbl_FromDouble
(
3
.
0
))
);
if
(
s
->
activity
[
v
]
>
ABC_CONST
(
0x014c924d692ca61b
))
act_var_rescale
(
s
);
if
(
s
->
orderpos
[
v
]
!=
-
1
)
order_update
(
s
,
v
);
...
...
@@ -362,8 +371,17 @@ static inline void act_var_bump_factor(sat_solver* s, int 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
)
double
act
=
Abc_Word2Dbl
(
s
->
activity
[
v
])
+
Abc_Word2Dbl
(
s
->
var_inc
)
*
s
->
factors
[
v
];
s
->
activity
[
v
]
=
Abc_Dbl2Word
(
act
);
if
(
act
>
1e100
)
act_var_rescale
(
s
);
if
(
s
->
orderpos
[
v
]
!=
-
1
)
order_update
(
s
,
v
);
}
else
if
(
s
->
VarActType
==
2
)
{
s
->
activity
[
v
]
=
Xdbl_Add
(
s
->
activity
[
v
],
Xdbl_Mul
(
s
->
var_inc
,
Xdbl_FromDouble
(
s
->
factors
[
v
]))
);
if
(
s
->
activity
[
v
]
>
ABC_CONST
(
0x014c924d692ca61b
))
act_var_rescale
(
s
);
if
(
s
->
orderpos
[
v
]
!=
-
1
)
order_update
(
s
,
v
);
...
...
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