Practical Applications of Extended Deductive Databases in Datalog ⋆ (original) (raw)

Aggregation in Disjunctive Deductive Databases

1999

Practical applications of deductive databases often require the use of extended features like disjunctive information, aggregation operators or default negation. But it has been unclear how one could deal with aggregation in the presense of recursion and disjunction. Usually, there is the requirement that deductive databases must be stratified w.r.t. aggregation, i.e. a predicate q that is defined using aggregation based on some other predicate p may not be used for deriving this other predicate p. Disjunctive deductive databases extend the classical Datalog language by disjunction, default negation, and function symbols. 1 There are practical examples that require non-- stratified aggregation in disjunctive deductive databases. We will present a clear declarative set semantics for disjunctive deductive databases P with aggregation. The semantics is based on a special program transformation, which replaces an aggregation by a suitable construct using default negation and the func...

Extending the power of datalog recursion

The VLDB Journal, 2012

Supporting aggregates in recursive logic rules represents a very important problem for Datalog. To solve this problem, we propose a simple extension, called Datalog F S (Datalog extended with frequency support goals), that supports queries and reasoning about the number of distinct variable assignments satisfying given goals, or conjunctions of goals, in rules. This monotonic extension greatly enhances the power of Datalog, while preserving (i) its declarative semantics and (ii) its amenability to efficient implementation via differential fixpoint and other optimization techniques presented in the paper. Thus, Datalog F S enables the efficient formulation of queries that could not be expressed efficiently or could not be expressed at all in Datalog with stratified negation and aggregates. In fact, using a generalized notion of multiplicity called frequency, we show that diffusion models and page rank computations can be easily expressed and efficiently implemented using Datalog F S .

A declarative extension of horn clauses, and its significance for datalog and its applications

Theory and Practice of Logic Programming, 2013

FS-rules provide a powerful monotonic extension for Horn clauses that supports monotonic aggregates in recursion by reasoning on the multiplicity of occurrences satisfying existential goals. The least fixpoint semantics, and its equivalent least model semantics, hold for logic programs with FS-rules; moreover, generalized notions of stratification and stable models are easily derived when negated goals are allowed. Finally, the generalization of techniques such as seminaive fixpoint and magic sets, make possible the efficient implementation of DatalogFS, i.e., Datalog with rules with Frequency Support (FS-rules) and stratified negation. A large number of applications that could not be supported efficiently, or could not be expressed at all in stratified Datalog can now be easily expressed and efficiently supported in DatalogFSand a powerful DatalogFSsystem is now being developed at UCLA.

THE DATALOG DL COMBINATION OF DEDUCTION RULES AND DESCRIPTION LOGICS

Computational Intelligence, 2007

Uniting ontologies and rules has become a central topic in the Semantic Web. Bridging the discrepancy between these two knowledge representations, this paper introduces Datalog DL as a family of hybrid languages, where Datalog rules are parameterized by various DL (description logic) languages ranging from ALC to SHIQ. Making Datalog DL a decidable system with complexity of EXPTIME, we propose independent properties in the DL body as the restriction to hybrid rules, and weaken the safeness condition to balance the trade-off between expressivity and reasoning power. Building on existing well-developed techniques, we present a principled approach to enrich (RuleML) rules with information from (OWL) ontologies, and develop a prototype system combining a rule engine (OO jDREW) with a DL reasoner (RACER).

Disjunctive datalog with existential quantifiers: Semantics, decidability, and complexity issues

Theory and Practice of Logic Programming, 2012

