DatalogMTL with Negation Overview
- DatalogMTL with Negation is a nonmonotonic temporal rule language that extends Datalog by integrating metric temporal operators with unstratified negation.
- It supports modeling of temporal patterns such as defaults, inertia, and exceptions through concise, recursive rules and metric modalities.
- Robust fixpoint and stable model semantics via Approximation Fixpoint Theory offer comprehensive analysis while managing varying computational complexities over discrete and dense time.
DatalogMTL with negation is an expressive nonmonotonic temporal rule language that extends Datalog by incorporating metric temporal operators and allowing unstratified negation-under-failure. This framework merges classic Datalog-style inductive logic programming with metric temporal logic (MTL), enabling concise specification of temporal patterns, defaults, exceptions, and policies in settings with dense or discrete time. Negation-as-failure introduces major increases in expressivity, supporting nonmonotonic reasoning in temporal domains but also fundamental increases in computational complexity and subtle semantic questions. Recent foundational work has provided robust fixpoint semantics for DatalogMTL with negation, generalizing both traditional logic programming and metric temporal ontology languages (Pollaci, 7 Jan 2026, Wałęga et al., 2023).
1. Syntax and Two-Valued Semantics
A DatalogMTL program is structured over a timeline , which is either the integers or rationals , ordered as usual. The language supports:
- Relational atoms: , for predicate and tuple .
- Metric temporal operators: Including "sometime" (), "always" () in past/future, metric Since , and Until .
- Negation-as-failure: The construct is permissible in bodies, even within recursion (i.e., unstratified).
- Rule heads: Restricted to , , , or .
A rule is written as:
with a safety condition requiring all head variables to appear positively in the body. Programs are finite sets of such rules, and datasets are finite sets of timed ground atoms .
Formally, a two-valued interpretation assigns to each a set of ground relational atoms. is defined by induction, matching the semantics of metric modal operators and negation. is a model of iff it covers all facts in their interval and satisfies all rules at all times. The bodies of rules may contain unstratified negation; no restrictions are imposed apart from safety and head–modal constraints (Pollaci, 7 Jan 2026, Wałęga et al., 2023).
2. Lattices, Three-Valued Semantics, and Immediate Consequence Operators
The set of all two-valued interpretations forms a complete lattice under pointwise set inclusion. Fixpoint characterizations rely on the standard immediate-consequence operator . For and each ,
where recursively "unwinds" metric modalities in the head (Pollaci, 7 Jan 2026).
Three-valued interpretations are pairs with (corresponding to "true" "possibly true"), forming a bilattice under the precision order iff and . Satisfaction in the three-valued setting proceeds in Fitting style:
- is true (resp. false) at if (resp. ); otherwise, undefined.
- Negation and conjunction act as standard for three-valued logic.
The three-valued immediate consequence operator extends to three-valued pairs: with (Pollaci, 7 Jan 2026). Three-valued models are precisely pre-fixpoints of .
3. Fixpoint and Stable Model Semantics via Approximation Fixpoint Theory
Approximation Fixpoint Theory (AFT) provides a uniform method to define semantics in nonmonotonic logics by associating an (anti-)monotonic operator and its consistent approximator. For DatalogMTL with negation, forms a consistent approximator of :
- is monotone.
- Restriction to exact pairs yields .
- Structural induction shows compatibility with the three-valued satisfaction relation.
AFT yields four classic semantics (Pollaci, 7 Jan 2026):
- Kripke–Kleene model: the least fixpoint of in precision order.
- Supported model: three-valued fixpoints of .
- Stable models: such that (resp. ) is the least fixpoint of (resp. ).
- Well-founded model: minimal (in precision) stable model.
- Two-valued stable models: with stable.
This structure cleanly generalizes nonmonotonic semantics from classical logic programming to the metric temporal setting.
4. Equivalence with Here-and-There Based Stable Model Semantics
Walega et al. (2024) (Wałęga et al., 2023) previously defined stable model semantics for DatalogMTL via the logic of here-and-there (HT), generalizing Pearce–Gelfond equilibrium semantics. An HT-interpretation is a pair with . is an HT-model if, for every and every rule, satisfaction in (resp. ) propagates to the head under suitable body conditions.
A crucial result is that the AFT-based stable model construction and the minimal HT-interpretation-based construction coincide at the two-valued (exact) level:
- Theorem: is an HT-stable model iff is an AFT-stable model (Pollaci, 7 Jan 2026).
- Every three-valued AFT-model is an HT-model, but not vice versa. Thus, the AFT paradigm not only recovers the previous temporal answer set semantics but also yields supported, Kripke–Kleene, and well-founded semantics in a unified framework.
5. Illustrative Examples of Nonmonotonic Temporal Patterns
Various nontrivial temporal patterns are naturally captured:
- Mutual default choice: For and , the stable models are exactly and ; both and are undefined in the Kripke–Kleene model; the well-founded model keeps both undefined.
- Frame rules: "Schedule service at unless another service occurs in ," formalized via recursion through metric modalities and negation.
- Metric-based exceptions: E.g., flagging vehicles for decommission after $12$ years unless they were recently inspected.
The expressivity enabled by unstratified negation and metric operators supports temporally-aware defaults, inertia, and cancellation patterns beyond the reach of positive or stratified temporal Datalog (Wałęga et al., 2023).
6. Decidability and Computational Complexity
Semantics and reasoning in DatalogMTL with negation exhibit marked complexity sensitivity to the time structure and fragment considered.
- Integer timeline ():
- Decidability: All four semantics are decidable.
- Data complexity: For fixed , existence and query answering in well-founded or stable models are in PTIME in the dataset size after grounding.
- Combined complexity: PSPACE-complete, primarily due to the expressiveness of metric operators encoding bounded reachability (Pollaci, 7 Jan 2026).
- For unstratified programs (full language): Stable model existence is EXPSPACE-complete in data complexity (Wałęga et al., 2023).
- For forward-propagating fragment: Data complexity reduces to PSPACE-complete, matching the positive case.
- Rational timeline ():
- Even for forward-propagating, propositional programs, stable model existence is undecidable.
- Proof techniques employ Turing machine encodings using metric intervals, negation, and recursion (Wałęga et al., 2023).
| Timeline | General Negation | Forward-Propagating |
|---|---|---|
| Integers () | EXPSPACE-complete | PSPACE-complete |
| Rationals () | Undecidable | Undecidable |
Decidability is preserved for all semantics over discrete (integer) time but lost over dense (rational) time.
7. Practical Considerations and Applications
The expressiveness of DatalogMTL with negation supports natural modeling of:
- Defaults, exceptions, and "unless" conditions
- Temporal frame axioms and inertia rules
- Streaming, run-time policy management, and temporal compliance
For the forward-propagating fragment, the complexity profile matches that of positive metric temporal Datalog, making it suitable for stream reasoning and temporal monitoring. Implementation strategies include:
- Sliding-window materialization: Maintain windows sized by rule intervals.
- Automata-theoretic approaches: Compile rule satisfaction/minimality into Büchi automata; exploit determinism in fragments.
- Hybrid engines: Delegate negative rules to ASP sub-solvers or specialized metric temporal reasoning backends.
Optimizations are possible when negation is acyclic (reduction to stratified evaluation) or future modalities are absent (enabling deterministic monitoring). These patterns align with many streaming and reactive policy scenarios encountered in practice.
References
- S. Pollaci. "Fixpoint Semantics for DatalogMTL with Negation" (Pollaci, 7 Jan 2026).
- P. Walega, A. Cucala, M. Grois, G. Kroetzsch. "Metric Datalog with Unstratifiable Negation" (Wałęga et al., 2023).