<!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>Reasoning in Financial Settings with Harmful Joins</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Teodoro Baldazzi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Paolo Atzeni</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Università Roma Tre, Department of Computer Science and Engineering</institution>
          ,
          <addr-line>Rome</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Warded Datalog+/- has recently emerged as a powerful logic language for ontological reasoning on large knowledge graphs, ofering a very good trade-of between expressive power and data complexity. Achieving decidability and data tractability in practice, over complex recursive settings with existential quantification, requires reasoners to adopt specialized strategies that control the efects of recursion and ensure reasoning termination with small memory footprint. However, to enable these strategies, the Warded Datalog+/- settings must be in a “harmless” form, i.e., without joins on variables afected by existential quantification. We provide an algorithm to remove such “harmful” joins, supporting reasoning decidability and the full expressive power of the language while preserving the correctness of the task. The algorithm is integrated into the Vadalog system, a state-of-the-art Warded Datalog+/- -based reasoner. We employ it to solve the Strong Link problem, a relevant ifnancial task to find possible links between pairs of companies, based on the existence of a person who owns a significant share of both their stocks. Solving this problem allows to investigate possibly malevolent shareholdings and ownerships.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Datalog</kwd>
        <kwd>Vadalog</kwd>
        <kwd>ontological reasoning</kwd>
        <kwd>existential quantification</kwd>
        <kwd>harmful joins</kwd>
        <kwd>financial scenarios</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <sec id="sec-1-1">
        <title>PTIME data complexity for the reasoning. The semantics</title>
        <p>of a set Σ of Warded rules over a database instance  is
Recent years have witnessed a growing interest, among defined via the chase procedure [6]. Intuitively, it adds
companies of distinct size and scope, towards building new facts to , possibly containing freshly generated
and exploiting private corporate knowledge in the form symbols  (technically, labelled nulls) [7] that act as
placeof financial Knowledge Graphs (KG). This led to the ris- holders for the existentially quantified variables, until
ing adoption of intelligent systems that allow to manage Σ is satisfied. Warded Datalog ± is implemented in the
such extensional knowledge and enrich it with new infor- Vadalog system [3], a state-of-the-art reasoner that allows
mation, inferred via eficient ontological reasoning mech- to perform ontological reasoning in complex scenarios.
anisms and modeled by logical rules and ontologies in Critical Aspects in Reasoning. When reasoning on
specific formalisms [ 1, 2]. Employing modern languages Datalog± settings, in the presence of recursion and
exfor Knowledge Representation and Reasoning (KRR) [3] istential quantification, infinite labelled nulls could be
enabled companies to solve relevant problems and tasks generated in the chase, causing the procedure not to
terin distinct business domains, such as investment analysis, minate and inhibiting the decidability of the task [8]. In
company ownership, shock propagation, fraud detection, this work, we tackle such issue in the context of Warded
anti-money laundering, etc. Datalog± scenarios. Indeed, while the computational
A Formalism for Ontological Reasoning. As main re- properties of the Warded fragment bode well for eficient
quirements, KRR languages must exhibit full support for implementations, it is still required to apply specific
techrecursion and joins as well as existential quantification, niques (namely, termination strategies) that properly
conall aspects essential to guarantee the expressive power trol the interactions between recursion and existentials
needed for ontological reasoning and KG traversal. At the in the chase. Consider the following example.
same time, decidability and tractability of the reasoning
must be sustained, basically limiting the data complexity Example 1. Scenario modeled with a Warded set Σ .
to a polynomial degree [4]. Warded Datalog± [2] is a
member (technically, a fragment) of the Datalog± fam- Bank(x) → ∃d Manager(x, d) ( )
ily [5] that recently rose among the logic languages for Acquires(x, y), Manager(x, d) → Manager(y, d) ( )
ontological reasoning on KGs. It covers these require- BankGroup(x, y) → ∃d Manager(x, d) ( )
ments, ofering a very good trade-of between
expressive power and computational complexity and capturing Manager(x, d), Manager(y, d) → BankGroup(x, y) ( )
Σ represents a bank acquisition scenario. For each bank 
there exists a manager  (rule  ). If  acquires a bank ,
 also becomes manager of  (rule  ). If  and  have a
