ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
cadical_options.cpp File Reference
#include "global.h"
#include "internal.hpp"
Include dependency graph for cadical_options.cpp:

Go to the source code of this file.

Namespaces

namespace  CaDiCaL
 

Macros

#define OPTION(N, V, L, H, O, P, R, D)
 
#define OPTION(N, V, L, H, O, P, R, D)
 
#define OPTION(N, V, L, H, O, P, R, D)
 
#define OPTION(N, V, L, H, O, P, R, D)
 
#define OPTION(N, V, L, H, O, P, R, D)
 
#define OPTION(N, V, L, H, O, P, R, D)
 
#define OPTION(N, V, L, H, O, P, R, D)
 
#define OPTION(N, V, L, H, O, P, R, D)
 
#define OPTION(N, V, L, H, O, P, R, D)
 

Macro Definition Documentation

◆ OPTION [1/9]

#define OPTION ( N,
V,
L,
H,
O,
P,
R,
D )
Value:
{#N, (int) V, (int) L, (int) H, (int) O, (bool) P, D},
#define bool
Definition espresso.h:254

◆ OPTION [2/9]

#define OPTION ( N,
V,
L,
H,
O,
P,
R,
D )
Value:
do { \
if ((L) > (V)) \
FATAL ("'" #N "' default '" #V "' " \
"lower minimum '" #L "' in 'options.hpp'"); \
if ((H) < (V)) \
FATAL ("'" #N "' default '" #V "' " \
"larger maximum '" #H "' in 'options.hpp'"); \
if (strcmp (prev, #N) > 0) \
FATAL ("'%s' ordered before '" #N "' in 'options.hpp'", prev); \
N = (int) (V); \
CADICAL_assert (&val (i) == &N); \
/* The order of initializing static data is undefined and thus */ \
/* it might be the case that the 'table' is not initialized yet. */ \
/* Thus this construction just reinitializes the table too even */ \
/* though it might not be necessary. */ \
CADICAL_assert (!table[i].name || !strcmp (table[i].name, #N)); \
table[i] = {#N, (int) (V), (int) (L), (int) (H), \
(int) (O), (bool) (P), D}; \
prev = #N; \
i++; \
} while (0);
char * name
Definition main.h:24
int strcmp()

◆ OPTION [3/9]

#define OPTION ( N,
V,
L,
H,
O,
P,
R,
D )
Value:
initialize_from_environment (N, #N, L, H);

◆ OPTION [4/9]

#define OPTION ( N,
V,
L,
H,
O,
P,
R,
D )
Value:
if (N != (V)) \
different++; \
if (verbose || N != (V)) { \
if ((L) == 0 && (H) == 1) { \
snprintf (buffer, sizeof buffer, "--" #N "=%s", \
(N ? "true" : "false")); \
MSG (" %s%-30s%s (%s default %s'%s'%s)", \
((N == (V)) ? "" : tout.bright_yellow_code ()), buffer, \
((N == (V)) ? "" : tout.normal_code ()), \
((N == (V)) ? "same as" : "different from"), \
((N == (V)) ? tout.green_code () : tout.yellow_code ()), \
(bool) (V) ? "true" : "false", tout.normal_code ()); \
} else { \
snprintf (buffer, sizeof buffer, "--" #N "=%d", N); \
MSG (" %s%-30s%s (%s default %s'" #V "'%s)", \
((N == (V)) ? "" : tout.bright_yellow_code ()), buffer, \
((N == (V)) ? "" : tout.normal_code ()), \
((N == (V)) ? "same as" : "different from"), \
((N == (V)) ? tout.green_code () : tout.yellow_code ()), \
tout.normal_code ()); \
} \
}
const char * normal_code()
Definition terminal.hpp:80
const char * green_code()
Definition terminal.hpp:76
const char * bright_yellow_code()
Definition terminal.hpp:75
const char * yellow_code()
Definition terminal.hpp:74

◆ OPTION [5/9]

#define OPTION ( N,
V,
L,
H,
O,
P,
R,
D )
Value:
if ((L) == 0 && (H) == 1) \
printf (" %-26s " D " [%s]\n", "--" #N "=bool", \
(bool) (V) ? "true" : "false"); \
else \
printf (" %-26s " D " [" #V "]\n", "--" #N "=" #L ".." #H);

◆ OPTION [6/9]

#define OPTION ( N,
V,
L,
H,
O,
P,
R,
D )
Value:
do { \
if (!(O)) \
break; \
const int64_t factor1 = ((O) == 1 ? factor2 : factor10); \
int64_t new_val = factor1 * (int64_t) (V); \
if (new_val > (H)) \
new_val = (H); \
if (new_val == (int) (V)) \
break; \
LOG ("optimization mode '%d' for '%s' " \
"gives '%" PRId64 "' instead of '%d", \
val, #N, new_val, (int) (V)); \
CADICAL_assert (new_val <= INT_MAX); \
N = (int) new_val; \
increased++; \
} while (0);

◆ OPTION [7/9]

#define OPTION ( N,
V,
L,
H,
O,
P,
R,
D )
Value:
do { \
if (!(P)) \
break; \
if (!(N)) \
break; \
LOG ("plain mode disables '%s'", #N); \
CADICAL_assert ((L) == 0); \
CADICAL_assert ((H) == 1); \
count++; \
N = 0; \
} while (0);

◆ OPTION [8/9]

#define OPTION ( N,
V,
L,
H,
O,
P,
R,
D )
Value:
do { \
if (!(R)) \
break; \
if (N == (V)) \
break; \
LOG ("resetting option '%s' to default %s", #N, #V); \
count++; \
N = (int) (V); \
} while (0);

◆ OPTION [9/9]

#define OPTION ( N,
V,
L,
H,
O,
P,
R,
D )
Value:
if ((N) == (int) (V)) \
LOG ("keeping non default option '--%s=%s'", #N, #V); \
else if ((N) != (int) (V)) { \
LOG ("overwriting default option by '--%s=%d'", #N, N); \
other.N = N; \
}