Clingo
Loading...
Searching...
No Matches
base-theory.c

The example shows how to inspect and use theory atoms.

The example shows how to inspect and use theory atoms.This is a very simple example that uses the ProgramBuilder to let theory atoms affect answer sets. In general, the backend can be used to implement a custom theory by translating it to a logic program. On the other hand, a Propagator can be used to implement a custom theory without adding any constraints in advance. Or both approaches can be combined.

Output

./theory-atoms 0
number of grounded theory atoms: 2
theory atom b/1 has a guard: true
Model: y
Model: x y

Code

// NOLINTNEXTLINE(bugprone-reserved-identifier)
#define __STDC_FORMAT_MACROS
#include <stdio.h>
int main(int argc, char *argv[]) {
(void)argc;
(void)argv;
printf("TODO\n");
return 0;
}