potassco / clingo

🤔 A grounder and solver for logic programs.
https://potassco.org/clingo
MIT License
601 stars 79 forks source link

left guard attempt #371

Closed jorgefandinno closed 2 years ago

jorgefandinno commented 2 years ago

Hi,

I have looking at the left guard problem. I managed to parse a grammar of the form

term theory_op & theory_atom_name { ... }

term is a term not a theory term, but theory_op it is a theory operator.

libgringo/tests/left_guard.py

contains a test using the python api.

I have a question. I can parse the input, but I don't know how to create the appropriated theory atom. Right now I always create the same guard independently of what I parse. The constructor for a theory atom takes as input a theory term, but I have a regular term.

I assume that I will need to convert the term into a theory term. Does it make sense?