ABC: A System for Sequential Synthesis and Verification
Loading...
Searching...
No Matches
cadical_var.cpp
Go to the documentation of this file.
1
#include "
global.h
"
2
3
#include "
internal.hpp
"
4
5
ABC_NAMESPACE_IMPL_START
6
7
namespace
CaDiCaL
{
8
9
void
Internal::reset_subsume_bits
() {
10
LOG
(
"marking all variables as not subsume"
);
11
for
(
auto
idx :
vars
)
12
flags
(idx).subsume =
false
;
13
}
14
15
void
Internal::check_var_stats
() {
16
#ifndef CADICAL_NDEBUG
17
int64_t
fixed
= 0, eliminated = 0, substituted = 0, pure = 0, unused = 0;
18
for
(
auto
idx :
vars
) {
19
Flags
&f =
flags
(idx);
20
if
(f.
active
())
21
continue
;
22
if
(f.
fixed
())
23
fixed
++;
24
if
(f.
eliminated
())
25
eliminated++;
26
if
(f.
substituted
())
27
substituted++;
28
if
(f.
unused
())
29
unused++;
30
if
(f.
pure
())
31
pure++;
32
}
33
CADICAL_assert
(
stats
.now.fixed ==
fixed
);
34
CADICAL_assert
(
stats
.now.eliminated == eliminated);
35
CADICAL_assert
(
stats
.now.substituted == substituted);
36
CADICAL_assert
(
stats
.now.pure == pure);
37
int64_t inactive = unused +
fixed
+ eliminated + substituted + pure;
38
CADICAL_assert
(
stats
.inactive == inactive);
39
CADICAL_assert
(
max_var
==
stats
.active +
stats
.inactive);
40
#endif
41
}
42
43
}
// namespace CaDiCaL
44
45
ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_START
Definition
abc_namespaces.h:54
ABC_NAMESPACE_IMPL_END
#define ABC_NAMESPACE_IMPL_END
Definition
abc_namespaces.h:55
global.h
CADICAL_assert
#define CADICAL_assert(ignore)
Definition
global.h:14
LOG
#define LOG(...)
Definition
cadical_kitten.c:368
internal.hpp
CaDiCaL
Definition
arena.hpp:8
CaDiCaL::flags
const char * flags()
Definition
cadical_version.cpp:109
CaDiCaL::Flags
Definition
flags.hpp:10
CaDiCaL::Flags::eliminated
bool eliminated() const
Definition
flags.hpp:71
CaDiCaL::Flags::substituted
bool substituted() const
Definition
flags.hpp:72
CaDiCaL::Flags::fixed
bool fixed() const
Definition
flags.hpp:70
CaDiCaL::Flags::unused
bool unused() const
Definition
flags.hpp:68
CaDiCaL::Flags::pure
bool pure() const
Definition
flags.hpp:73
CaDiCaL::Flags::active
bool active() const
Definition
flags.hpp:69
CaDiCaL::Internal::max_var
int max_var
Definition
internal.hpp:200
CaDiCaL::Internal::stats
Stats stats
Definition
internal.hpp:302
CaDiCaL::Internal::fixed
int fixed(int lit)
Definition
internal.hpp:1542
CaDiCaL::Internal::reset_subsume_bits
void reset_subsume_bits()
Definition
cadical_var.cpp:9
CaDiCaL::Internal::check_var_stats
void check_var_stats()
Definition
cadical_var.cpp:15
CaDiCaL::Internal::vars
const Range vars
Definition
internal.hpp:324
src
sat
cadical
cadical_var.cpp
Generated by Doxygen 1.13.2 © 2025 EPTansuo. All rights reserved.
鲁ICP备2021046540号