4,359 research outputs found
Pengines: Web Logic Programming Made Easy
When developing a (web) interface for a deductive database, functionality
required by the client is provided by means of HTTP handlers that wrap the
logical data access predicates. These handlers are responsible for converting
between client and server data representations and typically include options
for paginating results. Designing the web accessible API is difficult because
it is hard to predict the exact requirements of clients. Pengines changes this
picture. The client provides a Prolog program that selects the required data by
accessing the logical API of the server. The pengine infrastructure provides
general mechanisms for converting Prolog data and handling Prolog
non-determinism. The Pengines library is small (2000 lines Prolog, 150 lines
JavaScript). It greatly simplifies defining an AJAX based client for a Prolog
program and provides non-deterministic RPC between Prolog processes as well as
interaction with Prolog engines similar to Paul Tarau's engines. Pengines are
available as a standard package for SWI-Prolog 7.Comment: To appear in Theory and Practice of Logic Programmin
Approaches to Interpreter Composition
In this paper, we compose six different Python and Prolog VMs into 4 pairwise
compositions: one using C interpreters; one running on the JVM; one using
meta-tracing interpreters; and one using a C interpreter and a meta-tracing
interpreter. We show that programs that cross the language barrier frequently
execute faster in a meta-tracing composition, and that meta-tracing imposes a
significantly lower overhead on composed programs relative to mono-language
programs.Comment: 33 pages, 1 figure, 9 table
Applying Prolog to Develop Distributed Systems
Development of distributed systems is a difficult task. Declarative
programming techniques hold a promising potential for effectively supporting
programmer in this challenge. While Datalog-based languages have been actively
explored for programming distributed systems, Prolog received relatively little
attention in this application area so far. In this paper we present a
Prolog-based programming system, called DAHL, for the declarative development
of distributed systems. DAHL extends Prolog with an event-driven control
mechanism and built-in networking procedures. Our experimental evaluation using
a distributed hash-table data structure, a protocol for achieving Byzantine
fault tolerance, and a distributed software model checker - all implemented in
DAHL - indicates the viability of the approach
Towards a Rule Interchange Language for the Web
This articles discusses rule languages that are needed for a a
full deployment of the SemanticWeb. First, it motivates the need for such
languages. Then, it presents ten theses addressing (1) the rule and/or
logic languages needed on the Web, (2) data and data processing, (3)
semantics, and (4) engineering and rendering issues. Finally, it discusses
two options that might be chosen in designing a Rule Interchange Format
for the Web
Improving Prolog Programs: Refactoring for Prolog
Refactoring is an established technique from the OO-community to restructure
code: it aims at improving software readability, maintainability and
extensibility. Although refactoring is not tied to the OO-paradigm in
particular, its ideas have not been applied to Logic Programming until now.
This paper applies the ideas of refactoring to Prolog programs. A catalogue
is presented listing refactorings classified according to scope. Some of the
refactorings have been adapted from the OO-paradigm, while others have been
specifically designed for Prolog. Also the discrepancy between intended and
operational semantics in Prolog is addressed by some of the refactorings.
In addition, ViPReSS, a semi-automatic refactoring browser, is discussed and
the experience with applying \vipress to a large Prolog legacy system is
reported. Our main conclusion is that refactoring is not only a viable
technique in Prolog but also a rather desirable one.Comment: To appear in ICLP 200
Logic Programming Applications: What Are the Abstractions and Implementations?
This article presents an overview of applications of logic programming,
classifying them based on the abstractions and implementations of logic
languages that support the applications. The three key abstractions are join,
recursion, and constraint. Their essential implementations are for-loops, fixed
points, and backtracking, respectively. The corresponding kinds of applications
are database queries, inductive analysis, and combinatorial search,
respectively. We also discuss language extensions and programming paradigms,
summarize example application problems by application areas, and touch on
example systems that support variants of the abstractions with different
implementations
- …