13#if !defined(VITA_CORE_INTERPRETER_H)
14#define VITA_CORE_INTERPRETER_H
54 [[nodiscard]]
virtual terminal_param_t fetch_param()
const = 0;
56 [[nodiscard]]
virtual value_t fetch_var(
unsigned) {
return {}; }
71 value_t run() {
return run_nvi(); }
72 [[nodiscard]]
double penalty() {
return penalty_nvi(); }
73 [[nodiscard]]
bool is_valid()
const {
return is_valid_nvi(); }
77 virtual double penalty_nvi() = 0;
78 virtual bool is_valid_nvi()
const = 0;
Minimum interface of an interpreter.
An interface for parameter passing to functions / terminals.
virtual value_t fetch_arg(unsigned)=0
Fetches a specific input parameter assuming referential transparency.
virtual value_t fetch_opaque_arg(unsigned)=0
Fetches a specific input parameter without assuming referential transparency.
value_t operator[](unsigned i)
Equivalent to fetch_arg().
The main namespace for the project.
value_t run(const T &ind)
A handy short-cut for one-time execution of an individual.
std::variant< D_VOID, D_INT, D_DOUBLE, D_STRING > value_t
A variant containing the data types used by the interpreter for internal calculations / output value ...