# Goal-Driven Reasoning in DatalogMTL with Magic Sets

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

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning.
- Builds on 3 of its 30 references that are in the map.
- First posted on arXiv 10 Dec 2024.

## Placed in

- LLM reasoning / [Reasoning benchmarks and evaluation](https://mlsanity.com/lr/reasoning-benchmarks-and-evaluation/)

## Builds on (most cited first, 3 of 3)

- [Querying Log Data with Metric Temporal Logic (Technical Report)](https://mlsanity.com/paper/1703.08982/) (2017)
- [MeTeoR: Practical Reasoning in Datalog with Metric Temporal Operators](https://mlsanity.com/paper/2201.04596/) (2022)
- [The Stable Model Semantics of Datalog with Metric Temporal Operators](https://mlsanity.com/paper/2306.07625/) (2023)

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

- [Incremental Maintenance of DatalogMTL Materialisations](https://mlsanity.com/paper/2511.12169/) (2025)

## Abstract (arXiv)

DatalogMTL is a powerful rule-based language for temporal reasoning. Due to its high expressive power and flexible modeling capabilities, it is suitable for a wide range of applications, including tasks from industrial and financial sectors. However, due to its high computational complexity, practical reasoning in DatalogMTL is highly challenging. To address this difficulty, we introduce a new reasoning method for DatalogMTL which exploits the magic sets technique -- a rewriting approach developed for (non-temporal) Datalog to simulate top-down evaluation with bottom-up reasoning. We have implemented this approach and evaluated it on publicly available benchmarks, showing that the proposed approach significantly and consistently outperformed state-of-the-art reasoning techniques.
