NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The Stable Model Semantics of Datalog with Metric Temporal Operators

Przemyslaw Andrzej Walega, David J. Tena Cucala, Bernardo Cuenca Grau, Egor V. Kostylev · DOI

Abstract

This research extends DatalogMTL, a temporal logic programming language, by incorporating non-monotonic negation (negation-as-failure) under the stable model semantics. The study explores the theoretical foundations and computational complexity of this extension, termed DatalogMTL$^{\neg}$. The authors demonstrate that while the introduction of non-monotonic negation leads to undecidability over continuous rational timelines ($\mathbb{Q}$), reasoning remains decidable over discrete integer timelines ($\mathbb{Z}$). Notably, the paper identifies a "forward-propagating" fragment that preserves the PSPACE-complete data complexity of the original negation-free logic, offering a viable path for practical stream reasoning applications.

Introduction

In the domain of knowledge representation, DatalogMTL has emerged as a robust framework for reasoning about events and properties over time using metric operators (e.g., "always in the last 5 minutes"). However, traditional DatalogMTL primarily focused on positive rules or stratified negation, which limits its ability to model complex real-world scenarios such as temporal inertia—the principle that a property persists unless an explicit event changes it.

To address this, the authors introduce non-monotonic negation into DatalogMTL. This allows for "stable model semantics," the standard for Answer Set Programming (ASP), to be applied to temporal logic. The primary challenge addressed is balancing the expressive power of metric temporal operators with the non-monotonicity of negation without rendering the logic computationally intractable.

Methodology

The research employs several theoretical frameworks to define and analyze the semantics of DatalogMTL$^{\neg}$:

  1. Temporal Equilibrium Logic: The authors define the semantics using a generalization of "here-and-there" (HT) intuitionistic logic. This provides a formal basis for stable models over infinite temporal structures.
  2. Automata-Based Verification: For the integer timeline ($\mathbb{Z}$), the authors utilize Büchi automata. By constructing automata that recognize valid temporal interpretations within specific "windows," they establish a mechanism to verify if a candidate interpretation satisfies the stable model criteria.
  3. Complexity Mapping: The study performs a rigorous data complexity analysis, examining how the computational requirements scale with the size of the input facts while the rule set remains fixed.
  4. Undecidability Proofs: The authors use a reduction from deterministic Turing machines to show that the density of the rational timeline ($\mathbb{Q}$) allows for the encoding of infinite computations, leading to undecidability.

Key Insights and Complexity Results

The Impact of the Timeline

A central finding of the paper is the critical role of the underlying temporal domain.

  • Rational Timeline ($\mathbb{Q}$): Reasoning is undecidable. The ability to define arbitrarily small intervals allows for the simulation of complex computational states that cannot be guaranteed to terminate or be verified.
  • Integer Timeline ($\mathbb{Z}$): Reasoning is decidable. The discrete nature of the timeline allows for the use of automata-theoretic approaches to bound the search space for stable models.

Complexity Classes

Over the integer timeline, the complexity varies based on the program structure:

  • General Programs: Reasoning is EXPSPACE-complete in terms of data complexity.
  • Forward-Propagating Programs: These are programs where rules only derive facts about the current or future moments based on the past or present. This fragment is PSPACE-complete, which is significant because it matches the complexity of DatalogMTL without negation.

Discussion and Practical Implications

The identification of the forward-propagating fragment is particularly relevant for stream reasoning. In many real-time monitoring applications, data arrives sequentially, and conclusions are drawn about the current state based on historical data. The fact that adding negation does not increase the data complexity for these programs suggests that DatalogMTL$^{\neg}$ can be integrated into existing temporal reasoning systems without a prohibitive performance penalty.

However, the EXPSPACE complexity for general programs over integers highlights a significant computational hurdle. Future research is needed to bridge the gap between the current EXPSPACE upper bounds and the PSPACE lower bounds for the full language.

Conclusion

This work provides a comprehensive theoretical foundation for DatalogMTL with non-monotonic negation. By establishing the boundaries of decidability and identifying tractable fragments, the authors pave the way for more expressive temporal reasoning in AI. The next logical step involves implementing these semantics within practical reasoners, such as the MeTeoR system, to evaluate performance on real-world datasets and complex temporal queries.

Summary updated

BibTeX
@article{walega2024stable,
  author = {Przemyslaw Andrzej Walega and David J. Tena Cucala and Bernardo Cuenca Grau and Egor V. Kostylev},
  title = {{The Stable Model Semantics of Datalog with Metric Temporal Operators}},
  journal = {Theory Pract. Log. Program.},
  year = {2024},
  doi = {10.1017/s1471068423000315},
}
Figure