common manager, they are in the same bank group (rule  )
and vice versa (rule  ).</p>
        <p>Consider the database instance  = {Bank(Unicredit), The applicability of the isomorphism termination
stratBank(MPS), Acquires(Unicredit, MPS)} and the query : egy, to achieve reasoning decidability while preserving
“what are all the BankGroups?” as ontological reasoning correctness of query answering, is essential in such
comtask. It can be observed that the set of such bank groups plex domains. Therefore, reasoning settings that feature
is finite, whereas the chase does not terminate. First, harmful joins and recursion require to be treated properly.
we generate Manager(Unicredit, 0) and Manager(MPS, 1) Such is the case of the Strong Link problem [9], a
highby activating  from the facts Bank(Unicredit) and interest scenario in the context of company ownership.
Bank(MPS), respectively. Then, we obtain Man- It consists in determining possible links between pairs of
ager(MPS, 0) via  , BankGroup(Unicredit,MPS) via the companies, based on the existence of a person who owns
join on  0 in  , Manager(Unicredit, 2), Manager(MPS, 2) a significant share of both their stocks. Solving this task
by activating  and so on. Indeed, the recursion involv- allows to investigate and monitor (possibly malevolent)
ing  ,  and  causes the generation of an infinite set company shareholdings and ownerships.
⋃︀=3,...{Manager(Unicredit,  ), Manager(MPS,  )}. Motivated by this, we apply our HJE algorithm to the
Warded Datalog± scenario of Strong Link, rewriting it
into its Harmless Warded equivalent and enabling the
Vadalog system to solve the task in an eficient fashion,
while preserving correctness.</p>
        <p>Enabling Reasoning Termination in Vadalog. To
achieve reasoning termination in practice, while
upholding the correctness of the task, the Vadalog system applies
the isomorphism termination strategy in the chase:
isomorphic copies of previously generated facts (i.e., same In detail, the main contributions of this paper are:
name, same constants in same position and bijection
between labelled nulls) are not explored, i.e., the chase steps • An integration of the theoretical bases for the
starting from them are not performed and the derived Warded fragment. We introduce Harmless Warded
facts are not generated. This strategy exploits the the- Datalog± and we discuss the role of harmful joins in
oretical underpinning of Warded Datalog± known as Warded settings, with reference to expressive power
reasoning boundedness, which states that facts derived and reasoning termination. We define and solve the
from isomorphic origins would be in turn isomorphic, disarmament problem, which consists in rewriting a
thus uninformative for query answering [9]. set of Warded rules with harmful joins into a Harmless</p>
        <p>However, as a necessary condition for such exploita- Warded version, equivalent with respect to the chase.
tion, the set of rules is required to be in a “harmless” • The Harmful Join Elimination algorithm, our
rewritform, i.e., without a “harmful” type of joins between ing technique that exploits such bases to solve the
variables afected by existential quantification (namely, disarmament problem and enable Vadalog’s
terminain Harmless Warded Datalog± ). This is due to the fact tion strategy in practice on recursive reasoning
setthat rules with these harmful joins could activate on tings with harmful joins. We illustrate the procedure
labelled nulls, propagated from the existentials: there- and we apply it to the program in Example 1.
fore, the suppression of isomorphic facts carrying such
nulls could hamper their activation and, consequently, • A real-world application of the HJE algorithm on the
undermine the correctness of the reasoning task. For Strong Link problem. We discuss the financial task and
instance, in Example 1 Manager(MPS, 0) is isomorphic rewrite the corresponding setting with harmful joins
to Manager(MPS, 1), yet its suppression would prevent into its Harmless Warded equivalent. We provide an
the join in  with Manager(Unicredit, 0) from generat- experimental evaluation of the now enabled reasoning
ing BankGroup(Unicredit,MPS) and the query from being via the Vadalog system, extracting input data from the
answered correctly. On the other hand, it is intuitive to open KG provided by DBpedia [12].
observe that precluding the use of harmful joins when
modeling reasoning settings would afect the expressive
power of the adopted KRR language.</p>
        <p>In this work, we investigate the role of harmful joins
