Abstract
DatalogMTL is a powerful extension of Datalog for reasoning over temporal data. While traditionally defined over continuous timelines (e.g., the rational numbers $\mathbb{Q}$), many real-world applications operate on discrete time intervals. This paper investigates the data complexity of DatalogMTL over the integer timeline ($\mathbb{Z}$). The authors prove that switching to a discrete timeline significantly lowers computational complexity for many practical fragments, dropping from inherently sequential (P-hard) to highly parallelizable (NC1 or ACC0), making it highly suitable for high-speed data applications.
Introduction
In Knowledge Representation (KR), reasoning about time-varying data is critical for applications ranging from industrial sensor monitoring to cloud log analysis. DatalogMTL (Metric Temporal Logic) allows for the expression of complex temporal rules, such as triggering an alarm if a high-temperature state persists for a specific duration within a recent window.
Standard DatalogMTL assumes a continuous timeline ($\mathbb{Q}$), which, while mathematically robust, introduces significant computational overhead due to the density of the time domain. However, in engineering, data is often sampled at fixed intervals, effectively creating a discrete timeline. This paper explores whether assuming an integer timeline ($\mathbb{Z}$) simplifies reasoning without sacrificing practical expressivity.
Semantics of Temporal Operators
The core of DatalogMTL lies in its temporal operators, which allow rules to reference the past and future relative to a given time point $t$. These operators include "diamond" (eventually/sometime), "box" (always), "since", and "until", often parameterized by a time interval $\varrho$.
The figure above illustrates the formal semantics for these operators. For instance, $\mathfrak{M}, t \models_{\mathbb{T}} \diamond_{\varrho} A$ holds if there exists a time $t'$ such that the difference $t - t'$ falls within the interval $\varrho$ and $A$ is true at $t'$. The transition from a continuous timeline $\mathbb{T} = \mathbb{Q}$ to a discrete one $\mathbb{T} = \mathbb{Z}$ changes the set of possible $t'$ values, which is the key driver of the complexity shifts identified in this research.
Methodology
The authors utilize several theoretical frameworks to map the complexity landscape:
- Reduction to Rationals: They establish that integer-based reasoning is at most as complex as rational-based reasoning by providing a translation mechanism.
- Automata-Based Reasoning: For propositional fragments, the problem is modeled using Non-deterministic Finite Automata (NFA). To handle binary-encoded timestamps (which can represent very large intervals compactly), they employ a "succinct" NFA construction based on Chrobak’s normal form.
- Circuit Complexity: Fragments are classified into classes like NC1 and ACC0, which measure the degree to which an algorithm can be parallelized.
Key Insights: The "Density" Penalty
The primary finding is that the "density" of rational time—the existence of infinitely many points between any two moments—is a major source of computational difficulty. By restricting the domain to integers, many problems that were previously "P-hard" (difficult to parallelize) become much simpler.
Furthermore, the authors show that DatalogMTL over integers can capture Datalog1S, a classic temporal logic using a "successor" operator. This provides a formal bridge between modern metric temporal logics and established discrete systems.
Complexity Results
The study reveals a significant "complexity drop" when moving to integer semantics:
- Propositional Fragment: Complexity drops from P-hard to NC1-complete.
- Linear/Core Fragments: For subsets using restricted operators (like the past diamond), complexity drops from TC0-hard to ACC0.
- General Case: For the full language, complexity remains PSPACE-complete, matching the rational case. This suggests that while the most expressive forms of the logic remain heavy, the most commonly used practical fragments are significantly faster.
Conclusion and Future Work
This research demonstrates that for many practical monitoring and reasoning tasks, the integer timeline offers a much more efficient path than the continuous one. While the paper is theoretical, these results suggest that low-complexity fragments of DatalogMTL are ideal candidates for real-time stream reasoning. Future work will focus on developing practical, parallelized engines that can leverage these theoretical bounds for high-velocity data processing.
Summary updated