Hostname: page-component-77f85d65b8-5ngxj Total loading time: 0 Render date: 2026-03-29T14:57:12.958Z Has data issue: false hasContentIssue false

Plingo: A System for Probabilistic Reasoning in Answer Set Programming

Published online by Cambridge University Press:  29 November 2024

SUSANA HAHN
Affiliation:
University of Potsdam, Germany (e-mail: susuhahnml@ciencias.unam.mx)
TOMI JANHUNEN
Affiliation:
Tampere University, Finland (e-mail: Tomi.Janhunen@aalto.fi)
ROLAND KAMINSKI
Affiliation:
University of Potsdam, Germany (e-mails: kaminski@cs.uni-potsdam.de, javier@cs.uni-potsdam.de, nruehling@uni-potsdam.de and torsten@cs.uni-potsdam.de)
JAVIER ROMERO
Affiliation:
University of Potsdam, Germany (e-mails: kaminski@cs.uni-potsdam.de, javier@cs.uni-potsdam.de, nruehling@uni-potsdam.de and torsten@cs.uni-potsdam.de)
NICOLAS RÜHLING
Affiliation:
University of Potsdam, Germany (e-mails: kaminski@cs.uni-potsdam.de, javier@cs.uni-potsdam.de, nruehling@uni-potsdam.de and torsten@cs.uni-potsdam.de)
TORSTEN SCHAUB
Affiliation:
University of Potsdam, Germany (e-mails: kaminski@cs.uni-potsdam.de, javier@cs.uni-potsdam.de, nruehling@uni-potsdam.de and torsten@cs.uni-potsdam.de)
Rights & Permissions [Opens in a new window]

Abstract

We present plingo, an extension of the answer set programming (ASP) system clingo that incorporates various probabilistic reasoning modes. Plingo is based on $\textit{Lpmln}^{\pm }$, a simple variant of the probabilistic language Lpmln, which follows a weighted scheme derived from Markov logic. This choice is motivated by the fact that the main probabilistic reasoning modes can be mapped onto enumeration and optimization problems and that $\textit{Lpmln}^{\pm }$ may serve as a middle-ground formalism connecting to other probabilistic approaches. Plingo offers three alternative frontends, for Lpmln, P-log, and ProbLog. These input languages and reasoning modes are implemented by means of clingo’s multi-shot and theory-solving capabilities. In this way, the core of plingo is an implementation of $\textit{Lpmln}^{\pm }$ in terms of modern ASP technology. On top of that, plingo implements a new approximation technique based on a recent method for answer set enumeration in the order of optimality. Additionally, in this work, we introduce a novel translation from $\textit{Lpmln}^{\pm }$ to ProbLog. This leads to a new solving method in plingo where the input program is translated and a ProbLog solver is executed. Our empirical evaluation shows that the different solving approaches of plingo are complementary and that plingo performs similarly to other probabilistic reasoning systems.

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 (https://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), 2024. Published by Cambridge University Press
Figure 0

Listing 1. Lpmln birds example (birds.plp).

Figure 1

Listing 2. Translation of the birds example.

Figure 2

Listing 3. ProbLog tossing coins example (coins.plp).

Figure 3

Listing 4. Translation of the coins example.

Figure 4

Listing 5. P-log dice example (dice.plp).

Figure 5

Listing 6. Translation of the dice example.

Figure 6

Listing 7. Meta-encoding for the frontend of P-log.

Figure 7

Fig 1. System architecture of plingo. The frontends are colored in yellow. Modules of the system are gray boxes. The green flow corresponds to most probable explanation (MPE) inference, the blue one to exact marginal inference, and the red one to approximate inference, all of them using plingo’s internal solving algorithms. The purple flow corresponds to MPE and marginal inference using problog.

Figure 8

Table 1. Average and maximal error (in $\%$) of the approximation method on the Grid domain for different values of $k$

Figure 9

Fig 2. Runtimes of all systems and quality of the approximation method on the Grid domain.

Figure 10

Fig 3. Runtimes of plingo, plog-naive and plog-dco on the P-log domains.

Figure 11

Fig 4. Runtimes of plingo and lpmln2asp on the Lpmln domains.