1

When I run gringo on my program, it results into many grounded statements of the form

:- foo(a,b).

Then I also obtain many grounded constraints such as:

:- bar(a,x,y), foo(a,b).

Given the knowledge above, these are totally useless.

Note, these are both grounded versions of a rule in the following form:

:- foo(I, J), bar(I, X, B), quux(J, X, @f(B)).

Why are the grounded rules even present in the output? Why won't gringo just exclude foo(a,b) from the set of grounded atoms? Can I disable it somehow? The gringo output of my program is bloated by this and signifiacantly slows it down.

user1747134
  • 2,374
  • 1
  • 19
  • 26
  • If I understand gringo correctly, the rule you've given will not generate the grounded constraints you've given, it will generate grounded constraints which are conjunctions of all three predicates, e.g.: :- foo(a,b), bar(a,c,d), quux(b,c,e). Do you have other rules generating those constraints? Do I misunderstand gringo? – Ivan Uemlianin Oct 27 '17 at 08:02
  • You understand correctly. – user1747134 Nov 01 '17 at 11:33
  • In which case you must have other rules generating those grounded constraints. – Ivan Uemlianin Nov 01 '17 at 15:46

1 Answers1

0

You can use #show directive to display only the results that you want to see e.g.,

#show foo/2.
#show bar/3.
NTP
  • 4,338
  • 3
  • 16
  • 24