<!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>A Formal Comparison between Datalog-based Languages for Stream Reasoning</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Nicola Leone</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marco Manna</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maria Concetta Morelli</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Simona Perri</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Mathematics and Computer Science, University of Calabria</institution>
          ,
          <addr-line>Rende</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <fpage>151</fpage>
      <lpage>165</lpage>
      <abstract>
        <p>The paper investigates the relative expressiveness of two logic-based languages for reasoning over streams, namely LARS Programs - the language of the Logic-based framework for Analytic Reasoning over Streams called LARS - and LDSR - the language of the recent extension of the -DLV system for stream reasoning called I-DLV-sr. Although these two languages build over Datalog, they do difer both in syntax and semantics. To reconcile their expressive capabilities for stream reasoning, we define a comparison framework that allows us to show that, without any restrictions, the two languages are incomparable and to identify fragments of each language that can be expressed via the other one.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Stream Reasoning</kwd>
        <kwd>Datalog</kwd>
        <kwd>Knowledge Representation and Reasoning</kwd>
        <kwd>Relative Expressiveness</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>exactly the mission of the present paper. To this aim, the prime objective is to compare LDSR
with one of the most famous and well-studied formalisms for reasoning over streams that goes
under the name of LARS Programs (the language of LARS), where LARS is the Logic-based
framework for Analytic Reasoning over Streams [8]. More precisely, the paper investigates the
relative expressiveness of LDSR and LARS Programs. Despite the fact that these languages build
over Datalog and represent the information via sets of ASP ground predicate atoms associated
with diferent time points, unfortunately they overall difer both in syntax and semantics. In
particular, LDSR associates information that is true at every time point with standard ASP facts,
whereas LARS Programs involve background atoms whose truth is not directly associated with
all the time points. Moreover, given an input stream, LDSR returns a single set of information
related to the most recent time point (streaming model), whereas LARS Programs associate, for
each diferent time point of the stream, another stream called answer stream at that time point.</p>
      <p>To reconcile the expressive capabilities for stream reasoning of LDSR and LARS Programs,
we first define a comparison framework that allows to understand in which cases, starting from
the same input stream, both languages may produce the same output. Inside this framework,
we identify three output profiles —called atomic, bound, and full— that fix the form of the
output stream. Without any restriction on the two languages, the paper shows that they are
incomparable under all the output profiles. Eventually, for each output profile, the paper isolates
large fragments of each of the two languages that can be expressed via the other one.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Preliminaries</title>
      <p>We assume to have finite sets , ,  and  consisting of variables, constants, predicate names
and   respectively; we constrain  and  to be disjoint. A term is either a variable
in  or a constant in . A predicate atom has the form (1, . . . , ), where  ∈  is a predicate
name, 1, . . . ,  are terms and  ≥ 0 is the arity of the predicate atom; a predicate atom () of
arity 0 can be also denoted by . A predicate atom is ground if none of its terms is a variable.
We denote by  the set of all ground predicate atoms constructible from predicate names in
 and constants in . We divide the set of predicates  into two disjoint subsets, namely the
extensional predicates  and the intensional predicates  . Extensional predicates are further
partitioned into  for background data and  for data streams. The mentioned partitions
are analogously defined for ground atoms  , and . In what follows we will introduce
diferent types of constructs peculiar to the two languages considered in this paper. In both,
given a set of constructs , we will denote by () the set of predicates appearing in .</p>
      <p>A stream Σ is a sequence of sets of ground predicate atoms ⟨0, . . . , ⟩ such that for
0 ≤  ≤ ,  ⊆ . Each natural number  is called time point. A ground predicate atom  ∈ 
is true at the -th time point. Given a value  ∈ N s.t. 0 ≤  ≤ , we define the restriction of
Σ to  the stream ⟨0, . . . , ⟩ denoted with Σ| . Moreover, let  ⊆  we indicate with Σ|
the stream ⟨0′, . . . , ′⟩ with ′ = ⋃︀{∈|()∈ }  for each  ∈ {0, . . . , }. A subset of a
stream Σ = ⟨0, . . . , ⟩ is a stream Σ′ = ⟨0′, . . . , ′⟩ such that ′ = ∅ for each  ̸∈ (Σ′)
where (Σ′) is a subset of consecutive numbers of the set {0, . . . , } and for each  ∈ (Σ′)
′ ⊆ . For a stream Σ = ⟨0, . . . , ⟩, a backward observation identifies ground predicate
atoms that are true at some time points preceding the -th time point. More formally, given
a stream Σ = ⟨0, . . . , ⟩ and a set of numbers  ⊂ N, we define the backward observation
of Σ w.r.t.  as the family of sets { |  =  −  with  ∈  ∧  ≥ 0}, and we denote it as
(Σ, ). Given  ∈ N, a backward observation of Σ w.r.t. {0, . . . , } is called window.</p>
      <sec id="sec-2-1">
        <title>2.1. LARS syntax and semantics</title>
        <p>A window function is a function  that returns, given a stream Σ and a time point  ∈ {1, ..., },
a substream of Σ. We consider only time-based window functions, which select all the atoms
appearing in the last  time points, to which a window is trivially associated according to
the definition above. Given a predicate atom , a term  ∈  ∪  and a window function ,
formulas  are defined by the following grammar:</p>
        <p>::=  | ¬ |  ∧  |  ∨  |  →  | ◇  | □  | @ | ⊞   | ◁ .</p>
        <p>A LARS program P is a set of rules of the form  ←  1, . . . ,  , where ,  1, . . . ,   are
formulas. Given a rule , we call  the head of , denoted with (), and we call the conjunction
 1 ∧ · · · ∧   the body of , denoted with (). A ground formula can be satisfied at a time
point  in a  that is a triple  = (Σ, , ) where Σ is a stream,  is a set of window
functions and  ⊆ . Let Σ′ ⊆ Σ, we start defining the entailment relation ⊩ between
(, Σ′, ) and formulas:
• , Σ′,  ⊩  if  ∈  or  ∈ 
• , Σ′,  ⊩ ¬ if ,  ⊮ 
• , Σ′,  ⊩  ∧  if ,  ⊩  and ,  ⊩ 
• , Σ′,  ⊩  ∨  if ,  ⊩  or ,  ⊩ 
• , Σ′,  ⊩  →  if ,  ⊮  or ,  ⊩ 
• , Σ′,  ⊩ ◇  if , Σ′,  ⊩  for some ′ ∈ (Σ′)
• , Σ′,  ⊩ □  if , Σ′,  ⊩  for all ′ ∈ (Σ′) ,
• , Σ′,  ⊩ @′  if , Σ′, ′ ⊩  and ′ ∈ (Σ′) ,
• , Σ′,  ⊩ ⊞   , if , Σ′′,  ⊩  where Σ′′ = (Σ′, ),
• , Σ′,  ⊩ ◁ if , Σ,  ⊩  .</p>
        <p>The structure  = (Σ, , ) satisfies  at time  (,  |=  ) if , Σ′,  ⊩  . Given a ground
