Hostname: page-component-77f85d65b8-v2srd Total loading time: 0 Render date: 2026-03-28T07:57:03.221Z Has data issue: false hasContentIssue false

On the Foundations of Grounding in Answer Set Programming

Published online by Cambridge University Press:  25 July 2022

ROLAND KAMINSKI
Affiliation:
University of Potsdam, Potsdam, Germany (e-mails: kaminski@cs.uni-potsdam.de, torsten@cs.uni-potsdam.de)
TORSTEN SCHAUB
Affiliation:
University of Potsdam, Potsdam, Germany (e-mails: kaminski@cs.uni-potsdam.de, torsten@cs.uni-potsdam.de)
Rights & Permissions [Opens in a new window]

Abstract

We provide a comprehensive elaboration of the theoretical foundations of variable instantiation, or grounding, in Answer Set Programming (ASP). Building on the semantics of ASP’s modeling language, we introduce a formal characterization of grounding algorithms in terms of (fixed point) operators. A major role is played by dedicated well-founded operators whose associated models provide semantic guidance for delineating the result of grounding along with on-the-fly simplifications. We address an expressive class of logic programs that incorporates recursive aggregates and thus amounts to the scope of existing ASP modeling languages. This is accompanied with a plain algorithmic framework detailing the grounding of recursive aggregates. The given algorithms correspond essentially to the ones used in the ASP grounder gringo.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2022. Published by Cambridge University Press
Figure 0

Fig. 1. Rule dependencies for Example 19.

Figure 1

Fig. 2. Rule dependencies for the company controls encoding and instance in Example 10 where $c={\mathit{company}}$, $o={\mathit{owns}}$, and $s={\mathit{controls}}$.

Figure 2

Algorithm 1: Grounding Rules

Figure 3

Algorithm 2: Grounding Components

Figure 4

Algorithm 3: Grounding Programs

Figure 5

Table 1. Grounding of components ${{P}_{5,1}}$, ${{P}_{5,2}}$, ${{P}_{6}}$, and ${{P}_{7}}$ from Example 19 where $\mathtt{GroundComponent}Short = \mathtt{GroundComponent}$

Figure 6

Table 2. Grounding of Example 19 as output by gringo

Figure 7

Table 3. Tracing grounding of component ${{P}_{9}}$ where $c={\mathit{company}}$, $o={\mathit{owns}}$, and $s={\mathit{controls}}$

Figure 8

Table 4. Grounding of the company controls problem from Example 10 as output by gringo

Supplementary material: PDF

Kaminski and Schaub supplementary material

Kaminski and Schaub supplementary material

Download Kaminski and Schaub supplementary material(PDF)
PDF 608.9 KB