in Warded Datalog± settings and we enable reasoning
termination in their presence by applying the Harmful
Join Elimination (HJE) algorithm [10], a technique to
rewrite a set of Warded rules with harmful joins into an
equivalent Harmless Warded form.</p>
      </sec>
      <sec id="sec-1-2">
        <title>Related Work. Harmful Join Elimination belongs to the</title>
        <p>class of methodologies for Datalog rewriting. Among
them, we mention its conversion into specific fragments,
such as Guarded [13], Linear [14], and Disjunctive [15].</p>
        <p>Similarly, by interpreting the rules as queries, several
methods have been devised to rewrite Datalog±
programs with existential rules [16, 17] and from distinct
formalisms, such as Regular Path Queries [18] and
DeA Financial Use Case. As a powerful Warded Datalog± - scription Logics [19, 20]. The importance of achieving
debased reasoner, the Vadalog system is employed to ef- cidability of Datalog± reasoning settings, in the presence
ifciently solve relevant tasks in real-world scenarios, of recursion and existential quantification, determined
mainly related to the financial and business realm [ 11]. the research and the development of novel approaches
to sustain termination of reasoning tasks [21, 5, 7]. Yet,</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Reasoning with Vadalog</title>
      <p>the HJE algorithm is, to the best of our knowledge, the generated from the application of the rules in Σ over
ifrst technique to rewrite Warded Datalog ± rules into  [6]. We denote chase graph (, Σ) as the directed
an equivalent Harmless Warded version, that allows to graph with the facts from chase(, Σ) as nodes and an
achieve reasoning termination and decidability. edge from a node  to a node  if  is obtained from
Overview. This paper is organized as follows. In Sec-  (and possibly other facts) via a chase step, i.e., a rule
tion 2, we recall relevant background notions. In Sec- in Σ [5]. Given a pair  = (Σ , Ans), where Ans is an
tion 3, we discuss the disarmament problem and we illus- n-ary predicate, we define the evaluation of  over  as
trate the HJE algorithm in action. In Section 4, we provide the set of tuples (, Σ) = {¯ ∈ dom() | Ans(¯) ∈
the application of HJE on the Strong Link problem and chase(, Σ) }, where ¯ is a tuple of constants. We denote
we present the experimental evaluation. We draw our reasoning task as the task of finding a database instance
conclusions in Section 5.  such that: (i) ¯ ∈  if Ans(¯) ∈ (, Σ) and (ii) for
every other instance  ′ such that ¯ ∈  ′ if ¯ ∈ (, Σ) ,
there is a homomorphism from  to  ′ [3].</p>
      <p>In this section, we briefly recall some relevant notions to
guide our discussion. Let ,  , and  be disjoint
countably infinite sets of constants, (labelled) nulls and (regular) In this section, we present our rewriting technique and
variables, respectively. A (relational) schema S is a finite we apply it to Example 1. As the goal of this paper is to
set of relation symbols (or predicates) with associated enable reasoning with the Vadalog system on a real-world
arity. A term is a either a constant or variable. An atom scenario with harmful joins, we refer to the extended
over S is an expression of the form (¯) , where  ∈ S versions of the work [10, 22] for an in-depth discussion
is of arity  &gt; 0 and ¯ is an -tuple of terms. A database of the algorithm and the theory behind.
(instance) over S associates to each relation symbol in Without loss of generality (as more complex joins can
S a relation of the respective arity over the domain of be broken into multiple steps [3]), we define a harmful
constants and nulls. The members of the relations are join rule as a rule of the form:
called tuples or facts [9].</p>
    </sec>
    <sec id="sec-3">
      <title>3. Harmful Join Elimination</title>
      <p>(1, 1, ℎ), (2, 2, ℎ) → ∃ (, )
