Theory backend to build theory atoms.
More...
#include <backend.hh>
Theory backend to build theory atoms.
◆ atom()
Add a theory atom.
If an equivalent theory atom already exists, the function returns its associated program atom. If no equivalent theory atom exists and the provided program atom is engaged, a new theory atom is created using this program atom, and the function returns it. If the provided program atom is not engaged, a new theory atom is created and assigned a fresh program atom, and the function returns the newly created program atom.
- Parameters
-
atom | an optional program atom to assign |
name | the symbol representing the name of the atom |
elements | the theory elements of the atom |
guard | the optional guard of the atom |
- Returns
- the resulting term id
◆ element()
Add a theory element.
- Parameters
-
tuple | the theory term tuple of the element |
condition | the program literals forming the condition |
- Returns
- the resulting term id
◆ function()
Add a theory function.
- Parameters
-
name | the name of the function |
elements | the arguments of the function |
- Returns
- the resulting term id
◆ number()
Add a numeric theory term.
- Parameters
-
number | the value of the term |
- Returns
- the resulting term id
◆ sequence()
Add a theory term sequence.
- Parameters
-
type | the type of the sequence |
elements | the elements of the sequence |
- Returns
- the resulting term id
◆ string()
auto Clingo::TheoryBackend::string |
( |
std::string_view |
string | ) |
const -> ProgramId |
|
inline |
Add a string theory term.
Includes constants as well as quoted strings.
- Parameters
-
string | the value of the term |
- Returns
- the resulting term id
◆ symbol()
Convert the given symbol into a theory term.
- Parameters
-
symbol | the symbol to convert |
- Returns
- the resulting term id
The documentation for this class was generated from the following file: