Papers
Topics
Authors
Recent
Search
2000 character limit reached

DatalogMTL with Negation Overview

Updated 14 January 2026
  • 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 TT, which is either the integers Z,+\langle \mathbb{Z}, + \rangle or rationals Q,+\langle \mathbb{Q}, + \rangle, ordered as usual. The language supports:

  • Relational atoms: P(s)P(\vec{s}), for predicate PP and tuple s\vec{s}.
  • Metric temporal operators: Including "sometime" (±\Diamond^{\pm}), "always" (±\Box^{\pm}) in past/future, metric Since S[a,b]S_{[a,b]}, and Until U[a,b]U_{[a,b]}.
  • Negation-as-failure: The construct not M\mathsf{not}~M is permissible in bodies, even within recursion (i.e., unstratified).
  • Rule heads: Restricted to \top, P(s)P(\vec{s}), [a,b]M\Box^-_{[a,b]} M, or [a,b]+M\Box^+_{[a,b]} M.

A rule is written as:

MM1Mknot Mk+1not MmM \gets M_1 \land \cdots \land M_k \land \mathsf{not}~M_{k+1} \land \cdots \land \mathsf{not}~M_m

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 P(c)@[t1,t2]P(\vec{c})@[t_1,t_2].

Formally, a two-valued interpretation II assigns to each tTt \in T a set of ground relational atoms. I,tMI, t \models M is defined by induction, matching the semantics of metric modal operators and negation. II is a model of DΠD \cup \Pi 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 I\mathcal{I} of all two-valued interpretations I:T2GI: T \to 2^G forms a complete lattice under pointwise set inclusion. Fixpoint characterizations rely on the standard immediate-consequence operator TD,ΠT_{D, \Pi}. For III \in \mathcal{I} and each tt,

TD,Π(I)(t)={P(s)   [t1,t2], P(s)@[t1,t2]D, t[t1,t2]}{P(s)   (MB), t, I,tB (P(s),t)F(M,t)}T_{D,\Pi}(I)(t) = \{ P(\vec{s}) ~|~ \exists~[t_1, t_2],~P(\vec{s})@[t_1,t_2] \in D,~t \in [t_1,t_2] \} \cup \{P(\vec{s}) ~|~ \exists~(M \gets B),~t',~I, t' \models B ~(P(\vec{s}),t) \in F(M,t')\}

where FF recursively "unwinds" metric modalities in the head (Pollaci, 7 Jan 2026).

Three-valued interpretations are pairs (I1,I2)(I_1, I_2) with I1I2I_1 \subseteq I_2 (corresponding to "true" \subseteq "possibly true"), forming a bilattice L\mathcal{L} under the precision order (I1,I2)p(J1,J2)(I_1, I_2) \le_p (J_1, J_2) iff I1J1I_1 \subseteq J_1 and J2I2J_2 \subseteq I_2. Satisfaction in the three-valued setting proceeds in Fitting style:

  • P(s)P(\vec{s}) is true (resp. false) at (I1,I2)(I_1, I_2) if P(s)I1P(\vec{s}) \in I_1 (resp. P(s)I2P(\vec{s}) \notin I_2); otherwise, undefined.
  • Negation and conjunction act as standard for three-valued logic.

The three-valued immediate consequence operator TD,Π:LL\mathbb{T}_{D, \Pi}: \mathcal{L} \to \mathcal{L} extends TD,ΠT_{D, \Pi} to three-valued pairs: TD,Π1(I)(t)=facts from D{P(s)  (MB),t: #I,t3B=true, (P(s),t)F(M,t)} TD,Π2(I)(t)=facts from D{P(s)  (MB),t: #I,t̸3B=false, (P(s),t)F(M,t)}\begin{aligned} \mathbb{T}_{D, \Pi}^1(\mathcal{I})(t) &= \text{facts from } D \cup \{P(\vec{s}) ~|~ \exists(M \gets B), t':~ \#\mathcal{I}, t' \models_3 B = \text{true, } (P(\vec{s}), t) \in F(M, t')\} \ \mathbb{T}_{D, \Pi}^2(\mathcal{I})(t) &= \text{facts from } D \cup \{P(\vec{s}) ~|~ \exists(M \gets B), t':~ \#\mathcal{I}, t' \not\models_3 B = \text{false, } (P(\vec{s}), t) \in F(M, t')\} \end{aligned} with TD,Π(I)=(TD,Π1(I),TD,Π2(I))\mathbb{T}_{D, \Pi}(\mathcal{I}) = (\mathbb{T}_{D, \Pi}^1(\mathcal{I}), \mathbb{T}_{D, \Pi}^2(\mathcal{I})) (Pollaci, 7 Jan 2026). Three-valued models are precisely pre-fixpoints of TD,Π\mathbb{T}_{D, \Pi}.

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, TD,Π\mathbb{T}_{D, \Pi} forms a consistent approximator of TD,ΠT_{D,\Pi}:

  • TD,Π\mathbb{T}_{D, \Pi} is monotone.
  • Restriction to exact pairs (I,I)(I, I) yields TD,ΠT_{D, \Pi}.
  • 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 TD,Π\mathbb{T}_{D,\Pi} in precision order.
  • Supported model: three-valued fixpoints of TD,Π\mathbb{T}_{D, \Pi}.
  • Stable models: (I1,I2)(I_1, I_2) such that I1I_1 (resp. I2I_2) is the least fixpoint of TD,Π1(,I2)\mathbb{T}_{D, \Pi}^1(-, I_2) (resp. TD,Π2(I1,)\mathbb{T}_{D, \Pi}^2(I_1, -)).
  • Well-founded model: minimal (in precision) stable model.
  • Two-valued stable models: III \in \mathcal{I} with (I,I)(I, I) 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 (H,T)(H, T) with HTH \subseteq T. (H,T)(H, T) is an HT-model if, for every tt and every rule, satisfaction in HH (resp. TT) 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: II is an HT-stable model iff (I,I)(I, I) 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 Π={  Pnot Q.   Qnot P.  }\Pi = \{\;P \gets \mathsf{not}\ Q. \;\ Q \gets \mathsf{not}\ P.\;\} and T={0}T = \{0\}, the stable models are exactly {P}\{P\} and {Q}\{Q\}; both PP and QQ are undefined in the Kripke–Kleene model; the well-founded model keeps both undefined.
  • Frame rules: "Schedule service at t+1t+1 unless another service occurs in (t,t+1)(t, t+1)," 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 (T=ZT = \mathbb{Z}):
    • Decidability: All four semantics are decidable.
    • Data complexity: For fixed Π\Pi, 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 (T=QT = \mathbb{Q}):
    • 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 (Z\mathbb{Z}) EXPSPACE-complete PSPACE-complete
Rationals (Q\mathbb{Q}) 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

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to DatalogMTL with Negation.