A Linear Algebraic Approach to Datalog Evaluation

07/30/2016
by   Taisuke Sato, et al.
0

In this paper, we propose a fundamentally new approach to Datalog evaluation. Given a linear Datalog program DB written using N constants and binary predicates, we first translate if-and-only-if completions of clauses in DB into a set Eq(DB) of matrix equations with a non-linear operation where relations in M_DB, the least Herbrand model of DB, are encoded as adjacency matrices. We then translate Eq(DB) into another, but purely linear matrix equations tilde_Eq(DB). It is proved that the least solution of tilde_Eq(DB) in the sense of matrix ordering is converted to the least solution of Eq(DB) and the latter gives M_DB as a set of adjacency matrices. Hence computing the least solution of tilde_Eq(DB) is equivalent to computing M_DB specified by DB. For a class of tail recursive programs and for some other types of programs, our approach achieves O(N^3) time complexity irrespective of the number of variables in a clause since only matrix operations costing O(N^3) or less are used. We conducted two experiments that compute the least Herbrand models of linear Datalog programs. The first experiment computes transitive closure of artificial data and real network data taken from the Koblenz Network Collection. The second one compared the proposed approach with the state-of-the-art symbolic systems including two Prolog systems and two ASP systems, in terms of computation time for a transitive closure program and the same generation program. In the experiment, it is observed that our linear algebraic approach runs 10^1 10^4 times faster than the symbolic systems when data is not sparse. To appear in Theory and Practice of Logic Programming (TPLP).

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/29/2017

Recursive Method for the Solution of Systems of Linear Equations

New solution method for the systems of linear equations in commutative i...
research
05/23/2022

Learned Digital Back-Propagation for Dual-Polarization Dispersion Managed Systems

Digital back-propagation (DBP) and learned DBP (LDBP) are proposed for n...
research
09/22/2020

Enhancing Linear Algebraic Computation of Logic Programs Using Sparse Representation

Algebraic characterization of logic programs has received increasing att...
research
11/28/2018

Partial Evaluation of Logic Programs in Vector Spaces

In this paper, we introduce methods of encoding propositional logic prog...
research
06/12/2023

Towards end-to-end ASP computation

We propose an end-to-end approach for answer set programming (ASP) and l...
research
10/27/2022

Learning Discrete Directed Acyclic Graphs via Backpropagation

Recently continuous relaxations have been proposed in order to learn Dir...
research
08/25/2017

Network Essence: PageRank Completion and Centrality-Conforming Markov Chains

Jiří Matoušek (1963-2015) had many breakthrough contributions in mathema...

Please sign up or login with your details

Forgot password? Click here to reset