LARS program  , a stream Σ and a structure  we say that: ()  is a model of rule  ∈  for
 at time , denoted ,  |= , if ,  |= () → (); ()  is a model of  for  at time
, denoted ,  |=  , if ,  |=  for all rules  ∈  ; ()  is a minimal model, if no model
 ′ = (Σ′, , ) of  for  at time  exists such that Σ′ ⊂ Σ and (Σ) = (Σ′); and () The
reduct of a program  with respect to  at time  is defined by  , = { ∈  |,  |= ()}.
Fixed an input stream , contains only atoms belong to , we call  
   any stream Σ such that all atoms that occur in Σ but not in  have intensional predicates.
An interpretation stream Σ for a stream  is an   of a program      , if
 = (Σ, , ) is a ⊆ -minimal model of the reduct  , for  at time . The semantics of the
non-ground programs is given by the answer streams of according groundings, obtained by
replacing variables with constants from , respectively time points from (Σ), in all possible
ways. We consider LARS programs with a single answer stream for each time point, denoted
with LARSD, and we indicate the single answer stream of  for  at  with (, , ).
 at least  in {1, . . . , } |{ ∈ (Σ, ) :  ∈ }| ≥  |{ ∈ (Σ, ) :  ∈ }| &lt; 
 always in {1, . . . , }
 count  in {1, . . . , }
∀ ∈ (Σ, ),  ∈</p>
        <p>∃ ∈ (Σ, ) :  ̸∈ 
|{ ∈ (Σ, ) :  ∈ }| =  |{ ∈ (Σ, ) :  ∈ }| ̸=</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. LDSR syntax and semantics</title>
        <p>non-empty set  = {1, . . . , } ⊂ N, we define three types of streaming atoms:
Given a predicate atom , a term  ∈  ∩ N+, a counting term  ∈ ( ∩ N+) ∪ , and a finite
 at least  in {1, . . . , } |  always in {1, . . . , } |  count  in {1, . . . , }
In particular, if  is of the form {0, ..., }, then this set can be alternatively written as []
inside streaming atoms; also we may write  in place of  at least 1 in [0]. A streaming
atom  (resp., not  ) is said to be a positive streaming literal (resp., negative streaming literal),
where not denotes negation as failure. A streaming literal is said to be harmless if it has form
 at least  in  or  always in ; otherwise, it is said to be non-harmless. A streaming
literal is said to be ground if none of its terms is a variable.</p>
        <p>
          A rule is a formula of form (
          <xref ref-type="bibr" rid="ref1">1</xref>
          )  : - 1, . . . , . or (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) #temp  : - 1, . . . , ., where  is
a predicate atom,  ≥
other literals defined in the ASP-Core-2 standard [19]).
        </p>
        <p>0 and 1, . . . ,  represent a conjunction of literals (streaming literals or
(false) at time point .
streaming literal of () also appear in a positive streaming literal of ().</p>
        <p>For a rule , we say that the head of  is the set () = {}, whereas the set () =
{1, . . . , } is referred to as the body of . A rule  is safe if all variables in () or in a negative</p>
        <p>
          A program  is a finite set of safe rules. We denote with form(
          <xref ref-type="bibr" rid="ref1">1</xref>
          )( ) the set of rules of  of
form (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) and with form(
          <xref ref-type="bibr" rid="ref2">2</xref>
          )( ) the set of rules of  of form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ).
        </p>
        <p>A program  is stratified
if there is a partition of disjoint sets of rules  = Π1 ∪ · · · ∪
Π
Π1, . . . , Π. An LDSR program is a program being also stratified.
literal in the body of a rule in Π with predicate , { ∈  |() = {(1, . . . , )}} ⊆
(called strata) such that for  ∈ {1, . . . , } both these conditions hold: () for each harmless
⋃︀
=1 Π ;
{(1, . . . , )}} ⊆
() for each non-harmless literal in the body of a rule in Π with predicate , { ∈  |() =
⋃︀− =11 Π . We call Π1, . . . , Π a stratification for  and  is stratified by</p>
        <p>A backward observation allows to define the truth of a ground streaming literal at a given
time point. Given a stream Σ = ⟨0, . . . , ⟩,  = {1, . . . , } ⊂
N,  ∈  ∖ {0} and the
backward observation (Σ, ), Table 1 reports when Σ entails a ground streaming atom 
(denoted Σ |=  ) or its negation (Σ |= not  ). If Σ |=  ( Σ |= not  ) we say that  is true</p>
        <p>To make a comparison between LARSD and LDSR, we defined also for LDSR a model-theoretic
semantics that can be shown to be equivalent to the operational semantics originally defined.
Moreover, besides the concept of streaming model for LDSR, we defined the concept of answer
stream.</p>
        <p>
          Consider an LDSR program  . Given a rule  ∈  , the ground instantiation () of 
denotes the set of rules obtained by applying all possible substitutions  from the variables in
 to elements of . In particular, to the counting terms are applied only constants belong to
 ∩ N+. Similarly, the ground instantiation ( ) of  is the set ⋃︀∈ (). Given a ground
rule  ∈  , a stream Σ = ⟨0, . . . , ⟩ and a stream Σ′ = ⟨0′, . . . , ′⟩ such that Σ ⊆ Σ′, we
say that Σ′ is a model of  for Σ, denoted Σ′ |= , if Σ′ |= () when Σ′ |= (). We say that
Σ′ is a model of  for Σ, denoted Σ′ |=  , if Σ′ |=  for all rules  ∈ ( ). Moreover, Σ′ is a
minimal model, if no model Ω of  exists such that Ω ⊂ Σ′ and (Ω) = (Σ′). Let Σ′ be a model
of  for Σ, an atom  ∈ ′ is temporary in Σ′ if  ̸∈  and there exists no rule  ∈ form(
          <xref ref-type="bibr" rid="ref1">1</xref>
          )( )
such that Σ′ |= () and Σ′ |= (). Accordingly, let  (′) be the set of all temporary atoms
in ′, the stream ⟨0′, . . . , ′ ∖  (′)⟩ is called the permanent part of Σ′. Eventually, the reduct
of  w.r.t. Σ′, denoted by  Σ′ , consists of the rules  ∈ ( ) such that Σ′ |= ().
Definition 1. Given an LDSR program  , a stream Σ = ⟨0, . . . , ⟩ and a stream Σ′ =
⟨0′, . . . , ′⟩ such that Σ ⊆ Σ′, Σ′ is called answer stream and ′ streaming model of  for Σ if:
(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) if  &gt; 0, ⟨0′⟩ is the permanent part of the minimal model  of the reduct   for the stream
⟨0⟩; (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) if  &gt; 0, for all  ∈ 1, . . . ,  − 1, Σ′ is the permanent part of the minimal model 
|
of the reduct   for the stream ⟨0′, . . . , ′− 1, ⟩; and (
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) Σ′ is a minimal model of the reduct
 Σ′ for the stream ⟨0′, . . . , ′− 1, ⟩.
        </p>
        <p>Note that, diferently from LARS, for which the information associated with each time point
is entirely derived at the time point of evaluation, for LDSR, each time point  in the answer
stream is associated with the information derived when the time point  has been evaluated. In
other words, the answer stream for LDSR is obtained by collecting the results of the previous
time points and integrating them with the result of the time point of evaluation.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Framework</title>
      <p>In this section, we present the framework that has been designed for comparing the languages
LARSD and LDSR. The comparison focuses on diferent parts of the answer stream. In particular,
given an input stream  = ⟨0, . . . , ⟩, when referring to an evaluation time point  ≤ ,
one could compare the answer streams only at , or in all the time points up to  or also in
all time points up to . To this aim, we define three types of streams. Given  ∈ N and
 ∈ {0, . . . , }, we say that a stream  = ⟨0, . . . , ⟩ is of  - if  = ∅ for each
 ∈ {0, . . . , } ∖ {}; - if  = ∅ for each  ∈ { + 1, . . . , }; and -full if  may be
nonempty for each  ∈ {0, . . . , }.</p>
      <p>Consider a language  ∈ {LDSR, LARSD}, an input stream  = ⟨0, . . . , ⟩, a set of ground
predicate atoms  ⊆  and a program  ∈ , we call (, ,  ) an -tuple. According to the
three types of streams, for a -tuple and for each time point  ∈ {0, . . . , }, we now define
three types of output streams for each language .</p>
      <p>Given a LDSR- (, ,  ) and a time point  ∈ {0, . . . , }, we define:
• -(, ,  ) = ⟨0, . . . , ⟩ where  = ∅ for  ̸=  and  is the streaming
model of  ∪ {.| ∈ } on | = ⟨0, . . . , ⟩.
• -(, ,  ) = ⟨0, . . . , ⟩, where ⟨0, . . . , ⟩ is the answer stream of  ∪
{.| ∈ } for | = ⟨0, . . . , ⟩ and  = ∅ for  &lt;  ≤ .
• -full (, ,  ) = ⟨0, . . . , ⟩ where ⟨0, . . . , ⟩ is the answer stream of  ∪ {.| ∈
} for | = ⟨0, . . . , ⟩ and  =  ∪  for  &lt;  ≤ .</p>
      <p>Analogously, given a LARSD- (, ,  ) and a time point  ∈ {0, . . . , }, and the answer
stream (, , ) = ⟨0, . . . , ⟩, we define:
• -(, ,  ) = ⟨0, . . . , ⟩ where  = ∅ for  ̸=  and  =  ∪ .
• -(, ,  ) = ⟨0, . . . , ⟩, where  =  ∪  for 0 ≤  ≤  and  = ∅ for
 &lt;  ≤ .</p>
      <p>• -full (, ,  ) = ⟨0, . . . , ⟩ where  =  ∪  for 0 ≤  ≤ .</p>
      <p>We now define when a fragment of a language can be expressed in the other one in our
framework. In particular, we diferentiate expressible fragments from strictly expressible
fragments. Given a stream form  ∈ {, , full },and 1, 2 ∈ {LDSR, LARSD} with
1 ̸= 2, a fragment  ⊂ 1 is - via 2 if there exists a mapping  :  → 2 such
that, for each  -tuple (, ,  ) and for each time point of evaluation  ∈ {0, . . . , }, it holds
that -(, ,  ) = -(, ,  ( ))|( ∪∪) ; moreover,  is  - via 2
if -(, ,  ) = -(, ,  ( )). Basically, for the non strict expressiveness, a translation into
the other language is possible but it can involve the addition of auxiliary predicates, while for
the strict one, there is a translation that does not require auxiliary predicates and thus for which
the outputs coincide without the need of any filtering.</p>
      <p>We are now ready to compare the two languages. The first result of the comparison is that,
without any restrictions, the two languages are incomparable. The following two propositions
describe the results. The ideas behind the formal demonstrations, which are instead reported in
Appendix B [20], are also introduced.</p>
      <p>Proposition 1. LARSD is not - via LDSR.</p>
      <p>To see this, consider the simple LARSD program 1={@ − 1  ← @ .}. This program, that
expresses that the presence of an atom  in a time point infers the presence of an atom  in the
previous time point, is not expressible in LDSR since in its semantic the information associated
at every time point are relative only to the information received and inferred up to it.
Proposition 2. LDSR is not - via LARSD.</p>
      <p>To prove this result, consider the following LDSR program 2 = {( ) : - (), (,  ).}
where the predicate  belongs to the input predicates . The program 2 is not expressible in
LARSD since its semantics avoids to infer ground atoms over input predicates.</p>
      <p>Since -(, ,  ) ̸= -(, ,  ( )) implies -(, ,  ) = -(, ,  ( ))
holds for  ∈ {, full }, Proposition 1 and 2 imply the following result.</p>
      <sec id="sec-3-1">
        <title>Theorem 1. LARSD and LDSR are incomparable under each of the three stream forms.</title>
        <p>strictly
not strictly

strictly
not strictly</p>
        <p>Given the incomparability of the languages, we introduced some restrictions to identify
fragments of a language expressible in the other. Up to now, we identified seven fragments
that are described in detail in sections 3.1 and 3.2. Here, we briefly discuss their relations and
expressiveness (see Fig. 1 and Tables 2 and 3). In particular, Table 2 presents the fragments of
LARSD 1, 2 and 3. All of them are strictly expressible via LDSR. 1 is the largest identified
fragment and it is atomic-expressible; 2 is obtained from 1 by imposing some restriction and
it is bound-expressible, while 3 is obtained by further restricting 2, and allows for achieving
full-expressivity.</p>
        <p>As for LDSR, Table 3 summarizes its identified fragments 4,5,6 and 7. The largest
fragment is 4, which is bound-expressible via LARSD; the fragment 5, that restricts 4, allows
full expressiveness; the other two fragments allows for strictly expressiveness: 6 further
restricts 5, and it is full-expressible, while 7 is obtained by imposing restrictions on 4 and is
bound-expressible.
3.1. LARSD to LDSR
Here we present the identified fragments of LARSD. We consider two types of rules:
( ) □ ( ←
 1 ∧ · · · ∧
 )
and
(II )  ←
 1, . . . ,  
for  ∈ {1, . . . , }. For a rule of type (), we denote as () the consequent {} of the
implication, and with () the set of formulas { 1, . . . ,  } in the premise; moreover, for a
rule of type (II ), we denote with ℎ() the atom {} and with () the set of formulas
{ 1, . . . ,  }. Let  be a LARSD program, we denote with  ( ) the set of rules of  of type
() and with II ( ) the set of rules of  of type (II ).</p>
        <p>We say that a predicate  is marked if there are two rules  ∈  ( ) and ′ ∈ II ( )
with  = (()), ℎ ∈ (()) and ℎ = (ℎ(′)). The set of marked
predicates of a program  is denoted with  ( ).</p>
        <p>
          Consider a LARSD program  containing rules of type () and (II ) only. Let 1 =
 ( ) and 2 = II ( ). We define the graph ( ) = ⟨, ⟩, where: (
          <xref ref-type="bibr" rid="ref1">1</xref>
          )  =
(∪∈1 (())) ∪ (∪∈2 (ℎ())); (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) (, , “+”) ∈  if there exists a rule  ∈ 1
with (()) =  and  ∈ (()) occurring in a formula without negation
or if there exists a rule ′ ∈ 2 with (ℎ(′)) =  and  ∈ ((′)) occurring
in a formula without negation; and (
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) (, , “-”) ∈  if there exists a rule  ∈ 1 with
(()) =  and  ∈ () occurs in a formula with negation or if there exists a
rule ′ ∈ 2 with (ℎ(′)) =  and  ∈ ((′)) occurring in a formula with
negation.
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>Definition 2. Fragment 1 of LARSD collects all the programs  that meet the next condi</title>
        <p>tions: ()  =  ( ) ∪ II ( ); () ∪∈ ( )(()) ∩  ( ) = ∅; ()
∪∈II ( )(()) ∩  ( ) = ∅; () no cycle in ( ) contains an arc labeled with “-".
Roughly, 1 contains only programs that are stratified w.r.t negation, featuring only rules of
types (I) and (II), where no marked predicate appears in premises and in bodies.</p>
      </sec>
      <sec id="sec-3-3">
        <title>Proposition 3. 1 is strictly atomic-expressible via LDSR.</title>
        <p>
          Indeed, it can be shown that there is a mapping  1 : 1 → LDSR such that for each 1-
(, ,  ) and for each time point of evaluation  ∈ {0, . . . , }, it holds that -(, ,  ) =
-(, ,  1( )). In particular, given a program  ∈ 1, the LDSR program  1( ) is
obtained by replacing:
- each rule □ ( ←  1, . . . ,  ) of type () with the LDSR rule  : -  ( 1), . . . ,  ( ) of
form (
          <xref ref-type="bibr" rid="ref1">1</xref>
          )
- each rule  ←  1, . . . ,   of type () with the LDSR rule
#temp  : -  ( 1), . . . ,  ( ) of form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          )
where  associates each LARSD formula in the 1 fragment with a LDSR streaming atom as
reported below:
-  (⊞ ♢ ) =  in [].
-  (⊞ □ ) =  always in [].
-  () = .
Intuitively, the idea of the mapping  1 is that LARSD rules of type () that must be evaluated
at each time point are associated with  rules of form (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) and LARSD rules of type (II )
that infer information only at the evaluation time point  are associate with LDSR rules of form
(
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) which are evaluated at each time point but the derivations of the time points preceding 
have been forgotten via the #temp operator. Moreover, we impose the restrictions () and
() for defining 1 in order to achieve atomic-expressiveness; indeed, they ensure that, if in
LDSR a permanent information is derived relying on a temporary information, this is not used
to derive other information.
        </p>
        <p>Now, we define the fragment 2 that imposes an additional restriction w.r.t to 1, and the
fragment 3 that further restricts 2.</p>
      </sec>
      <sec id="sec-3-4">
        <title>Definition 3. The fragment 2 of LARSD is the subset of the programs of 1 that meet the</title>
        <p>condition (⋃︀∈II ( ) (ℎ())) ∩ ((⋃︀∈ ( ) (()) = ∅.</p>
      </sec>
      <sec id="sec-3-5">
        <title>Proposition 4. 2 is strictly bound-expressible via LDSR.</title>
        <p>It can be shown that for the mapping  2 =  1|2 , it holds that for each 2- (, ,  ) and for
each time point of evaluation  ∈ {0, . . . , }, -(, ,  ) = -(, ,  2( )).
Basically, the additional condition for fragment 2 avoids that a temporary information associated
to a time point can generate a permanent information.</p>
        <p>We now show an example of a program belonging to fragment 2 and its image with respect
to the function  2. The example is taken from one of the tasks of the “model and solve” Stream
Reasoning Hackathon 2021 [21]. The task concerns urban trafic management. Trafic is
observed from a top-down, third-person perspective, and vehicle movement flows in a given
road network coded as Datalog facts are considered. We want to identify the vehicles that
appear or disappear in the network. It is then necessary to note vehicles that were absent at the
previous time point and are now present and vice versa. A rule of type () is used to evaluate
the presence of vehicles at the current and previous time points; then the obtained information
is used in a rule of type (II ) that detects the appearance or disappearance of a vehicle at the
evaluation time point. This task can be modelled via the following program  in 2:
□ ( ( ℎ) ← ( ℎ, ,  )).
( ℎ) ← ( ℎ, ,  ), ¬ ⊞ 0 @ ⊤ ∧ @ − 1 ( ℎ).
( ℎ) ← ⊞ 0@ ⊤ ∧ @ − 1 ( ℎ), ¬ ( ℎ).
The corresponding LDSR program, image of the  2 function, is:</p>
        <p>( ℎ) : - ( ℎ, ,  ).
#temp ( ℎ) : - ( ℎ, ,  ), not  ( ℎ) in {1}.
#temp ( ℎ) : - ( ℎ, ,  ) in {1}, not  ( ℎ).</p>
      </sec>
      <sec id="sec-3-6">
        <title>Definition 4. The fragment 3 of LARSD is the subset of the programs of 2 that meet the</title>
        <p>condition  = II ( ).</p>
      </sec>
      <sec id="sec-3-7">
        <title>Proposition 5. 3 is strictly full-expressible via LDSR.</title>
        <p>
          Similarly to 2, it can be shown that, considering the mapping  3 =  1|3 , it holds that that for
each 3- (, ,  ) and for each time point of evaluation  ∈ {0, . . . , }, -full (, ,  ) =
-full (, ,  3( )). Intuitively, since in LDSR the evaluation of a program with respect to a
time point  can not add information in the output stream at time points that are subsequent to
, to achieve full expressiveness, we impose the restriction to rules of type type (II ) in LARSD
as these are evaluated only at  and do not change the output in the subsequent time points.
3.2. LDSR to LARSD
Here we present the identified fragments of LDSR along with their expressiveness. While, for
the fragments of LARSD we obtained strict expressiveness and each rule in LARSD has been
translated into exactly one rule in LDSR, for the fragments of LDSR, the translation, in general,
needs auxiliary atoms and additional rules to simulate the behavior of rules of the form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) and
of some streaming and aggregates atoms.
        </p>
        <p>The largest identified fragment is 4 that is defined as follows.</p>
      </sec>
      <sec id="sec-3-8">
        <title>Definition 5. The fragment 4 is the subset of the LDSR programs  that meet the condition</title>
        <p>⋃︀∈ (()) ⊂   .</p>
        <p>Basically, 4 is obtained from LDSR by simply imposing that no extensional predicate appears
in the head of a rule.</p>
      </sec>
      <sec id="sec-3-9">
        <title>Proposition 6. 4 is bound-expressible via LARSD.</title>
        <p>It can be shown that there is a mapping  4 : 4 → LARSD such that for each 4- (, ,  )
and for each  ∈ {0, . . . , }, -(, ,  ) = -(, ,  4( ))|( ∪∪) . First, we
note that, in general, each streaming atom in 4 has to properly translated into a LARSD formula;
moreover a special rewriting, requiring additional rules, has to be performed for streaming atoms
of the form  count  in {1, . . . , }, where  is a variable in  and for all the aggregate
atoms. Thus, without going into details, the mapping  4 relies on a function  that associates
each streaming atom (but those of form  count  in {1, . . . , }) with a LARSD formula that
expresses the condition that must be satisfied in the stream for the streaming atom to be true;
moreover, if  is an aggregate atom or a streaming atom of the form  count  in {1, . . . , },
 associates it with a formula containing auxiliary atoms defined via an additional set of rules
 that are needed to simulate its semantics. For the sake of the presentation, the function 
and the set of additional rules  are reported in Appendix A.1 [20].</p>
        <p>
          Furthermore, given a program  ∈ 4, the mapping  4 has to replace each rule  in  with
one or more LARSD rules. In sum, the program  4( ) is obtained by:
- replacing each rule  : -  1, . . . ,   of form (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) with the LARSD rule □ ( ← ⊞ 0@ ⊤ ∧
( 1) ∧ · · · ∧ ( )).
- for each rule #temp  : -  1, . . . ,   of form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ),
- replacing it with the LARSD rule  ← ⊞ 0@ ⊤, ( 1), . . . , ( )
- adding the rule □ ( ← ⊞ 0@ ⊤ ∧ ( 1) ∧ · · · ∧
( )).
- adding for each streaming atom  of the form  count  in {1, . . . , }, where  is a
variable in  or aggregates atom, a set of rules  .
        </p>
        <p>
          Basically, the mapping  4 manages the interaction between the two forms of rules, simulating,
at an evaluation time point , the temporary derivations obtained in the previous time points
and evaluating their efect on the permanent derivations that will be part of the output. This
is mainly obtained by creating and handling a copy of each rule of the form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) where the
sufix “temp” is added to the head predicate. Moreover, since the streaming atoms in LDSR are
evaluated according to the backward observation, we need to identify the reference time point
in which the  formulas representing the conditions expressed by the streaming atoms
have to checked. To do this, we use the formula ⊞ 0@ ⊤ that evaluates the tautology within a
window of size 0 and thus, it holds in the rule instance where the variable  corresponds to the
reference time point.
        </p>
        <p>
          We are now ready to define the fragment 5 that is obtained from 4 by avoiding rules of
form (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ).
        </p>
      </sec>
      <sec id="sec-3-10">
        <title>Definition 6. The fragment 5 of LDSR is the subset of the programs of 4 that meet the condition</title>
        <p>= form2( ).</p>
        <p>Proposition 7. 5 is full - via LARSD.</p>
        <p>
          To see this, consider, the mapping  5 : 5 → LARSD such that, for each program  ∈ 5,  5( )
is obtained by:
- replacing each rule #temp  : -  1, . . . ,   of form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) , with the LARSD rule  ←
⊞ 0@ ⊤, ′( 1), . . . , ′( ).
- adding for each streaming atom  of the form  count  in {1, . . . , }, where  is a
variable in  or aggregates atom, a set of rules  .
        </p>
        <p>
          It can be shown that  5 is such that for each 5- (, ,  ) and for each  ∈ {0, . . . , },
-full (, ,  ) = -full (, ,  5( ))|( ∪∪) . Roughly, similarly to  4,  5 relies on a
function ′ for rewriting body atoms and adds auxiliary rules for handling aggregate atoms or a
streaming atoms of the form  count  in {1, . . . , } (more details on this are reported in
Appendix A.2 [20]); however the translation for the fragment 5 is simpler than the one for
4, as it is suficient to associate each rule of form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) with a LARSD rule of type (II). Indeed,
since rules of form (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) are not allowed, there is no need to consider the information that can be
derived in a permanent way through them. The condition defining the fragment 5 ensures
the full expressiveness: since a program in this fragment features only rules of form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ), and its
translation only rules of type (II), their evaluation at each time point  can derive information
only at , while leaving unchanged the output in the other time points.
        </p>
        <p>The fragment 6 restrict 5 to reach strict full expressiveness.</p>
      </sec>
      <sec id="sec-3-11">
        <title>Definition 7. The fragment 6 of LDSR is the subset of the programs of 5 in which streaming</title>
        <p>atoms of the form  count  in {1, . . . , } where  ∈  and aggregate atoms are not allowed
in rule bodies.</p>
      </sec>
      <sec id="sec-3-12">
        <title>Proposition 8. 6 is strictly full-expressible via LARSD.</title>
        <p>It can be shown that for the mapping  6 =  5|6 , it holds that for each 6- (, ,  ) and
for each  ∈ {0, . . . , }, -full (, ,  ) = -full (, ,  6( )). Since no atoms involving the
addition of auxiliary predicates are considered, 6 is strictly expressible.</p>
        <p>
          The last considered fragment 7 still features strict expressiveness, but of bound type, as,
diferently from 6, it allows also rules of form (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) to some extent.
        </p>
      </sec>
      <sec id="sec-3-13">
        <title>Definition 8. The fragment 7 of LDSR is the subset of the programs of 4 that meet the following</title>
        <p>conditions: () (∪∈form2( )((()))∩(∪∈form2 (P)((())) = ∅ () streaming atoms
of the form  count  in {1, . . . , } where  ∈  and aggregate atoms are not allowed in
rule bodies.</p>
      </sec>
      <sec id="sec-3-14">
        <title>Proposition 9. 7 is strictly bound-expressible via LARSD.</title>
        <p>
          It can be shown that there is a mapping  7 : 7 → LARSD such that for each 7- (, ,  )
and for each  ∈ {0, . . . , }, -(, ,  ) = -(, ,  7( )). To see this, consider,
the mapping  7 : 7 → LARSD such that, for each program  ∈ 7,  7( ) is obtained by:
- replacing each rule #temp  : -  1, . . . ,   of form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) with the LARSD rule  ←
⊞ 0@ ⊤, ′( 1), . . . , ′( ).
- replacing each rule  : -  1, . . . ,   of form (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) with the LARSD rule □ ( ← ⊞ 0@ ⊤ ∧
′′( 1) ∧ · · · ∧ ′′( ))
The mapping relies on the same function ′ as  5 for the rules of form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ). In addition, for the
rule of form (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ), a diferent function ′′ is used to associate the body streaming atoms with
 formulas based on the following definition.
        </p>
        <p>
          Definition 9. Given an atom (1, . . . , ) and a LDSR rule  with () = (′1, . . . , ′)
we call definition of (1, . . . , ) in , denoted with ((1, . . . , )), the conjunction
⋀︀{ ∈()}  ⋀︀1≤ ≤   = ′. Given an LDSR program  the definition of (1, . . . , ) in 
is  ((1, . . . , )) = (1, . . . , ) ∨ (⋁︀{∈ |(())=} ((1, . . . , ))).
This definition identifies, for each predicate  in the head of a rule of form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ), a  formula
relying only on permanent information that can be used in the  translation in place of
. Further details on the translation and the ′′ functions are reported in Appendix A.3 [20].
We note here that the strict expressiveness of this fragment is obtained since the translation of
the allowed streaming atoms does not require the use of additional atoms, and condition ()
simplifies the rewriting of the rules of form (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) w.r.t what fragment 4. Indeed, in this case, it is
not necessary to add the rules used by  4 such as □ ( ← ⊞ 0@ ⊤ ∧ ( 1) ∧ · · · ∧ ( ))
that required additional auxiliary atoms.
        </p>
        <p>Consider, for example, the LDSR program  ′ that could be used for monitoring irregularity in
a subway station monitoring system. Three minutes are expected to elapse between the arrival
of one train and the next, so the program records an irregularity when one train passes and
another has already passed in one of the previous two minutes:
 ′ = { : - _, _ at least 1 in {1, 2}.}
The program belongs to the 7 fragment, and the corresponding LARSD program with respect
to the  7 function is as follows:
 7( ′) = {□ ( ← ⊞ 0@ ⊤ ∧ (@1 _ ∧ 1 =  − 0)</p>
        <p>∧ (@2 _ ∧ ((2 =  − 1) ∨ (2 =  − 2))).}</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>This work presents a formal comparison about the relative expressiveness of the two languages
LDSR and LARS. The main contribution of the work is twofold: () we propose a suitable
framework to compare the two languages, which exhibit diferent syntax and semantics. and
() for each language, we identify a number of fragments that can be expressed by the other
one, showing possible rewritings. In order to compare the semantics of the two languages, we
ifrst provided an alternative equivalent model-theoretic definition of the semantics of LDSR,
instead of the operational one originally provided. Moreover, we defined the concept of answer
stream also for LDSR, as an extension of the streaming model. The framework allowed us for
focusing the comparison on diferent forms of the output stream (atomic, bound, full) and on
the nature of the rewriting that could forbid or admit the addition of auxiliary predicates (strict
or not strict expressiveness, respectively). For each given form of output and type of rewriting,
we studied how to build fragments of a language that could meet the desired expressiveness. To
do this, we considered the semantics behind each construct or combination of constructs that
can occur in the rules and the efect of interactions between the diferent rules. The fragments
1, ..., 7 are the largest we identified so far, but, of course, these could be further enlarged and
new ones could be possibly found; this will be the subject of future works.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This work has been partially supported by the project “MAP4ID - Multipurpose Analytics
Platform 4 Industrial Data”, N. F/190138/01-03/X44 and by the Italian MIUR Ministry and the
Presidency of the Council of Ministers under the project “Declarative Reasoning over Streams"
under the “PRIN" 2017 call (CUP 2417000080001, project 2017M9C25L_001).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>D.</given-names>
            <surname>Dell'Aglio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. D.</given-names>
            <surname>Valle</surname>
          </string-name>
          ,
          <string-name>
            <surname>F. van Harmelen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bernstein</surname>
          </string-name>
          ,
          <article-title>Stream reasoning: A survey and outlook</article-title>
          ,
          <source>Data Sci. 1</source>
          (
          <year>2017</year>
          )
          <fpage>59</fpage>
          -
          <lpage>83</lpage>
          . URL: https://doi.org/10.3233/DS-170006. doi:
          <volume>10</volume>
          .3233/ DS-170006.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>D. F.</given-names>
            <surname>Barbieri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Braga</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ceri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. D.</given-names>
            <surname>Valle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Grossniklaus</surname>
          </string-name>
          ,
          <string-name>
            <surname>C-</surname>
          </string-name>
          <article-title>SPARQL: a continuous query language for RDF data streams</article-title>
          ,
          <source>Int. J. Semantic Comput</source>
          .
          <volume>4</volume>
          (
          <issue>2010</issue>
          )
          <fpage>3</fpage>
          -
          <lpage>25</lpage>
          . URL: https://doi.org/10.1142/S1793351X10000936. doi:
          <volume>10</volume>
          .1142/S1793351X10000936.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Hoeksema</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Kotoulas</surname>
          </string-name>
          ,
          <article-title>High-performance distributed stream reasoning using s4</article-title>
          , in: Ordring Workshop at ISWC,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>T.</given-names>
            <surname>Pham</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. I.</given-names>
            <surname>Ali</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mileo</surname>
          </string-name>
          , C-ASP:
          <article-title>continuous asp-based reasoning over RDF streams</article-title>
          , in: M.
          <string-name>
            <surname>Balduccini</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Lierler</surname>
          </string-name>
          , S. Woltran (Eds.),
          <source>Logic Programming and Nonmonotonic Reasoning - 15th International Conference, LPNMR 2019</source>
          , Philadelphia, PA, USA, June 3-7,
          <year>2019</year>
          , Proceedings, volume
          <volume>11481</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2019</year>
          , pp.
          <fpage>45</fpage>
          -
          <lpage>50</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -20528-7\_4.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>D. L.</given-names>
            <surname>Phuoc</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dao-Tran</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. X.</given-names>
            <surname>Parreira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hauswirth</surname>
          </string-name>
          ,
          <article-title>A native and adaptive approach for unified processing of linked streams and linked data</article-title>
          , in: L.
          <string-name>
            <surname>Aroyo</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Welty</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Alani</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Taylor</surname>
          </string-name>
          , A.
          <string-name>
            <surname>Bernstein</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Kagal</surname>
            ,
            <given-names>N. F.</given-names>
          </string-name>
          <string-name>
            <surname>Noy</surname>
          </string-name>
          , E. Blomqvist (Eds.),
          <source>The Semantic Web - ISWC 2011 - 10th International Semantic Web Conference</source>
          , Bonn, Germany,
          <source>October 23-27</source>
          ,
          <year>2011</year>
          , Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>I</given-names>
          </string-name>
          , volume
          <volume>7031</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2011</year>
          , pp.
          <fpage>370</fpage>
          -
          <lpage>388</lpage>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>642</fpage>
          -25073-6_
          <fpage>24</fpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -25073-6\_
          <fpage>24</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>G.</given-names>
            <surname>Brewka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Eiter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Truszczynski</surname>
          </string-name>
          ,
          <article-title>Answer set programming at a glance</article-title>
          ,
          <source>Communications of the ACM</source>
          <volume>54</volume>
          (
          <year>2011</year>
          )
          <fpage>92</fpage>
          -
          <lpage>103</lpage>
          . doi:
          <volume>10</volume>
          .1145/2043174.2043195.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gebser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Leone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Maratea</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Perri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ricca</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Schaub</surname>
          </string-name>
          ,
          <article-title>Evaluation techniques and systems for answer set programming: a survey</article-title>
          , in: J.
          <string-name>
            <surname>Lang</surname>
          </string-name>
          (Ed.),
          <source>Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018, July 13-19</source>
          ,
          <year>2018</year>
          , Stockholm, Sweden, ijcai.org,
          <year>2018</year>
          , pp.
          <fpage>5450</fpage>
          -
          <lpage>5456</lpage>
          . URL: https://doi.org/10. 24963/ijcai.
          <year>2018</year>
          /769. doi:
          <volume>10</volume>
          .24963/ijcai.
          <year>2018</year>
          /769.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>H.</given-names>
            <surname>Beck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dao-Tran</surname>
          </string-name>
          , T. Eiter,
          <string-name>
            <surname>LARS:</surname>
          </string-name>
          <article-title>A logic-based framework for analytic reasoning over streams</article-title>
          ,
          <source>Artif. Intell</source>
          .
          <volume>261</volume>
          (
          <year>2018</year>
          )
          <fpage>16</fpage>
          -
          <lpage>70</lpage>
          . URL: https://doi.org/10.1016/j.artint.
          <year>2018</year>
          .
          <volume>04</volume>
          .003. doi:
          <volume>10</volume>
          .1016/j.artint.
          <year>2018</year>
          .
          <volume>04</volume>
          .003.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>H. R.</given-names>
            <surname>Bazoobandi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Beck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Urbani</surname>
          </string-name>
          ,
          <article-title>Expressive stream reasoning with laser</article-title>
          , in: C.
          <string-name>
            <surname>d'Amato</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Fernández</surname>
            ,
            <given-names>V. A. M.</given-names>
          </string-name>
          <string-name>
            <surname>Tamma</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Lécué</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Cudré-Mauroux</surname>
            ,
            <given-names>J. F.</given-names>
          </string-name>
          <string-name>
            <surname>Sequeda</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Lange</surname>
          </string-name>
          , J. Heflin (Eds.),
          <source>The Semantic Web - ISWC 2017 - 16th International Semantic Web Conference</source>
          , Vienna, Austria,
          <source>October 21-25</source>
          ,
          <year>2017</year>
          , Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>I</given-names>
          </string-name>
          , volume
          <volume>10587</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2017</year>
          , pp.
          <fpage>87</fpage>
          -
          <lpage>103</lpage>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>319</fpage>
          -68288-
          <issue>4</issue>
          _6. doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -68288-4\_6.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>H.</given-names>
            <surname>Beck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Dao-Tran</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Eiter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Folie</surname>
          </string-name>
          ,
          <article-title>Stream reasoning with LARS, Künstliche Intell</article-title>
          .
          <volume>32</volume>
          (
          <year>2018</year>
          )
          <fpage>193</fpage>
          -
          <lpage>195</lpage>
          . URL: https://doi.org/10.1007/s13218-018-0537-9. doi:
          <volume>10</volume>
          .1007/ s13218-018-0537-9.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>T.</given-names>
            <surname>Eiter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Ogris</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Schekotihin</surname>
          </string-name>
          ,
          <article-title>A distributed approach to LARS stream reasoning (system paper)</article-title>
          ,
          <source>Theory Pract. Log. Program</source>
          .
          <volume>19</volume>
          (
          <year>2019</year>
          )
          <fpage>974</fpage>
          -
          <lpage>989</lpage>
          . URL: https://doi.org/10. 1017/S1471068419000309. doi:
          <volume>10</volume>
          .1017/S1471068419000309.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>X.</given-names>
            <surname>Ren</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Curé</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Naacke</surname>
          </string-name>
          , G. Xiao,
          <article-title>Bigsr: real-time expressive RDF stream reasoning on modern big data platforms</article-title>
          , in: N.
          <string-name>
            <surname>Abe</surname>
            , H. Liu,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Pu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>N. K.</given-names>
          </string-name>
          <string-name>
            <surname>Ahmed</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Qiao</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Song</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Kossmann</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Tang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>He</surname>
            ,
            <given-names>J. S.</given-names>
          </string-name>
          Saltz (Eds.),
          <source>IEEE International Conference on Big Data (IEEE BigData</source>
          <year>2018</year>
          ), Seattle, WA, USA, December
          <volume>10</volume>
          -
          <issue>13</issue>
          ,
          <year>2018</year>
          , IEEE,
          <year>2018</year>
          , pp.
          <fpage>811</fpage>
          -
          <lpage>820</lpage>
          . URL: https://doi.org/10.1109/BigData.
          <year>2018</year>
          .
          <volume>8621947</volume>
          . doi:
          <volume>10</volume>
          .1109/BigData.
          <year>2018</year>
          .
          <volume>8621947</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Mileo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Abdelrahman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Policarpio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hauswirth</surname>
          </string-name>
          ,
          <article-title>Streamrule: A nonmonotonic stream reasoning system for the semantic web</article-title>
          , in: W. Faber, D. Lembo (Eds.),
          <source>Web Reasoning and Rule Systems - 7th International Conference, RR</source>
          <year>2013</year>
          ,
          <article-title>Mannheim</article-title>
          , Germany,
          <source>July 27-29</source>
          ,
          <year>2013</year>
          . Proceedings, volume
          <volume>7994</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2013</year>
          , pp.
          <fpage>247</fpage>
          -
          <lpage>252</lpage>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>642</fpage>
          -39666-3_
          <fpage>23</fpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -39666-3\_
          <fpage>23</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>T. M. Do</surname>
            ,
            <given-names>S. W.</given-names>
          </string-name>
          <string-name>
            <surname>Loke</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Liu</surname>
          </string-name>
          ,
          <article-title>Answer set programming for stream reasoning</article-title>
          , in: C. J.
          <string-name>
            <surname>Butz</surname>
          </string-name>
          , P. Lingras (Eds.),
          <source>Advances in Artificial Intelligence - 24th Canadian Conference on Artificial Intelligence</source>
          ,
          <source>Canadian AI</source>
          <year>2011</year>
          ,
          <article-title>St</article-title>
          . John's, Canada, May
          <volume>25</volume>
          -27,
          <year>2011</year>
          . Proceedings, volume
          <volume>6657</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2011</year>
          , pp.
          <fpage>104</fpage>
          -
          <lpage>109</lpage>
          . URL: https: //doi.org/10.1007/978-3-
          <fpage>642</fpage>
          -21043-3_
          <fpage>13</fpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -21043-3\_
          <fpage>13</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gebser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Grote</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kaminski</surname>
          </string-name>
          , T. Schaub,
          <article-title>Reactive answer set programming</article-title>
          , in: J. P. Delgrande, W. Faber (Eds.),
          <source>Logic Programming and Nonmonotonic Reasoning - 11th International Conference, LPNMR 2011</source>
          , Vancouver, Canada, May
          <volume>16</volume>
          -19,
          <year>2011</year>
          . Proceedings, volume
          <volume>6645</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2011</year>
          , pp.
          <fpage>54</fpage>
          -
          <lpage>66</lpage>
          . URL: https: //doi.org/10.1007/978-3-
          <fpage>642</fpage>
          -20895-
          <issue>9</issue>
          _7. doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -20895-9\_7.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>F.</given-names>
            <surname>Calimeri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Manna</surname>
          </string-name>
          , E. Mastria,
          <string-name>
            <given-names>M. C.</given-names>
            <surname>Morelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Perri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Zangari</surname>
          </string-name>
          ,
          <article-title>I-dlv-sr: A stream reasoning system based on I-DLV, Theory Pract</article-title>
          . Log. Program.
          <volume>21</volume>
          (
          <year>2021</year>
          )
          <fpage>610</fpage>
          -
          <lpage>628</lpage>
          . URL: https://doi.org/10.1017/S147106842100034X. doi:
          <volume>10</volume>
          .1017/S147106842100034X.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>P.</given-names>
            <surname>Carbone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Katsifodimos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ewen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Markl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Haridi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Tzoumas</surname>
          </string-name>
          , Apache flink ™:
          <article-title>Stream and batch processing in a single engine</article-title>
          ,
          <source>IEEE Data Eng. Bull</source>
          .
          <volume>38</volume>
          (
          <year>2015</year>
          )
          <fpage>28</fpage>
          -
          <lpage>38</lpage>
          . URL: http://sites.computer.org/debull/A15dec/p28.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>G.</given-names>
            <surname>Ianni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Pacenza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Zangari</surname>
          </string-name>
          ,
          <article-title>Incremental maintenance of overgrounded logic programs with tailored simplifications</article-title>
          ,
          <source>Theory Pract. Log. Program</source>
          .
          <volume>20</volume>
          (
          <year>2020</year>
          )
          <fpage>719</fpage>
          -
          <lpage>734</lpage>
          . URL: https: //doi.org/10.1017/S147106842000040X. doi:
          <volume>10</volume>
          .1017/S147106842000040X.
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>F.</given-names>
            <surname>Calimeri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Faber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gebser</surname>
          </string-name>
          , G. Ianni,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kaminski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Krennwallner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Leone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Maratea</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ricca</surname>
          </string-name>
          , T. Schaub,
          <article-title>Asp-core-2 input language format</article-title>
          ,
          <source>TPLP</source>
          <volume>20</volume>
          (
          <year>2020</year>
          )
          <fpage>294</fpage>
          -
          <lpage>309</lpage>
          . URL: https://doi.org/10.1017/S1471068419000450. doi:
          <volume>10</volume>
          .1017/S1471068419000450.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>N.</given-names>
            <surname>Leone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Manna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. C.</given-names>
            <surname>Morelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Perri</surname>
          </string-name>
          ,
          <article-title>A formal comparison between datalog-based languages for stream reasoning (extended version</article-title>
          ),
          <year>2022</year>
          . URL: https://arxiv.org/abs/2208. 12726. doi:
          <volume>10</volume>
          .48550/ARXIV.2208.12726.
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>P.</given-names>
            <surname>Schneider</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Alvarez-Coello</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Le-Tuan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. N.</given-names>
            <surname>Duc</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. L.</given-names>
            <surname>Phuoc</surname>
          </string-name>
          ,
          <article-title>Stream reasoning playground</article-title>
          , in: P. Groth,
          <string-name>
            <given-names>M.</given-names>
            <surname>Vidal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F. M.</given-names>
            <surname>Suchanek</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. A.</given-names>
            <surname>Szekely</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Kapanipathi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Pesquita</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Skaf-Molli</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          Tamper (Eds.),
          <source>The Semantic Web - 19th International Conference, ESWC</source>
          <year>2022</year>
          , Hersonissos, Crete, Greece, May 29 - June 2,
          <year>2022</year>
          , Proceedings, volume
          <volume>13261</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2022</year>
          , pp.
          <fpage>406</fpage>
          -
          <lpage>424</lpage>
          . URL: https://doi.org/10. 1007/978-3-
          <fpage>031</fpage>
          -06981-9_
          <fpage>24</fpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>031</fpage>
          -06981-9\_
          <fpage>24</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>