21,781 research outputs found
Logic programming in the context of multiparadigm programming: the Oz experience
Oz is a multiparadigm language that supports logic programming as one of its
major paradigms. A multiparadigm language is designed to support different
programming paradigms (logic, functional, constraint, object-oriented,
sequential, concurrent, etc.) with equal ease. This article has two goals: to
give a tutorial of logic programming in Oz and to show how logic programming
fits naturally into the wider context of multiparadigm programming. Our
experience shows that there are two classes of problems, which we call
algorithmic and search problems, for which logic programming can help formulate
practical solutions. Algorithmic problems have known efficient algorithms.
Search problems do not have known efficient algorithms but can be solved with
search. The Oz support for logic programming targets these two problem classes
specifically, using the concepts needed for each. This is in contrast to the
Prolog approach, which targets both classes with one set of concepts, which
results in less than optimal support for each class. To explain the essential
difference between algorithmic and search programs, we define the Oz execution
model. This model subsumes both concurrent logic programming
(committed-choice-style) and search-based logic programming (Prolog-style).
Instead of Horn clause syntax, Oz has a simple, fully compositional,
higher-order syntax that accommodates the abilities of the language. We
conclude with lessons learned from this work, a brief history of Oz, and many
entry points into the Oz literature.Comment: 48 pages, to appear in the journal "Theory and Practice of Logic
Programming
A Practical Type Analysis for Verification of Modular Prolog Programs
Regular types are a powerful tool for computing very precise descriptive types for logic programs. However, in the context of real life, modular Prolog programs, the accurate results obtained by regular types often come at the price of efficiency. In this paper we propose a combination of techniques aimed at improving analysis efficiency in this context. As a first technique we allow optionally reducing the accuracy of inferred types by using only the types defined by the user or present in the libraries. We claim that, for the purpose of verifying type signatures given in the form of assertions the precision obtained using this approach is sufficient, and show that analysis times can be reduced significantly. Our second technique is aimed at dealing with situations where we would like to limit the amount of reanalysis performed, especially for library modules. Borrowing some ideas from polymorphic type systems, we show how to solve the problem by admitting parameters in type specifications. This allows us to compose new call patterns with some pre computed analysis info without losing any information. We argue that together these two techniques contribute to the practical and scalable analysis and verification of types in Prolog programs
A Fuzzy Logic Programming Environment for Managing Similarity and Truth Degrees
FASILL (acronym of "Fuzzy Aggregators and Similarity Into a Logic Language")
is a fuzzy logic programming language with implicit/explicit truth degree
annotations, a great variety of connectives and unification by similarity.
FASILL integrates and extends features coming from MALP (Multi-Adjoint Logic
Programming, a fuzzy logic language with explicitly annotated rules) and
Bousi~Prolog (which uses a weak unification algorithm and is well suited for
flexible query answering). Hence, it properly manages similarity and truth
degrees in a single framework combining the expressive benefits of both
languages. This paper presents the main features and implementations details of
FASILL. Along the paper we describe its syntax and operational semantics and we
give clues of the implementation of the lattice module and the similarity
module, two of the main building blocks of the new programming environment
which enriches the FLOPER system developed in our research group.Comment: In Proceedings PROLE 2014, arXiv:1501.0169
Modular Web Queries — From Rules to Stores
Even with all the progress in Semantic technology, accessing Web
data remains a challenging issue with new Web query languages and approaches
appearing regularly. Yet most of these languages, including W3C approaches
such as XQuery and SPARQL, do little to cope with the explosion of the data
size and schemata diversity and richness on the Web. In this paper we propose
a straightforward step toward the improvement of this situation that is simple to
realize and yet effective: Advanced module systems that make partitioning of (a)
the evaluation and (b) the conceptual design of complex Web queries possible.
They provide the query programmer with a powerful, but easy to use high-level
abstraction for packaging, encapsulating, and reusing conceptually related parts
(in our case, rules) of a Web query. The proposed module system combines ease
of use thanks to a simple core concept, the partitioning of rules and their consequences
in flexible “stores”, with ease of deployment thanks to a reduction
semantics. We focus on extending the rule-based Semantic Web query language
Xcerpt with such a module system though the same approach can be applied to
other (rule-based) languages as well
A Generic Module System forWeb Rule Languages: Divide and Rule
An essential feature in practically usable programming languages is
the ability to encapsulate functionality in reusable modules. Modules make large
scale projects tractable by humans. For Web and Semantic Web programming,
many rule-based languages, e.g. XSLT, CSS, Xcerpt, SWRL, SPARQL, and RIF
Core, have evolved or are currently evolving. Rules are easy to comprehend
and specify, even for non-technical users, e.g. business managers, hence easing
the contributions to the Web. Unfortunately, those contributions are arguably
doomed to exist in isolation as most rule languages are conceived without modularity,
hence without an easy mechanism for integration and reuse. In this paper
a generic module system applicable to many rule languages is presented. We
demonstrate and apply our generic module system to a Datalog-like rule language,
close in spirit to RIF Core. The language is gently introduced along the
EU-Rent use case. Using the Reuseware Composition Framework, the module
system for a concrete language can be achieved almost for free, if it adheres to
the formal notions introduced in this paper
- …