potassco / clingo

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

Grounder output description #511

Closed joshuaguerin closed 2 months ago

joshuaguerin commented 2 months ago

I've gone through the documentation, searched a bit in the email repo, and can't find documentation on the --gringo grounding output.

When I run even the simplest program:

a(1..3).

the grounder produces a lot of seemingly useful information:

asp 1 0 0
1 0 1 1 0 0
1 0 1 2 0 0
1 0 1 3 0 0
4 4 a(1) 0
4 4 a(2) 0
4 4 a(3) 0
0

I've been searching around, but I haven't been able to find a description of exactly what the output means. Where would I find documentation on how to read gringo output?

BenKaufmann commented 2 months ago

You can read about the intermediate language aspif e.g. here and here.

joshuaguerin commented 2 months ago

That looks like exactly what I was missing. Thanks @BenKaufmann !