3,644 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
Interning Ground Terms in XSB
This paper presents an implementation of interning of ground terms in the XSB
Tabled Prolog system. This is related to the idea of hash-consing. I describe
the concept of interning atoms and discuss the issues around interning ground
structured terms, motivating why tabling Prolog systems may change the
cost-benefit tradeoffs from those of traditional Prolog systems. I describe the
details of the implementation of interning ground terms in the XSB Tabled
Prolog System and show some of its performance properties. This implementation
achieves the effects of that of Zhou and Have but is tuned for XSB's
representations and is arguably simpler.Comment: Proceedings of the 13th International Colloquium on Implementation of
Constraint LOgic Programming Systems (CICLOPS 2013), Istanbul, Turkey, August
25, 201
Description and Optimization of Abstract Machines in a Dialect of Prolog
In order to achieve competitive performance, abstract machines for Prolog and
related languages end up being large and intricate, and incorporate
sophisticated optimizations, both at the design and at the implementation
levels. At the same time, efficiency considerations make it necessary to use
low-level languages in their implementation. This makes them laborious to code,
optimize, and, especially, maintain and extend. Writing the abstract machine
(and ancillary code) in a higher-level language can help tame this inherent
complexity. We show how the semantics of most basic components of an efficient
virtual machine for Prolog can be described using (a variant of) Prolog. These
descriptions are then compiled to C and assembled to build a complete bytecode
emulator. Thanks to the high level of the language used and its closeness to
Prolog, the abstract machine description can be manipulated using standard
Prolog compilation and optimization techniques with relative ease. We also show
how, by applying program transformations selectively, we obtain abstract
machine implementations whose performance can match and even exceed that of
state-of-the-art, highly-tuned, hand-crafted emulators.Comment: 56 pages, 46 figures, 5 tables, To appear in Theory and Practice of
Logic Programming (TPLP
A new module system for prolog
It is now widely accepted that separating programs into modules has proven very useful in program development and maintenance. While many Prolog implementations include useful module systems, we feel that these systems can be improved in a number of ways, such as, for example, being more amenable to effective global analysis and allowing sepárate compilation or sensible creation of standalone executables. We discuss a number of issues related to the design of such an improved module system for Prolog. Based on this, we present the choices made in the Ciao module system, which has been designed to meet a number of objectives: allowing sepárate compilation, extensibility in features and in syntax, amenability to modular global analysis, etc
kLog: A Language for Logical and Relational Learning with Kernels
We introduce kLog, a novel approach to statistical relational learning.
Unlike standard approaches, kLog does not represent a probability distribution
directly. It is rather a language to perform kernel-based learning on
expressive logical and relational representations. kLog allows users to specify
learning problems declaratively. It builds on simple but powerful concepts:
learning from interpretations, entity/relationship data modeling, logic
programming, and deductive databases. Access by the kernel to the rich
representation is mediated by a technique we call graphicalization: the
relational representation is first transformed into a graph --- in particular,
a grounded entity/relationship diagram. Subsequently, a choice of graph kernel
defines the feature space. kLog supports mixed numerical and symbolic data, as
well as background knowledge in the form of Prolog or Datalog programs as in
inductive logic programming systems. The kLog framework can be applied to
tackle the same range of tasks that has made statistical relational learning so
popular, including classification, regression, multitask learning, and
collective classification. We also report about empirical comparisons, showing
that kLog can be either more accurate, or much faster at the same level of
accuracy, than Tilde and Alchemy. kLog is GPLv3 licensed and is available at
http://klog.dinfo.unifi.it along with tutorials
- …