potassco / asprin

💊 Qualitative and quantitative optimization in answer set programming
https://potassco.org/
MIT License
19 stars 3 forks source link

How to get JSON output #10

Open stessaris opened 2 years ago

stessaris commented 2 years ago

With clingo you can use the --outf=2 argument to generate JSON output, and the --clingo-help of asprin states that it can be used as well. However, by using it you get a RuntimeError from clingo.Controller in Asprin. __get_control.

I guess that outf argument is not supported by the clingo Python API. I guess that --clingo-help should mention only the options that can be used.

Is there any way to get JSON output from asprin?

javier-romero commented 2 years ago

Thank you @stessaris!

You are right, clingo--help should only mention the options that can be used.

And unfortunately, the answer to the last question is no, but this is a nice feature to have in the next release.