Extended Magic for Negation: Efficient Demand-Driven Evaluation of Stratified Datalog with Precise Complexity Guarantees

09/18/2019
by   K. Tuncay Tekle, et al.
0

Given a set of Datalog rules, facts, and a query, answers to the query can be inferred bottom-up starting from the facts or top-down starting from the query. For efficiency, top-down evaluation is extended with memoization of inferred facts, and bottom-up evaluation is performed after transformations to make rules driven by the demand from the query. Prior work has shown their precise complexity analysis and relationships. However, when Datalog is extended with even stratified negation, which has a simple and universally accepted semantics, transformations to make rules demand-driven may result in non-stratified negation, which has had many complex semantics and evaluation methods. This paper presents (1) a simple extension to demand transformation, a transformation to make rules demand-driven for Datalog without negation, to support stratified negation, and (2) a simple extension to an optimal bottom-up evaluation method for Datalog with stratified negation, to handle non-stratified negation in the resulting rules. We show that the method provides precise complexity guarantees. It is also optimal in that only facts needed for top-down evaluation of the query are inferred and each firing of a rule to infer such a fact takes worst-case constant time. We extend the precise relationship between top-down evaluation and demand-driven bottom-up evaluation to Datalog with stratified negation. Finally, we show experimental results for performance, as well as applications to previously challenging examples.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/04/2014

Acyclicity Notions for Existential Rules and Their Application to Query Answering in Ontologies

Answering conjunctive queries (CQs) over a set of facts extended with ex...
research
07/20/2021

Semantic Reasoning with Differentiable Graph Transformations

This paper introduces a differentiable semantic reasoner, where rules ar...
research
08/27/2019

Datalog Reasoning over Compressed RDF Knowledge Bases

Materialisation is often used in RDF systems to derive, in a preprocessi...
research
02/03/2018

Demand-driven Alias Analysis : Formalizing Bidirectional Analyses for Soundness and Precision

A demand-driven approach to program analysis have been viewed as efficie...
research
09/16/2019

RuDaS: Synthetic Datasets for Rule Learning and Evaluation Tools

Logical rules are a popular knowledge representation language in many do...
research
09/16/2022

User Guided Abductive Proof Generation for Answer Set Programming Queries (Extended Version)

We present a method for generating possible proofs of a query with respe...
research
02/16/2022

Querying Inconsistent Prioritized Data with ORBITS: Algorithms, Implementation, and Experiments

We investigate practical algorithms for inconsistency-tolerant query ans...

Please sign up or login with your details

Forgot password? Click here to reset