<!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>Count Aggregation in Semantic Queries</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Bogdan Kostov</string-name>
          <email>bogdan.kostov@fel.cvut.cz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Petr Kremen</string-name>
          <email>petr.kremen@fel.cvut.cz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Cybernetics, Czech Technical University</institution>
          ,
          <addr-line>Prague</addr-line>
          ,
          <country country="CZ">Czech Republic</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper we study the distinct count aggregation function used in queries into expressive ontologies. The main di erences in this settings opposed to aggregation in relational database systems are the Open World Assumption and incomplete knowledge. We propose di erent interpretations useful in di erent practical use-cases of the distinct count function, i.e. basic count, semantic count, epistemic count and semantic tuple count some of which use knowledge derived from the ontology in order to obtain results in accordance with the Open World Assumption. We use interval semantics to model the uncertainty of the distinct count function's result induced by incomplete knowledge in the ontology. We show that interval semantics are particularly useful in aggregate queries with ltering clause and when we need the retrieval of the boundaries of the uncertainty of the distinct count function's result. We study and present relationships among the di erent interpretations and decidability of the semantic tuple count. We also propose a theoretical approximation of the semantic tuple count. Our results are applicable to a wide range of description logic formalisms allowing to express equality/inequality between individuals, concepts and relations, e.g. Web Ontology Language.</p>
      </abstract>
      <kwd-group>
        <kwd>semantic counting</kwd>
        <kwd>count function</kwd>
        <kwd>OWL</kwd>
        <kwd>semantic query</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Aggregation functions are an important feature of modern query languages.
Aggregation is well understood in query languages of database systems with Unique
Name Assumption (UNA) principle, e.g. SQL for relational databases. Although
this simple well-known interpretation of aggregation can in some cases be used
correctly in queries over semantic knowledge bases, in general this
interpretation will return incorrect results as it will not use knowledge inferred from the
knowledge base with the Open World Assumption (OWA). As opposed to that,
semantic aggregation relies on the knowledge inferred from the knowledge base
in order to provide correct result of aggregation functions.</p>
      <p>Currently the research led of semantic aggregation is in its infant state.
