Hostname: page-component-74656f9884-npj9w Total loading time: 0 Render date: 2026-11-07T00:41:51.220Z Has data issue: false hasContentIssue false

Inlining External Sources in Answer Set Programs

Published online by Cambridge University Press:  11 February 2019

CHRISTOPH REDL*
Affiliation:
Institute of Logic and Computation, Vienna University of Technology, Favoritenstraße 9-11, A-1040 Vienna, Austria (e-mail: redl@kr.tuwien.ac.at)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

hex-programs are an extension of answer set programs (ASP) with external sources. To this end, external atoms provide a bidirectional interface between the program and an external source. The traditional evaluation algorithm for hex-programs is based on guessing truth values of external atoms and verifying them by explicit calls of the external source. The approach was optimized by techniques that reduce the number of necessary verification calls or speed them up, but the remaining external calls are still expensive. In this paper, we present an alternative evaluation approach based on inlining of external atoms, motivated by existing but less general approaches for specialized formalisms such as DL-programs. External atoms are then compiled away such that no verification calls are necessary. The approach is implemented in the dlvhex reasoner. Experiments show a significant performance gain. Besides performance improvements, we further exploit inlining for extending previous (semantic) characterizations of program equivalence from ASP to hex-programs, including those of strong equivalence, uniform equivalence, and $\langle\mathcal{H},\mathcal{B}\rangle$- equivalence. Finally, based on these equivalence criteria, we characterize also inconsistency of programs w.r.t. extensions. Since well-known ASP extensions (such as constraint ASP) are special cases of hex, the results are interesting beyond the particular formalism.

Information

Type
Original Article
Copyright
Copyright © Cambridge University Press 2019