Hostname: page-component-89b8bd64d-j4x9h Total loading time: 0 Render date: 2026-05-08T01:20:23.941Z Has data issue: false hasContentIssue false

Practical Reasoning in DatalogMTL

Published online by Cambridge University Press:  28 October 2024

DINGMIN WANG
Affiliation:
Department of Computer Science, University of Oxford, Oxford, UK (e-mails: dingmin.wang@cs.ox.ac.uk, bernardo.cuenca.grau@cs.ox.ac.uk)
BERNARDO CUENCA GRAU
Affiliation:
Department of Computer Science, University of Oxford, Oxford, UK (e-mails: dingmin.wang@cs.ox.ac.uk, bernardo.cuenca.grau@cs.ox.ac.uk)
PRZEMYSŁAW A. WAŁȨGA
Affiliation:
Department of Computer Science, University of Oxford, Oxford, UK School of Electronic Engineering and Computer Science, Queen Mary University of London, London, UK (e-mail: przemyslaw.walega@cs.ox.ac.uk)
PAN HU
Affiliation:
Department of Computer Science, University of Oxford, Oxford, UK School of Electronic Information and Electrical Engineering, Shanghai Jiao Tong University, Shanghai, China, (e-mail: pan.hu@sjtu.edu.cn)
Rights & Permissions [Opens in a new window]

Abstract

DatalogMTL is an extension of Datalog with metric temporal operators that has found an increasing number of applications in recent years. Reasoning in DatalogMTL is, however, of high computational complexity, which makes reasoning in modern data-intensive applications challenging. In this paper we present a practical reasoning algorithm for the full DatalogMTL language, which we have implemented in a system called MeTeoR. Our approach effectively combines an optimised (but generally non-terminating) materialisation (a.k.a. forward chaining) procedure, which provides scalable behaviour, with an automata-based component that guarantees termination and completeness. To ensure favourable scalability of the materialisation component, we propose a novel seminaïve materialisation procedure for DatalogMTL enjoying the non-repetition property, which ensures that each rule instance will be applied at most once throughout its entire execution. Moreover, our materialisation procedure is enhanced with additional optimisations which further reduce the number of redundant computations performed during materialisation by disregarding rules as soon as it is certain that they cannot derive new facts in subsequent materialisation steps. Our extensive evaluation supports the practicality of our approach.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2024. Published by Cambridge University Press
Figure 0

Table 1. Semantics of ground metric atoms

Figure 1

Procedure 1: Naïve($\Pi, {\mathscr{D}}, P(\mathbf{c})@\rho$)

Figure 2

Procedure 2: Seminaïve $\Pi,{\mathscr{D}},P(\mathbf{c})@\rho$)

Figure 3

Procedure 3: OptimisedSeminaïve $\Pi,{\mathscr{D}}, P(\mathbf{c})@\rho)$)

Figure 4

Algorithm 4: Practical reasoning algorithm

Figure 5

Fig. 1. Comparison of automata- and LTL-based approaches (left) and scalability of the automata approach (right).

Figure 6

Fig. 2. Comparison of time and memory consumption in various materialisation strategies.

Figure 7

Fig. 3. Scalability of our optimised seminaïve materialisation.

Figure 8

Fig. 4. Comparison between meTeoR and the query rewriting baseline.