Introduction
Temporal reasoning is a cornerstone of modern monitoring systems, enabling the verification of complex constraints such as Service Level Agreements (SLAs) or regulatory compliance in transport. While DatalogMTL—a temporal extension of Datalog using metric operators—has proven effective for these tasks, it has historically struggled with non-monotonic negation. In real-world scenarios, we often need to model inertia or defaults (e.g., "a vehicle remains booked unless a cancellation occurs"). This requires a robust semantic framework for negation that can handle recursion and infinite timelines.
This paper introduces DatalogMTL$^{\neg}$, extending the language with non-monotonic negation under stable model semantics. By adapting Equilibrium Logic, the authors provide a mathematically sound foundation for reasoning about defaults and exceptions over time.
Theoretical Framework: Equilibrium Logic
To define stable models in a temporal context, the authors utilize Equilibrium Logic, which is rooted in the "here-and-there" (HT) intuitionistic logic. This approach is particularly suited for temporal settings because it naturally handles the minimality requirements of stable models. Unlike standard Answer Set Programming (ASP), where a program typically has a finite number of models, a temporal program can yield infinitely many models. This occurs because choices (e.g., between $P$ and $Q$ in a cycle of negation) can be made independently at every discrete or continuous point on an infinite timeline.
The Decidability Frontier
A primary contribution of this work is the analysis of how the nature of time affects computational complexity. The authors identify a sharp divide between continuous and discrete timelines:
- The Rational Timeline (Continuous): Reasoning is undecidable. The density of rational numbers allows for the encoding of an infinite Turing machine tape within a finite time interval, even when rules only propagate information forward.
- The Integer Timeline (Discrete): The "gaps" between time points prevent such encodings, making the logic decidable.
Algorithmic Approach
For discrete time, the authors propose an automata-based reasoning strategy. They decompose infinite temporal interpretations into a sequence of "windows" and construct specialized Büchi automata to recognize valid models. One automaton identifies candidate models, while a second (constructed via complementation) ensures that no "smaller" model exists, thereby satisfying the minimality condition of the stable model semantics.
Complexity Results
The research establishes several key complexity bounds for data complexity (scaling with the number of facts):
- General Integer Programs: Reasoning is decidable and resides within ExpSpace.
- Forward-Propagating Fragment: For programs where rules only look toward the future, the complexity drops to PSpace-complete.
Crucially, the PSpace-complete result for the forward-propagating fragment matches the complexity of DatalogMTL without negation. This suggests that developers can utilize the expressive power of non-monotonic negation "for free" in terms of worst-case computational scaling for many practical monitoring applications.
Conclusion and Future Work
This work provides the first comprehensive treatment of stable model semantics for Datalog with metric temporal operators. While the general continuous case is undecidable, the results for discrete time offer a clear path toward implementation. Future research will focus on integrating these algorithms into the MeTeoR engine and identifying "safe" fragments of continuous time that might remain decidable for specific industrial use cases.
Summary updated