( )</p>
      <sec id="sec-3-1">
        <title>Existentials and Afectedness. The Vadalog system</title>
        <p>employs vadalog, a KRR language that implements where ,  and  are atoms, [3] and [3] are afected
Warded Datalog± as its logical core. A Warded Datalog± positions, 1, 2 ⊆ , 1, 2 ⊆  are disjoint tuples of
program consists of a set of facts and rules. An existential harmless variables or constants, ℎ is a harmful variable.
wruhleeirsea firs(tt-hoerdbeordsyen)taenndce ∀(t¯h∀e¯(h ea(d¯), a¯)re→co∃n¯jun(c¯t,io¯))ns, Harmless Warded Datalog± . As we have introduced,
of atoms, over the respective predicates, with constants in order to exploit the reasoning boundedness property,
and variables. For brevity, we may omit quantifiers and Warded programs with recursion and existentials must
denote conjunction by comma. Let Σ be a set of rules not contain harmful joins, that is, they belong to the
and [] a position (i.e., the -th term of a predicate  with Harmless Warded fragment. A set of rules ∈ Harmless
arity , where  = 1, . . . , ). We define [] as afected if Warded Datalog± if the following conditions hold: (1) it is
(i)  appears in a rule in Σ with the -th term that con- Warded, i.e., all the dangerous variables in its rules appear
tains an existentially quantified variable or, (ii) there is in a single body atom (the ward), which only shares
harma rule  of Σ such that a universally quantified variable less variables with the rest of the body; and (2) it does not
is only in afected body positions and in position [] in contain harmful join rules. Indeed, while the chase
prothe head of  . A variable  is harmful, with respect to a cedure remains potentially infinite in Harmless Warded
rule, if  appears only in afected positions, otherwise it settings due to the generation of infinite labelled nulls,
is harmless. A rule that contains a harmful variable is a the absence of joins activating on such nulls renders their
harmful rule. In Example 1,  and  are existential rules, identity irrelevant in the evaluation [9].
 propagates the afected position Manager[2] and  is a
harmful join rule, i.e., a rule such that a harmful variable
is involved in a join (namely, harmful join). If the harmful
variable appears in the head of the rule, it is dangerous.</p>
        <p>A rule with a dangerous variable is a dangerous rule.</p>
      </sec>
      <sec id="sec-3-2">
        <title>The Disarmament Problem. In presence of Harmless</title>
        <p>Warded programs, the isomorphism termination
strategy can thus be applied without afecting the
correctness of the reasoning task: given two isomorphic facts
 and ′, only  is explored in the chase, whereas the
descending portions of the chase graph rooted in ′ are
pruned. However, restricting vadalog to such fragment,
while it preserves the computational qualities of Warded
Datalog± , limits the expressiveness of the KRR language
Chase and Reasoning. Let  be a database and Σ
a set of rules. The chase procedure is a fundamental
algorithmic tool that enforces the satisfaction of Σ by
expanding  into a new instance chase(, Σ) with facts
to joins between harmless variables. To avoid such re- ′ be unifiable with  by substitution  . The result of
strictions, we define the disarmament problem for a set unfolding  at  with  is the rule  : (, →) . If
Σ of Warded Datalog± rules as the task of finding a set the head of  contains an existentially quantified variable
Σ ′ of Harmless Warded rules that is equivalent to Σ . In ℎ, it replaces ℎ with a Skolem atom ℎ in  , where  is
this context, two sets of rules are equivalent if they have an injective, deterministic and range disjoint function that
the same meaning with respect to the chase [14], i.e., calculates the values for existentially quantified variables,
chase(, Σ) = chase(, Σ ′) modulo fact isomorphism to control the identity of labelled nulls.
for each database . It can be proved that the
disarmament problem is always solvable, that is, for each Warded Moreover, to cover the activation of the harmful join in 
set Σ there is an equivalent Harmless Warded set Σ ′ [22]. on nulls that are propagated from causes involved in a
recursion, the following folding operation [14] is applied.</p>
      </sec>
      <sec id="sec-3-3">
        <title>Disarming Warded Datalog± . Let Σ be a Warded set</title>
        <p>with one or more harmful join rules. With the goal of Definition 3 ( Folding). Let  be a rule , →, where
