Tractable Fragments of Datalog with Metric Temporal Operators

We study the data complexity of reasoning for fragments of DatalogMTL—an extension of Datalog with metric temporal operators over the rational numbers. Reasoning in DatalogMTL is PSPACEcomplete, which handicaps its application in practice. To achieve tractability we first study the core fragment, which disallows conjunction in rule bodies, and show that reasoning remains PSPACE-hard. Intractability prompts us to also limit the kinds of temporal operators allowed in rules, and we propose a practical core fragment for which reasoning becomes TC-complete. Finally, we show that this fragment can be extended by allowing linear conjunctions in rule bodies (with at most one IDB atom), and show that the resulting fragment is NLcomplete, thus no harder than plain linear Datalog.