Datalog is one of the best-known rule-based languages, and extensions of it are used in a wide context of applications. An important Datalog extension is Disjunctive Datalog, which significantly increases the expressivity of the basic language. Disjunctive Datalog is useful in a wide range of applications, ranging from Databases (e.g., Data Integration) to Artificial Intelligence (e.g., diagnosis and planning under incomplete knowledge). However, in recent years an important shortcoming of Datalog-based languages became evident, e.g. in the context of data-integration (consistent query-answering, ontology-based data access) and Semantic Web applications: The language does not permit any generation of and reasoning with unnamed individuals in an obvious way. In general, it is weak in supporting many cases of existential quantification. To overcome this problem, Datalog ∃ has recently been proposed, which extends traditional Datalog by existential quantification in rule heads. In this work, we propose a natural extension of Disjunctive Datalog and Datalog ∃ , called Datalog ∃,∨ , which allows both disjunctions and existential quantification in rule heads and is therefore an attractive language for knowledge representation and reasoning, especially in domains where ontology-based reasoning is needed. We formally define syntax and semantics of the language Datalog ∃,∨ , and provide a notion of instantiation, which we prove to be adequate for Datalog ∃,∨ . A main issue of Datalog ∃ and hence also of Datalog ∃,∨ is that decidability is no longer guaranteed for typical reasoning tasks. In order to address this issue, we identify many decidable fragments of the language, which extend, in a natural way, analog classes defined in the non-disjunctive case. Moreover, we carry out an in-depth complexity analysis, deriving interesting results which range from Logarithmic Space to Exponential Time.

Datalog Rewritability of Disjunctive Datalog Programs and its Applications to Ontology Reasoning

We study the problem of rewriting a disjunctive datalog program into plain datalog. We show that a disjunctive program is rewritable if and only if it is equivalent to a linear disjunctive program, thus providing a novel characterisation of datalog rewritability. Motivated by this result, we propose weakly linear disjunctive datalog-a novel rule-based KR language that extends both datalog and linear disjunctive datalog and for which reasoning is tractable in data complexity. We then explore applications of weakly linear programs to ontology reasoning and propose a tractable extension of OWL 2 RL with disjunctive axioms. Our empirical results suggest that many non-Horn ontologies can be reduced to weakly linear programs and that query answering over such ontologies using a datalog engine is feasible in practice.

Defining datalog in rewriting logic

Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2010

In recent work, the effectiveness of using declarative languages has been demonstrated for many problems in program analysis. Using a simple relational query language, like Datalog, complex interprocedural analyses involving dynamically created objects can be expressed in just a few lines. By exploiting the power of the Rewriting Logic language Maude, we aim at transforming Datalog programs into efficient rewrite systems that compute the same answers. A prototype has been implemented and applied to some real-world Datalog-based analyses. Experimental results show that the performance of solving Datalog queries in rewriting logic is comparable to state-of-the-art Datalog solvers.

Semi-Inflationary DATALOG: A declarative database language with procedural features

2005

This paper presents a rule-based database language which extends stratified DATALOG by adding a controlled form of inflationary fixpoint, immersed in a context of classical stratified negation with least fixpoint. The proposed language, called Semi-Inflationary DATALOG (DATALOG @(*) for short), smoothly combines the declarative purity of stratified negation with the procedural style of the inflationary fixpoint, DATALOG @(*) is particularly suitable to express algorithms in a mixed style: declarative rules, whenever it is natural and convenient, and procedural ones, any time it is easier to list the sequence of single actions. In the latter case, in order not to oblige the programmer to supply unnecessary procedural details, a number of choice constructs are available to express don't care non-determinism. The semantics of a DATALOG @(*) program is given using stable models by means of rule rewriting into a DATALOG program with choice and XY-stratification. In addition the complexity and expressive power of DATALOG @(*) queries is precisely characterized and some lights are put on the related class NQPTIME as well.

Relationlog: A typed extension to Datalog with sets and tuples

The Journal of Logic Programming, 1998

We study the relationships between the correctness of logic program transformation and program termination. We consider de nite programs and we identify somè invariants' of the program transformation process. The validity of these invariants ensures the preservation of the success set semantics, provided that the existential termination of the initial program implies the existential termination of the nal program. We also identify invariants for the preservation of the nite failure set semantics. We consider four very general transformation rules: de nition introduction, definition elimination, i-replacement, and nite failure. Many versions of the transformation rules proposed in the literature, including unfolding, folding, and goal replacement, are instances of the i-replacement rule. By using our proposed invariants which are based on Clark completion, we prove, for our transformation rules, various results concerning the preservation of both the success set and nite failure set semantics. By exploiting some powerful properties of the Clark completion, we are able to derive simple proofs of these preservation results. These proofs are much simpler than those done by induction on the construction of the SLD-trees, like the ones proposed in the literature for related results.