enabling the isomorphism termination strategy, while  is an atom and  and  are (conjunctions of) atoms,
preserving vadalog’s expressive power, we propose a and let  be a rule ′→, where  is an atom and ′
technique to rewrite Σ into an equivalent Harmless form, is an atom or a conjunction of atoms. Let ′ be unifiable
i.e., to solve the disarmament problem. with  by substitution  . The result of folding  into  is</p>
        <p>We first provide some theoretical bases. By definition the rule  : (, →) .
of harmful variables, we observe that Σ always contains
one or more rules that propagate the afectedness of such
variables (i.e., the nulls in the chase), from the
existentials to the harmful join. We define them as follows.</p>
        <sec id="sec-3-3-1">
          <title>To keep track of the composition for each harmful join</title>
          <p>rule, we employ the harmful unfolding tree (hu-tree).</p>
          <p>Apart from the more technical side [10], the hu-tree  for
︀⟨ Σ ,  ⟩︀ can be defined as a rule-labelled tree-like structure
Definition 1 ( Causes of Afectedness ). Let  ∈ Σ be a where: (i) the root is labelled by  ; (ii) for each  , there
harmful join rule and let  ∈ {A,B} be an atom in the body exists a root-to-leaf path  whose nodes are labelled by
of  . We define causes of afectedness as the sequences of the result of unfolding their parent nodes with the causes
rules Γ  = [ , . . . ,  1] ( &lt; |Σ |,  ≥ 1) ∈ Σ , where: in  (in order of appearance); (iii) for each   ∈ 
(i)  1: 1(, ), 1→∃ℎ 2(, , ℎ) is a direct cause, i.e., involved in a recursion, there exists a node labelled by the
an existential rule that causes a position to be afected; and result of folding its parent node into  . By definition of
(ii)  : (, , ℎ), →+1(, , ℎ), 1 &lt;  ≤ , are unfolding and folding, it can be proved that the leaves
indirect causes, i.e., rules that propagate the afectedness of  are harmless rules that cover the generation of all
from  1 to  , such that +1 = . 1, . . . ,  are atoms, the facts derived in the chase from the activation of  on
1, . . . ,  are (conjunctions of) atoms not containing ℎ labelled nulls [22]. With reference to Example 1, Figure 1
(as the rules are Warded). shows the path 21, built by unfolding  with the causes
in 21 (atoms are renamed for space reasons).</p>
          <p>Man(x,d),Man(y,d)→BGroup(x,y)
βГMan12
αГMan21</p>
          <p>Acq(v1,v2),Man(v1,d),
Man(y,d)→BGroup(v2,y)</p>
          <p>αГMan12
Acq(v1,v2),Bank(v1),Man(y,d),</p>
          <p>fdα(v1)→BGroup(v2,y)
Acq(v1,v2),Bank(v1),Bank(v3),
fdα(v1),fdα(v3)→BGroup(v2,v3)
With reference to Example 1, the rules  and  are direct
causes of afectedness, whereas  is an indirect one. The
sequences of causes for the atom    1 (resp.,
 2 in order of appearance in  ) are: Γ 11 = [ ],
Γ 12 = [,  ], Γ 13 = [ ], Γ 14 = [,  ]. Let
 = Γ ⌢Γ  be the concatenation of the sequences
Γ  and Γ  for the atoms ,  in  : the causes in 
are labelled after the sequence they belong to. In our
example 21 = [ Γ12 ,  Γ12 ,  Γ21 ].
Intuitively, our goal is to replace each  with harmless rules
that cover the generation of all the facts derived in the
chase from the activation of  . To learn how the
propagated nulls that activate the harmful join afect the
meaning, and to consequently build proper harmless rules, we
compose  along all  . Such composition is performed
via the unfolding operation [14], defined as follows.</p>
        </sec>
      </sec>
      <sec id="sec-3-4">
        <title>Harmful Join Elimination. By exploiting these theo</title>
        <p>Definition 2 ( Unfolding). Let  be a rule , →, retical bases, we now present our rewriting algorithm,
