<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Analysing Temporal Reasoning in Description Logics Using Formal Grammars (Extended Abstract)</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Camille Bourgaux</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anton Gnatenko</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michaël Thomazo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DI ENS, ENS, CNRS, PSL University &amp; Inria</institution>
          ,
          <addr-line>Paris</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Free University of Bozen-Bolzano</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <abstract>
        <p>We establish a correspondence between (fragments of)  ℰℒ ○ , a temporal extension of ℰℒ with the LTL operator ○ , and conjunctive grammars (context-free grammars equipped with the operation of intersection). This connection implies that  ℰℒ ○ does not enjoy ultimate periodicity of models, and further leads to undecidability of query answering in  ℰℒ ○ , closing a question left open since the introduction of  ℰℒ ○ . It also allows to establish decidability of query answering for some new fragments of  ℰℒ ○ , and to reuse for this purpose existing tools and algorithms for conjunctive grammars.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Description logics</kwd>
        <kwd>temporal reasoning</kwd>
        <kwd>conjunctive grammars</kwd>
        <kwd>ontology-mediated query answering</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Alice</p>
      <p>Prof
advisorOf</p>
      <p>Happy</p>
      <p>Dr</p>
      <p>ProfProf
ProfProf

ProfProf</p>
      <p>ProfProf
ProfProf</p>
      <p>StudentDr
ProfProud
(a) Some inferences for Example 1. Dashed lines repre- (b) An illustration for the facts that 3 ∈
sent the temporal evolution of a given element, while 3 (ProfProf ), in the upper part, and
dotted lines represent a relation whose existence is ∈  (ProfProud), in the lower part. Each
known due to role rigidity. symbol  stands for a step forward in time.</p>
      <p>
        Gutiérrez-Basulto et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] showed that TAQ answering is undecidable for  ℰ ℒ. To restore
