=Paper= {{Paper |id=Vol-3135/EcoFinKG_2022_short11 |storemode=property |title=A Temporal Datalog Primer |pdfUrl=https://ceur-ws.org/Vol-3135/EcoFinKG_2022_short11.pdf |volume=Vol-3135 |authors=Livia Blasi |dblpUrl=https://dblp.org/rec/conf/edbt/Blasi22 }} ==A Temporal Datalog Primer== https://ceur-ws.org/Vol-3135/EcoFinKG_2022_short11.pdf
A Temporal Datalog Primer: Talk Abstract
Livia Blasi1,2
1
    Banca d’Italia, Italy
2
    TU Wien, Austria



1. Talk Abstract                                                                          case, we assume the time unit is in months. Thus, Rule 1
                                                                                          tells the company to buy π‘ π‘‘π‘Žπ‘Ÿπ‘‘π‘’π‘ if it has shown an
In this talk1 we present a review of the literature on tem- πΈπ‘ π‘‘π‘–π‘šπ‘Žπ‘‘π‘’π‘‘π‘‰ π‘Žπ‘™π‘’π‘’πΌπ‘›π‘π‘Ÿπ‘’π‘Žπ‘ π‘’ continually in the interval
poral reasoning, with particular focus on DatalogMTL, that goes from 0 to 3 months in the past.
an extension of the Datalog language with Metric Tem-
                                                                                             We present now another example in the same scenario
poral Logic operators. We show how temporal reasoning
                                                                                          that uses the diamond minus operator and recursion.
can prove to be a crucial tool for financial data dealing
with time.
   Financial and economics applications have temporal
                                                                                                    [0,2] InvestInSector(π‘ π‘’π‘π‘‘π‘œπ‘Ÿ, π‘–π‘›π‘£π‘’π‘ π‘‘π‘šπ‘’π‘›π‘‘),
data deeply ingrained in their nature, and nowadays it is
                                                                                                 [0,1] ReturnFromInvestment(π‘ π‘’π‘π‘‘π‘œπ‘Ÿ, π‘Ÿπ‘’π‘‘π‘’π‘Ÿπ‘›)
more important than ever to be able to reason over such
data. For example, we may be interested in understanding                                                               π‘Ÿπ‘’π‘‘π‘’π‘Ÿπ‘› > π‘–π‘›π‘£π‘’π‘ π‘‘π‘šπ‘’π‘›π‘‘,
the trend of the price of the stock for a certain company,                                    β†’ SuccessfulInvestment(π‘ π‘’π‘π‘‘π‘œπ‘Ÿ, π‘–π‘›π‘£π‘’π‘ π‘‘π‘šπ‘’π‘›π‘‘) (2)
or in being able to derive conclusions about the likeliness                                      SuccessfulInvestment(π‘ π‘’π‘π‘‘π‘œπ‘Ÿ, π‘–π‘›π‘£π‘’π‘ π‘‘π‘šπ‘’π‘›π‘‘),
of change of ownership of a company depending on how
many of their shares have been bought over time by a                                                   π‘›π‘’π‘€πΌπ‘›π‘£π‘’π‘ π‘‘π‘’π‘šπ‘’π‘›π‘‘ = π‘–π‘›π‘£π‘’π‘ π‘‘π‘šπ‘’π‘›π‘‘ * 𝛽
shareholder.                                                                                    β†’ InvestInSector(π‘ π‘’π‘π‘‘π‘œπ‘Ÿ, π‘›π‘’π‘€πΌπ‘›π‘£π‘’π‘ π‘‘π‘šπ‘’π‘›π‘‘) (3)
   Temporal reasoning is one of the key approaches that
allow for such and similar reasoning tasks, as it allows to The diamond minus 𝜚 operator assesses whether a fact
consider complex data structures (e.g. Knowledge Graphs has been valid at least once in the past relative interval 𝜚.
or KGs) not just as a snapshot fixed in time (as it would In this case we will consider the time unit being in years.
be for non temporal automated reasoning), but in the                                         Rule 2 states that if an investment in π‘ π‘’π‘π‘‘π‘œπ‘Ÿ in the last
evolution of the entities represented in the data, so as                                  2 years  had a π‘Ÿπ‘’π‘‘π‘’π‘Ÿπ‘›, in the last year, greater than the
to provide a much needed additional dimension to the original π‘–π‘›π‘£π‘’π‘ π‘‘π‘šπ‘’π‘›π‘‘, then it is considered a SuccessfulIn-
scope of the domain at hand.                                                              vestment. In Rule 3, then, for each SuccessfulInvestment
   In particular, we are interested in temporal operators                                 we  compute a π‘›π‘’π‘€πΌπ‘›π‘£π‘’π‘ π‘‘π‘šπ‘’π‘›π‘‘ that will be used to in-
that allow to reason on the validity of data for specific vest in the same sector.
periods of time in the past or in the future w.r.t. the Languages. While proposals of a temporal reasoning
current moment.                                                                           language and in extension to Datalog have been pre-
   In order to show how some of these operators work sented already starting from the 1980s, it is only thanks
and their usefulness in reasoning, we present, as an ex- to a recent resurgence of interest in temporal logic, and
ample, the scenario of a company concerned with future in particular in extending Datalog with Metric Tempo-
acquisitions and investments.                                                             ral Logic (MTL), that led to several studies on various
                                                                                          fragments of the proposed language DatalogMTL. These
                                                                                          studies attest to the feasibility and the potential of its
          ⊟[0,3] EstimatedValueIncrease(π‘ π‘‘π‘Žπ‘Ÿπ‘‘π‘’π‘),
                                                                                          possible applications, and in recent years we have seen
                                                    β†’ Buy(π‘ π‘‘π‘Žπ‘Ÿπ‘‘π‘’π‘)                    (1) many of them [1, 2, 3, 4, 5, 6, 7, 8, 9]. However, even
   The box minus ⊟𝜚 operator assesses whether a fact considering a limited volume of published literature, it
is always valid in the past relative interval 𝜚. In this is a challenge to understand the expressive power of the
                                                                                          involved languages, especially in the context of current
                                                                                          ones, and even more than that what is the path to take
$ liviablasi@gmail.com (L. Blasi)
                                                                                          this research into the future.
 0000-0003-0701-1688 (L. Blasi)
         Β© 2022 Copyright for this paper by its authors. Use permitted under Creative        In particular, we are interested in understanding what
          Commons License Attribution 4.0 International (CC BY 4.0).
    CEUR

          CEUR Workshop Proceedings (CEUR-WS.org)
    Workshop
    Proceedings
                  http://ceur-ws.org
                  ISSN 1613-0073
                                                                                          it means to reason in a certain DatalogMTL fragment,
    1
      The views and opinions expressed in this paper are those of the and what kind of applications can make use of such a
authors and do not necessarily reflect the official policy or position reasoning space.
of Banca d’Italia.
  While several surveys have been conducted on tem-            [7] P. A. Walega, B. C. Grau, M. Kaminski, E. V.
poral logic and reasoning over time [10], in fact, to our          Kostylev, Tractable fragments of datalog with met-
knowledge most of them are now either outdated [11] or             ric temporal operators, in: IJCAI, ijcai.org, 2020, pp.
are not focused on covering the topic in terms of practi-          1919–1925.
cal applications, hence ignoring the latest finds on Data-     [8] P. A. Walega, D. J. T. Cucala, E. V. Kostylev, B. C.
logMTL and the dense timeline [12, 13, 14, 15].                    Grau, Datalogmtl with negation under stable mod-
Contribution. In this talk, we present the following               els semantics, in: KR, 2021, pp. 609–618.
contributions:                                                 [9] P. A. Walega, M. Zawidzki, B. C. Grau, Finitely ma-
                                                                   terialisable datalog programs with metric temporal
     β€’ We present a short introduction on temporal rea-            operators, in: KR, 2021, pp. 619–628.
       soning, with a focus on DatalogMTL, which ex-          [10] J. Chomicki, Temporal query languages: A survey,
       tends the Datalog language with Metric Temporal             in: D. M. Gabbay, H. J. Ohlbach (Eds.), Temporal
       Logic operators, and which has been deemed to               Logic, Springer Berlin Heidelberg, Berlin, Heidel-
       be very promising in terms of practical applica-            berg, 1994, pp. 506–534.
       tions.                                                 [11] G. Gottlob, E. GrΓ€del, H. Veith, Linear Time Data-
     β€’ We present some of the recent results of the re-            log and Branching Time Logic, Kluwer Academic
       search on DatalogMTL in terms of complexity                 Publishers, USA, 2000, p. 443–467.
       and integration with other Datalog languages.          [12] S. Konur, A survey on temporal logics for specify-
     β€’ We propose a number of scenarios in financial               ing and verifying real-time systems, Frontiers of
       applications which deal with temporal data, and             Computer Science 7 (2013) 370.
       we show how problems can be solved through             [13] S. Konur, A survey on temporal logics, CoRR
       the use of temporal reasoning.                              abs/1005.3199 (2010). arXiv:1005.3199.
                                                              [14] A. Artale, R. Kontchakov, A. Kovtunova,
     β€’ We list some desiderata for future development of
                                                                   V. Ryzhikov, F. Wolter, M. Zakharyaschev,
       temporal Datalog that would allow us to integrate
                                                                   Ontology-mediated query answering over
       powerful temporal reasoning into the Vadalog
                                                                   temporal data: a survey, 2017.
       system [16] a reasoning system for Knowledge
                                                              [15] V. Goranko, A. Rumberg, Temporal Logic, in: E. N.
       Graphs.
                                                                   Zalta (Ed.), The Stanford Encyclopedia of Philoso-
                                                                   phy, Fall 2021 ed., Metaphysics Research Lab, Stan-
                                                                   ford University, 2021. URL: https://plato.stanford.
References                                                         edu/archives/fall2021/entries/logic-temporal/.
                                                              [16] L. Bellomarini, E. Sallinger, G. Gottlob, The vadalog
 [1] S. Brandt, E. G. KalaycΔ±, R. Kontchakov, V. Ryzhikov,         system: Datalog-based reasoning for knowledge
     G. Xiao, M. Zakharyaschev, Ontology-based data                graphs, PVLDB 11 (2018) 975–987.
     access with a horn fragment of metric temporal
     logic, 2017.
 [2] S. Brandt, E. G. Kalayci, V. Ryzhikov, G. Xiao, M. Za-
     kharyaschev, Querying log data with metric tem-
     poral logic, J. Artif. Intell. Res. 62 (2018) 829–877.
 [3] S. Kikot, V. Ryzhikov, P. A. Walega, M. Za-
     kharyaschev, On the data complexity of ontology-
     mediated queries with MTL operators over timed
     words, in: Description Logics, volume 2211 of CEUR
     Workshop Proceedings, CEUR-WS.org, 2018.
 [4] P. A. Walega, M. Kaminski, B. C. Grau, Reasoning
     over streaming data in metric temporal datalog, in:
     AAAI, AAAI Press, 2019, pp. 3092–3099.
 [5] P. A. Walega, B. C. Grau, M. Kaminski, E. V.
     Kostylev, Datalogmtl: Computational complexity
     and expressive power, in: IJCAI, ijcai.org, 2019, pp.
     1886–1892.
 [6] P. A. Walega, B. C. Grau, M. Kaminski, E. V.
     Kostylev, Datalogmtl over the integer timeline, in:
     KR, 2020, pp. 768–777.