where  and  are atoms and  is an atom or a con- which we named Harmful Join Elimination. Given a
junction of atoms, and let  be a rule →′, where ′ Warded set Σ with one or more harmful join rules  ,
is an atom and  an atom or a conjunction of atoms. Let HJE(Σ) = Σ ′ ∈ Harmless Warded Datalog± such that</p>
        <p>In the grounding phase, HJE adds new harmless rules
to cover the activation of  on ground values, propagated
from the database. It employs the Dom(ℎ) [9] atom, to
ensure that the harmful join variables bind only to
constants in the domain, and an artificial atom ′, where 
∈ {, } of  . With reference to Example 1, the following
rules (namely, dom rules) are added to Σ ′.</p>
        <sec id="sec-3-4-1">
          <title>In this section, we provide a real-world application of the</title>
          <p>HJE algorithm. We employ it to enable reasoning with
the Vadalog system on the Strong Link problem, which
we then solve and empirically evaluate.</p>
          <p>The Strong Link Problem. Being able to determine
and monitor the connections between companies and
shareholders, as well as to investigate possible felonious
activities in company ownership scenarios, is of
highinterest in the financial and corporate realm. With such
goal in mind, we consider the Strong Link problem over
“significantly controlled companies”, that is, companies
for which there exist “significant shareholders” who own
more than 20% of their stocks [9]. Two distinct
companies  and  are involved in a strong link if they share
(at least) one significant shareholder. The Strong Link
scenario can be modeled in Warded Datalog± as follows.
Example 2. Strong Link modeled with Warded rules.</p>
          <p>Company(x) → ∃p∃s Owns(p, s, x)</p>
          <p>Owns(p, s, x) → Stock(x, s)</p>
          <p>Owns(p, s, x) → PSC(x, p)</p>
          <p>PSC(x, p), Controls(x, y) → ∃s Owns(p, s, y)
PSC(x, p), PSC(y, p), x ̸= y → StrongLink(x, y)
StrongLink(x, y) → ∃p∃s Owns(p, s, x)
StrongLink(x, y) → ∃p∃s Owns(p, s, y)</p>
          <p>Stock(x, s) → Company(x)
(1)
(2)
(3)
(4)
(5)
(6)
(7)
For each company  there exists a person  who owns
a certain share  (rule 1), which is part of the company
stock (rule 2). If  owns a share  (rule 3),  is a “person
with significant control” (psc) for . For each company 
controlled by ,  owns a certain share  of  (rule 4). If
two distinct companies  and  share a common psc, they
are involved in a strong link (rule 5). Vice versa, if there is
a strong link between  and , there exists a person  who
owns a share of  (rule 6) and  (rule 7). If  is a share of
a stock for , then  is a company (rule 8).</p>
          <p>Indeed, reasoning on the Strong Link program does not
terminate, as the existential quantification in rule 4, rule 6
and rule 7, and their recursion with rule 3 and rule 5,
cause the generation of an infinite set of   facts in the
chase. Moreover, the isomorphism termination strategy
cannot be applied, due to the presence of the harmful join
rule 5 that hampers the reasoning boundedness of the
program. Therefore, we apply HJE to enable reasoning with
the Vadalog system. Note that rule 1, rule 6 and rule 7
are direct causes of afectedness for the   atoms in
rule 5, whereas rule 3 and rule 4 are indirect ones. Due
to the recursion on such causes, the back-composition
phase builds a hu-tree which consists of both unfolding
and folding leaves. The harmless rules that replace rule 5
in Example 2 are provided below (atoms are renamed
and some rules are merged for space reasons). As in
Example 1,  s are added via grounding, whereas  s and  s
label hu-tree leaves deriving from unfolding and folding,
respectively. Note that some rules were dropped during
cleanup, as they would have never activated.</p>
          <p>Dom(p), PSC(x, p) → PSC′(x, p) ( 1)</p>
          <p>PSC′(x, p) → PSC(x, p) ( 2)</p>
          <p>PSC′(x, p), PSC′(y, p), x ̸= y → SLink(x, y) ( 3)