However the need of semantic aggregation is becoming apparent as more and
more applications of semantic technologies emerge. In this paper we propose the
need of di erent interpretations of the distinct count function in the settings
of OWA and ontology representing incomplete knowledge, i.e. basic count (BC),
semantic tuple count (ST C), epistemic count (E C) and semantic count (SC). We
study the relationships among the di erent interpretations. We also investigate
the decidability of the ST C interpretation.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        In recent years, expressive query languages, like SPARQL-DL [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], OWL-SAIQL
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], SQWRL [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] for OWL 2 [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] or SeRQL [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], SPARQL [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] for RDF, have been
introduced and implemented in the eld of semantic web. There have been deep
studies [7{11] evaluating conjunctive queries in RDF and OWL, but few e orts
have been spent on an algebra, as well as aggregation functions.
      </p>
      <p>
        Recently the RDF query language SPARQL [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] has been extended towards
the new SPARQL 1.1 1 [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] including many new constructs, e.g. aggregation
functions or negation as failure. There are already publicly available
implementations, e.g. ARQ [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], KGRAM [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], RDF::Query [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] or Sesame [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ].
Independently on SPARQL 1.1 authors of [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] discuss the topic of aggregation over
data structured as RDF graphs rather than on the relational data returned by
the query (the result set table). The authors stress the need of di erent modes
of aggregation. A few years ago the SQWRL query language for OWL [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] was
proposed. All these e orts implement or interpret aggregation using the basic
relational semantics, i.e. the result of aggregation functions is computed over the
results of the non-aggregate variant of the query and neglect the impact of the
interplay between aggregation functions and the inferred domain elements.
      </p>
      <p>
        More closely related to our study is the work [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. It shows that exact
semantics, of aggregate queries over a DL-LiteA ontology returns results only if
the Abox is not empty and if axioms in the Tbox resolve as constraints over
cardinalities of the groups in the aggregate query. The authors propose epistemic
semantics of aggregate queries in the settings of data integration use-cases
returning the aggregate function's results known from (inferred by) the ontology.
The authors propose an evaluation algorithm for a sub set of aggregate queries,
i.e. restricted epistemic aggregate queries, de ned using functional dependency
of query variables w.r.t. the Tbox of the queried ontology.
      </p>
      <p>
        Although not exactly in the same framework of query answering like in this
paper, the authors in [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] propose an approach using ontology design pattern
for incorporating a quanti cation over types without actually using explicit
numerical information.
      </p>
      <p>In this paper we examine the distinct count aggregation function, its possible
interpretations and their use-cases. We focus our research on the distinct count
aggregation function alone as it is non-trivial but not too overly complicated. We
believe that better understanding of the distinct count function and its possible
interpretations will cover most of the peculiarities of aggregation in the
context of expressive knowledge bases assuming the OWA principle and incomplete
knowledge, thus contributing to OWL and RDF.</p>
      <sec id="sec-2-1">
        <title>1 SPARQL 1.1 version recently became a W3C recommendation.</title>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Motivation</title>
      <p>
        In this section we present a simple ontology which describes a simple taxonomy
of teachers categories and contains assertions about teachers and courses. The
ontology is presented using the well known description logic syntax, see [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ].
Example 1. A simple example ontology O1 about teachers and the courses they
teach.
      </p>
      <p>Tbox
BusyTeacher v Teacher, Professor v Teacher, 9teaches Course v Teacher,
BusyTeacher v 3 teaches, Professor v 3 teaches
Abox
BusyTeacher(Sara), Professor(Steve), Professor(John), BusyTeacher(John),
Course(math), Course(physics), Course(history), teaches(Dave; math),
teaches(Dave; physics), teaches(Dave; history), teaches(Sara; history),
:
math 6= history</p>
      <p>We will use the following two aggregate queries throughout the paper to
demonstrate the di erences in the results of the individual interpretations of the
distinct count function.</p>
      <p>Q1 - Find all teachers and the number of distinct courses they teach.
Q2 - Find all teachers that teach more than one distinct courses.</p>
      <p>Next we will discuss the need of di erent interpretations of the distinct count
function. The most natural interpretation of the distinct count function is the
semantics count interpretation. This interpretation enables users to query for
the distinct count function value or its constraints as entailed by the queried
ontology. For example using this interpretation in query Q1 we obtain that John
teaches exactly three courses or using it in query Q2 we will obtain that Dave,
Sara and John teach more than one course. We call this the semantics count
interpretation and we consider it suitable for knowledge retrieval oriented
usecases. This interpretation is a natural extension of the certain answer semantics
for the distinct count function and it is monotonic.</p>
      <p>
        Although that is the most natural and in fact correct extension of the
semantics of the distinct count function, there are some use-cases that need di erent
CWA interpretations. As argued in [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] for ontology based data access (OBDA)
use-cases, the certain answer semantics for aggregate queries is not practical as
they return trivial results, e.g. empty or very restricted result sets. The authors
propose that in this context a practical interpretation will be the one that
returns the least known number of courses they teach. This is called the epistemic
count interpretation. As opposed to the semantic count, the result set of query
Q1 with the epistemic count interpretation will contain for example that Dave
and Sara teach respectively two and three courses.
      </p>
      <p>
        Note that the epistemic count interpretation may count both named and
unnamed entities. This makes the use of this interpretation inappropriate in
purely data-centric ontology applications. In [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] the authors use OWL to model
integrity constraints (IC) and propose IC CWA semantics to enable instance
data validation. We propose an extension to this semantics for the distinct count
function. We call this the semantic tuple count interpretation. As opposed to
the previous interpretations the result of Q2 with the semantic tuple count
interpretation will contain only Dave as he is the one for which the data in the
ontology O1 satis es the condition in the query. The semantic tuple count can
be used to depict IC for n-ary relations.
      </p>
      <p>The most common interpretation of the distinct count function is the basic
count interpretation. This interpretation is scalable and it is safe to be used in
data oriented use-cases in CWA and UNA systems. The usage of this
interpretation in applications assuming OWA may return incorrect results, however, it can
still be used as an approximation. For example the result of query Q1 contains
the answer Dave teaches three courses, which may or may not be true according
to the ontology.</p>
      <p>We continue with the formal de nition of the di erent interpretations of the
distinct count function and the discussion of the results of queries Q1 and Q2 in
these interpretations.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Preliminaries</title>
      <p>In this section we will de ne basic terms and notions used in the rest of the
paper. We will start with the de nition of ontology followed by the de nition
conjunctive queries and aggregate queries with distinct count function.
4.1</p>
      <sec id="sec-4-1">
        <title>Ontology</title>
        <p>De nition 1. An ontology O is a pair hS; Ai, where S is a signature and A
is a set of axioms. The semantics of ontologies use a rst order interpretation
I = ( I ; I ), where I is an interpretation domain and I : S ! I is an
interpretation function mapping elements from the ontology signature S to elements
from the interpretation domain I . An ontology O is satis ed by an
interpretation I, denoted by I j= O, if all of its axioms are satis ed by the interpretation
I, such interpretation I is called a model of O. We say that a set of axioms A is
entailed by the ontology O, denoted by O j= A, if every model I of the ontology
O, is also a model of A, I j= A.</p>
        <p>Next we de ne the notion of the monotonic extension O0 of the ontology O.
De nition 2. We say that O0 = hS0; A0i is an extension of O = hS; Ai if A
A0 and S S0. O0 is monotonic if the original ontology O is entailed by O0,
0 = O. A model I0 = ( I0 ; I0 ) of the ontology O is an extension of the model
IO =j ( I ; I ) j= O if I0 I0 and I0 I .</p>
        <p>
          For a full description of the syntax and semantics of di erent description
logic formalisms see [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ]. Note that our discussion is also applicable for OWL 2
ontologies [
          <xref ref-type="bibr" rid="ref22 ref23">22, 23</xref>
          ] since OWL 2 is backed by the SROIQ(D) description logic.
        </p>
        <p>We consider description logics which allow only monotonic extensions. In
section 5.2 where we prove decidability of the semantic tuple count we further
restrict to a subfamily of description logics that enable expressing whether two
entity objects are di erent, the same or it is not known, which we will refer to
as equality/inequality relation. We require the OWA assumption over the
equality/inequality relation because it provides means to model incomplete
knowledge, and it is the fundamental source of uncertainty of the semantic tuple count
function's value.
4.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Conjunctive Queries</title>
        <p>The discussion in this paper about distinct count function and its proposed
interpretations is set in the context of conjunctive queries.</p>
        <p>De nition 3. We will denote conjunctive queries using the following rule like
notation</p>
        <p>Q(x)
(x; z):
(1)
The head of the query Q(x) denotes the name of the query and the result variables
Rvar(Q) = x. The body of the query (x; z) is a comma separated list of query
atoms interpreted as a conjunctive query, as de ned in the SPARQL-DL 2 query
language. The query atom list may contain non result variables z. Note that
the result variables must be distinguished. By Vvar(Q) we denote the list of all
variables in the query. A binding : Vvar(Q) ! S is a mapping of the variables
of the query to elements in the ontology's signature and Qj is the substitution
of the variables in Q by the binding . The binding substitution of a tuple of
variables v = (v1; : : : ; vk) is denoted by (v) = ( (v1); : : : ; (vk)). We call Q a
ground query if there are no variables in the query. A solution to the query Q
w.r.t. the ontology O is a binding for which the substitution Qj is a ground
query, the body of which is entailed by the ontology (denoted by O j= Qj ). The
set of all possible solutions of Q w.r.t. O or the model I of O is denoted by
SatQO = f jO j= Qj g or SatIQ = f jI j= Qj g respectively . The result set
of query Q w.r.t. O denoted by QO, is a set of bindings of the result variables
Rvar(Q), formally QO = faja = (Rvar(Q)) ^ 2 SatQOg.
4.3</p>
      </sec>
      <sec id="sec-4-3">
        <title>Aggregate Queries</title>
        <p>Here we de ne the types of aggregate queries along with their simple syntax used
for the purpose of representing aggregate queries in this paper. We also de ne
some additional terminology and symbols used later in the paper.
De nition 4. We will denote distinct count retrieval and distinct count ltering
queries respectively as follows:</p>
        <p>Qa(x; countdSist(y))
(x; y; z)
(2)</p>
        <sec id="sec-4-3-1">
          <title>2 See [1] for list of atoms and their interpretations.</title>
          <p>( opncountdSist(y)); (x; y; z)
In the queries of the type Qa, the head Qa(x; countdSist(y)) speci es the disjoint
sets of grouping Gvar(Qa) = x and aggregation Avar(Qa) = y variables. The
distinct count aggregation function which returns the number of distinct tuples
according to the semantics mode speci ed by the superscript S w.r.t. the ontology
O is denoted by countdSist. The body of Qa contains a query atom list.</p>
          <p>We also consider distinct count ltering by comparison queries of the form
Qac show in (3). The head of queries of these type contain only the grouping
variables. The body of the query contains cardinality restriction atom3 where
op 2 f&gt;; &lt;; ; ; =; 6=g. By Q we denote a non aggregate variant of Q, obtained
from Q by removing its aggregate function from the head or the comparison
predicate in the body. The result variables of Q are the union of group and
aggregate variables of Q, Rvar(Q ) = Gvar(Q) [ Avar(Q).</p>
          <p>Before we de ne the general semantics of the result of aggregate queries
we clarify and de ne the auxiliary terms and notations in the following three
de nitions.</p>
          <p>De nition 5. Let N0;1 be the extension of the set of natural numbers with
zero and in nity N0;1 = N [ f0; 1g. Let L be a subset of N0;1 and let Int(L)
denote the smallest interval containing L,Int(L) = hinf(L); sup(L)i. We extend
the intuitive comparison between elements in N0;1 with comparison between sets
L N0;1 and elements n 2 N0;1 . L n (L &lt; n) is be true if and only if
sup(L) n _ sup(L) = n = 1 (sup(L) &lt; n). L n (L &gt; n) is true if and only
if inf(L) n _ inf(L) = n = 1 (inf(L) &gt; n). Note that the symbol 1 is an
element of N0;1 .</p>
          <p>Next we de ne the interpretation a tuple and a set of tuples.</p>
          <p>De nition 6. Let O = hS; Ai be an ontology, I = ( I ; I ) a model of O and
T be a set of tuples composed of elements in S. The interpretation of the of the
tuple t = (t1; t2; : : : ; tk); t 2 T is tI = (t1I ; t2I ; : : : ; tkI ). The interpretation of T is
T I = ftI j8t 2 T g.</p>
          <p>Next we de ne aggregate groups or simply groups as the set of tuples with
common grouping variable binding.</p>
          <p>
            De nition 7. Let Q be an aggregate query of type Qa or Qac, O be an ontology,
I a model of O and let k = (Gvar(Q )), where is an arbitrary binding. Then
the aggregate group, denoted by (O; Q; k), with key k is equal to the set of tuples
f (Avar(Q))j (Gvar(Q)) = k ^ 2 SatQO g. The aggregate group with key k in a
tuple set T is (T; k) = faj8t 2 T; (k; a) = tg.
3 Note that we reuse the well known notation for property cardinality restrictions, see
[
            <xref ref-type="bibr" rid="ref20">20</xref>
            ].
          </p>
          <p>Note that the de nition of the aggregate group (O; Q; k) w.r.t. to the
ontology O can be used also to obtain an aggregate group w.r.t. to the model I of
O, i.e. (I; Q; k).</p>
          <p>Next we de ne results of aggregate queries in terms of the counting
function f S [O;Q] is an
[O;Q] and the set KS (O; Q). Informally the counting function f S
uncertainty aware generalization of the distinct count function, it takes as an
input the key of the group to be counted and returns a set of possible values
w.r.t. O and Q. The set KS (O; Q) is the set of keys of the groups to be counted.
The counting function and the key of sets will be de ned in each of the concrete
distinct count interpretations. The superscript is used to distinguish among the
di erent interpretations.</p>
          <p>De nition 8. Let D be the set of all tuples of arbitrary length and P(N0;1 ) be
the power set of N0;1 . Let S be an aggregate semantic, f S
[O;Q] : D ! P(N0;1 )
be the counting function and KS (O; Q) D be the key set in S. The result
of an aggregate query Q of type (2) w.r.t. the ontology O is QO = f(k 2
KS (O; Q); inf (L))jL := f S</p>
          <p>[O;Q](k) ^ inf(L) = sup(L)g and the result set of an
aggregate query Q with comparison ltering, i.e. queries of the form Qac, is
QO = fk 2 KS (O; Q)jL := f[SO;Q](k) ^ L op ng. The interpretation of the last
condition L op n is de ned in De nition 5.
5</p>
          <p>Distinct count function
In this section we formally de ne the semantics of each of the various
interpretations of the counting function f S</p>
          <p>[O;Q] and the set of keys KS (O; Q). We present
this de nitions in order to be able to show formally the relations between the
interpretations and in the case of SC and ST C to be able evaluate comparison
ltering queries in OWA. We show and discuss the results of the example queries
Q1 and Q2 from section 3 in each of the proposed semantics. We also study the
relationship between individual interpretations of the distinct count function.
We prove decidability of the semantic tuple count ST C interpretation. Finally
we show how to enable distinct count queries in the context of the description
logic SROIQ.</p>
          <p>In (4) we show the queries Q1 and Q2 from example 1 in the notation de ned
in De nition 4.</p>
          <p>Q1(?t; countdist?c) PropertyValue(teaches; ?t; ?c)
Q2(?t) (&gt;1countdist(?c)); PropertyValue(teaches; ?t; ?c)
(4)</p>
          <p>The tables in this section showing the results of the queries have the following
notation. Only cells highlighted with grey background color 4 are part of the
result set of the query. The other cells have white background. Note that through
out this section O = hS; Ai is an arbitrary ontology with a signature S and an
axiom set A, Q is an arbitrary aggregate query, O1 refers to the ontology in
example 1 and Q1 and Q2 refer to the queries shown in (4).
4 The use of colors in this paper is intended to be readable in gray scale copies.
5.1</p>
        </sec>
      </sec>
      <sec id="sec-4-4">
        <title>Known interpretations of the Distinct Count</title>
        <p>In this section we discuss three known interpretations of the distinct count
function in aggregate queries.</p>
        <p>Basic Count Interpretation The basic count interpretation (BC) is used
originally in the SQL query language, but it is also used in semantic query
languages, e.g. SPARQL and SQWRL. This interpretation is not adequate for
ontological knowledge as it does not infer the distinct count function's value
from the ontology. The basic count interpretation can be implemented in n log n
time, where n is the size of the tuple set to be counted.</p>
        <p>De nition 9. The set of keys KBC(O; Q) is the set of all syntactically distinct
result bindings of the grouping variables Gvar(Q) of the query Q over the ontology
O, i.e. KBC (O; Q) = fkjk = (Gvar(Q)) ^ 2 SatQO g. For k 2 KBC(O; Q) the
counting function is de ned as f[BOC;Q] = fj (O; Q; k)jg.</p>
        <p>The result of the distinct count query Q1 is shown in table 1(a).</p>
        <p>There are two group keys Dave and Sara. The number of courses Dave teaches
is three because there are three courses that Dave teaches asserted in the
ontology, whose names are syntactically di erent. For Sara, who teaches only one
course according to the ontology, the result of the count function is one. We can
see that this interpretation ignores the implicit knowledge derived from the fact
that Sara is a BusyTeacher that teaches at least three courses.</p>
        <p>
          Semantic Count Interpretation Informally the semantic count (SC)
interpretation counts the number of possible tuples entailed by the queried ontology.
This interpretation is similar to the exact semantics presented in [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]. However
our de nition of SC presented here does not return a single value of the distinct
count function but a set of possible values. While this de nition has no e ect on
the results of queries of type Qa it ensures monotonic results in the queries of
type Qac. The decidability of the SC interpretation is an open problem.
Nevertheless we believe that the minimum of the SC interpretation is more likely to
be decidable.
De nition 10. The semantic count interpretation is denoted by SC. Let l =
jGvar(Q)j be the number of grouping variables in Q and S = Sl is the set of all
tuples of length l composed of elements from the signature S. The SC counting
function is de ned as follows f[SOC;Q](k) = fjT I j jT := (I; Q; k); 8I j= Og. The
SC key set is de ned as follows KBC(O; Q) = fk 2 Sj sup(f[SOC;Q](k)) &gt; 0g.
        </p>
        <p>Next we discuss the results of the example queries Q1 and Q2, with formal
representation shown in (4), over the ontology O1 from example 1. The last
columns in the tables 2(a) and 2(b) show the boundaries of the intervals found
for each of the group keys from the rst column.</p>
        <p>In table 2(a) we show the results of query Q1. Next we discuss the intuition
of the calculation of the values of the SC counting function for each of groups
in table 2(a). In order to obtain the nal result of the query we need to apply
the comparison semantics from de nition 8. The last row in both tables show
an unexpected group which the algorithm should process. In fact we have two
more groups that we omitted from the table which are with keys history and
physics. This is an e ect of the OWA assumption. This anomaly is caused by
the fact that the ontology O1 does not explicitly state that math, history and
physics are not teachers and that only teachers can teach and thus allowing the
existence of models in which subjects teach something. Moreover the calculated
interval is zero to in nity because there are no axioms which constraint it. The
SC can be used to locate such unwanted behavior. The minimum in the rst
row with group key Dave is obtained from the two semantically distinct courses
math and history that Dave teaches. The maximum of the rst row is in nity
because the ontology does not constrain the number of courses Dave can teach.
The minimum of the second row with group key Sara is determined from the
constraint that a BusyTeacher teaches at least three courses and the fact that
Sara is a BusyTeacher and who teaches history. In this case there are two
restrictions, 'at least three' and 'at least one' which constraint the minimum
of courses Sara teaches. In such cases we should select the most speci c one.
Therefore the minimum of the second row's interval is three since the rst
restriction is more speci c. The evaluation of the maximum in the second row's
interval is analogous to the one in the rst row. The third row's minimum is
zero because Steve is not constrained to teach a minimum number of courses
as Dave and Sara were in the rst and second rows. The maximum in the third
row is derived from the fact that Steve is a professor and the constraint of the
Professor class which limits its instances to teach at most three courses. Now
we apply interval semantics to the rst three rows that we discussed. The three
rows are not included in the result of query Q1 with SC semantics because
according to the de nition of the results of queries of type Qa in de nition 8 which
states that set returned by the counting function must be singleton. The answer
contains only the last row because the return value of the counting function is
a singleton containing only the number three. This is true because the John is
both a Professor and a BusyTeacher the constraints of which were already
discussed.</p>
        <p>The results of query Q2 as well as all the relevant group keys of Q2 are
shown in table 2(b). We have discussed the interval boundaries of the intervals
for groups of Q1 and since the Q2 has identical groups, note that KSC(O1; Q1) =
KSC(O1; Q2), we skip this explanation for query Q2. The result of Q2 contains
all rows except for the third one with group key Steve that does not satis es the
comparison lter which limits the retrieval of groups with at least two distinct
tuples in all models of the ontology O1.</p>
        <p>
          We point out the importance of interval semantics in the settings of
incomplete knowledge. Note that in query Q2 we obtained results that were not present
in the result of Q1. This proves that the results of query Q2 obtained by ltering
the results of query Q1 won't contain the full result entailed by the ontology.
Epistemic Count Interpretation The epistemic count (E C) interpretation is
introduced in the work [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]. Informally this interpretation of the distinct count
function returns a single value which represents the known number of distinct
tuples in an aggregate group. For the number k of known tuples holds that
in any model I of the ontology O there is at least k distinct tuples for the
counted group. Because countdEiCst interpretation is equivalent to the in mum of
the SC counting function here we de ne the countdEiCst interpretation in terms of
SC counting function and key set. The decidability of the E C interpretation is
an open problem an it is equivalent to the decidability of the minimum of the
SC interpretation problem.
        </p>
        <p>De nition 11. The E C key set is de ned as KEC(O; Q) = KSC(O; Q). The E C
counting function is de ned as f[EOC;Q](k) = finf(f[SOC;Q](k))g.</p>
        <p>In tables 3(a) and 3(a) we can see the results of the aggregate queries Q1 and
Q2 respectively with distinct count function interpreted with the E C semantics.
The results are identical with those of the minimum of the interval in tables 2(a)
and 2(b) and are not discussed further.
5.2</p>
        <p>Semantic Tuple Count Interpretation
The semantic tuple count (ST C) interpretation is de ned using interval
semantics. Informally it counts the same tuples as the BC interpretation but it uses
knowledge in the ontology to derive the equivalence/inequivalence relation
between the counted tuples which is needed to remove semantically duplicate tuples
and also to deal with uncertainty of the count's value.</p>
        <p>De nition 12. The ST C key set KST C is de ned as the key set of the BC
interpretation, i.e. KST C (O; Q) = KBC(O; Q). We de ne the ST C counting
function as follows f[SOT;QC](k) = fj (O; Q; k)I jj8I j= Og.</p>
        <p>Next we discuss the results of queries Q1 and Q2 from example 1 with the
ST C interpretation. Here we also show all the group keys that should be
considered during evaluation of the ST C interpretation and since the ST C
interpretation is interval based we also show the evaluated intervals in the last columns of
the tables 4(a) and 4(b). In table 4(a) we have the results of Q1. Now we discuss
the values of the interval boundaries in rows one and two. The minimum in the
rst row is based on the two distinct courses math and history. The maximum
is three because there are three entailed tuples in the group of the rst row and
because there is no other axioms that constraints the maximum to be smaller.
The minimum in the second row is one because we have only one tuple for the
Sara group. This is also the only possible value for the maximum of row two
because there are no other entailed tuples in that group. Apparently from the
interval semantics only the second row is returned.</p>
        <p>The results for the query Q2 are shown in table 4(b). We already discussed
the interval boundaries in the discussion of query Q1. Applying the interval
semantics we lter the second row because Sara teaches only one distinct course
and therefore it is not contained in the result. The rst is contained in the result
because the minimum boundary, which is 2, is bigger than the less than operand
in the ltering atom, which is one.</p>
        <p>
          Decidability of the ST C Interpretation In this section we prove decidability
of the ST C interpretation. We present only the statements of the most relevant
lemmas and the proof of the theorem at the end of the section. The omitted
proofs and lemmas can be found in the technical report [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ]. First we de ne the
family of formalisms for which we prove that the ST C interpretation is decidable.
De nition 13. We assume that the supported formalisms F (i) are capable
of expressing the equality/inequality relation among elements of the ontology
(ii) consistency check of ontologies and query answering is decidable in F and
(iii) that F is monotonic.
        </p>
        <p>Implementing the evaluation of the ST C counting function based on de
nition 5.2 is not feasible because the ontology O might have an in nite number
of models. We show that there is a nite number of models su cient for the
calculation of the boundaries of the value of the ST C counting function.</p>
        <p>The next proposition states that the interval of the distinct count function
with SC and ST C interpretation w.r.t. the ontology O will be more speci c if we
extend the queried ontology. The interval calculated w.r.t. the original ontology
will include the one calculated from the extended ontology.</p>
        <p>Note that in this section we will use identical equality and inequality axioms,
denoted by =a and 6=a respectively, for all type of entities, i.e. individuals,classes
and properties. In the following section we show an equivalent representation of
this axioms in the concrete logic SROIQ.</p>
        <p>De nition 14. Let O = hS; Ai be an ontology, T be a tuple set composed of
elements in the set D S. Let I = ( I ; I ) be an interpretation such that I is
de ned on D then the complete set of equality/inequality axioms satis ed by I
is denoted as A#(I; D) = fa =a bj8a; b 2 D; aI = bI g [ fa 6=a bj8a; b 2 D; aI 6=
bI g. We denote the set all complete sets of equality/inequality axioms between
elements in D w.r.t. the ontology O as A#(O; D) = fA#(I; D)j8I j= Og. The
cannonic model of A# = A#(I; D), denoted by IA# = ( IA# ; IA# ) is a model
with an interpretation function IA# the domain of which is D.</p>
        <p>Note that adding equality/inequality axioms to the complete set A#(I; D)
wont change the original set or if it does the resulting set is unsatis able. Note
also that the cannonic interpretation function IA# can be constructed in
polynomial time.</p>
        <p>Lemma 1. Let O = hS; Ai be an ontology, D
S, then A#(O; D) is nite.</p>
        <p>Lemma 2. Let T be a tuple set composed of elements from set D and two
interpretations I1 and I2 which agree on the equivalence and inequivalence between
elements in D. Then the number of elements in the sets T I1 and T I2 is the
same, jT I1 j = jT I2 j.</p>
        <p>The next lemma states that for extensions of the ontology O with an axiom
set from A#(O; D) the ST C counting function returns a singleton set and that
the only value in the set can be calculated in polynomial time.</p>
        <p>Lemma 3. Let O = hS; Ai be an ontology, Q be an aggregate query, k 2 KST C,
T = (QO; k) and D be the set of elements composing tuples in T , I = ( I ; I )
be a model of O, A# = A#(I; D), O0 = hS; A [ A#i and IA# be the cannonic
interpretation function of A#. Then f[SOT0;CQ](k) = fcg, where c = jT I j = jT IA# j.</p>
        <p>Instead of looking for the boundaries of the ST C interval in the set of all
models as the de nition 12 suggests, we can search for the boundaries in the
nite set of representations of the equality interpretation. We rst describe an
algorithm which terminates in a nal number of steps and then we prove its
correctness.</p>
        <p>Algorithm 1 : STC - Semantic Tuple Count procedure
PROCEDURE STC</p>
        <p>INPUT : O // the queried ontology,</p>
        <p>T // set of tuples to be counted
OUTPUT : &lt;a,b&gt; // the calculated interval
a := inf; b := 0;
D := {elements used in tuples in T};
FORALL A# IN A#(O,D) DO</p>
        <p>A' := union(A, A#);
IF A' is consistent
construct cannonic interpretation I#(A#);
c := |T interpreted by I#(A#)|;
IF a &gt; c THEN a := c;</p>
        <p>IF b &lt; c THEN b := c;</p>
        <p>END-IF
END-FORALL</p>
        <p>RETURN &lt;a,b&gt;;
END</p>
        <p>We will prove decidability by proving correctness and termination of
algorithm 1.</p>
        <p>Theorem 1. The algorithm 1 terminates and evaluates correctly the interval
Int(f[SOT;QC](k)) for an ontology O and aggregate query Q and group key k.
Proof. Algorithm 1 terminates since there is a nite number of extensions to
check. From lemma 3 we have that the ST C counting function is a subset of the
calculated interval. Also from lemma 3 we have that the interval is the smallest
because the boundaries correspond to some model of O.</p>
        <p>
          Corollary 1. Calculation of the ST C interval is decidable in the family of
formalisms de ned in De nition 13.
ST C Interpretation approximation The proposed algorithm 1 is searching
trough all the possible extensions for the set of elements D. As we show in
corollary 1 there are n = 2jDj2 possible extensions for each of which we need to make
a consistency check. In this section we propose an approximation of the ST C
interpretation which can be used for example as optimization of an evaluation
algorithm. The approach presented here utilizes the knowledge inferred from the
ontology. The prove of the correctness of the approximation is presented in the
technical report [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ].
        </p>
        <p>De nition 15. Let G = (V; E) be an undirected graph with nodes V and edges
E. A connected component K in G is a subgraph in G maximal with the property,
for each pair of nodes in K there is a path in K. A (maximal) clique C is a graph
maximal with the property C is a subgraph of G and is complete. The biggest
clique C in G is called maximum.</p>
        <p>In order to de ne the approximation formally we need rst to de ne the
auxiliary term di erence graph, and the notion of maximum clique.
De nition 16. Let O = hS; Ai be an ontology, let T be a set of tuples of length
l and composed of elements from the set D S. Let s; t 2 T , equality s =a t
and inequality of tuples w.r.t. the ontology O is de ned respectively as O j=
fs1 =a t1; : : : ; sl =a tlg and O j= si 6=a ti for some 1 i l. Let G=(O; T ) =
(D; E=(O; T )) be the graph with edges E=(O; T ) = f(a; b)j8(a; b) 2 T 2; O j=
a =a bg. The di erence graph is denoted by G(O; T ) = (V; E) w.r.t. O and T .
The set nodes is the set of connected components of G=(O; T ), there is an edge
between the nodes u and v in V , fu; vg 2 E if and only if the ontology entails
6=a axiom between some pair of the set u v.</p>
        <p>Theorem 2. Let O be an ontology, Q an aggregate query, k 2 KST C (O; Q) and
let T = (O; Q; k) be the group to be counted. Let the G(O; T ) = (V; E) be the
di erence graph w.r.t. O and T and Cmax = (VC ; EC ) be the maximum clique
graph of G(O; T ). Int(f[SOT;QC](Vvar(k))) hjVC j; jV ji.</p>
        <p>
          ST C interpretation in SROIQ In this section we discuss the countdSiTstC
function in a concrete description logic SROIQ. The ST C interpretation is
decidable in this description logic since SROIQ satis es all the requirements
shown in De nition 13. We consider any query language which supports
conjunctive queries with mixed Abox, Tbox, Rbox terms, e.g. SPARQL-DLNOT
[
          <xref ref-type="bibr" rid="ref25">25</xref>
          ]. In order to apply the ST C interpretation in this scenario we need to show
representations of equality and inequality between elements of the signature of
the ontology which will be used to generate the complete set of axioms in A#.
        </p>
        <p>5.2 shows the representations for each of the three term types. Individuals
ik; k 2 1; 2; 3:::, are unique and not contained in the ontology. Note that classes
and properties have two possible ways of representing the inequality relation.
If one of the representations fails we must also test the other when checking
whether two terms of type class or property need to be compared for inequality.
type
=a</p>
        <p>6=a
We investigated the distinct count function in the context of di erent semantics,
i.e. BC, SC and E C. We introduced a new interpretation ST C and compared
its behavior with the other interpretations. We found the following
relationships between SC and E C, inf(f[SOC;Q]) = E C and also between SC and ST C,
inf(f[SOT;QC](k)) inf(f[SOC;Q](k)) and sup(f[SOT;QC](k)) sup(f[SOC;Q](k)). We proved
decidability of the ST C interpretation in the context of the selected family of
formalisms, provided an approximation using basic graph problems and showed
how to apply the ST C in the SROIQ description logic.</p>
        <p>
          In future work we would like to focus on the implementation of the evaluation
of the ST C interpretation into the SPARQL-DLNOT [
          <xref ref-type="bibr" rid="ref25">25</xref>
          ] query language. In
order to provide practical implementation research in optimizing the evaluation
is needed. In the worst case algorithm 1 will issue 2n2 consistency checks where
n is the number of counted tuples. We are also interested in the investigation of
the decidability of SC and E C.
        </p>
        <p>Acknowledgments This work has been supported by the grant by the grant of the
Czech Technical University in Prague No. SGS13/204/OHK3/3T/13 E ective
solving of engineering problems using semantic technologies. Authors also want
to express thanks to the anonymous reviewers for providing useful comments
during manuscript preparation.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Sirin</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>SPARQL-DL: SPARQL Query for OWL-DL</article-title>
          .
          <source>In: 3rd OWL Experiences and Directions Workshop</source>
          (OWLED-
          <year>2007</year>
          ).
          <article-title>(</article-title>
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Kubias</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schenk</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Staab</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pan</surname>
            ,
            <given-names>J.Z.</given-names>
          </string-name>
          :
          <article-title>OWL SAIQL - an OWL DL Query Language for Ontology Extraction</article-title>
          .
          <source>In: In Proc. of OWLED-07</source>
          . (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>O</given-names>
            <surname>'Connor</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.J.</given-names>
            ,
            <surname>Das</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.K.</surname>
          </string-name>
          :
          <article-title>SQWRL: A query language for OWL</article-title>
          . In: OWLED. (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. Group,
          <string-name>
            <surname>W.O.W.:</surname>
          </string-name>
          <article-title>OWL 2 Web Ontology Language Document Overview</article-title>
          .
          <source>W3C Recommendation</source>
          ,
          <source>W3C (October</source>
          <year>2009</year>
          ) http://www.w3.org/TR/2009/REC-owl2
          <string-name>
            <surname>-</surname>
          </string-name>
          overview-20091027, cit.
          <volume>04</volume>
          .12.
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Broekstra</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kampman</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>An rdf query and transformation language</article-title>
          . In Staab, S.,
          <string-name>
            <surname>Stuckenschmidt</surname>
          </string-name>
          , H., eds.: Semantic Web and
          <string-name>
            <surname>Peer-</surname>
          </string-name>
          to-Peer. Springer Berlin Heidelberg (
          <year>2006</year>
          )
          <volume>23</volume>
          {
          <fpage>39</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Prud'hommeaux</surname>
          </string-name>
          , E.,
          <string-name>
            <surname>Seaborne</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>SPARQL Query Language for RDF. W3C Recommendation, W3C</article-title>
          (
          <year>January 2008</year>
          ) http://www.w3.org/TR/2008/REC-rdfsparql-query-
          <volume>20080115</volume>
          , cit. 3.
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kutz</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sattler</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          :
          <article-title>The Even More Irresistible SROIQ</article-title>
          . In Doherty, P.,
          <string-name>
            <surname>Mylopoulos</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Welty</surname>
          </string-name>
          , C.A., eds.: KR, AAAI Press (
          <year>2006</year>
          )
          <volume>57</volume>
          {
          <fpage>67</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Sirin</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Optimizations for Answering Conjunctive ABox Queries</article-title>
          .
          <source>In: Description Logics. Volume 189 of CEUR</source>
          . (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Kremen</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kouba</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          :
          <article-title>Conjunctive Query Optimization in OWL2-DL</article-title>
          .
          <source>In: Proceedings of the 22th International Conference on Database and Expert System Applications (DEXA</source>
          <year>2011</year>
          ).
          <article-title>Volume 6861 of LNCS</article-title>
          ., Springer Verlag (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Glimm</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lutz</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sattler</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          :
          <article-title>Conjunctive Query Answering in the Description Logic SHIQ</article-title>
          .
          <source>In: Proceedings of the 20th International Joint Conference on Arti cial Intelligence (IJCAI</source>
          <year>2007</year>
          ).
          <article-title>(</article-title>
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Kollia</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Glimm</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Horrocks</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Query Answering over SROIQ Knowledge Bases with SPARQL</article-title>
          .
          <source>In: Proceedings of the 2011 International Workshop on Description Logic (DL</source>
          <year>2011</year>
          ).
          <article-title>(</article-title>
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Seaborne</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Harris</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <source>: SPARQL 1.1 Query</source>
          . W3C Working Draft,
          <source>W3C (October</source>
          <year>2009</year>
          ) http://www.w3.org/TR/2009/WD-sparql11
          <string-name>
            <surname>-</surname>
          </string-name>
          query-20091022
          <source>, cit. 3</source>
          .
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <article-title>Apache: ARQ - A SPARQL Processor for Jena, web site</article-title>
          (
          <year>April 2011</year>
          ) http://jena.apache.org/documentation/query/index.html,
          <source>cit. 3</source>
          .
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Corby</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <article-title>Kgram: a knowledge graph abstract machine</article-title>
          , web site http://wimmics.inria.fr/corese, cit. 3.
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Williams</surname>
          </string-name>
          , G.T.:
          <article-title>RDF Query 2</article-title>
          .
          <fpage>909</fpage>
          - RDF::
          <article-title>Query - A complete SPARQL 1.1 Query and Update implementation for use with RDF::Trine, web site</article-title>
          (
          <year>November 2012</year>
          ) http://search.cpan.org/dist/RDF-Query/,
          <source>cit. 3</source>
          .
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Arjohn</surname>
            <given-names>Kampman</given-names>
          </string-name>
          , Christiaan Fluit,
          <string-name>
            <surname>J.B.</surname>
          </string-name>
          : Sesame, web site (
          <year>January 2013</year>
          ) http://sourceforge.net/projects/sesame, cit. 3.
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Seid</surname>
            ,
            <given-names>D.Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mehrotra</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Grouping and aggregate queries over semantic web databases</article-title>
          .
          <source>In: ICSC</source>
          . (
          <year>2007</year>
          )
          <volume>775</volume>
          {
          <fpage>782</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kharlamov</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nutt</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thorne</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Aggregate queries over ontologies</article-title>
          .
          <source>In: ONISW</source>
          . (
          <year>2008</year>
          )
          <volume>97</volume>
          {
          <fpage>104</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19. Mart nez, D.C.,
          <string-name>
            <surname>Janowicz</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hitzler</surname>
            ,
            <given-names>P.:</given-names>
          </string-name>
          <article-title>A logical geo-ontology design pattern for quantifying over types</article-title>
          .
          <source>In: SIGSPATIAL/GIS</source>
          . (
          <year>2012</year>
          )
          <volume>239</volume>
          {
          <fpage>248</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Baader</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McGuinness</surname>
            ,
            <given-names>D.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nardi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
          </string-name>
          , P.F., eds.:
          <article-title>The Description Logic Handbook: Theory, Implementation, and Applications</article-title>
          . In Baader, F.,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McGuinness</surname>
            ,
            <given-names>D.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nardi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
          </string-name>
          , P.F., eds.: Description Logic Handbook, Cambridge University Press (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Tao</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sirin</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bao</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McGuinness</surname>
            ,
            <given-names>D.L.</given-names>
          </string-name>
          :
          <article-title>Integrity constraints in owl</article-title>
          . In: AAAI. (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Parsia</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Patel-Schneider</surname>
            ,
            <given-names>P.F.</given-names>
          </string-name>
          :
          <article-title>OWL 2 Web Ontology Language Structural Speci cation and Functional-Style Syntax</article-title>
          . W3C recommendation,
          <source>W3C (October</source>
          <year>2009</year>
          ) http://www.w3.org/TR/2009/REC-owl2
          <string-name>
            <surname>-</surname>
          </string-name>
          syntax-20091027, cit.
          <volume>12</volume>
          .12.
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Patel-Schneider</surname>
            ,
            <given-names>P.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grau</surname>
            ,
            <given-names>B.C.</given-names>
          </string-name>
          :
          <article-title>OWL 2 Web Ontology Language Direct Semantics</article-title>
          .
          <source>W3C Recommendation</source>
          ,
          <source>W3C (October</source>
          <year>2009</year>
          ) http://www.w3.org/TR/2009/REC-owl2
          <string-name>
            <surname>-</surname>
          </string-name>
          direct-semantics-
          <volume>20091027</volume>
          , cit.
          <volume>12</volume>
          .12.
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Kostov</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kremen</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Count aggregation in semantic queries - technical report</article-title>
          .
          <source>Technical report</source>
          , Czech Technical University in Prague, Dept. of
          <string-name>
            <surname>Cybernetics</surname>
          </string-name>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Kremen</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kostov</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Expressive OWL Queries: Design</surname>
          </string-name>
          , Evaluation, Visualization.
          <source>International Journal On Semantic Web and Information Systems</source>
          (
          <year>2012</year>
          )
          <article-title>IGI Publishing</article-title>
          . To appear in
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>