# Querying Log Data with Metric Temporal Logic (Technical Report)

arXiv: https://arxiv.org/abs/1703.08982 · HTML: https://mlsanity.com/paper/1703.08982/

## Key facts

- Cited by 10 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 27 Mar 2017.

## Built on by (most cited first, 10 of 10)

- [MeTeoR: Practical Reasoning in Datalog with Metric Temporal Operators](https://mlsanity.com/paper/2201.04596/) (2022)
- [Goal-Driven Reasoning in DatalogMTL with Magic Sets](https://mlsanity.com/paper/2412.07259/) (2024)
- [On Deciding the Data Complexity of Answering Linear Monadic Datalog Queries with LTL Operators(Extended Version)](https://mlsanity.com/paper/2501.13762/) (2025)
- [Query Evaluation in DatalogMTL -- Taming Infinite Query Results](https://mlsanity.com/paper/2109.10691/) (2021)
- [Seminaive Materialisation in DatalogMTL](https://mlsanity.com/paper/2208.07100/) (2022)
- [The Transformation Logics](https://mlsanity.com/paper/2304.09639/) (2023)
- [Inconsistency Handling in DatalogMTL](https://mlsanity.com/paper/2505.10394/) (2025)
- [Analysing Temporal Reasoning in Description Logics Using Formal Grammars](https://mlsanity.com/paper/2508.00575/) (2025)
- [Incremental Maintenance of DatalogMTL Materialisations](https://mlsanity.com/paper/2511.12169/) (2025)
- [Inferring High-Level Events from Timestamped Data: Complexity and Medical Applications](https://mlsanity.com/paper/2604.21793/) (2026)

## Abstract (arXiv)

We propose a novel framework for ontology-based access to temporal log data using a datalog extension datalogMTL of a Horn fragment of the metric temporal logic MTL. We show that datalogMTL is ExpSpace-complete even with punctual intervals, in which case full MTL is known to be undecidable. We also prove that nonrecursive datalogMTL is PSpace-complete for combined complexity and in AC0 for data complexity. We demonstrate by two real-world use cases that nonrecursive datalogMTL programs can express complex temporal concepts from typical user queries and thereby facilitate access to temporal log data. Our experiments with Siemens turbine data and MesoWest weather data show that datalogMTL ontology-mediated queries are efficient and scale on large datasets.