Comp(x), Contr(x, y) → SLink(x, y), SLink(y, x) ( 1,2)
Comp(x), Contr(x, y), Contr(x, z) → SLink(y, z) ( 3)
SLink(x, y), Contr(x, w), Contr(x, z) → SLink(w, z) ( 4)
SLink(x, y), Contr(x, w), Contr(x, z) → SLink(z, w) ( 5)
SLink(x, y), Contr(x, z) → SLink(x, z), SLink(z, x) ( 6,7)
SLink(x, y), Contr(x, z) → SLink(y, z) ( 1)</p>
          <p>SLink(x, y), Contr(x, z) → SLink(z, y) ( 2)</p>
        </sec>
        <sec id="sec-3-4-2">
          <title>Experiments and Results. We extracted input data for</title>
          <p>companies and ownership relations from the open KG
provided by DBpedia [12], which publishes information
for around 67K companies. We adopted datasets of
increasing complexity, with 1K, 5K, 10K, 15K, 20K, 25K and
30K companies, respectively. The Vadalog system, with
HJE integrated as part of its logic optimizer [3], was used
as a “library” and invoked from specific Java test classes
for end-to-end executions of the reasoning. We run the
experiments on a local installation of the Vadalog system,
with a MacBook Pro i7 with 2.5 GHz and 8 GB of RAM.
We first applied HJE to the program, with average time of
under 1 second. Then, we built two reasoning scenarios:
• SpecStrongLinks (Spec), to obtain all the strong links of
the company BBC, to vary the number of companies;
• AllStrongLinks (All), to obtain all the possible pairs of
strong links, to vary the number of companies.</p>
        </sec>
        <sec id="sec-3-4-3">
          <title>The tasks were analyzed both in terms of time required</title>
          <p>for the reasoning to terminate and of number of strong
links detected. Figure 3(a) illustrates the former
perspective. The results prove the very good performance of
the Vadalog system, even if tested on a local installation.
Indeed, the Spec scenario requires more time than the All
one for smaller datasets; when the number of companies
increases, All tends to a steeper curve. On the other hand,
Figure 3(b) shows the strong links founds between pairs
of distinct companies in the All scenario. Finally, Figure 4
provides all the numerical results of the experiments.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>5. Conclusion</title>
      <sec id="sec-4-1">
        <title>Employing powerful reasoning engines such as Warded</title>
        <p>Datalog± -based Vadalog system allows companies to
solve relevant tasks in the financial and corporate realm.</p>
        <p>Among them, the Strong Link problem proved to be
problematic to tackle, due to the presence of harmful joins and
recursion that hampered termination and decidability of
the reasoning in vadalog. In this work, we discussed
the disarmament problem of rewriting Warded settings
with such problematic joins into an equivalent Harmless
Warded form, while upholding the correctness of the task.</p>
        <p>We contributed the Harmful Join Elimination, a
disarmament algorithm integrated into the Vadalog system, and
we applied it to enable reasoning on Strong Link.
applications, in: 2010 25th Annual IEEE LICS, IEEE,
2010, pp. 228–242.
[8] A. Calì, G. Gottlob, M. Kifer, Taming the infinite
chase: Query answering under expressive relational
constraints, Journal of Artificial Intelligence
Research 48 (2013) 115–174.
[9] L. Bellomarini, E. Sallinger, G. Gottlob, The Vadalog</p>
        <p>System: Datalog-based reasoning for knowledge
graphs, VLDB 11 (2018).
[10] T. Baldazzi, L. Bellomarini, E. Sallinger, P. Atzeni,</p>
        <p>Eliminating harmful joins in warded datalog+/-,
