<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Practical Datalog Rewriting for Existential Rules</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Zhe</forename><surname>Wang</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">Griffith University</orgName>
								<address>
									<country key="AU">Australia</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Peng</forename><surname>Xiao</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">Griffith University</orgName>
								<address>
									<country key="AU">Australia</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Kewen</forename><surname>Wang</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">Griffith University</orgName>
								<address>
									<country key="AU">Australia</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Practical Datalog Rewriting for Existential Rules</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">4664F70F89BA489FE7CE3D0257363AEE</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-23T21:12+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Existential rules is an expressive ontology formalism for ontologymediated query answering and as a trade-off, query answering is of high complexity, while several tractable fragments have been identified. Existing systems are based on first-order rewriting methods and the resulting queries can be too large for DBMS to handle. It is shown that datalog rewriting can result in more compact queries but the previous study is mostly theoretical. A practical datalog rewriting algorithm is still missing. In this paper, we fill the gap by proposing a practical datalog rewriting algorithm for conjunctive query answering over existential rules, and establish its correctness over well known fragments of existential rules. Experiments on our prototype system showed superior or comparable performance over state-of-the-art systems on both the compactness of rewritings and the efficiency of query answering.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Existential rules (a.k.a. Datalog± and tuple generating dependencies) <ref type="bibr" target="#b1">[2,</ref><ref type="bibr" target="#b5">6]</ref> is a family of expressive ontology languages. It attracted intensive interest lately due to its expressive power covering datalog and many Horn description logics, including the core dialects of DL-Lite and EL <ref type="bibr" target="#b4">[5]</ref>, which underlay the OWL 2 Profiles. This makes existential rules an appealing formalism for ontology-mediated query answering. While the query answering problem is undecidable over the full formalism, several interesting fragments have been proposed <ref type="bibr" target="#b3">[4,</ref><ref type="bibr" target="#b5">6,</ref><ref type="bibr" target="#b16">17]</ref> that support tractable query answering.</p><p>A major approach for query answering over ontologies expressed in description logics or existential rules is query rewriting. Given an ontology Σ and a query q, a rewriting method transforms them into another query q Σ , which is sometimes in a different query formalism, such that answering q Σ can be handled by conventional database management systems (DBMSs) and at the same time preserves the answers to the original ontology-mediated query. The rewriting approach is particularly promising as it allows ontology-mediated query answering to be implemented on top of existing highly-optimised database query engines. While many algorithms and systems have been developed for various description logics <ref type="bibr" target="#b17">[18,</ref><ref type="bibr" target="#b6">7,</ref><ref type="bibr" target="#b24">25,</ref><ref type="bibr" target="#b22">23]</ref>, particularly for DL-Lite and EL <ref type="bibr" target="#b14">[15,</ref><ref type="bibr" target="#b19">20,</ref><ref type="bibr" target="#b21">22,</ref><ref type="bibr" target="#b11">12]</ref>, it is challenging to extend them to more general existential rules, as existential rules allow predicates of arbitrary arities (instead of only unary and binary predicates) and variable permutations in the rules.</p><p>Existing systems for query answering over existential rules are typically based on first-order rewritings <ref type="bibr" target="#b7">[8,</ref><ref type="bibr" target="#b12">13,</ref><ref type="bibr" target="#b13">14]</ref>, i.e., q Σ is a first-order query. A limitation of such an approach is that it can only handle ontologies and queries that are first-order rewritable. Well-accepted first-order rewritable classes are the linear and sticky existential rules <ref type="bibr" target="#b5">[6]</ref>. Yet many practical ontologies do not necessarily fall into these classes, such as some ontologies formulated in EL. Even for ontologies and queries that are first-order rewritable, the results of rewriting can suffer from a significant blow-up and become difficult for DBMSs to handle <ref type="bibr" target="#b18">[19]</ref>.</p><p>On the other hand, taking datalog as the target query language can lead to much more compact rewritings and it is shown for description logics that executing (nonrecursive) datalog rewritings is much more feasible for DBMSs than equivalent firstorder rewritings <ref type="bibr" target="#b11">[12]</ref>. All ontologies and queries that are first-order rewritable are trivially datalog rewritable, and more datalog rewritable classes are known, such as the guarded existential rules <ref type="bibr" target="#b8">[9]</ref>. However, existing research on datalog rewriting of existential rules are mostly theoretical <ref type="bibr" target="#b9">[10,</ref><ref type="bibr" target="#b2">3]</ref> (refer to <ref type="bibr" target="#b0">[1]</ref> for a detailed discussion). While several algorithms and systems have been developed for datalog rewriting for various description logics <ref type="bibr" target="#b6">[7,</ref><ref type="bibr" target="#b11">12]</ref>, to the best of our knowledge, a practical system is still missing for datalog rewriting over more general existential rules.</p><p>In this paper, we fill the gap by presenting both a practical algorithm and a prototype system for datalog rewriting and query answering over existential rules. Our algorithm is based on the notion of unfolding <ref type="bibr" target="#b23">[24]</ref> and the observation that unfolding can generate a datalog rewriting whenever it exists. Yet instead of naive unfolding, to achieve compactness of rewriting, we separate the results of unfolding into short rules by introducing fresh predicates and reusing such predicates when possible. Such a separation technique not only reduces the length of generated rules but also facilitates structure sharing (via the reuse of predicates). While such a rewriting process may not terminate, we move on to identify classes of ontologies where the rewriting process terminates and produce correct datalog rewritings, including both a novel class and several existing well-accepted classes. After that, we introduce a practical algorithm for computing the datalog rewriting through constructing rewriting graphs, which again facilitates structure sharing and can be seen as a decomposed representation of rewritings. Finally, we implemented our algorithm as a prototype system and evaluate it against the state-of-the-art systems for both existential rules and description logics on commonly used benchmark ontologies and queries.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Preliminaries</head><p>Let N c , N n , and N v be disjoint, countably infinite sets of constants, (labelled) nulls, and variables respectively. A term is either a constant, null, or variable. We assume standard first-order logic notions, such as predicates, (ground) atoms, formulas, entailment (|=) and equivalence (≡). An instance is a (possibly infinite) set of atoms that contains only constants and nulls. A dataset is a finite ground instance. For a formula or an instance ϕ, var(ϕ) denotes the variables in ϕ.</p><p>An existential rule (or a rule) r is a formula of the form</p><formula xml:id="formula_0">∀x.∀y.[∃z.ϕ(x, z) ← ψ(x, y)]</formula><p>where x, y and z are pairwise disjoint vectors of variables, and ϕ(x, z) and ψ(x, y) are conjunctions of atoms with variables from respectively x∪z and x∪y. We assume rules do not contain constants. Variables in x are called frontier variables, denoted fr(r). and those in z are called existential variables, denoted ext(r). Formula ϕ is the head of the rule r, denoted head(r), and formula ψ is the body of r, denoted body(r); again, they can be seen as (existentially quantified conjunctions of) sets of atoms. For brevity, universal quantifiers in a rule are often omitted, and we sometimes express rule r as head(r) ← body(r). A datalog rule r is an existential rule whose head consists of a single atom and ext(r) is empty.</p><p>A conjunctive query (CQ) q is a first-order formula of the form ∃y.ϕ(x, y), where x and y are tuples of variables and φ is a conjunction of atoms containing only constants and variables from x ∪ y. Sometimes it is convenient to treat it as a datalog rule Q(x) ← ϕ(x, y) where Q is a fresh predicate with arity |x|. If x is empty then q is a Boolean CQ (BCQ). Answering CQs can be reduced to that of BCQs and hence w.l.o.g. we consider only BCQs in this paper. For convenience, we assume a fixed renaming between variables and labelled nulls, which allows us to identify a BCQ with the set of its atoms where all the variables are renamed as nulls, and vice versa. A union of BCQs (UCQ) is a disjunction of BCQs, which is seen as a finite set of finite instances.</p><p>An ontology-mediated query (OMQ) is a pair Q = (Σ, q) with Σ a finite set of rules and q a BCQ. The answer of Q over a dataset D is true if Σ ∪ D |= q, and false otherwise. A datalog rewriting of an OMQ (Σ, q) is a of the form (Π, Q) where Π is a datalog program and Q is a nullary predicate, such that for any dataset D, Σ ∪ D |= q iff Π ∪ D |= Q. We call it a strong datalog rewriting if additionally Σ ∪ {q} |= Π. Q is the query predicate of q and sometimes denoted as Q q . When Π consists of only non-recursive datalog rule with Q in their heads, the rewriting is a UCQ rewriting.</p><p>The UCQ rewriting of OMQs can be obtained through the notion of piece unification for a given BCQ q and a rule r <ref type="bibr" target="#b15">[16]</ref>. First, for a subset q of q, a variable occurring both in q and in q \ q is a separating variable for q in q. A piece unifier of q and r is a triple µ = (B, H, τ ), where ∅ ⊂ B ⊆ q, H ⊆ head(r), and τ is a most general unifier between B and H such that the following condition is satisfied for each z ∈ ext(r): If a term t (t = z) in B ∪ H is unified with z, i.e., zτ = tτ , then t is not a separating variable for B in q.</p><p>For a set X of variables and a substitution σ, σ| X denotes the restricted substitution to domain X. Another substitution σ is a safe extension of σ| X on a set of variables Y , if σ coincides with σ| X and for each y ∈ Y , yσ is a fresh variable.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Datalog Rewriting for OMQs</head><p>In this section, we will introduce a compact datalog rewriting approach, based on the notion of unfolding for existential rules <ref type="bibr" target="#b23">[24]</ref>. A rule r can be unfolded by a rule r if there exists a piece unifier µ = (B, H, τ ) of body(r) and r , and the result of unfolding r by r with µ is the following rule denoted unf µ (r, r ):</p><formula xml:id="formula_1">∃z.[head(r)τ ∪ head(r )τ ] ← (body(r) \ B)τ ∪ body(r )τ (<label>1</label></formula><formula xml:id="formula_2">)</formula><p>where τ is a safe extension of τ | var(H) on var(r ) \ var(H), τ is a safe extension of τ | fr(r) on ext(r), and z consists of all the variables in the head but not in the body. The result of exhaustive unfolding for Σ is denoted unfold(Σ).</p><p>Note that if a strong datalog rewriting exists for an OMQ, then there exists a subset of its unfolding that consists of datalog rules and is such a datalog rewriting.</p><p>Lemma 1. For an OMQ (Σ, q), a strong datalog rewriting exists iff there exists a finite subset Π ⊆ unfold(Σ ∪ {q}) such that (Π, Q q ) is such a datalog rewriting.</p><p>Clearly, a naive method to compute a datalog rewriting using the above unfolding is impractical, as the datalog rules obtained from unfolding can be very large (indeed, are often of unbounded sizes). In what follows, we introduce a practical approach for datalog rewriting by breaking up long datalog rules into smaller ones. It is known that every OMQ (Σ, q) can be transformed into an OMQ (Σ , q) whose rule heads have single atoms in a way that preserves query answering <ref type="bibr" target="#b7">[8]</ref>. For convenience, in what follows, we assume Σ consists of rules of single-atom heads. As a first step, we present an alternative operator, which we simply call rewriting, between two existential rules. Definition 1. For two rules r, r and a piece unifier µ = (B, H, τ ) of body(r) and r , the result of rewriting r by r with µ, denoted rew µ (r, r ), consists of the following rules</p><formula xml:id="formula_3">P(x r )τ ← body(r )τ ,<label>(2)</label></formula><formula xml:id="formula_4">∃z.R(v) ← (body(r) \ B)τ ∪ {P(x r )τ },<label>(3)</label></formula><formula xml:id="formula_5">α ← R(v) for each α ∈ head(r)τ ∪ head(r )τ ,<label>(4)</label></formula><p>∃z.</p><p>[head(r)τ ∪ head(r</p><formula xml:id="formula_6">)τ ] ← (body(r) \ B)τ ∪ {P(x r )τ },<label>(5)</label></formula><p>where τ , τ are as in Equation ( <ref type="formula" target="#formula_1">1</ref>), v is a tuple of variables in head(r)τ ∪ head(r )τ , z consists of all the variables in the head but not in the body, and P and R are fresh predicates with arities |x r | and |v|.</p><p>Note that rule (5) can be captured by rules ( <ref type="formula" target="#formula_4">3</ref>) and ( <ref type="formula" target="#formula_5">4</ref>), yet it is included for the correctness of rewriting in some cases. We mark rule <ref type="bibr" target="#b4">(5)</ref> as temporary which will be deleted after the rewriting is completed, and we will discuss in next section when the generation of such temporary rules are not necessary. Also, for rules of the form (3) that are not datalog rules, we also mark them for deletion. We can use rew µ (r, r ) to replace unf µ (r, r ) in the unfolding of rules and it is not hard to see that the resulting set of rules are equivalent w.r.t. query answering. Indeed, if we allow fresh predicates P and R to be further unfolded, then the rewriting process generates strictly more rules than unfold(Σ). However, it is clear that allowing the unfolding of fresh predicates forfeits their purpose, as they were introduced to break up long rules and their unfolding simply reverses it. Hence, it is natural to disallow unfolding of such fresh predicates.</p><p>Furthermore, it also does not make sense to introduce a different fresh predicate each time when the "same" piece unifier, i.e., up to variable renaming, is applied. This is achieved through a label function λ(•) that maps each fresh predicate to a set of atoms. Formally, for predicates P and R in Definition 1, λ(P) = Hτ = head(r )τ and λ(R) = γ(head(r))τ ∪ γ(head(r ))τ , where γ(A(x)) = A(x) if A is a (non-fresh) predicate occurring in the initial rules and otherwise γ(A(x)) = λ(A).</p><p>Finally, special handling for rewriting a query q by another rule r is needed. In particular, the handling of head atoms is simpler, such that rew µ (q, r ) replaces rules (3)-( <ref type="formula" target="#formula_6">5</ref>) with the following rules</p><formula xml:id="formula_7">Q ← (body(q) \ B)τ ∪ {P(x r )τ }, (6) Q ← (body(q) \ B)τ ∪ body(r )τ .<label>(7)</label></formula><p>Again, rule <ref type="bibr" target="#b6">(7)</ref> can be captured by rules ( <ref type="formula" target="#formula_3">2</ref>) and ( <ref type="formula">6</ref>), yet it is included for the correctness of rewriting in some cases. It is also temporary rules to be deleted after the rewriting is completed. We are ready to define the rewriting of a set of existential rules Σ.</p><p>Definition 2. The rewriting of a set of existential rules Σ, denoted rewrite(Σ) is the (possibly infinite) set of rules obtained by exhaustively applying rewriting between each pair of rules r, r as in Definition 1 under the following conditions and by deleting temporary and non-datalog rules at the end:</p><p>-H does not contain any fresh predicate; -If r is a query (i.e., has Q in the head), its rewriting follows ( <ref type="formula" target="#formula_3">2</ref>), ( <ref type="formula">6</ref>) and ( <ref type="formula" target="#formula_7">7</ref>); -For each introduced fresh predicate A ∈ {P, R} in an atom of the form A(x), if there is an atom A (x ) with A another fresh predicate of the same type introduced in previous rewriting steps such that there is a most general unifier σ between λ(A) and λ(A ) with xσ = x σ, then reuse A to replace A. -Eliminate rule r if there is another rule r and a homomorphism σ from body(r )</p><p>to body(r) such that a safe extension σ of σ exists with head(r )σ = head(r).</p><p>We use rewrite| R (Σ) (resp., rewrite R (Σ)) with R ⊆ {(2), . . . , <ref type="bibr" target="#b6">(7)</ref>} to denote the variant of rewrite(Σ) where temporary rules in R are not generated (resp., only rules in R are generated) during rewriting.</p><p>Example 1. Consider Σ 1 = {r 1 : B(y) ← A(x, y), r 2 : ∃y.A(x, y) ← B(x)} and q = Q ← A(x, y) ∧ A(y, z). The (one step) rewriting of r 1 by r 2 results the following rules: Rewriting q by r 2 , by r 1 , and then by r 2 leads to (not a complete list of) rules:</p><formula xml:id="formula_8">r 3 : P 1 (x) ← B(x), r 4 : ∃y.R 1 (x, y) ← P 1 (x), r 5 : A(x, y) ← R 1 (x, y),</formula><formula xml:id="formula_9">r 8 : Q ← A(x, y) ∧ P 1 (y), r 9 : Q ← A(x, y) ∧ B(y),</formula><formula xml:id="formula_10">r 10 : P 2 (y) ← A(z, y), r 11 : Q ← A(x, y) ∧ P 2 (y), r 12 : Q ← A(x, y) ∧ A(z, y), r 13 : Q ← P 1 (x), r 14 : Q ← B(x).</formula><p>Note that P 1 is reused; also, rules r 13 and r 14 cannot be obtained without keeping temporary rules r 9 and r 12 during the rewriting. Now we establish the soundness and completeness of our datalog rewriting.</p><formula xml:id="formula_11">Proposition 1. For an OMQ Q = (Σ, q), let Π = rewrite(Σ ∪ {q}) (resp., Π = rewrite| (5) (Σ ∪ {q}) or Π = rewrite| (7) (Σ ∪ {q})). If Π is finite then (Π, Q q ) is a datalog rewriting of Q.</formula><p>Proof (Sketch). We want to show for each dataset D, Σ ∪D |= q iff Π ∪D |= Q q . First, we only need to establish "if" direction for Π = rewrite(Σ ∪{q}), which can be checked inductively through the unfolding of rules in Π. In particular, consider the unfolding of (reused) fresh predicates in two rules r 1 and r 2 of the form</p><formula xml:id="formula_12">Q ← B 1 ∪ {A(x)} and A(x) ← B 2 ,</formula><p>where A is a fresh predicate and B 1 , B 2 do not contain fresh predicates. Suppose λ(A) = H(y, z) with some substitution σ such that yσ = x, then by the definition of rewriting and unfolding, there are rules (up to variable renaming) Q ← B 1 ∪ H σ with H ⊆ H and Hσ ← B 2 from unfold(Σ ∪ {q}). Note that the predicate reuse condition in Definition 2 ensures that H σ is a piece for unification. Thus, the result of unfolding r 1 by r 2 is in unfold(Σ ∪ {q}). This can be extended to the cases where B 1 , B 2 contain fresh predicates. Also, we only need to show the "only if" direction for Π = rewrite| (5) (Σ ∪ {q}) and Π = rewrite| (7) (Σ ∪ {q}), and we only need to show for each rule r ∈ unfold(Σ ∪ {q}) with head Q, r also occurs in unfold(Π) (up to variable renaming). We only demonstrate the proof for Π = rewrite| (7) (Σ ∪ {q}). We show this by an induction on forward chaining, i.e., consider an unfolding chain: (i) r 1 , . . . , r n ∈ Σ ∪ {q}, (ii) for i ≥ 2, r i,...,1 is the result of unfolding r i by r i−1,...,1 , and (iii) r n = q. For the first two rules r 1 , r 2 in the chain, r 2,1 is of the form <ref type="bibr" target="#b0">(1)</ref>, and it has corresponding results of rewriting, rules ( <ref type="formula" target="#formula_6">5</ref>) and ( <ref type="formula" target="#formula_3">2</ref>), denoted r for further unfolding and the body of r 2,1 can be reconstructed through (unfolding) r 2,1 . For each rule r i (i ≥ 2), there is a rule r (5) i,...,1 in the process of rewriting that rewrites it to r (5) i,...,1 and r (2) i,...,1 , such that the head of r i,...,1 is preserved in r (5) i,...,1 for further unfolding and the body of r i,...,1 can be reconstructed through (unfolding) r </p><formula xml:id="formula_13">≤ i ≤ n in Π. That is, r = r n,...,1 is in unfold(Π).</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Datalog Rewritable Classes</head><p>The process of rewriting introduced in the previous section does not necessarily terminate; for example, it does not terminate on Σ 2 = {∃z.A(z, x) ← A(x, y)}. It is not hard to see that the termination issue is caused by the generation of temporary rules. If we disallow the generation of temporary rules, the rewriting always terminates.</p><p>Lemma 2. For a set of rules Σ, the computation of rewrite| (5), <ref type="bibr" target="#b6">(7)</ref> (Σ) always terminates and the result is finite.</p><p>This can be seen as follows. Suppose the maximum number of atoms in the initial rule bodies is m. For each rule of the forms (2)-( <ref type="formula" target="#formula_5">4</ref>) and <ref type="bibr" target="#b5">(6)</ref>, it has a single atom head and its body has at most m atoms. Also, for each fresh predicate P, λ(P) consists of a single head atom of an initial rule (up to variable renaming). Similarly, for each fresh predicate R, λ(R) consists of at most m head atoms of initial rules, as each rewriting step may add one atom to the head and rule (3) can be rewritten at most m times (noting that unfolding of fresh predicates is disallowed).</p><p>In what follows, we discuss several classes of rules on which (finite) datalog rewritings can be obtained by restricting the generation temporary rules. We start by defining a novel class called separable rule sets, which is through adapting a marking procedure from <ref type="bibr" target="#b16">[17]</ref>.</p><p>We use z r to denote an existential variable z in rule r. For a set of rules Σ, an atom α and a variable x occurring at position i in α, we mark the position with a minimum set of variables M (i, α) satisfying the following conditions: (i) if head(r) = α for some r ∈ Σ with x ∈ ext(r) then M (i, α) = {x r }; (ii) if head(r) = α for some r ∈ Σ with x ∈ fr(r) then M (i, α) is the intersection of all M (j, β) s.t. β ∈ body(r) and x occurs at position j in atom β; (iii) if α ∈ body(r) then M (i, α) is the union of M (i, head(r )) for all r ∈ Σ s.t. r can be unfolded by r with α unified with head(r ). Definition 3. A set of rules Σ is separable if for each rule r ∈ Σ, there do not exists a variable x shared by two body atoms such that the intersection of all M (i, α), for each atom α ∈ body(r) and each position i that x occurs in α, is non-empty.</p><p>It is not hard to see that Σ 2 is separable.</p><p>The class of shy rule sets is proposed in <ref type="bibr" target="#b16">[17]</ref>. Intuitively, a set of rules is shy if no existential variable occurs in a position of a relation where a join variable occurs in a rule body, neither can two variables occurring in such (existential-variable) positions of the body also occur in the same head atom.</p><p>Proposition 2. Each rule set that is shy is also separable.</p><p>This can be seen from that any rule set violating separability also violates Condition 1 of shyness <ref type="bibr" target="#b16">[17]</ref>. However, the converse of the proposition is not necessarily true and</p><formula xml:id="formula_14">Σ 2 ∪ {B(x, y) ← A(x, u) ∧ A(y, v)} is such a case. Proposition 3. For a OMQ (Σ, q) such that Σ ∪ {q} is separable, rewrite (2),(6) (Σ ∪ {q}) is a datalog rewriting of (Σ, q).</formula><p>Intuitively, the proof is based on the fact that the unfolding of rules in Σ ∪ {q} only involves a single atom in the body each time, and thus the result of unfolding can be reconstructed from the result of rewriting even if the bodies are separated.</p><p>The class of sticky rule sets is introduced in <ref type="bibr" target="#b5">[6]</ref>, which are shown to be first-order rewritable. The key idea is that fresh variable generated during backward chaining cannot occur in two separate atoms <ref type="bibr" target="#b20">[21]</ref>. The two classes of sticky and separable rules are incomparable; for instance, Σ 3 = {A(x, y) ← A(x, z) ∧ A(z, y)} is separable but not sticky, and Σ 1 ∪ {C(x, y, z) ← A(x, y) ∧ A(y, z)} (where Σ 1 is from Example 1) is sticky but not separable. Proposition 4. For a OMQ (Σ, q) such that Σ is sticky, rewrite (2),( <ref type="formula">6</ref>), <ref type="bibr" target="#b6">(7)</ref> (Σ ∪ {q}) is a datalog rewriting of (Σ, q). Indeed, the proposition holds for all finite unification sets <ref type="bibr" target="#b1">[2]</ref>, as the backward chaining always terminates on such rule sets and hence rewrite (2),( <ref type="formula">6</ref>), <ref type="bibr" target="#b6">(7)</ref> (Σ ∪ {q}) (in particular, rules of the form ( <ref type="formula" target="#formula_7">7</ref>)) is finite. Moreover, if we disallow the reuse of fresh predicates, the resulting datalog rewriting is a non-recursive one.</p><p>Finally, we are also interested in the class of acyclic rule sets, for which various notions of acyclicity have been proposed <ref type="bibr" target="#b10">[11]</ref>, which guarantees the termination of forward chaining (i.e., on certain chase procedures).</p><p>Proposition 5. For a OMQ (Σ, q) such that Σ is acyclic, rewrite| (7) (Σ ∪ {q}) is a datalog rewriting of (Σ, q). It can be seen from that the acyclicity conditions guarantee the Skolem chase terminates on critical instances <ref type="bibr" target="#b10">[11]</ref>, which avoids the generation of infinitely many Skolemised terms. In our case, it avoids the generation of infinitely many existential variables in the heads of rules <ref type="bibr" target="#b4">(5)</ref>, whereas the sizes of their bodies are always bounded. Hence, the number of such rules is finite, and rewrite| (7) (Σ ∪ {q}) is finite.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">A Rewriting Algorithm</head><p>In this section, we introduce a practical algorithm for computing datalog rewritings of the form rewrite| (5) (Σ), which can be configured to compute rewrite| (5), <ref type="bibr" target="#b6">(7)</ref> (Σ) and rewrite (2),( <ref type="formula">6</ref>),(7) (Σ). It can also be easily adapted to compute rewrite| (7) (Σ). Inspired by <ref type="bibr" target="#b11">[12]</ref>, we compute a decomposed representation of the heads and bodies of the resulting rules from unfolding, such that (i) the representation is compact due to structure sharing, (ii) the datalog rewriting rewrite| (5) (Σ) can be conveniently extracted from such a representation, and (iii) the complete rules from unfolding (e.g., rule <ref type="bibr" target="#b6">(7)</ref>) can be reconstructed via backtracking.</p><p>For a set of rules Σ whose maximum number of body atoms is m, we define a rewriting graph to be a direct graph (N, E) whose nodes in N are of the form (R, I), where R and I each consists of at most m atoms, and whose edges in E are labelled with piece unifiers. Each node n = (R, I) is associated with two fresh predicates P n and R n , and we reuse fresh predicates as in Section 3 through a label function λ(•). For each node n = (R, I), let u n = fr(R ← I) and v n = var(R). Intuitively, an edge from node n = (R, I) to node n = (R , I ) labelled with µ = (B, H, τ ) represents a set of rules (i.e., rules (2)-( <ref type="formula" target="#formula_5">4</ref>) and ( <ref type="formula">6</ref>)) obtained during rewriting as follows:</p><formula xml:id="formula_15">P n (u n ) ← I , corresponding to (2) ∃z.R n (v n ) ← (I \ B)τ ∪ {P n (u n )}, corresponding to<label>(3) and (6)</label></formula><formula xml:id="formula_16">α ← R n (v n ) for each α ∈ R ,<label>corresponding to (4)</label></formula><p>where z consists of all the variables in the head but not in the body. For a rewriting graph G, dlg(G) is the set of datalog rules obtained as above from the edges of G. Now, we present the algorithm for computing rewriting graphs. Note that similar as the rule elimination in Definition 2, for a new node n = (R, I), if there is an existing node n = (R , I ) and a homomorphism σ from I to I such that a safe extension σ of σ exists with R ⊆ R σ , then n should be eliminated. In Algorithm 1, actions with a * are subject to the reuse of fresh predicates and node elimination. Also, τ and τ denote safe extensions of τ as in Equation <ref type="bibr" target="#b0">(1)</ref>.</p><p>In Algorithm 1, we first initialise the nodes to be the pairs of heads and bodies of existing rules (line 2) and use a queue Γ to store the nodes representing rules to be rewritten (line 4 onwards). Since a piece unifier cannot contain a fresh predicate (by Definition 2 and guaranteed in line 7), only original rules or rules of the forms (2), (3), ( <ref type="formula">6</ref>) and <ref type="bibr" target="#b6">(7)</ref> need to be rewritten, and only original rules or rules of the form (4) with head α can rewrite such rules. Lines 9-21 are the rewriting process, with lines 10-12 corresponding to the rewriting of an original rule or a rule (2), and lines 13-15 corresponding to that of rules ( <ref type="formula" target="#formula_4">3</ref>) and <ref type="bibr" target="#b5">(6)</ref>. The rewriting produces 2 new node (subject to predicate reuse and node elimination): node n represents the generated rules (2)-( <ref type="formula" target="#formula_5">4</ref>) and ( <ref type="formula">6</ref>), and is added to N . It is added to the queue for the further rewriting of rule (2); node n † is not added to N but is added to the queue for the further rewriting of rules ( <ref type="formula" target="#formula_4">3</ref>) and <ref type="bibr" target="#b5">(6)</ref>. Note that temporary rules of the form <ref type="bibr" target="#b6">(7)</ref> need to be generated to ensure the correctness. The generation of their representations is achieved through backtracking (lines 22-27). It is not hard to verify that rule <ref type="bibr" target="#b6">(7)</ref> corresponds to ∃z.R n (v n ) ← S.</p><p>We establish the correctness of Algorithm 1 as follows. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Experiments</head><p>We have implemented a prototype system Drewer (Datalog REWriting for Existential Rules), where the piece unification implementation is adapted from the first-order rewriting system Graal <ref type="bibr" target="#b12">[13]</ref>, and used RDFox<ref type="foot" target="#foot_0">1</ref> as the datalog engine. We conducted two set of experiments to evaluate the performance of our system. All experiments were performed on a desktop machine with a processor at 3.30 GHz and 8GB of RAM.</p><p>In the first set of experiments, we compared our system with state-of-the-art query rewriting systems regarding the compactness and efficiency of query rewriting. In particular, Graal is a first-order rewriting system for existential rules, Iqaros <ref type="bibr" target="#b22">[23]</ref> is a first-order rewriting system for OWL 2 DL featured in its rewriting minimisation, and Rapid <ref type="bibr" target="#b21">[22]</ref> is a datalog rewriting system for DL-Lite and EL based on optimised resolution. For benchmark ontologies and queries, we selected 3 commonly used ontologies <ref type="bibr" target="#b12">[13]</ref>, which are DL-Lite versions of Adolena (A), OpenGALEN2 (G), and StockExchange (S). Each of the ontologies comes with 5 conjunctive queries.</p><p>Table <ref type="table" target="#tab_0">1</ref> records the sizes and times for query rewriting, where sizes are measured by the numbers of atoms and the times are in milliseconds. Both Rapid and Iqaros output minimal rewritings of the same sizes recorded under "UCQ". To achieve efficiency as well as compactness in rewriting, Graal makes use of the so called rule compilation, which leads to its small rewriting output. Yet, the results of rewriting produced by Graal are not standard UCQs, which have to be evaluated through a special homomorphism mechanism, and thus cannot be directly handled by DBMSs for datalog engines. We can see that the benefit of datalog rewriting w.r.t. sizes compared to UCQ rewritings becomes obvious when large UCQ rewritings are generated (≥50), with two exceptions q 2 and q 4 on G. This is because the ontology has a large number of simple axioms. For rewriting times, the performance of our system is comparable to Graal and Rapid, with an exception on G due to the reason discussed before.</p><p>In the second set of experiments, we compared our system with existing end-toend in-memory (as our system is in-memory) query answering systems regarding time efficiency. We use RDF4j as the data store of Graal. Another system we compared is Pagoda <ref type="bibr" target="#b24">[25]</ref>, which is not a standard rewriting system, but a hybrid system combining a datalog engine and an OWL 2 reasoner. To compare with Graal and Iqaros, we used the DL-Lite versions of two widely used ontologies, LUBM and Reactome <ref type="bibr" target="#b24">[25]</ref>.</p><p>As Reactome comes with over 100 queries, we randomly selected 5 queries. Table <ref type="table" target="#tab_1">2</ref> records the times (in seconds) on pre-processing (Pre) and query evaluation (Eval). Our system showed superior performance in most cases compared to Graal, which is possibly due to the special homomorphism mechanism implemented in it. both of which took significantly more time in pre-processing. Considering only the query evaluation times, Drewer is comparable to Pagoda, whereas Pagoda took more preprocessing time for the materialization of upper-bound and lower-bound datalog programs. Iqaros shows best performance among all the systems, while the performance of Drewer is comparable on Reactome. Note that Iqaros is specialised for first-order rewritable OWL 2 DL ontologies, whereas Drewer is for more general existential rules.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7">Conclusion</head><p>In this paper, we have presented a novel approach to datalog rewriting for existential rules and introduced a new datalog rewritable class, the separable rule sets, which generalises the class of shy rule sets. Furthermore, we presented a practical algorithm for computing datalog rewritings and established its correctness. Finally, we implemented and evaluated our prototype system Drewer, which is to the best of our knowledge, the first datalog rewriting system for existential rules. Our system demonstrated superior or comparable performance compared to state-of-the-art rewriting and query answering systems.</p><p>For future work, we are working on identifying a more general class of datalog rewritable existential rules, optimising our rewriting algorithm and implementation, and conducting further evaluation on more complex ontologies and queries.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>r 6 :</head><label>6</label><figDesc>B(y) ← R 1 (x, y), r 7 : ∃y.[A(x, y) ∧ B(y)] ← P 1 (x), where λ(P 1 ) = {A(x, y)} and λ(R 1 ) = {A(x, y), B(y)}.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>1 .</head><label>1</label><figDesc>The head of r 2,1 is preserved in r</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head></head><label></label><figDesc>..,1 . Finally, the body of r n,...,1 can be reconstructed by unfolding r ..,1 for all 1</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>Algorithm 1 :Theorem 1 .</head><label>11</label><figDesc>Compute Rewriting Graphsinput : A set of existential rules Σ output: A rewriting graph (N, E) 1 begin 2 initialise N := {(head(r), body(r)) | r ∈ Σ} and E := ∅; 3 assign * fresh predicates Pn, Rn to each n = (R, I) ∈ N with λ(Pn) = λ(Rn) = R; 4 let Γ be a queue and initially Γ := N ; 5 while Γ = ∅ do 6 take n = (R, I) popped from Γ ; 7 foreach n = (R , I ) ∈ N and α ∈ R containing no fresh predicate do 8 consider rule r := α ← I ; 9 foreach piece unifier µ = (B, H, τ ) of I and r do 10 if n ∈ N then 11 take n := (R , I τ ) where R = Rτ ∪ {ατ } if R is a singleton; otherwise R = {Pn(un)τ , ατ }; 12 assign * a fresh predicate R n and let λ(R n ) := λ(Pn)τ ∪ {ατ }; 13 else 14 take n := (R , I τ ) where R = Rτ ∪ {ατ } if R is a singleton; otherwise R = {Rn(vn)τ , ατ }; 15 assign * a fresh predicate R n and let λ(R n ) := λ(Rn)τ ∪ {ατ }; 16 assign * a fresh predicate P n and let λ(P n ) := ατ ; 17 add * n to N and (n, n ) to E labelled with µ; push * n to Γ ; 18 take n † := (R , (I \ B)τ ∪ {P n (u n )}); 19 assign * a fresh predicate R n † and let λ(R n † ) = λ(Rn)τ ∪ {ατ }; push * n † to Γ ; 20 initialise p := n and S := I; 21 while p has a parent n = (R , I ) and n = n do 22 suppose the path from n to n has labels (B1, H1, τ1), . . . , (Bm, Hm, τm); 23 let p := n and S := S ∪ (I \ B1)τ1 • • • τm; 24 take n ‡ := (R, S) and reuse the predicate R n ‡ := Rn; push * n ‡ to Γ ; 25 return (N, E); For a set of rules Σ, if rewrite| (5) (Σ) is finite then Algorithm 1 computes a finite rewriting graph G such that dlg(G) ≡ rewrite| (5) (Σ).</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1 :</head><label>1</label><figDesc>Comparison on query rewriting.</figDesc><table><row><cell>Ontology</cell><cell>Query</cell><cell cols="3">Rewriting Size UCQ Drewer Graal</cell><cell cols="4">Rewriting Time Drewer Graal Rapid Iqaros</cell></row><row><cell></cell><cell>q1</cell><cell>27</cell><cell>54</cell><cell>2</cell><cell>26</cell><cell>15</cell><cell>9</cell><cell>3</cell></row><row><cell></cell><cell>q2</cell><cell>50</cell><cell>32</cell><cell>2</cell><cell>3</cell><cell>3</cell><cell>5</cell><cell>3</cell></row><row><cell>A</cell><cell>q3</cell><cell>104</cell><cell>32</cell><cell>1</cell><cell>3</cell><cell>8</cell><cell>6</cell><cell>18</cell></row><row><cell></cell><cell>q4</cell><cell>224</cell><cell>35</cell><cell>2</cell><cell>2</cell><cell>3</cell><cell>15</cell><cell>10</cell></row><row><cell></cell><cell>q5</cell><cell>624</cell><cell>37</cell><cell>1</cell><cell>3</cell><cell>2</cell><cell>20</cell><cell>312</cell></row><row><cell></cell><cell>q1</cell><cell>2</cell><cell>3</cell><cell>1</cell><cell>62</cell><cell>6</cell><cell>5</cell><cell>5</cell></row><row><cell></cell><cell>q2</cell><cell>1152</cell><cell>1276</cell><cell>1</cell><cell>70</cell><cell>50</cell><cell>41</cell><cell>4040</cell></row><row><cell>G</cell><cell>q3</cell><cell>488</cell><cell>80</cell><cell>5</cell><cell>99</cell><cell>45</cell><cell>20</cell><cell>5779</cell></row><row><cell></cell><cell>q4</cell><cell>147</cell><cell>155</cell><cell>1</cell><cell>60</cell><cell>3</cell><cell>2</cell><cell>402</cell></row><row><cell></cell><cell>q5</cell><cell>324</cell><cell>59</cell><cell>19</cell><cell>68</cell><cell>34</cell><cell>9</cell><cell>7206</cell></row><row><cell></cell><cell>q1</cell><cell>6</cell><cell>10</cell><cell>1</cell><cell>11</cell><cell>7</cell><cell>6</cell><cell>0</cell></row><row><cell></cell><cell>q2</cell><cell>2</cell><cell>30</cell><cell>1</cell><cell>1</cell><cell>0</cell><cell>2</cell><cell>3</cell></row><row><cell>S</cell><cell>q3</cell><cell>4</cell><cell>15</cell><cell>1</cell><cell>3</cell><cell>1</cell><cell>2</cell><cell>11</cell></row><row><cell></cell><cell>q4</cell><cell>4</cell><cell>30</cell><cell>1</cell><cell>0</cell><cell>1</cell><cell>2</cell><cell>8</cell></row><row><cell></cell><cell>q5</cell><cell>8</cell><cell>16</cell><cell>1</cell><cell>1</cell><cell>5</cell><cell>3</cell><cell>117</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head>Table 2 :</head><label>2</label><figDesc>Comparison on query answering.</figDesc><table><row><cell cols="2">Ontology Query</cell><cell cols="2">Drewer Pre Eval</cell><cell cols="2">Graal Pre Eval</cell><cell cols="2">Pagoda Pre Eval</cell><cell cols="2">Iqaros Pre Eval</cell></row><row><cell></cell><cell>q1</cell><cell></cell><cell>1.49</cell><cell></cell><cell>4.73</cell><cell></cell><cell>0.82</cell><cell></cell><cell>0.00</cell></row><row><cell></cell><cell>q2</cell><cell></cell><cell>0.46</cell><cell></cell><cell>13.87</cell><cell></cell><cell>0.00</cell><cell></cell><cell>0.00</cell></row><row><cell>LUBM</cell><cell>q3</cell><cell>22.94</cell><cell>0.03</cell><cell>200.74</cell><cell>0.00</cell><cell>121.98</cell><cell>0.95</cell><cell>22.3</cell><cell>0.01</cell></row><row><cell></cell><cell>q4</cell><cell></cell><cell>1.48</cell><cell></cell><cell>0.00</cell><cell></cell><cell>0.39</cell><cell></cell><cell>0.02</cell></row><row><cell></cell><cell>q5</cell><cell></cell><cell>1.49</cell><cell></cell><cell>0.18</cell><cell></cell><cell>0.65</cell><cell></cell><cell>0.03</cell></row><row><cell></cell><cell>q1</cell><cell></cell><cell>0.04</cell><cell></cell><cell>5.15</cell><cell></cell><cell>0.03</cell><cell></cell><cell>0.01</cell></row><row><cell></cell><cell>q2</cell><cell></cell><cell>0.07</cell><cell></cell><cell>5.35</cell><cell></cell><cell>0.02</cell><cell></cell><cell>0.00</cell></row><row><cell>Reactome</cell><cell>q3</cell><cell>7.83</cell><cell>0.08</cell><cell>59.80</cell><cell>5.03</cell><cell>13.73</cell><cell>0.01</cell><cell>8.46</cell><cell>0.00</cell></row><row><cell></cell><cell>q4</cell><cell></cell><cell>0.07</cell><cell></cell><cell>5.05</cell><cell></cell><cell>0.01</cell><cell></cell><cell>0.01</cell></row><row><cell></cell><cell>q5</cell><cell></cell><cell>0.07</cell><cell></cell><cell>5.12</cell><cell></cell><cell>0.02</cell><cell></cell><cell>0.00</cell></row></table></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">https://www.cs.ox.ac.uk/isg/tools/RDFox/</note>
		</body>
		<back>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Rewriting guarded existential rules into small datalog programs</title>
		<author>
			<persName><forename type="first">S</forename><surname>Ahmetaj</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Ortiz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Simkus</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of ICDT-18</title>
				<meeting>of ICDT-18</meeting>
		<imprint>
			<date type="published" when="2018">2018</date>
			<biblScope unit="page">24</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">On rules with existential variables: Walking the decidability line</title>
		<author>
			<persName><forename type="first">J.-F</forename><surname>Baget</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Leclère</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M.-L</forename><surname>Mugnier</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Salvat</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Artif. Intell</title>
		<imprint>
			<biblScope unit="volume">175</biblScope>
			<biblScope unit="issue">9-10</biblScope>
			<biblScope unit="page" from="1620" to="1654" />
			<date type="published" when="2011">2011</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Ontology-based data access: a study through disjunctive datalog, csp, and MMSNP</title>
		<author>
			<persName><forename type="first">M</forename><surname>Bienvenu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Cate</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Lutz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Wolter</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of PODS-13</title>
				<meeting>of PODS-13</meeting>
		<imprint>
			<date type="published" when="2013">2013</date>
			<biblScope unit="page" from="213" to="224" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Taming the infinite chase: Query answering under expressive relational constraints</title>
		<author>
			<persName><forename type="first">A</forename><surname>Calì</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Gottlob</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Kifer</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">J. Artif. Intell. Res</title>
		<imprint>
			<biblScope unit="volume">48</biblScope>
			<biblScope unit="page" from="115" to="174" />
			<date type="published" when="2013">2013</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">A general datalog-based framework for tractable query answering over ontologies</title>
		<author>
			<persName><forename type="first">A</forename><surname>Calì</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Gottlob</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Lukasiewicz</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">J. Web Sem</title>
		<imprint>
			<biblScope unit="volume">14</biblScope>
			<biblScope unit="page" from="57" to="83" />
			<date type="published" when="2012">2012</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Towards more expressive ontology languages: The query answering problem</title>
		<author>
			<persName><forename type="first">A</forename><surname>Calì</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Gottlob</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Pieris</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Artif. Intell</title>
		<imprint>
			<biblScope unit="volume">193</biblScope>
			<biblScope unit="page" from="87" to="128" />
			<date type="published" when="2012">2012</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Query rewriting for horn-shiq plus rules</title>
		<author>
			<persName><forename type="first">T</forename><surname>Eiter</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Ortiz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Simkus</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T.-K</forename><surname>Tran</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Xiao</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of AAAI-12</title>
				<meeting>of AAAI-12</meeting>
		<imprint>
			<date type="published" when="2012">2012</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Query rewriting and optimization for ontological databases</title>
		<author>
			<persName><forename type="first">G</forename><surname>Gottlob</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Orsi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Pieris</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">ACM Trans. Database Syst</title>
		<imprint>
			<biblScope unit="volume">39</biblScope>
			<biblScope unit="issue">3</biblScope>
			<biblScope unit="page">46</biblScope>
			<date type="published" when="2014">2014</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Expressiveness of guarded existential rule languages</title>
		<author>
			<persName><forename type="first">G</forename><surname>Gottlob</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Rudolph</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Simkus</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of PODS-14</title>
				<meeting>of PODS-14</meeting>
		<imprint>
			<date type="published" when="2014">2014</date>
			<biblScope unit="page" from="27" to="38" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Rewriting ontological queries into small nonrecursive datalog programs</title>
		<author>
			<persName><forename type="first">G</forename><surname>Gottlob</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Schwentick</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of KR-12</title>
				<meeting>of KR-12</meeting>
		<imprint>
			<date type="published" when="2012">2012</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">Acyclicity notions for existential rules and their application to query answering in ontologies</title>
		<author>
			<persName><forename type="first">B</forename><forename type="middle">C</forename><surname>Grau</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Horrocks</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Krötzsch</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Kupke</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Magka</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Motik</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Z</forename><surname>Wang</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">J. Artif. Intell. Res</title>
		<imprint>
			<biblScope unit="volume">47</biblScope>
			<biblScope unit="page" from="741" to="808" />
			<date type="published" when="2013">2013</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">Efficient query rewriting in the description logic EL and beyond</title>
		<author>
			<persName><forename type="first">P</forename><surname>Hansen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Lutz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Seylan</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Wolter</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of IJCAI-15</title>
				<meeting>of IJCAI-15</meeting>
		<imprint>
			<date type="published" when="2015">2015</date>
			<biblScope unit="page" from="3034" to="3040" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">Query rewriting for existential rules with compiled preorder</title>
		<author>
			<persName><forename type="first">M</forename><surname>König</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Leclère</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M.-L</forename><surname>Mugnier</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of IJCAI-15</title>
				<meeting>of IJCAI-15</meeting>
		<imprint>
			<date type="published" when="2015">2015</date>
			<biblScope unit="page" from="3106" to="3112" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">Sound, complete and minimal ucq-rewriting for existential rules</title>
		<author>
			<persName><forename type="first">M</forename><surname>König</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Leclère</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M.-L</forename><surname>Mugnier</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Thomazo</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Semantic Web</title>
		<imprint>
			<biblScope unit="volume">6</biblScope>
			<biblScope unit="issue">5</biblScope>
			<biblScope unit="page" from="451" to="475" />
			<date type="published" when="2015">2015</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<analytic>
		<title level="a" type="main">The combined approach to query answering in DL-Lite</title>
		<author>
			<persName><forename type="first">R</forename><surname>Kontchakov</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Lutz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Toman</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Wolter</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Zakharyaschev</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of KR-10</title>
				<meeting>of KR-10</meeting>
		<imprint>
			<date type="published" when="2010">2010</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b15">
	<analytic>
		<title level="a" type="main">On bounded positive existential rules</title>
		<author>
			<persName><forename type="first">M</forename><surname>Leclère</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M.-L</forename><surname>Mugnier</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><surname>Ulliana</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of DL-16</title>
				<meeting>of DL-16</meeting>
		<imprint>
			<date type="published" when="2016">2016</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b16">
	<analytic>
		<title level="a" type="main">Efficiently computable datalog∃ programs</title>
		<author>
			<persName><forename type="first">N</forename><surname>Leone</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Manna</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Terracina</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Veltri</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of KR-12</title>
				<meeting>of KR-12</meeting>
		<imprint>
			<date type="published" when="2012">2012</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b17">
	<analytic>
		<title level="a" type="main">Tractable query answering and rewriting under description logic constraints</title>
		<author>
			<persName><forename type="first">H</forename><surname>Pérez-Urbina</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Motik</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Horrocks</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">J. Applied Logic</title>
		<imprint>
			<biblScope unit="volume">8</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="186" to="209" />
			<date type="published" when="2010">2010</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b18">
	<analytic>
		<title level="a" type="main">Improving query answering over dl-lite ontologies</title>
		<author>
			<persName><forename type="first">R</forename><surname>Rosati</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Almatelli</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of KR-10</title>
				<meeting>of KR-10</meeting>
		<imprint>
			<date type="published" when="2010">2010</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b19">
	<analytic>
		<title level="a" type="main">Introducing nominals to the combined query answering approaches for EL</title>
		<author>
			<persName><forename type="first">G</forename><surname>Stefanoni</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Motik</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Horrocks</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of AAAI-13</title>
				<meeting>of AAAI-13</meeting>
		<imprint>
			<date type="published" when="2013">2013</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b20">
	<monogr>
		<title level="m" type="main">Conjunctive Query Answering Under Existential Rules -Decidability, Complexity, and Algorithms</title>
		<author>
			<persName><forename type="first">M</forename><surname>Thomazo</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2013">2013</date>
			<pubPlace>France</pubPlace>
		</imprint>
		<respStmt>
			<orgName>Montpellier 2 University</orgName>
		</respStmt>
	</monogr>
	<note type="report_type">PhD thesis</note>