decidability, they considered the fragment  ℰ ℒ ○ , which only allows operators ○ and ○ − , and imposed additional
syntactic constraints based on some form of acyclicity (either on the description logics side, or on the
temporal side). The constraints were designed to enforce the crucial property of ultimate periodicity.
A TBox  is ultimately periodic if for all ,  ∈ NC( ), the languages { |  |=  ⊑ ○ ,  ∈ N}
and { |  |=  ⊑ ○ − ,  ∈ N} are regular,1 and TAQ answering with ultimately periodic  ℰ ℒ ○
TBoxes is in PSpace, for data complexity [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. It was left open whether every  ℰ ℒ ○ -TBox is ultimately
periodic and whether TAQ answering with  ℰ ℒ ○ -TBoxes is decidable.
      </p>
      <p>Our contribution is to link temporal reasoning with  ℰ ℒ ○ -TBoxes to the study of associated formal
languages, which allows us to close (negatively) these open questions and obtain additional results. We
work with  ℰ ℒ ○ -TBoxes in normal form, whose concept inclusions are of the form
 ⊑ ○ 
 ⊓ ′ ⊑ 
∃. ⊑ 
 ⊑ ∃.
(1)
with  ∈ Z encoded in unary. We will further consider two fragments of  ℰ ℒ ○ : the future fragment,
 ℰ ℒf○ uture, is obtained by setting  ⩾ 0, and the linear fragment,  ℰ ℒl○in, disallows concept inclusions
of the form  ⊓ ′ ⊑ . For simplicity, in this extended abstract we assume that all roles are rigid (all
the results hold without this assumption).</p>
      <p>
        Conjunctive grammars as introduced by Okhotin [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], have the form  = (, Σ, ), with an alphabet
Σ and finite sets  , of nonterminals, and , of rules of the form  →  &amp; , where  ∈  , and
,  ∈ ( ∪ Σ)* . The semantics extends that of context-free grammars [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], with  &amp; being the
intersection of languages generated by  and  . We write ( ) for the language generated by 
(such languages are called conjunctive). An example of a conjunctive language which is not context-free
is { |  ∈ N} = { | ,  ∈ N} ∩ { | ,  ∈ N}. We refer to the survey by Okhotin
[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] for more details.
      </p>
      <p>
        The membership problem for conjunctive grammars is P-complete [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. A language (or a grammar)
is called unary when the underlying alphabet contains just one symbol, i.e. Σ = {}. It follows from
Parikh’s Theorem [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] that every unary context-free language is regular. In contrast, there are unary
conjunctive languages that are nonregular [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], and it is even undecidable whether a given grammar
generates an empty language, or a regular language [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>TBoxes and grammars. We establish a correspondence between TBoxes of  ℰ ℒf○ uture and  ℰ ℒl○in and
unary grammars.</p>
      <p>
        Theorem 2. For every  ℰ ℒf○ uture-TBox  , one can construct in polynomial time a unary conjunctive
grammar  = ( , {},  ) such that for any ,  ∈ NC( ), there is  ∈  such that
 ∈  () if  |=  ⊑ ○ .
1Gutiérrez-Basulto et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] gave a diferent definition based on quasimodels, but it is equivalent to ours.
      </p>
      <p>We sketch the construction. Set  = { | ,  ∈ NC( )} and let  contain exactly the
following rules.</p>
      <p>→
→
→
→
→
,
,
 &amp; ,
,
  ,
for  ⊑  ∈  or  = 
for  ⊑ ○  ∈  ,  &gt; 0
for  ∈ NC( ),  ⊓  ⊑  ∈ 
for  ⊑ ∃., ∃. ⊑  ∈ 
for , ,  ∈ NC( )
(2)
(3)
(4)
(5)
(6)</p>
      <p>Intuitively, for every pair of concept names ,  ∈ NC( ),  encodes every possible way of
deriving (, ) from (, 0) with  : either directly (using (2) when  = 0 or (3) when  =  &gt; 0),
or by obtaining (, ) and (, ) that together give (, ) (4), or by going through an anonymous
object (5), or through an intermediate point (, ), 0 ⩽  ⩽  (6). See Figure 1b for an illustration.</p>
      <p>Interestingly, a converse translation is also possible.</p>
      <p>Theorem 3. For every unary conjunctive grammar  = (, {}, ), one can construct in polynomial
time a  ℰ ℒf○ uture-TBox  and  ∈ NC(), such that for every ℬ ∈  there is  ∈ NC() such that
 |=  ⊑ ○  if  ∈ (ℬ).</p>
      <p>When considering the linear fragment, a similar connection can be built using only context-free
grammars (over a two-symbol alphabet).</p>
      <p>Theorem 4. For every  ℰ ℒl○in-TBox  , there exists a context-free grammar Γ = ( , {, }, ′ ), of

size polynomial in | |, such that for any ,  ∈ NC( ), there is  ∈  such that  |=  ⊑ ○  if
there exists  ∈ Γ ( ) with #() − #() = .</p>
      <p>Here,  = { | ,  ∈ NC( )} is as in Theorem 2, and ′ contains exactly the rules defined
by (2), (3), (5), (6), as well as the following rules. 

→
 ||,
for  ⊑ ○  ∈  ,  &lt; 0
(3* )
In a word  ∈ {, }* , a symbol  corresponds to a step forwards in time, and a symbol  to a step
backwards. Otherwise, the intuition behind Γ is the same as that given for  .</p>
      <p>Note that Theorem 4 is not constructive: although Γ can be computed when all roles in  are rigid,
in the general case we could only prove that it exists.</p>
      <p>
        Consequences for temporal atomic query answering. Using Theorem 2, we show that TAQ
answering with  ℰ ℒf○ uture-TBoxes is decidable in polynomial time2. It also follows that one can use
tools that have been developed for conjunctive grammars, such as Whale Calf [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. Furthermore, by
Theorem 4 and Parikh’s Theorem [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], every  ℰ ℒl○in-TBox is ultimately periodic. Using this, we show
that TAQ answering with  ℰ ℒl○in-TBoxes is NL-complete for data complexity (and in ExpSpace for
combined complexity, when all role names are rigid).
      </p>
      <p>
        On the other hand, by Theorem 3 and results on unary conjunctive grammars [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], there exists a
 ℰ ℒf○ uture-TBox that is not ultimately periodic. Moreover, we show that deciding emptiness of unary
conjunctive grammars is reducible to TAQ answering with  ℰ ℒ ○ -TBoxes, or to TAQ answering with
 ℰ ℒf○ uture-TBoxes extended with rigid concept names. It follows that TAQ answering is undecidable in
these two cases. It is also undecidable to check if the language { |  |=  ⊑ ○ } is regular for a
 ℰ ℒf○ uture-TBox  and ,  ∈ NC( ).
      </p>
      <p>
        The fact that  ℰ ℒf○ uture is not ultimately periodic is arguably unexpected, as its temporal component,
LTL, is ultimately periodic [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], and its DL component, ℰ ℒ, is such that every pair ( , ) possesses
a canonical model which has, informally speaking, a regular structure [16]. It remains open if
ultimate periodicity of  ℰ ℒ ○ -TBoxes is decidable, since for the corresponding problem—given a unary
conjunctive grammar tell if all its nonterminals generate regular languages—no result is known.
2This can be alternatively derived from the results of Gutiérrez-Basulto et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] on the temporally acyclic  ℰℒ ○ .
      </p>
      <p>
        We hope to employ the TBox-grammar correspondence to develop a practical reasoner for  ℰℒf○ uture.
On the more theoretical side, it is possible that this correspondence can be lifted to more expressive
temporal description logics and more general classes of formal grammars (e.g. Boolean grammars [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]).
We also believe that our results may be of independent interest for the theory of unary conjunctive
grammars.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Acknowledgments</title>
      <p>Many thanks to Roman Kontchakov for introducing us to the problem of ultimate periodicity from the
perspective of semilinear sets. We would also like to thank Alexander Okhotin for providing us with
the code of Whale Calf and valuable suggestions on the implementation.</p>
    </sec>
    <sec id="sec-3">
      <title>Declaration on Generative AI</title>
      <p>The authors have not employed any Generative AI tools.
[16] R. Kontchakov, M. Zakharyaschev, An introduction to description logics and query rewriting, in:
RW, 2014. doi:10.1007/978-3-319-10587-1\_5.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Bourgaux</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gnatenko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Thomazo</surname>
          </string-name>
          ,
          <article-title>Analysing temporal reasoning in description logics using formal grammars</article-title>
          , in: ECAI (to appear),
          <year>2025</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>V.</given-names>
            <surname>Gutiérrez-Basulto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Jung</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kontchakov</surname>
          </string-name>
          ,
          <article-title>Temporalized EL ontologies for accessing temporal data: Complexity of atomic queries</article-title>
          ,
          <source>in: IJCAI</source>
          ,
          <year>2016</year>
          . URL: http://www.ijcai.org/Abstract/16/160.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Artale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kontchakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lutz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Wolter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zakharyaschev</surname>
          </string-name>
          ,
          <article-title>Temporalising tractable description logics</article-title>
          ,
          <source>in: TIME</source>
          ,
          <year>2007</year>
          . doi:
          <volume>10</volume>
          .1109/TIME.
          <year>2007</year>
          .
          <volume>62</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Artale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kontchakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Wolter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zakharyaschev</surname>
          </string-name>
          ,
          <article-title>Temporal description logic for ontologybased data access</article-title>
          ,
          <source>in: IJCAI</source>
          ,
          <year>2013</year>
          . URL: http://www.aaai.org/ocs/index.php/IJCAI/IJCAI13/paper/ view/6824.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Artale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kontchakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kovtunova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Ryzhikov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Wolter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zakharyaschev</surname>
          </string-name>
          ,
          <article-title>First-order rewritability and complexity of two-dimensional temporal ontology-mediated queries</article-title>
          ,
          <source>J. Artif. Intell. Res</source>
          . (
          <year>2022</year>
          ). doi:
          <volume>10</volume>
          .1613/JAIR.1.13511.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Artale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kontchakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kovtunova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Ryzhikov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Wolter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zakharyaschev</surname>
          </string-name>
          ,
          <article-title>Ontologymediated query answering over temporal data: A survey (invited talk)</article-title>
          ,
          <source>in: TIME</source>
          ,
          <year>2017</year>
          . doi:
          <volume>10</volume>
          . 4230/LIPICS.TIME.
          <year>2017</year>
          .
          <volume>1</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Okhotin</surname>
          </string-name>
          , Conjunctive grammars,
          <source>J. Autom. Lang. Comb</source>
          .
          <volume>6</volume>
          (
          <year>2001</year>
          )
          <fpage>519</fpage>
          -
          <lpage>535</lpage>
          . doi:
          <volume>10</volume>
          .25596/ JALC-2001-519.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>N.</given-names>
            <surname>Chomsky</surname>
          </string-name>
          ,
          <article-title>Three models for the description of language</article-title>
          ,
          <source>IRE Transactions on Information Theory</source>
          <volume>2</volume>
          (
          <year>1956</year>
          )
          <fpage>113</fpage>
          -
          <lpage>124</lpage>
          . doi:
          <volume>10</volume>
          .1109/TIT.
          <year>1956</year>
          .
          <volume>1056813</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A.</given-names>
            <surname>Okhotin</surname>
          </string-name>
          ,
          <article-title>Conjunctive and boolean grammars: The true general case of the context-free grammars</article-title>
          ,
          <source>Computer Science Review</source>
          <volume>9</volume>
          (
          <year>2013</year>
          )
          <fpage>27</fpage>
          -
          <lpage>59</lpage>
          . doi:
          <volume>10</volume>
          .1016/j.cosrev.
          <year>2013</year>
          .
          <volume>06</volume>
          .001.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>A.</given-names>
            <surname>Okhotin</surname>
          </string-name>
          ,
          <article-title>A recognition and parsing algorithm for arbitrary conjunctive grammars</article-title>
          ,
          <source>Theoretical Computer Science</source>
          <volume>302</volume>
          (
          <year>2003</year>
          )
          <fpage>365</fpage>
          -
          <lpage>399</lpage>
          . doi:https://doi.org/10.1016/S0304-
          <volume>3975</volume>
          (
          <issue>02</issue>
          )
          <fpage>00853</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>R. J.</given-names>
            <surname>Parikh</surname>
          </string-name>
          ,
          <article-title>On context-free languages</article-title>
          ,
          <source>J. ACM</source>
          <volume>13</volume>
          (
          <year>1966</year>
          )
          <fpage>570</fpage>
          -
          <lpage>581</lpage>
          . doi:
          <volume>10</volume>
          .1145/321356.321364.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>A.</given-names>
            <surname>Jeż</surname>
          </string-name>
          ,
          <article-title>Conjunctive grammars generate non-regular unary languages</article-title>
          ,
          <source>Int. J. Found. Comput. Sci</source>
          .
          <volume>19</volume>
          (
          <year>2008</year>
          )
          <fpage>597</fpage>
          -
          <lpage>615</lpage>
          . doi:
          <volume>10</volume>
          .1142/S012905410800584X.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Jeż</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Okhotin</surname>
          </string-name>
          ,
          <article-title>Conjunctive grammars over a unary alphabet: Undecidability and unbounded growth</article-title>
          ,
          <source>Theory of Computing Systems</source>
          <volume>46</volume>
          (
          <year>2010</year>
          )
          <fpage>27</fpage>
          -
          <lpage>58</lpage>
          . doi:
          <volume>10</volume>
          .1007/s00224-008-9139-5.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>A.</given-names>
            <surname>Okhotin</surname>
          </string-name>
          ,
          <article-title>Whale calf, a parser generator for conjunctive grammars</article-title>
          ,
          <source>in: CIAA</source>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>A. P.</given-names>
            <surname>Sistla</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. M.</given-names>
            <surname>Clarke</surname>
          </string-name>
          ,
          <article-title>The complexity of propositional linear temporal logics</article-title>
          ,
          <source>J. ACM</source>
          <volume>32</volume>
          (
          <year>1985</year>
          )
          <fpage>733</fpage>
          -
          <lpage>749</lpage>
          . doi:
          <volume>10</volume>
          .1145/3828.3837.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>