in: International Joint Conference on Rules and</p>
        <p>Reasoning, Springer, 2021, pp. 267–275.
[11] P. Atzeni, L. Bellomarini, M. Iezzi, E. Sallinger,</p>
        <p>A. Vlad, Weaving enterprise knowledge graphs:
The case of company ownership graphs., in: EDBT,
2020, pp. 555–566.
[12] DBpedia, 2018. URL: http://wiki.dbpedia.org/</p>
        <p>services-resources/downloads/dbpedia-tables.
[13] G. Gottlob, S. Rudolph, M. Simkus, Expressiveness
of guarded existential rule languages, in: PODS,
2014, pp. 27–38.
[14] F. Afrati, M. Gergatsoulis, F. Toni, Linearisability on
datalog programs, Theoretical Computer Science
308 (2003) 199–226.
[15] M. Kaminski, Y. Nenov, B. C. Grau, Datalog
rewritability of disjunctive datalog programs and
non-Horn ontologies, Artificial Intelligence 236
(2016) 90–118.
[16] M. Kónig, M. Leclere, M.-L. Mugnier, Query
rewriting for existential rules with compiled preorder, in:
[1] M. Krötzsch, V. Thost, Ontologies for knowledge IJCAI, 2015, pp. 3006–3112.</p>
        <p>graphs: Breaking the rules, in: International Se- [17] Z. Wang, P. Xiao, K. Wang, Z. Zhuang, H. Wan,
mantic Web Conference (1), volume 9981 of Lecture Query answering for existential rules via eficient
Notes in Computer Science, 2016, pp. 376–392. datalog rewriting., in: IJCAI, 2020, pp. 1933–1939.
[2] G. Gottlob, A. Pieris, Beyond SPARQL under OWL [18] N. Francis, L. Segoufin, C. Sirangelo, Datalog
rewrit2 QL entailment regime: Rules to the rescue, in: ings of regular path queries using views, arXiv
IJCAI, 2015. preprint arXiv:1511.00938 (2015).
[3] L. Bellomarini, D. Benedetto, G. Gottlob, E. Sallinger, [19] G. Stefanoni, B. Motik, I. Horrocks, Small datalog
Vadalog: A modern architecture for automated rea- query rewritings for el*, in: Proc. 25th Int’l
Worksoning with large knowledge graphs, Information shop on Description Logics, Citeseer, 2012.</p>
        <p>Systems (2020) 101528. [20] S. Ahmetaj, M. Ortiz, M. Simkus, Polynomial
data[4] L. Bellomarini, G. Gottlob, A. Pieris, E. Sallinger, log rewritings for expressive description logics with
Swift logic for big data and knowledge graphs, in: closed predicates., in: IJCAI, 2016, pp. 878–885.</p>
        <p>IJCAI, Springer, 2017, pp. 2–10. [21] G. Berger, G. Gottlob, A. Pieris, E. Sallinger, The
[5] A. Calì, G. Gottlob, T. Lukasiewicz, A general space-eficient core of Vadalog, in: PODS, 2019, pp.
datalog-based framework for tractable query an- 270–284.</p>
        <p>swering over ontologies, in: PODS, 2009, pp. 77–86. [22] T. Baldazzi, L. Bellomarini, E. Sallinger, P. Atzeni,
[6] D. Maier, A. O. Mendelzon, Y. Sagiv, Testing impli- iwarded: A system for benchmarking
datalog+/cations of data dependencies, ACM Transactions reasoning (technical report), arXiv preprint
on Database Systems 4 (1979) 455–468. arXiv:2103.08588 (2021).
[7] A. Calì, G. Gottlob, T. Lukasiewicz, B. Marnette, [23] H. Tamaki, T. Sato, Unfold/fold transformation of
A. Pieris, Datalog+/-: A family of logical knowl- logic programs, in: ICLP, Uppsala University, 1984,
edge representation and query languages for new pp. 127–138.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list />
  </back>
</article>