</biblStruct>

<biblStruct xml:id="b21">
	<analytic>
		<title level="a" type="main">Optimising resolution-based rewriting algorithms for OWL ontologies</title>
		<author>
			<persName><forename type="first">D</forename><surname>Trivela</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Stoilos</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Chortaras</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><forename type="middle">B</forename><surname>Stamou</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">J. Web Semant</title>
		<imprint>
			<biblScope unit="volume">33</biblScope>
			<biblScope unit="page" from="30" to="49" />
			<date type="published" when="2015">2015</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b22">
	<analytic>
		<title level="a" type="main">Rewriting minimisations for efficient ontologybased query answering</title>
		<author>
			<persName><forename type="first">T</forename><surname>Venetis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Stoilos</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><surname>Vassalos</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of ICTAI-16</title>
				<meeting>of ICTAI-16</meeting>
		<imprint>
			<date type="published" when="2016">2016</date>
			<biblScope unit="page" from="1095" to="1102" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b23">
	<analytic>
		<title level="a" type="main">Forgetting and unfolding for existential rules</title>
		<author>
			<persName><forename type="first">Z</forename><surname>Wang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Wang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">X</forename><surname>Zhang</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of AAAI-18</title>
				<meeting>of AAAI-18</meeting>
		<imprint>
			<date type="published" when="2018">2018</date>
			<biblScope unit="page" from="2013" to="2020" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b24">
	<analytic>
		<title level="a" type="main">Pagoda: Pay-as-you-go ontology query answering using a datalog reasoner</title>
		<author>
			<persName><forename type="first">Y</forename><surname>Zhou</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><forename type="middle">C</forename><surname>Grau</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Nenov</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Kaminski</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Horrocks</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">J. Artif. Intell. Res</title>
		<imprint>
			<biblScope unit="volume">54</biblScope>
			<biblScope unit="page" from="309" to="367" />
			<date type="published" when="2015">2015</date>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
