Abstract
DatalogMTL is a powerful rule-based language for temporal reasoning. Due toits high expressive power and flexible modeling capabilities, it is suitablefor a wide range of applications, including tasks from industrial and financialsectors. However, due its high computational complexity, practical reasoning inDatalogMTL is highly challenging. To address this difficulty, we introduce anew reasoning method for DatalogMTL which exploits the magic sets technique --a rewriting approach developed for (non-temporal) Datalog to simulate top-downevaluation with bottom-up reasoning. We implement this approach and evaluate iton several publicly available benchmarks, showing that the proposed approachsignificantly and consistently outperforms performance of the state-of-the-artreasoning techniques.