包含以下数据成员的列传:
1. solver->clause
2. flags
3.frames
4.kitten
5.limit
1.
数据成员solver->clause 是一个文字序列,以一个工作栈的方式管理一部分文字; 主要包括在以下文件中: internal.h internal.c
主要的操作包括:
1. RELEASE_STACK (solver->clause);
EMPTY_STACK (solver->clause), 2. for (all_stack (unsigned, lit, solver->clause))
CLEAR_STACK (solver->clause);
solver->clause_satisfied = false;
3. assert (SIZE_STACK (solver->clause) < UINT_MAX);
---------- D:\SAT_study2024\06outforImplieGraph\outInforToNetworkx_kissat2024
//clause.c 4. reference kissat_new_original_clause (kissat *solver) { reference kissat_new_irredundant_clause (kissat *solver) { reference kissat_new_redundant_clause (kissat *solver, unsigned glue) {
//analyze.c 5. (1) for (all_stack (unsigned, lit, solver->clause)) assert (all_assigned[IDX (lit)].analyzed); (2) for (all_stack (unsigned, lit, solver->clause)) {
|
|
2.flags
//flags.c static inline void activate_literal (kissat *solver, unsigned lit) { const unsigned idx = IDX (lit); flags *f = FLAGS (idx); if (f->active) return; lit = STRIP (lit); LOG ("activating %s", LOGVAR (idx)); f->active = true; assert (!f->fixed); assert (!f->eliminated); solver->active++; INC (variables_activated); kissat_enqueue (solver, idx); const double score = 1.0 - 1.0 / solver->statistics.variables_activated; kissat_update_heap (solver, &solver->scores, idx, score); if (solver->stable) { const unsigned lit = LIT (idx); if (!VALUE (lit)) kissat_push_heap (solver, &solver->scores, idx); } assert (solver->unassigned < UINT_MAX); solver->unassigned++; kissat_mark_removed_literal (solver, lit); kissat_mark_added_literal (solver, lit); assert (!VALUE (lit)); assert (!VALUE (NOT (lit))); assert (!SAVED (idx)); assert (!TARGET (idx)); assert (!BEST (idx)); }
//flag.c
---------- D:\SAT_study2024\06outforImplieGraph\outInforToNetworkx_kissat2024
//inlinequeue.h static inline void kissat_enqueue (kissat *solver, unsigned idx) { assert (idx < solver->vars); links *links = solver->links, *l = links + idx; l->prev = l->next = DISCONNECT; kissat_enqueue_links (solver, idx, links, &solver->queue); LOG ("enqueued %s stamped %u", LOGVAR (idx), l->stamp); if (!VALUE (LIT (idx))) kissat_update_queue (solver, links, idx); kissat_check_queue (solver); }
|
|
//inline.h static inline void kissat_mark_removed_literal (kissat *solver, unsigned lit) { const unsigned idx = IDX (lit); flags *flags = FLAGS (idx); if (flags->fixed) return; if (!flags->eliminate) { LOG ("marking %s to be eliminated", LOGVAR (idx)); flags->eliminate = true; INC (variables_eliminate); } } static inline void kissat_mark_added_literal (kissat *solver, unsigned lit) { const unsigned idx = IDX (lit); flags *flags = FLAGS (idx); if (!flags->subsume) { LOG ("marking %s to forward subsume", LOGVAR (idx)); flags->subsume = true; INC (variables_subsume); } const unsigned bit = 1u << NEGATED (lit); if (!(flags->factor & bit)) { flags->factor |= bit; LOG ("marking literal %s to factor", LOGLIT (lit)); INC (literals_factor); } }
|
|
//kissat_mark_removed_literal 出现的地方 ---------- D:\SAT_study2024\06outforImplieGraph\outInforToNetworkx_kissat2024
|
|
3. frames与层有关系的属性
//promote.h //从这段函数代码可以了解frames属性的应用 1 static inline unsigned kissat_recompute_glue (kissat *solver, clause *c, 2 unsigned limit) { 3 assert (limit); 4 assert (EMPTY_STACK (solver->promote)); //空的工作栈供临时使用 5 unsigned res = 0; 6 for (all_literals_in_clause (lit, c)) { 7 assert (VALUE (lit)); 8 const unsigned level = LEVEL (lit); //由文字lit得知所在层 9 frame *frame = &FRAME (level); //所在层对应frame 10 if (frame->promote) //frame的属性被使用 11 continue; 12 if (++res == limit) 13 break; 14 frame->promote = true; 15 PUSH_STACK (solver->promote, level); //记录被使用过的层 16 } 17 for (all_stack (unsigned, level, solver->promote)) { 18 frame *frame = &FRAME (level); 19 assert (frame->promote); 20 frame->promote = false; //恢复frame对应层属性 21 } 22 CLEAR_STACK (solver->promote); //临时使用完毕后,清理。 23 return res; 24 }
|
|
//decide.c 1 void kissat_decide (kissat *solver) { 2 START (decide); 3 assert (solver->unassigned); 4 if (solver->warming) 5 INC (warming_decisions); 6 else { 7 INC (decisions); 8 if (solver->stable) 9 INC (stable_decisions); 10 else 11 INC (focused_decisions); 12 } 13 solver->level++; 14 assert (solver->level != INVALID_LEVEL); 15 const unsigned idx = kissat_next_decision_variable (solver); 16 const value value = kissat_decide_phase (solver, idx); 17 unsigned lit = LIT (idx); 18 if (value < 0) 19 lit = NOT (lit); 20 kissat_push_frame (solver, lit); 21 assert (solver->level < SIZE_STACK (solver->frames)); 22 LOG ("decide literal %s", LOGLIT (lit)); 23 kissat_assign_decision (solver, lit); 24 STOP (decide); 25 } 26 27 void kissat_internal_assume (kissat *solver, unsigned lit) { 28 assert (solver->unassigned); 29 assert (!VALUE (lit)); 30 solver->level++; 31 assert (solver->level != INVALID_LEVEL); 32 kissat_push_frame (solver, lit); 33 assert (solver->level < SIZE_STACK (solver->frames)); 34 LOG ("assuming literal %s", LOGLIT (lit)); 35 kissat_assign_decision (solver, lit); 36 }
|
|
//inlineframe.h 1 #ifndef _inlineframes_h_INCLUDEDd 2 #define _inlineframes_h_INCLUDEDd 3 4 #include "allocate.h" 5 #include "internal.h" 6 7 static inline void kissat_push_frame (kissat *solver, unsigned decision) { 8 assert (!solver->level || decision != UINT_MAX); 9 const size_t trail = SIZE_ARRAY (solver->trail); 10 frame frame; 11 frame.decision = decision; 12 frame.promote = false; 13 frame.trail = trail; 14 frame.used = 0; 15 PUSH_STACK (solver->frames, frame); 16 } 17 18 #endif
|
|
//internal.c 1 kissat *kissat_init (void) { 2 kissat *solver = kissat_calloc (0, 1, sizeof *solver); 3 #ifndef NOPTIONS 4 kissat_init_options (&solver->options); 5 #else 6 kissat_init_options (); 7 #endif 8 #ifndef QUIET 9 kissat_init_profiles (&solver->profiles); 10 #endif 11 START (total); 12 kissat_init_queue (solver); 13 assert (INTERNAL_MAX_LIT < UINT_MAX); 14 kissat_push_frame (solver, UINT_MAX); 15 solver->watching = true; 16 solver->conflict.size = 2; 17 solver->scinc = 1.0; 18 solver->first_reducible = INVALID_REF; 19 solver->last_irredundant = INVALID_REF; 20 kissat_reset_last_learned (solver); 21 #ifndef NDEBUG 22 kissat_init_checker (solver); 23 #endif 24 25 return solver; 26 }
重点: (1)每一层frame中包含对应本层的信息: 决策文字,决策文字所在trail位置,以及标识属性:bool promote; unsigned used;unsigned saved; (2)回溯到new_level时,trail回溯到new_level的尾部文字之后;所以frames回溯到new_level+1层,以便获取这个指示位置。 详见: //backtrack.c
|
|
4.kitten
//出现kitten的地方 ---------- D:\SAT_study2024\06outforImplieGraph\outInforToNetworkx_kissat2024
|
|
5. limit
//各种判别界限的更新 ---------- D:\SAT_study2024\06outforImplieGraph\outInforToNetworkx_kissat2024
|
|
//学习子句管理界限的触发判定与更新在 文件reduce.c中: //触发 bool kissat_reducing (kissat *solver) { if (!GET_OPTION (reduce)) return false; if (!solver->statistics.clauses_redundant) return false; if (CONFLICTS < solver->limits.reduce.conflicts) return false; return true; }
//更新 1 int kissat_reduce (kissat *solver) { 2 START (reduce); 3 INC (reductions); 4 kissat_phase (solver, "reduce", GET (reductions), 5 "reduce limit %" PRIu64 " hit after %" PRIu64 " conflicts", 6 solver->limits.reduce.conflicts, CONFLICTS); 7 kissat_compute_and_set_tier_limits (solver); 8 bool compact = kissat_compacting (solver); 9 reference start = compact ? 0 : solver->first_reducible; 10 if (start != INVALID_REF) { 11 #ifndef QUIET 12 size_t arena_size = SIZE_STACK (solver->arena); 13 size_t words_to_sweep = arena_size - start; 14 size_t bytes_to_sweep = sizeof (word) * words_to_sweep; 15 kissat_phase (solver, "reduce", GET (reductions), 16 "reducing clauses after offset %" REFERENCE_FORMAT 17 " in arena", 18 start); 19 kissat_phase (solver, "reduce", GET (reductions), 20 "reducing %zu words %s %.0f%%", words_to_sweep, 21 FORMAT_BYTES (bytes_to_sweep), 22 kissat_percent (words_to_sweep, arena_size)); 23 #endif 24 if (kissat_flush_and_mark_reason_clauses (solver, start)) { 25 reducibles reds; 26 INIT_STACK (reds); 27 if (collect_reducibles (solver, &reds, start)) { 28 sort_reducibles (solver, &reds); 29 mark_less_useful_clauses_as_garbage (solver, &reds); 30 RELEASE_STACK (reds); 31 kissat_sparse_collect (solver, compact, start); 32 } else if (compact) 33 kissat_sparse_collect (solver, compact, start); 34 else 35 kissat_unmark_reason_clauses (solver, start); 36 } else 37 assert (solver->inconsistent); 38 } else 39 kissat_phase (solver, "reduce", GET (reductions), "nothing to reduce"); 40 kissat_classify (solver); 41 UPDATE_CONFLICT_LIMIT (reduce, reductions, SQRT, false); 42 solver->last.conflicts.reduce = CONFLICTS; 43 REPORT (0, '-'); 44 STOP (reduce); 45 return solver->inconsistent ? 20 : 0; 46 }
|
|
//相关结构体定义与C语言宏操作设定新的增长区间。 //kimits.h #ifndef _limits_h_INCLUDED #define _limits_h_INCLUDED #include <stdbool.h> #include <stdint.h> typedef struct bounds bounds; typedef struct changes changes; typedef struct delays delays; typedef struct delay delay; typedef struct remember remember; typedef struct enabled enabled; typedef struct limited limited; typedef struct limits limits; struct bounds { struct { uint64_t max_bound_completed; unsigned additional_clauses; } eliminate; }; struct limits { uint64_t conflicts; uint64_t decisions; uint64_t reports; struct { uint64_t count; uint64_t ticks; uint64_t conflicts; } mode; struct { struct { uint64_t eliminate; uint64_t subsume; } variables; uint64_t conflicts; } eliminate; struct { uint64_t marked; } factor; struct { uint64_t conflicts; } probe, randec, reduce, reorder, rephase, restart; struct { uint64_t conflicts; uint64_t interval; } glue; }; struct limited { bool conflicts; bool decisions; }; struct enabled { bool eliminate; bool focus; bool mode; bool probe; }; struct delay { unsigned count; unsigned current; }; struct delays { delay bumpreasons; delay congruence; delay sweep; delay vivifyirr; }; struct remember { struct { uint64_t eliminate; uint64_t probe; } ticks; struct { uint64_t reduce; } conflicts; }; struct kissat; changes kissat_changes (struct kissat *); bool kissat_changed (changes before, changes after); void kissat_init_limits (struct kissat *); uint64_t kissat_scale_delta (struct kissat *, const char *, uint64_t); double kissat_nlogpown (uint64_t, unsigned); double kissat_sqrt (uint64_t); double kissat_logn (uint64_t); #define LOGN(COUNT) kissat_logn (COUNT) #define LINEAR(COUNT) (COUNT) #define NLOGN(COUNT) kissat_nlogpown (COUNT, 1) #define NLOG2N(COUNT) kissat_nlogpown (COUNT, 2) #define NLOG3N(COUNT) kissat_nlogpown (COUNT, 3) #define SQRT(COUNT) kissat_sqrt (COUNT) #define UPDATE_CONFLICT_LIMIT(NAME, COUNT, SCALE_COUNT_FUNCTION, \ SCALE_DELTA) \ do { \ if (solver->inconsistent) \ break; \ const struct statistics *statistics = &solver->statistics; \ assert (statistics->COUNT > 0); \ struct limits *limits = &solver->limits; \ uint64_t DELTA = GET_OPTION (NAME##int); \ const double SCALING = SCALE_COUNT_FUNCTION (statistics->COUNT); \ assert (SCALING >= 1); \ DELTA *= SCALING; \ const uint64_t SCALED = \ !(SCALE_DELTA) ? DELTA \ : kissat_scale_delta (solver, #NAME, DELTA); \ limits->NAME.conflicts = CONFLICTS + SCALED; \ kissat_phase ( \ solver, #NAME, GET (COUNT), "new limit of %s after %s conflicts", \ FORMAT_COUNT (limits->NAME.conflicts), FORMAT_COUNT (SCALED)); \ } while (0) #include <inttypes.h> #define SET_EFFORT_LIMIT(LIMIT, NAME, START) \ uint64_t LIMIT; \ do { \ const uint64_t OLD_LIMIT = solver->statistics.START; \ const uint64_t TICKS = solver->statistics.search_ticks; \ const uint64_t LAST = solver->probing ? solver->last.ticks.probe \ : solver->last.ticks.eliminate; \ uint64_t REFERENCE = TICKS - LAST; \ const uint64_t MINEFFORT = 1e6 * GET_OPTION (mineffort); \ if (REFERENCE < MINEFFORT) { \ REFERENCE = MINEFFORT; \ kissat_extremely_verbose ( \ solver, #NAME " effort reference %s set to 'mineffort'", \ FORMAT_COUNT (REFERENCE)); \ } else { \ kissat_extremely_verbose ( \ solver, #NAME " effort reference %s = %s - %s 'search_ticks'", \ FORMAT_COUNT (REFERENCE), FORMAT_COUNT (TICKS), \ FORMAT_COUNT (LAST)); \ } \ const double EFFORT = (double) GET_OPTION (NAME##effort) * 1e-3; \ const uint64_t DELTA = EFFORT * REFERENCE; \ \ kissat_extremely_verbose ( \ solver, #NAME " effort delta %s = %g * %s '" #START "'", \ FORMAT_COUNT (DELTA), EFFORT, FORMAT_COUNT (REFERENCE)); \ \ const uint64_t NEW_LIMIT = OLD_LIMIT + DELTA; \ kissat_very_verbose (solver, \ #NAME " effort limit %s = %s + %s '" #START "'", \ FORMAT_COUNT (NEW_LIMIT), \ FORMAT_COUNT (OLD_LIMIT), FORMAT_COUNT (DELTA)); \ \ LIMIT = NEW_LIMIT; \ \ } while (0) struct kissat; bool kissat_delaying (struct kissat *, delay *); void kissat_bump_delay (struct kissat *, delay *); void kissat_reduce_delay (struct kissat *, delay *); #define DELAYING(NAME) kissat_delaying (solver, &solver->delays.NAME) #define BUMP_DELAY(NAME) kissat_bump_delay (solver, &solver->delays.NAME) #define REDUCE_DELAY(NAME) \ kissat_reduce_delay (solver, &solver->delays.NAME) #endif
//kimits.c #include "internal.h" #include "logging.h" #include "mode.h" #include "print.h" #include "reduce.h" #include "rephase.h" #include "resources.h" #include "restart.h" #include <inttypes.h> #include <math.h> double kissat_logn (uint64_t count) { assert (count > 0); const double res = log10 (count + 9); assert (res >= 1); return res; } double kissat_sqrt (uint64_t count) { assert (count > 0); const double res = sqrt (count); assert (res >= 1); return res; } double kissat_nlogpown (uint64_t count, unsigned exponent) { assert (count > 0); const double tmp = log10 (count + 9); double factor = 1; while (exponent--) factor *= tmp; assert (factor >= 1); const double res = count * factor; assert (res >= 1); return res; } uint64_t kissat_scale_delta (kissat *solver, const char *pretty, uint64_t delta) { const uint64_t C = BINIRR_CLAUSES; double f = kissat_logn (C + 1) - 5; const double ff = f * f; assert (ff >= 0); const double fff = 4.5 * ff + 25; uint64_t scaled = fff * delta; assert (delta <= scaled); // clang-format off kissat_very_verbose (solver, "scaled %s delta %" PRIu64 " = %g * %" PRIu64 " = (4.5 (log10(%" PRIu64 ") - 5)^2 + 25) * %" PRIu64, pretty, scaled, fff, delta, C, delta); // clang-format on (void) pretty; return scaled; } static void init_enabled (kissat *solver) { bool probe; if (!GET_OPTION (simplify)) probe = false; else if (!GET_OPTION (probe)) probe = false; else if (GET_OPTION (substitute)) probe = true; else if (GET_OPTION (sweep)) probe = true; else if (GET_OPTION (vivify)) probe = true; else probe = false; kissat_very_verbose (solver, "probing %sabled", probe ? "en" : "dis"); solver->enabled.probe = probe; bool eliminate; if (!GET_OPTION (simplify)) eliminate = false; else if (!GET_OPTION (eliminate)) eliminate = false; else eliminate = true; kissat_very_verbose (solver, "eliminate %sabled", eliminate ? "en" : "dis"); solver->enabled.eliminate = eliminate; } #define INIT_CONFLICT_LIMIT(NAME, SCALE) \ do { \ const uint64_t DELTA = GET_OPTION (NAME##init); \ const uint64_t SCALED = \ !(SCALE) ? DELTA : kissat_scale_delta (solver, #NAME, DELTA); \ limits->NAME.conflicts = CONFLICTS + SCALED; \ kissat_very_verbose (solver, \ "initial " #NAME " limit of %s conflicts", \ FORMAT_COUNT (limits->NAME.conflicts)); \ } while (0) void kissat_init_limits (kissat *solver) { assert (solver->statistics.searches == 1); init_enabled (solver); limits *limits = &solver->limits; if (GET_OPTION (randec)) INIT_CONFLICT_LIMIT (randec, false); if (GET_OPTION (reduce)) INIT_CONFLICT_LIMIT (reduce, false); if (GET_OPTION (reorder)) INIT_CONFLICT_LIMIT (reorder, false); if (GET_OPTION (rephase)) INIT_CONFLICT_LIMIT (rephase, false); if (!solver->stable) kissat_update_focused_restart_limit (solver); kissat_init_mode_limit (solver); if (solver->enabled.eliminate) { INIT_CONFLICT_LIMIT (eliminate, true); solver->bounds.eliminate.max_bound_completed = 0; solver->bounds.eliminate.additional_clauses = 0; kissat_very_verbose (solver, "reset elimination bound to zero"); } if (solver->enabled.probe) INIT_CONFLICT_LIMIT (probe, true); } #ifndef QUIET static const char *delay_description (kissat *solver, delay *delay) { delays *delays = &solver->delays; if (delay == &delays->bumpreasons) return "bumping reason side literals"; else if (delay == &delays->congruence) return "congruence closure"; else if (delay == &delays->sweep) return "sweeping"; else { assert (delay == &delays->vivifyirr); return "vivifying irredundant clauses"; } } #endif #define VERY_VERBOSE_IF_NOT_BUMPREASONS(...) \ VERY_VERBOSE_OR_LOG (delay == &solver->delays.bumpreasons, __VA_ARGS__) void kissat_reduce_delay (kissat *solver, delay *delay) { if (!delay->current) return; delay->current /= 2; VERY_VERBOSE_IF_NOT_BUMPREASONS ( solver, "%s delay interval decreased to %u", delay_description (solver, delay), delay->current); delay->count = delay->current; #ifdef QUIET (void) solver; #endif } void kissat_bump_delay (kissat *solver, delay *delay) { delay->current += delay->current < UINT_MAX; VERY_VERBOSE_IF_NOT_BUMPREASONS ( solver, "%s delay interval increased to %u", delay_description (solver, delay), delay->current); delay->count = delay->current; #ifdef QUIET (void) solver; #endif } bool kissat_delaying (kissat *solver, delay *delay) { if (delay->count) { delay->count--; VERY_VERBOSE_IF_NOT_BUMPREASONS ( solver, "%s still delayed (%u more times)", delay_description (solver, delay), delay->current); return true; } else { VERY_VERBOSE_IF_NOT_BUMPREASONS (solver, "%s not delayed", delay_description (solver, delay)); return false; } #ifdef QUIET (void) solver; #endif }
|
|
//决策方式的转换限定 //decide.c 1 void kissat_start_random_sequence (kissat *solver) { 2 if (!GET_OPTION (randec)) 3 return; 4 5 if (solver->stable && !GET_OPTION (randecstable)) 6 return; 7 8 if (!solver->stable && !GET_OPTION (randecfocused)) 9 return; 10 11 if (solver->randec) 12 kissat_very_verbose (solver, 13 "continuing random decision sequence " 14 "at %s conflicts", 15 FORMAT_COUNT (CONFLICTS)); 16 else { 17 INC (random_sequences); 18 const uint64_t count = solver->statistics.random_sequences; 19 const unsigned length = GET_OPTION (randeclength) * LOGN (count); 20 kissat_very_verbose (solver, 21 "starting random decision sequence " 22 "at %s conflicts for %s conflicts", 23 FORMAT_COUNT (CONFLICTS), FORMAT_COUNT (length)); 24 solver->randec = length; 25 26 UPDATE_CONFLICT_LIMIT (randec, random_sequences, LOGN, false); 27 } 28 }
|
|
// 相位转换界限 // rephase.c 1 static char reset_phases (kissat *solver) { 2 const uint64_t count = GET (rephased); 3 assert (count > 0); 4 const uint64_t select = (count - 1) % (uint64_t) size_rephase_schedule; 5 const char type = rephase_schedule[select](solver); 6 kissat_phase ( 7 solver, "rephase", GET (rephased), "%s phases in %s search mode", 8 rephase_type_as_string (type), solver->stable ? "stable" : "focused"); 9 LOG ("copying saved phases as target phases"); 10 memcpy (solver->phases.target, solver->phases.saved, VARS); 11 UPDATE_CONFLICT_LIMIT (rephase, rephased, NLOG3N, false); 12 kissat_reset_target_assigned (solver); 13 if (type == 'B') 14 kissat_reset_best_assigned (solver); 15 return type; 16 }
|
|
// reorder.c 1 void kissat_reorder (kissat *solver) { 2 START (reorder); 3 INC (reordered); 4 assert (!solver->level); 5 kissat_phase (solver, "reorder", GET (reordered), 6 "reorder limit %" PRIu64 " hit a after %" PRIu64 7 " conflicts in %s mode ", 8 solver->limits.reorder.conflicts, CONFLICTS, 9 solver->stable ? "stable" : "focused"); 10 if (solver->stable) 11 reorder_stable (solver); 12 else 13 reorder_focused (solver); 14 kissat_phase (solver, "reorder", GET (reordered), 15 "reordered decisions in %s search mode", 16 solver->stable ? "stable" : "focused"); 17 UPDATE_CONFLICT_LIMIT (reorder, reordered, LINEAR, false); 18 REPORT (0, 'o'); 19 STOP (reorder); 20 }
//probe.c 1 int kissat_probe (kissat *solver) { 2 assert (!solver->inconsistent); 3 INC (probings); 4 assert (!solver->probing); 5 solver->probing = true; 6 const unsigned max_rounds = GET_OPTION (proberounds); 7 for (unsigned round = 0; round != max_rounds; round++) { 8 unsigned before = solver->active; 9 probe (solver); 10 if (solver->inconsistent) 11 break; 12 if (before == solver->active) 13 break; 14 } 15 kissat_classify (solver); 16 UPDATE_CONFLICT_LIMIT (probe, probings, NLOGN, true); 17 solver->last.ticks.probe = solver->statistics.search_ticks; 18 assert (solver->probing); 19 solver->probing = false; 20 return solver->inconsistent ? 20 : 0; 21 }
//变量消除 //eliminate.c 1 int kissat_eliminate (kissat *solver) { 2 assert (!solver->inconsistent); 3 INC (eliminations); 4 eliminate (solver); 5 kissat_classify (solver); 6 UPDATE_CONFLICT_LIMIT (eliminate, eliminations, NLOG2N, true); 7 solver->last.ticks.eliminate = solver->statistics.search_ticks; 8 return solver->inconsistent ? 20 : 0; 9 }
static void eliminate (kissat *solver) { kissat_backtrack_propagate_and_flush_trail (solver); assert (!solver->inconsistent); STOP_SEARCH_AND_START_SIMPLIFIER (eliminate); kissat_phase (solver, "eliminate", GET (eliminations), "elimination limit of %" PRIu64 " conflicts hit", solver->limits.eliminate.conflicts); init_map_and_kitten (solver); kissat_enter_dense_mode (solver, 0); eliminate_variables (solver); kissat_resume_sparse_mode (solver, true, 0); reset_map_and_kitten (solver); kissat_check_statistics (solver); STOP_SIMPLIFIER_AND_RESUME_SEARCH (eliminate); }
//顺便指出,internal.h定义kissat类型包含以下数据成员: //internal.h bounds bounds; classification classification; delays delays; enabled enabled; limited limited; limits limits; remember last; unsigned walked;
|
|