203 research outputs found
Tabling with Sound Answer Subsumption
Tabling is a powerful resolution mechanism for logic programs that captures
their least fixed point semantics more faithfully than plain Prolog. In many
tabling applications, we are not interested in the set of all answers to a
goal, but only require an aggregation of those answers. Several works have
studied efficient techniques, such as lattice-based answer subsumption and
mode-directed tabling, to do so for various forms of aggregation.
While much attention has been paid to expressivity and efficient
implementation of the different approaches, soundness has not been considered.
This paper shows that the different implementations indeed fail to produce
least fixed points for some programs. As a remedy, we provide a formal
framework that generalises the existing approaches and we establish a soundness
criterion that explains for which programs the approach is sound.
This article is under consideration for acceptance in TPLP.Comment: Paper presented at the 32nd International Conference on Logic
Programming (ICLP 2016), New York City, USA, 16-21 October 2016, 15 pages,
LaTeX, 0 PDF figure
Tabling as a Library with Delimited Control
Tabling is probably the most widely studied extension of Prolog. But despite
its importance and practicality, tabling is not implemented by most Prolog
systems. Existing approaches require substantial changes to the Prolog engine,
which is an investment out of reach of most systems. To enable more widespread
adoption, we present a new implementation of tabling in under 600 lines of
Prolog code. Our lightweight approach relies on delimited control and provides
reasonable performance.Comment: 15 pages. To appear in Theory and Practice of Logic Programming
(TPLP), Proceedings of ICLP 201
Mode-Directed Tabling and Applications in the YapTab System
Tabling is an implementation technique that solves some limitations of Prolog\u27s operational semantics in dealing with recursion and redundant sub-computations. Tabling works by memorizing generated answers and then by reusing them on similar calls that appear during the resolution process. In a traditional tabling system, all the arguments of a tabled subgoal call are considered when storing answers into the table space. Traditional tabling systems are thus very good for problems that require finding all answers. Mode-directed tabling is an extension to the tabling technique that supports the definition of selective criteria for specifying how answers are inserted into the table space. Implementations of mode-directed tabling are already available in systems like ALS-Prolog, B-Prolog and XSB. In this paper, we propose a more general approach to the declaration and use of mode-directed tabling, implemented on top of the YapTab tabling system, and we show applications of our approach to problems involving Justification, Preferences and Answer Subsumption
Planning as Tabled Logic Programming
This paper describes Picat's planner, its implementation, and planning models
for several domains used in International Planning Competition (IPC) 2014.
Picat's planner is implemented by use of tabling. During search, every state
encountered is tabled, and tabled states are used to effectively perform
resource-bounded search. In Picat, structured data can be used to avoid
enumerating all possible permutations of objects, and term sharing is used to
avoid duplication of common state data. This paper presents several modeling
techniques through the example models, ranging from designing state
representations to facilitate data sharing and symmetry breaking, encoding
actions with operations for efficient precondition checking and state updating,
to incorporating domain knowledge and heuristics. Broadly, this paper
demonstrates the effectiveness of tabled logic programming for planning, and
argues the importance of modeling despite recent significant progress in
domain-independent PDDL planners.Comment: 27 pages in TPLP 201
The PITA System: Tabling and Answer Subsumption for Reasoning under Uncertainty
Many real world domains require the representation of a measure of
uncertainty. The most common such representation is probability, and the
combination of probability with logic programs has given rise to the field of
Probabilistic Logic Programming (PLP), leading to languages such as the
Independent Choice Logic, Logic Programs with Annotated Disjunctions (LPADs),
Problog, PRISM and others. These languages share a similar distribution
semantics, and methods have been devised to translate programs between these
languages. The complexity of computing the probability of queries to these
general PLP programs is very high due to the need to combine the probabilities
of explanations that may not be exclusive. As one alternative, the PRISM system
reduces the complexity of query answering by restricting the form of programs
it can evaluate. As an entirely different alternative, Possibilistic Logic
Programs adopt a simpler metric of uncertainty than probability. Each of these
approaches -- general PLP, restricted PLP, and Possibilistic Logic Programming
-- can be useful in different domains depending on the form of uncertainty to
be represented, on the form of programs needed to model problems, and on the
scale of the problems to be solved. In this paper, we show how the PITA system,
which originally supported the general PLP language of LPADs, can also
efficiently support restricted PLP and Possibilistic Logic Programs. PITA
relies on tabling with answer subsumption and consists of a transformation
along with an API for library functions that interface with answer subsumption
- …