ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
walk.c File Reference
#include "walk.h"
#include "allocate.h"
#include "decide.h"
#include "dense.h"
#include "inline.h"
#include "phases.h"
#include "print.h"
#include "rephase.h"
#include "report.h"
#include "terminate.h"
#include "warmup.h"
#include <string.h>
Include dependency graph for walk.c:

Go to the source code of this file.

Classes

struct  tagged
 
struct  counter
 

Macros

#define LD_MAX_WALK_REF   31
 
#define MAX_WALK_REF   ((1u << LD_MAX_WALK_REF) - 1)
 
#define INVALID_BEST_TRAIL_POS   UINT_MAX
 
#define report_initial_minimum(...)
 
#define report_minimum(...)
 

Typedefs

typedef typedefABC_NAMESPACE_IMPL_START struct tagged tagged
 
typedef struct counter counter
 
typedef struct walker walker
 

Functions

typedef STACK (double)
 
bool kissat_walking (kissat *solver)
 
void kissat_walk (kissat *solver)
 

Macro Definition Documentation

◆ INVALID_BEST_TRAIL_POS

#define INVALID_BEST_TRAIL_POS   UINT_MAX

◆ LD_MAX_WALK_REF

#define LD_MAX_WALK_REF   31

Definition at line 21 of file walk.c.

◆ MAX_WALK_REF

#define MAX_WALK_REF   ((1u << LD_MAX_WALK_REF) - 1)

Definition at line 22 of file walk.c.

◆ report_initial_minimum

#define report_initial_minimum ( ...)
Value:
do { \
} while (0)

Definition at line 364 of file walk.c.

364#define report_initial_minimum(...) \
365 do { \
366 } while (0)

◆ report_minimum

#define report_minimum ( ...)
Value:
do { \
} while (0)

Definition at line 367 of file walk.c.

367#define report_minimum(...) \
368 do { \
369 } while (0)

Typedef Documentation

◆ counter

typedef struct counter counter

Definition at line 18 of file walk.c.

◆ tagged

typedef typedefABC_NAMESPACE_IMPL_START struct tagged tagged

Definition at line 17 of file walk.c.

◆ walker

typedef struct walker walker

Definition at line 19 of file walk.c.

Function Documentation

◆ kissat_walk()

void kissat_walk ( kissat * solver)

Definition at line 938 of file walk.c.

938 {
939 KISSAT_assert (!solver->level);
940 KISSAT_assert (!solver->inconsistent);
941 KISSAT_assert (kissat_propagated (solver));
943
944 reference last_irredundant = solver->last_irredundant;
945 if (last_irredundant == INVALID_REF)
946 last_irredundant = SIZE_STACK (solver->arena);
947
948 if (last_irredundant > MAX_WALK_REF) {
949 kissat_phase (solver, "walk", GET (walks),
950 "last irredundant clause reference %u too large",
951 last_irredundant);
952 return;
953 }
954
955 uint64_t clauses = BINIRR_CLAUSES;
956 if (clauses > MAX_WALK_REF) {
957 kissat_phase (solver, "walk", GET (walks),
958 "way too many irredundant clauses %" PRIu64, clauses);
959 return;
960 }
961
962 if (GET_OPTION (warmup))
964
966 walking_phase (solver);
968}
#define SIZE_STACK(S)
Definition stack.h:19
#define KISSAT_assert(ignore)
Definition global.h:13
#define solver
Definition kitten.c:211
#define GET_OPTION(N)
Definition options.h:295
#define kissat_phase(...)
Definition print.h:48
#define STOP_SEARCH_AND_START_SIMPLIFIER(...)
Definition profile.h:133
#define STOP_SIMPLIFIER_AND_RESUME_SEARCH(...)
Definition profile.h:136
#define INVALID_REF
Definition reference.h:16
ABC_NAMESPACE_HEADER_START typedef unsigned reference
Definition reference.h:9
#define GET(NAME)
Definition statistics.h:416
#define BINIRR_CLAUSES
Definition statistics.h:341
#define MAX_WALK_REF
Definition walk.c:22
bool kissat_walking(kissat *solver)
Definition walk.c:913
ABC_NAMESPACE_IMPL_START void kissat_warmup(kissat *solver)
Definition warmup.c:11
Here is the call graph for this function:

◆ kissat_walking()

bool kissat_walking ( kissat * solver)

Definition at line 913 of file walk.c.

913 {
914 reference last_irredundant = solver->last_irredundant;
915 if (last_irredundant == INVALID_REF)
916 last_irredundant = SIZE_STACK (solver->arena);
917
918 if (last_irredundant > MAX_WALK_REF) {
920 "can not walk since last "
921 "irredundant clause reference %u too large",
922 last_irredundant);
923 return false;
924 }
925
926 uint64_t clauses = BINIRR_CLAUSES;
927 if (clauses > MAX_WALK_REF) {
929 "can not walk due to "
930 "way too many irredundant clauses %" PRIu64,
931 clauses);
932 return false;
933 }
934
935 return true;
936}
#define kissat_extremely_verbose(...)
Definition print.h:53
Here is the caller graph for this function:

◆ STACK()

typedef STACK ( double )

Definition at line 41 of file walk.c.

46 {
48
49 unsigned best_trail_pos;
50 unsigned clauses;
51 unsigned current;
52 unsigned exponents;
53 unsigned initial;
54 unsigned minimum;
55 unsigned offset;
56
58
59 counter *counters;
60 litpairs *binaries;
61 tagged *refs;
62 double *table;
63
64 value *original_values;
65 value *best_values;
66
67 doubles scores;
68 unsigneds unsat;
69 unsigneds trail;
70
71 double size;
72 double epsilon;
73
74 uint64_t limit;
75 uint64_t flipped;
76#ifndef KISSAT_QUIET
77 uint64_t start;
78 struct {
79 uint64_t flipped;
80 unsigned minimum;
81 } report;
82#endif
83};
ABC_NAMESPACE_HEADER_START typedef uint64_t generator
Definition random.h:12
ABC_NAMESPACE_IMPL_START typedef signed char value
unsigned long long size
Definition giaNewBdd.h:39
Definition walk.c:35
Definition walk.c:24
long random()
Here is the call graph for this function: