Clingo
|
Abstract class connecting grounder and theory data. More...
#include <backend.hh>
Public Member Functions | |
virtual | ~TheoryBackend ()=default |
Destroy the backend. | |
void | num (prg_id_t id, prg_weight_t num) |
Add a theory number. | |
void | str (prg_id_t id, std::string_view str) |
Add a theory string. | |
void | fun (prg_id_t id, prg_id_t name, PrgIdSpan args) |
Add a theory function. | |
void | tup (prg_id_t id, TheoryTermTupleType type, PrgIdSpan args) |
Add a theory tuple. | |
void | elem (prg_id_t id, PrgIdSpan terms, PrgLitSpan cond) |
Add a theory element. | |
void | atom (prg_lit_t atom_or_zero, prg_id_t name, PrgIdSpan elems, std::optional< std::pair< prg_id_t, prg_id_t > > guard) |
Add a theory atom. | |
void | end () |
Finalize the theory. | |
Abstract class connecting grounder and theory data.
|
inline |
Add a theory atom.
atom_or_zero | the literal of the atom (zero for directives) |
name | the name of the atom (must be a function or symbol) |
elems | the elements of the atom |
guard | the optional guard of the atom |
|
inline |
Add a theory element.
id | the unique element id |
terms | the terms forming the tuple |
cond | the condition of the element |
Add a theory function.
id | the unique term id |
name | the term id of the function name |
args | the term ids of the arguments |
|
inline |
Add a theory number.
id | the unique term id |
num | the number |
|
inline |
Add a theory string.
id | the unique term id |
str | the string |
|
inline |
Add a theory tuple.
id | the unique term id |
type | the type of the tuple |
args | the term ids of the arguments |