Show statements rework #477
Replies: 4 comments 4 replies
-
This sounds like a really nice feature. There are many occasions where this would have helped me avoid needing to use python to post-process the model. It would be non-trivial to implement efficiently, as the show syntax would basically be an SQL-like query language. But, if it were to be added it would also be useful to have an API call to control whether to process the shows for a given model. |
Beta Was this translation helpful? Give feedback.
-
In principle one could ground the show statements individually for each model but this would only be possible in clingo. This is nothing that can easily be added to the current system that is designed to also provide grounder and solver separately. However, one could write a system based on the clingo API that offers a feature like this. |
Beta Was this translation helpful? Give feedback.
-
I guess it would be very easy to provide a python executable that works exactly like clingo, that first filters out any show statements, then does all the solving, and in the end uses the show statement to print solutions. |
Beta Was this translation helpful? Give feedback.
-
I have a further remark related to |
Beta Was this translation helpful? Give feedback.
-
Quite often we encounter encodings where people use output formatting (show statements, additional calculation in the encoding). This can lead to serious performance degradation, especially in the presence of aggregates.
Given the following example:
clingo (clasp) introduces variables and constraints for the show statement. We have a nice separation between instance and encoding, and I would like to think about a similar separation of solving and output. Show statements shouldn't effect the search process, so users can use these more freely.
Do you think it would be possible/is worth to:
I think that these changes would make ASP more accessible for the average user that does not might expect that show statements have an impact on the performance of a system.
Beta Was this translation helpful? Give feedback.
All reactions