ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
reduce.h File Reference
#include <stdbool.h>
#include "global.h"
Include dependency graph for reduce.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool kissat_reducing (struct kissat *)
 
int kissat_reduce (struct kissat *)
 

Function Documentation

◆ kissat_reduce()

int kissat_reduce ( struct kissat * solver)

Definition at line 155 of file reduce.c.

155 {
156 START (reduce);
157 INC (reductions);
158 kissat_phase (solver, "reduce", GET (reductions),
159 "reduce limit %" PRIu64 " hit after %" PRIu64 " conflicts",
160 solver->limits.reduce.conflicts, CONFLICTS);
162 bool compact = kissat_compacting (solver);
163 reference start = compact ? 0 : solver->first_reducible;
164 if (start != INVALID_REF) {
165#ifndef KISSAT_QUIET
166 size_t arena_size = SIZE_STACK (solver->arena);
167 size_t words_to_sweep = arena_size - start;
168 size_t bytes_to_sweep = sizeof (word) * words_to_sweep;
169 kissat_phase (solver, "reduce", GET (reductions),
170 "reducing clauses after offset %" REFERENCE_FORMAT
171 " in arena",
172 start);
173 kissat_phase (solver, "reduce", GET (reductions),
174 "reducing %zu words %s %.0f%%", words_to_sweep,
175 FORMAT_BYTES (bytes_to_sweep),
176 kissat_percent (words_to_sweep, arena_size));
177#endif
179 reducibles reds;
180 INIT_STACK (reds);
181 if (collect_reducibles (solver, &reds, start)) {
182 sort_reducibles (solver, &reds);
183 mark_less_useful_clauses_as_garbage (solver, &reds);
184 RELEASE_STACK (reds);
185 kissat_sparse_collect (solver, compact, start);
186 } else if (compact)
187 kissat_sparse_collect (solver, compact, start);
188 else
190 } else
191 KISSAT_assert (solver->inconsistent);
192 } else
193 kissat_phase (solver, "reduce", GET (reductions), "nothing to reduce");
195 UPDATE_CONFLICT_LIMIT (reduce, reductions, SQRT, false);
196 solver->last.conflicts.reduce = CONFLICTS;
197 REPORT (0, '-');
198 STOP (reduce);
199 return solver->inconsistent ? 20 : 0;
200}
#define SIZE_STACK(S)
Definition stack.h:19
#define RELEASE_STACK(S)
Definition stack.h:71
#define INIT_STACK(S)
Definition stack.h:22
#define INC(NAME)
ABC_NAMESPACE_IMPL_START void kissat_classify(struct kissat *solver)
Definition classify.c:7
bool kissat_compacting(kissat *solver)
Definition collect.c:635
void kissat_sparse_collect(kissat *solver, bool compact, reference start)
Definition collect.c:610
pcover reduce()
#define FORMAT_BYTES(BYTES)
Definition format.h:31
#define SQRT(COUNT)
Definition kimits.h:113
#define UPDATE_CONFLICT_LIMIT(NAME, COUNT, SCALE_COUNT_FUNCTION, SCALE_DELTA)
Definition kimits.h:115
#define KISSAT_assert(ignore)
Definition global.h:13
unsigned __int64 word
DECLARATIONS ///.
Definition kitPerm.c:36
#define solver
Definition kitten.c:211
#define kissat_phase(...)
Definition print.h:48
#define STOP(P)
Definition profile.hpp:158
#define START(P)
Definition profile.hpp:150
#define INVALID_REF
Definition reference.h:16
ABC_NAMESPACE_HEADER_START typedef unsigned reference
Definition reference.h:9
#define REFERENCE_FORMAT
Definition reference.h:11
#define REPORT(...)
Definition report.h:10
#define CONFLICTS
Definition statistics.h:335
#define GET(NAME)
Definition statistics.h:416
void kissat_compute_and_set_tier_limits(struct kissat *solver)
Definition tiers.c:53
void kissat_unmark_reason_clauses(kissat *solver, reference start)
Definition trail.c:66
bool kissat_flush_and_mark_reason_clauses(kissat *solver, reference start)
Definition trail.c:49
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kissat_reducing()

bool kissat_reducing ( struct kissat * solver)

Definition at line 16 of file reduce.c.

16 {
17 if (!GET_OPTION (reduce))
18 return false;
19 if (!solver->statistics_.clauses_redundant)
20 return false;
22 return false;
23 return true;
24}
#define GET_OPTION(N)
Definition options.h:295
struct limits::@317277023072347355124305102271146250361353123031 reduce
uint64_t conflicts
Definition kimits.h:27
Here is the call graph for this function:
Here is the caller graph for this function: