sat-solver/automata.hpp

54 lines
1.3 KiB
C++

#ifndef STRUCT_AUTOMATA
#define STRUCT_AUTOMATA
#include <cmdln_flags.hpp>
struct automata
{
public:
bool is_accepting = false;
struct automata *on[2] = {NULL, NULL};
public:
static struct automata* new_variable(
int depth,
bool verbose,
unsigned variable_index,
bool value,
unsigned number_of_variables);
static struct automata* complement(
const struct automata* original);
static struct automata* union_(
int depth,
bool verbose,
const struct automata* left,
const struct automata* right);
static struct automata* intersect(
int depth,
bool verbose,
const struct automata* left,
const struct automata* right);
static struct automata* eliminate_dead_code(
int depth,
bool verbose,
const struct automata* original);
static struct automata* simplify(
int depth,
bool verbose,
const struct automata* original);
static void dump(struct automata*, const char* fmt, ...);
static void free(struct automata*);
};
#endif