<!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>PR-OWL 2 RL - A Language for Scalable Uncertainty Reasoning on the Semantic Web</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Laecio L. dos Santos</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Rommel N. Carvalho</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marcelo Ladeira</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Li Weigang</string-name>
          <email>weigangg@cic.unb.br</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gilson L. Mendes</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, University of Bras lia (UnB) Bras lia</institution>
          ,
          <addr-line>DF</addr-line>
          ,
          <country country="BR">Brazil</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Research and Strategic Information, Brazilian O ce of the Comptroller General (CGU)</institution>
          ,
          <addr-line>Bras lia, DF</addr-line>
          ,
          <country country="BR">Brazil</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Probabilistic OWL (PR-OWL) improves the Web Ontology Language (OWL) with the ability to treat uncertainty using Multi-Entity Bayesian Networks (MEBN). PR-OWL 2 presents a better integration with OWL and its underlying logic, allowing the creation of ontologies with probabilistic and deterministic parts. However, there are scalability problems since PR-OWL 2 is built upon OWL 2 DL which is a version of OWL based on description logic SROIQ(D) and with high complexity. To address this issue, this paper proposes PR-OWL 2 RL, a scalable version of PR-OWL based on OWL 2 RL pro le and triplestores (databases based on RDF triples). OWL 2 RL allows reasoning in polynomial time for the main reasoning tasks. This paper also presents First-Order expressions accepted by this new language and analyzes its expressive power. A comparison with the previous language presents which kinds of problems are more suitable for each version of PR-OWL.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Web Ontology Language (OWL) is the main language in the Semantic Web for
creating ontologies. It lacks the capacity for treating uncertainty, limiting its
application in several kinds of domains. Various approaches have been proposed
to solve this issue using di erent formalisms, such as Bayesian networks, fuzzy
logic, and Dempster-Sha er theory. One of these approaches, Probabilistic OWL
(PR-OWL) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] adds uncertainty treatment capacity to OWL using Multi-Entity
Bayesian Networks (MEBN) [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], which is a very expressive First-Order
Probabilistic Logic. PR-OWL has been implemented in UnBBayes 3, which is an open
source framework for probabilistic graphical models. PR-OWL 2 [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] extends the
previous language adding a tight and better integration between OWL existing
concepts and properties and PR-OWL new ones. A PR-OWL 2 implementation
also was developed in UnBBayes, using Protege 4 and its HermiT [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] default
      </p>
    </sec>
    <sec id="sec-2">
      <title>3 http://unbbayes.sourceforge.net/</title>
    </sec>
    <sec id="sec-3">
      <title>4 http://protege.stanford.edu/</title>
      <p>OWL DL reasoner for modeling and reasoning with the deterministic part of the
ontology.</p>
      <p>
        PR-OWL 2 implementation, however, has some scalability problems due to
the time complexity of OWL 2 DL reasoners to solve complex expressions. This
hinders the ability to work with domains that have large assertive databases. One
example is the public procurement fraud detection domain developed in Brazil,
for which a probabilistic ontology was created using PR-OWL 2 [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Although
the probabilistic ontology has been successfully tested with simple cases, in a real
situation, using government databases, millions of triples will be needed, making
the reasoning intractable with PR-OWL 2 and its current implementation.
      </p>
      <p>
        The solution proposed for overcoming this limitation is to use triplestores
together with the OWL 2 RL pro le to create a new version of PR-OWL 2,
named PR-OWL 2 RL. The OWL 2 RL [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] pro le allows implementations with
reasoning in polynomial time for the main reasoning tasks in systems based on
rules. The reasoning is mainly processed by materialization, where the rule set
is evaluated when new statements are included in the base, as well as the new
knowledge that is derived by them.
      </p>
      <p>The proposal of this new language requires: 1) to review the PR-OWL
language according the OWL 2 RL syntax restrictions; 2) a new algorithm to
evaluate the MEBN rst-order formulas using triplestores; and 3) to design a scalable
algorithm for generating Situation Speci c Bayesian Networks (SSBN). This
paper discusses the rst two issues.</p>
      <p>This paper is organized as follows. Section 2 describes some relevant
concepts for the understanding of this work: MEBN, OWL and PR-OWL. Section 3
presents PR-OWL 2 bottlenecks that motivated this work. Section 4 introduces
the language proposed and shows how the rst-order formulas can be evaluated
using the SPARQL language. Finally, Section 5 presents some conclusions and
possible future work.
2</p>
      <sec id="sec-3-1">
        <title>Fundamentals</title>
        <p>This section presents some concepts necessary for the understanding of this
paper. Section 2.1 presents Multi-Entity Bayesian Networks, the formalism used by
PR-OWL to deal with uncertainty in the OWL language. Section 2.2 presents the
OWL language and its versions, including the OWL 2 RL pro le, and triplestores.
Section 2.3 presents PR-OWL, its extension, PR-OWL 2, and its implementation
in the UnBBayes Framework.
2.1</p>
        <p>
          Multi-Entity Bayesian Networks
Multi-Entity Bayesian Networks (MEBN) is a formalism for representing
rstorder probabilistic knowledge bases [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. MEBN joins Bayesian networks with
First-Order Logic (FOL), augmenting the expressive power of the rst by
allowing uncertainty representation and reasoning in situations where the quantity of
random variables is unknown.
        </p>
        <p>MEBN models the domain using a MEBN Theory (MTheory), which is
composed of random variables that together have a unique joint probability
distribution. The knowledge is divided into MEBN Fragments (MFrags). Each MFrag is
composed by resident nodes, input nodes, and context nodes. Resident nodes are
random variables for which the Local Probability Distribution (LPD) is de ned
in the MFrag where they are. Input nodes are references to resident nodes de ned
in a di erent MFrag. Context nodes contain restrictions that need to be satis ed
in order to correctly instantiate the corresponding MFrag. The nodes represent
entity attributes and relationships between entities. Each node is parameterized
with ordinary variables (OV), placeholders lled with entity instances available
in the knowledge base during the instantiation of the model.</p>
        <p>
          Figure 1 shows the MFrag Front Of Enterprise of the Procurement Fraud
ontology [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. This probabilistic ontology was designed to identify frauds in
public procurements in Brazil using the data available in the Brazilian O ce of the
Comptroller General (CGU). In this MFrag, the resident node isFrontFor (node
9) refers to the probability that a person is a front for an enterprise. It is in
uenced by the input nodes hasValue, hasAnnualIncome, and hasEducationLevel
(nodes 6{8). The context nodes (nodes 1{5) show which restrictions need to be
satis ed in order to instantiate this MFrag. Nodes 4 and 5, for example, say
that the procurement has to be nished and the person of interest has to be
responsible for the enterprise that won the procurement.
An MTheory works like a template, which is instantiated giving the query
nodes and the evidence to build a Situation-Speci c Bayesian Network (SSBN), a
Bayesian Network with all nodes computationally relevant to answer the queries.
Laskey presents in [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] an algorithm for generating a SSBN that expands the
network from both the queries and ndings in order to build a grand BN which
is pruned by removing barren, nuisance, and d-separated nodes.
2.2
OWL is the main Semantic Web language for building ontologies. OWL 2, its
current version, became a W3C recommendation in 2009 [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ].
        </p>
        <p>
          The direct model-theoretic semantics of OWL 2 is called Direct Semantics,
which is strongly related to the semantics of description logics [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]. The Direct
Semantics assigns meaning directly to ontology structures, in a way
compatible with the semantics of the SROIQ description logic [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]. Description Logics
are subsets of FOL that model the domain based on its classes and
properties. It represents the knowledge by rst de ning the relevant concepts of the
domain (TBox), and then using these concepts to specify properties of objects
and individuals occurring in the domain (ABox) [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. Di erent description logics
have been created, trying to get a favorable trade-o between expressiveness
and complexity. OWL 2 DL is based on SROIQ(D). Several reasoners based on
tableau algorithms were created for OWL 2 DL. Some examples are HermiT [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ],
Pellet [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] and FaCT++ [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ].
        </p>
        <p>
          OWL 2 has three di erent pro les (syntactic subsets): OWL 2 EL, OWL 2
QL, and OWL 2 RL. All of them are more restrictive than OWL 2 DL and trades
o OWL 2's expressive power for computational or implementation bene ts. In
these pro les, most types of reasoning can be made in polynomial time. OWL 2
EL is suitable for ontologies with a very large but simple TBox. OWL 2 QL is
suitable to work with conjunctive queries, permitting the use of ontological
reasoning in systems like relational databases through a query rewriting approach.
OWL 2 RL, based on Datalog and in R-entailment [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ], is suitable to allow an
easy implementation in systems based on rules.
        </p>
        <p>
          W3C proposes a set of rules called OWL 2 RL/RDF that implements the
OWL 2 RL pro le. This set of rules is based on RDF Semantic, where the
knowledge is organized in graphs, composed by RDF triples. Each RDF triple is
composed by a subject linked to an object by a property. The reasoning is made
through rules, where given a set of speci c triples and a rule, we can get another
expression that follows logically from the rule. The Theorem PR1 [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] states
some conditions that guarantee that the ontology O2 entailed from O1 under
the Direct Semantics is the same entailed under the rst-order axiomatization
of RDF semantics using the OWL 2 RL/RDF rules:
{ neither O1 nor O2 contains an IRI (International Resource Identi er) that is
used for more than one type of entity;
{ O1 does not contain the following axioms:
        </p>
        <p>SubAnnotationPropertyOf,
AnnotationPropertyDomain,</p>
        <p>AnnotationPropertyRange; and
{ each axiom in O2 is an assertion of the form as speci ed below, for a1, a2,
. . . , an a named individual:</p>
        <p>ClassAssertion( C a ) where C is a class,
ObjectPropertyAssertion( OP a1 a2 ) where OP is an object property,
DataPropertyAssertion( DP a v ) where DP is a data property, or</p>
        <sec id="sec-3-1-1">
          <title>SameIndividual( a1 . . . an ).</title>
          <p>The OWL 2 RL pro le is implemented by some triplestores. Triplestores
are databases that organize the knowledge in graphs composed by RDF triples.
They are becoming very useful and there are a lot of commercial (e.g., GraphDB,
Oracle Spatial and Graph, and AllegroGraph) and free implementations (e.g.,
Sesame). They normally implement the RDF/RDFS entailment rules, using
materialization for expanding the rules when new declarations are added to the base.
SPARQL is the main language used for querying RDF databases. It is very
similar to SQL, acting over generalized RDF graphs. Most triplestores accept, in
addiction to RDFS, inference with some constructions of OWL. Implementations
of the OWL 2 RL pro le are common.
2.3</p>
          <p>
            PR-OWL
Probabilistic OWL (PR-OWL) is an extension of the OWL language that
permits the creation of probabilistic ontologies [
            <xref ref-type="bibr" rid="ref7">7</xref>
            ]. It works as an upper-ontology,
consisting of a set of classes, subclasses, and properties that allow modeling the
uncertainty part of the ontology using MEBN. Figure 2 shows the main concepts
involved in a PR-OWL ontology. The probabilistic ontology is modeled using the
MTheory class, composed by a set of MFrags. These MFrags must collectively
form a consistent MTheory. The MFrags are built from random variables, which
have a probabilistic distribution and an exhaustive set of possible states.
          </p>
          <p>
            UnBBayes has an implementation of PR-OWL and MEBN [
            <xref ref-type="bibr" rid="ref3 ref6">3, 6</xref>
            ] that allows
the design of an MTheory using a graphical user interface (GUI). A
pseudocode can be used for de ning the LPDs. The MTheory is stored in a knowledge
base, supported by the PowerLoom Knowledge Representation and Reasoning
(KR&amp;R) System5. The algorithm for generating SSBNs is based on the one
proposed in [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ].
          </p>
          <p>
            PR-OWL 2 [
            <xref ref-type="bibr" rid="ref4">4</xref>
            ] extends PR-OWL by having a better built-in integration
between OWL and MEBN. The main concept used for this is the property
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>5 http://www.isi.edu/isd/LOOM/PowerLoom/</title>
      <p>definesUncertaintyOf that links a random variable to an OWL property. The
additional properties isObjectIn and isSubObjectIn allow the mapping of both
domain and range of the OWL property to its corresponding concept in MEBN.
PR-OWL 2 also has other improvements, like the support to polymorphism and
the use of OWL datatypes. A plug-in for PR-OWL 2 was developed in UnBBayes,
using Protege for modeling the deterministic parts of the ontology. Protege is a
popular open source framework for editing ontologies. Moreover, HermiT is used
for evaluating the context nodes and for getting information about ndings.
3</p>
      <sec id="sec-4-1">
        <title>Description of the Problem</title>
        <p>
          PR-OWL 2 and its implementation in UnBBayes have some scalability and
expressibility problems. OWL 2 DL, which is used in PR-OWL 2 de
nition/implementation, is based on description logic SROIQ(D) that has complexity
N2EXPTIME-complete [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] for the main reasoning problems: ontology
consistency, class expression satis ability, class expression subsumption, and instance
checking. This class of complexity comprises the problems solvable by
nondeterministic algorithm in time at most double exponential in the size of the
input [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. OWL 2 DL reasoners are normally based on tableau algorithms.
Donini [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] states two di erent sources of complexity in tableau calculi: the
ANDBranching, responsible for the exponential size of a single candidate model, and
the OR-Branching, responsible for the exponential number of di erent candidate
models. This exponential complexity of OWL 2 DL reasoners makes the queries
more time/space consuming, the larger/more complex the knowledge base is.
Thus, making it inviable for several cases. Furthermore, most OWL reasoners
are limited to the available memory of the computational resource used, since
the database needs to be loaded into memory to allow inference. This clearly
does not scale to real and large databases.
        </p>
        <p>
          We also have scalability problems because of the use of Protege's GUI and
API in UnBBayes' PR-OWL 2 implementation. We made tests using LUBM
ontologies to verify the performance of this implementation. LUBM (Lehigh
University Benchmark) [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ] is a very popular benchmark for reasoners and
triplestores. Using an i5 machine with 3GB of memory dedicated to run Protege, we
could not load nor initialize the reasoner with the LUBM 100, an assertive base
containing 2,779,262 instances of classes and 11,096,694 instances of properties.
We used the HermiT reasoner, where the initialization consists of building the
class hierarchy, classifying object and data properties, computing instances of
all classes and object properties, and calculating same as individual. This
initialization is necessary to solve the queries. LUBM 100 base has 1,06 GB when
stored in an OWL le in XML format, making it clear that the structure used
by Protege adds a great overhead to PR-OWL 2 implementation.
        </p>
        <p>
          This scalability problems limit the use of PR-OWL in domains with large
assertive bases. In the domain of procurement fraud detection [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], for example,
the assertive base can easily have millions of assertions. This makes it
unsuitable to using an OWL reasoner for the necessary deterministic reasoning, which
comprises of evaluating the FOL expressions and searching for ndings.
        </p>
        <p>Since PR-OWL 2 is written in OWL 2 DL, one possibility is to use an OWL
2 DL reasoner for solving the FOL formulas during MEBN reasoning. PR-OWL
2 current implementation in UnBBayes does that.</p>
        <p>Evaluating MEBN FOL formulas using an OWL DL reasoner requires some
workarounds. The Table 1 presents the formulas that are allowed in the
current implementation of UnBBayes, where ov are ordinary variables, CONST are
constants, and booleanRV are Boolean random variables. Expressions with
connectives and quanti ers are not allowed in this version.
ov1 = ov2
booleanRV( ov1 [ , ov2 , . . . ] )
ov0 = nonBooleanRV( ov1 )
ov0 = nonBooleanRV( ov1 [ , ov2, . . . ] )
CONST = nonBooleanRV( ov1 [ , ov2 , . . . ] )
nonBooleanRV( ov1 [ , ov2 , . . . ] ) = CONST
nonBooleanRV( ov1 ) = ov0
nonBooleanRV( ov1 [ , ov2 , . . . ] ) = ov0
Negation
NOT ( ov1 = ov2 )
NOT booleanRV( ov1 [ , ov2, . . . ] )
NOT ( ov0 = nonBooleanRV( ov1 ))
NOT ( nonBooleanRV ( ov 1 ) = ov0)
4</p>
      </sec>
      <sec id="sec-4-2">
        <title>PR-OWL based on OWL 2 RL pro le</title>
        <p>In order to overcome the limitations presented, we propose PR-OWL 2 RL, a
more scalable version of PR-OWL based in the OWL 2 RL pro le. The purpose
is to use an RDF triplestore database for both the storage and reasoning with
very large ontologies represented as RDF triples. This is possible because OWL
2 RL allows reasoning in polynomial time for the main reasoning tasks. SPARQL
is the common query language used with RDF triples.</p>
        <p>Since PR-OWL 2 is written in OWL 2 DL, some adjustments are necessary to
adapt it for OWL 2 RL. This is due to the fact that OWL 2 RL imposes several
syntactic restrictions on the OWL expressions. Running a validator developed
by the Manchester University 6 we found the following unsupported features:
1. Use of non-superclass expression where superclass expression is required;
2. Use of non-subclass expression where subclass expression is required;
3. Use of non-equivalent-class expression where equivalent-class expression is
required; and
4. Use of unsupported data range.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>6 http://mowl-power.cs.man.ac.uk:8080/validator/</title>
      <p>Figure 3 shows examples for each kind of unsupported feature. The rst case
occurs for several reasons, such as the use of existential quanti er and
disjunction on the right side of a subClass expression or in range/domain expressions,
the use of owl:Thing as superclass or in range/domain expressions, and the use
of the quali ed restriction exactly. The second occurs in the class owl:Thing,
that is setted as a subclass of the restriction 'hasUID only String'. The
property hasUID is used to guarantee that every instance in PR-OWL has a unique
identi er (a requisite necessary to work with MEBN, where each possible state
has to be unique). The third occurs in all equivalent expressions of PR-OWL
2, which includes conjunctions, min/max/exactly cardinality expressions, and
universal/existential quanti ers. OWL 2 RL is very restrictive in relation to
equivalent expressions, allowing only Class, intersection, and hasValue
expressions. Finally, the fourth occurs in the isRepresentedAs range expression,
where all possible formats to represent the probabilistic distributions are listed.</p>
      <p>Since the syntax of OWL 2 RL/RDF is based on RDF, it permits generalized
RDF graphs, not having the several restrictions of OWL 2 DL. The pure OWL 2
RL pro le, however, has restrictions to allow reasoning also with the Direct
Semantics. We choose to adapt PR-OWL 2 RL with the OWL 2 RL restrictions for
keeping the compatibility with both semantics. In order to make this adaptation
it is necessary to x the unsupported features listed above.</p>
      <p>To solve the unsupported features, we analyzed three alternatives. The rst
consists in rewriting all expressions of PR-OWL 2 from OWL 2 DL to OWL 2
RL. However, this is not possible due the less expressive power of OWL 2 RL
language. Expressions subClass, for instance, with existential quanti er on the
right side cannot be expressed in this pro le. The second alternative consists
in rewriting to OWL 2 RL the expressions that can be rewritten, removing the
others, and passing the responsibility of validating them forward to the PR-OWL
reasoner. The problem with this alternative is that the resulting ontology is hard
to understand due to the rewriting of the expressions to less intuitive axioms and
because the restrictions are only partially explicit. The last alternative consists in
turning PR-OWL into a lightweight ontology, containing only the class hierarchy
and the object and data properties (with its domain and range restrictions).
The full validation of the probabilistic model consistency is left to the PR-OWL
reasoner. This was the chosen alternative because it results in a simpler ontology,
su cient for expressing the MEBN elements in OWL language.</p>
      <p>
        The FOL formulas in PR-OWL 2 RL are evaluated in a di erent way than
they are in the previous versions of PR-OWL. Using materialization, all
implications of an added expression is calculated in load time. In the triplestores
implementations, we do not have posterior reasoning: the queries are solved with
searches on the database, using the SPARQL language, in a similar way to the
SQL language in relational databases. This means that in the knowledge base
we already have for example the hierarchy of an instance explicitly. For
example, if an instance a is of the class A, and A is subclass of B, then, we will also
have both ClassAssertion(A,a) and ClassAssertion(B,a) information on the
base, where the second one was derived from the rule showed below (extracted
from [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]).
      </p>
      <p>IF T(?c1, rdfs:subClassOf, ?c2) AND T(?x, rdf:type, ?c1)
THEN T(?x, rdf:type, ?c2)</p>
      <p>If we ask if a is instance of class B, the result will be TRUE because we will
get the information ClassAssertion(B,a). The advantage of this approach is
that queries are very fast. The disadvantage is that complex reasoning cannot
be handled, justifying the OWL 2 RL language restrictions.</p>
      <p>The BNF grammar below shows the restrictions on the types of context nodes
formulas accepted in PR-OWL 2 RL. The evaluation of these context nodes will
be handled using the SPARQL language.</p>
      <p>Listing 1.1. BNF Grammar for FOL Expressions in PR-OWL 2 RL
&lt;atom&gt; : : = ov1 == ov2 j
booleanRV ( ov1 , [ , ov2 . . . ] ) j
nonBooleanRV ( ov1 , [ , ov2 . . . ] ) = ov0 j
ov0 = nonBooleanRV ( ov1 , [ , ov2 . . . ] ) j
nonBooleanRV ( ov1 , [ , ov2 . . . ] ) = CONST j</p>
      <p>CONST = nonBooleanRV ( ov1 , [ , ov2 . . . ] )
&lt;n e g a t i o n &gt; : : = NOT &lt;atom&gt;
&lt;c o n j u n c t i o n &gt;::= &lt;atom&gt; [AND &lt;atom&gt;]+
&lt;d i s j u n c t i o n &gt;::= &lt;atom&gt; [OR &lt;atom&gt;]+
&lt;formula&gt; : : = &lt;atom&gt; j &lt;n e g a t i o n &gt; j</p>
      <p>&lt;c o n j u n c t i o n &gt; j &lt;d i s j u n c t i o n &gt;</p>
      <p>Table 2 shows how to evaluate these formulas using SPARQL. To solve the
EQUAL TO operator between two ordinary variables, we can use the SPARQL
FILTER construction, limiting the result of a query where the terms are equal.
The evaluation of AND and OR connectives is possible using period and UNION
constructions. The negation can be implemented by the PR-OWL 2 reasoner in
one of three ways depending on each case: for a not equal expression a FILTER
can be used with the operator != (di erent); for a boolean RV it is su cient
to ask if it is equal FALSE; and nally, for a not boolean RV, we can use the
operator NOT EXISTS inside a FILTER.</p>
      <p>To evaluate expressions where we do not know the value of some ordinary
variable, we use the SPARQL SELECT construction. If we already know all values,
a command ASK is used. This command evaluates the expression and returns
TRUE or FALSE. The evaluation of the context nodes is made one by one and the
implementation is responsible for keeping the consistency between the ordinary
variable values of each node. The following code shows a SELECT to get which
procurements ENTERPRISE 1 won (node 5 in Figure 1).</p>
      <sec id="sec-5-1">
        <title>SELECT ?procurement WHERE { ?procurement rdf:type Procurement . ENTERPRISE_1 hasWinnerOfProcurement ?procurement}</title>
        <p>
          Finally, for the new language to be useful, it is also necessary to propose a new
algorithm for generating a SSBN. The previous SSBN algorithm implemented in
PR-OWL 2 starts from the queries set as well as the ndings set. Since we can
have a large assertive base in PR-OWL 2 RL, making the ndings set very large,
the previous SSBN construction algorithm might be hindered. We plan to extend
the algorithm previously proposed in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], by starting only from the queries set
and removing known issues with it. For instance, the version proposed in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] does
not evaluate the parent nodes of a query, even if they are not d-separated from
the evidence.
        </p>
        <p>Using the new language proposed, together with a triplestore and the
materialization approach, it is possible to solve the scalability problems presented.
The BNF grammar proposed is su cient to evaluate all context node formulas
used in the Procurement Fraud probabilistic ontology.</p>
        <p>
          The Theorem PR1 [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] limits the entailed statements to assertions. The
reasoning in PR OWL 2 RL is mainly over the assertive base (ABox), but, based
on the use cases already developed for PR-OWL, this does not seem to be a
problem.
        </p>
        <p>
          It is important to note that Costa, the author of PR-OWL, already visualized
the possibility of creating more restrictive versions of the language to guarantee
tractability [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. The objective of PR-OWL 2 RL is not to substitute the previous
version (in the way that PR-OWL 2 intends to substitute PR-OWL). Both
PROWL 2 and PR-OWL 2 RL have characteristics that make them suitable for
di erent kind of domains. While PR-OWL 2 is recommended for heavyweight
ontologies, with complex expressions, but limited assertive bases, PR-OWL 2
RL is ideal for lightweight ontologies, with simple expressions and a very large
knowledge base. This last one, for example, is the case of the ontologies in Linked
Data projects.
5
        </p>
        <sec id="sec-5-1-1">
          <title>Conclusion and Future Work</title>
          <p>Using a less expressive version of OWL for reasoning in polynomial time,
PROWL 2 RL is developed to work with ontologies containing millions of triples.
When used together with RDF triplestores, it can solve the scalability problem
of the previous PR-OWL versions. Using a commercial database it is possible to
work with billions of triples, making it suitable even for working with Big Data.
The restrictions on the expressiveness of OWL 2 RL do not allow it to express
some complex statements, but it is su cient for a lot of domains, such as the
Procurement Fraud, and Linked Open Data projects. This paper presented
limitations on the rst-order expressions used in context node formulas, restricting
the use of MEBN logic, but allowing at the same time the same constructs which
are implemented and allowed in UnBBayes' PR-OWL 2 plug-in.</p>
          <p>
            A future work that is already under way is the implementation of a plug-in
for PR-OWL 2 RL in UnBBayes. In this plug-in we plan to use the triplestore
GraphDB Lite, a free version of GraphDB [
            <xref ref-type="bibr" rid="ref2">2</xref>
            ]. GraphDB, previously OWLIM,
partially implements the OWL 2 RL pro le (it does not implement the rules
related to datatypes), using the OWL 2 RL/RDF rules and a materialization
approach. The UnBBayes' PR-OWL 2 RL plug-in will allow the user to model
a probabilistic ontology using the language, to put it into the triplestore, to
ll the assertive base, and to build a SSBN from the queries set. Other future
work is create new study cases to validate the solution. We also plan to make an
extension of the LUBM ontology by adding uncertainty concepts to it, making
it possible to construct a benchmark for large probabilistic ontologies.
          </p>
        </sec>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Franz</given-names>
            <surname>Baader</surname>
          </string-name>
          and
          <string-name>
            <given-names>Werner</given-names>
            <surname>Nutt</surname>
          </string-name>
          .
          <article-title>Basic description logics</article-title>
          .
          <source>In The Description Logic Handbook: Theory, Implementation, and Applications</source>
          , pages
          <volume>43</volume>
          {
          <fpage>95</fpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Barry</given-names>
            <surname>Bishop</surname>
          </string-name>
          and
          <string-name>
            <given-names>Spas</given-names>
            <surname>Bojanov</surname>
          </string-name>
          .
          <article-title>Implementing OWL 2 RL and OWL 2 QL rulesets for OWLIM</article-title>
          . In Michel Dumontier and Mlanie Courtot, editors,
          <source>OWLED</source>
          , volume
          <volume>796</volume>
          <source>of CEUR Workshop Proceedings. CEUR-WS.org</source>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Rommel</surname>
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Carvalho</surname>
          </string-name>
          , Marcelo Ladeira, Laecio L. Santos, Shou Matsumoto, and
          <string-name>
            <surname>Paulo</surname>
            <given-names>C. G.</given-names>
          </string-name>
          <string-name>
            <surname>Costa</surname>
          </string-name>
          .
          <article-title>A GUI tool for plausible reasoning in the semantic web using MEBN</article-title>
          .
          <source>In Innovative Applications in Data Mining</source>
          , pages
          <volume>17</volume>
          {
          <fpage>45</fpage>
          .
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Rommel</surname>
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Carvalho</surname>
          </string-name>
          , Kathryn B.
          <string-name>
            <surname>Laskey</surname>
          </string-name>
          , and
          <string-name>
            <surname>Paulo</surname>
            <given-names>C. G.</given-names>
          </string-name>
          <article-title>da Costa. PR-OWL 2.0 - bridging the gap to OWL semantics</article-title>
          .
          <source>In Proceedings of the 6th International Workshop on Uncertainty Reasoning for the Semantic Web (URSW</source>
          <year>2010</year>
          ),
          <article-title>collocated with the 9th International Semantic Web Conference (ISWC-</article-title>
          <year>2010</year>
          ), Shanghai, China, November 7,
          <year>2010</year>
          , pages
          <fpage>73</fpage>
          {
          <fpage>84</fpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Rommel</surname>
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Carvalho</surname>
          </string-name>
          , Shou Matsumoto, Kathryn B.
          <string-name>
            <surname>Laskey</surname>
            , Paulo C. G. da Costa, Marcelo Ladeira,
            <given-names>and Laecio L.</given-names>
          </string-name>
          <string-name>
            <surname>Santos</surname>
          </string-name>
          .
          <article-title>Probabilistic ontology and knowledge fusion for procurement fraud detection in brazil. In Uncertainty Reasoning for the Semantic Web II, International Workshops URSW 2008-2010 Held at ISWC</article-title>
          and
          <article-title>UniDL 2010 Held at FLoC</article-title>
          ,
          <source>Revised Selected Papers</source>
          , pages
          <volume>19</volume>
          {
          <fpage>40</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Paulo</surname>
            <given-names>C. G.</given-names>
          </string-name>
          <string-name>
            <surname>Costa</surname>
            , Marcelo Ladeira,
            <given-names>Rommel N.</given-names>
          </string-name>
          <string-name>
            <surname>Carvalho</surname>
          </string-name>
          , Kathryn B.
          <string-name>
            <surname>Laskey</surname>
          </string-name>
          , Laecio L.
          <string-name>
            <surname>Santos</surname>
            , and
            <given-names>Shou</given-names>
          </string-name>
          <string-name>
            <surname>Matsumoto</surname>
          </string-name>
          .
          <article-title>A rst-order Bayesian tool for probabilistic ontologies</article-title>
          . In David Wilson and H. Chad Lane, editors,
          <source>FLAIRS Conference</source>
          , pages
          <volume>631</volume>
          {
          <fpage>636</fpage>
          . AAAI Press,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Paulo Cesar G. da Costa</surname>
          </string-name>
          , Kathryn B.
          <string-name>
            <surname>Laskey</surname>
            , and
            <given-names>Kenneth J.</given-names>
          </string-name>
          <string-name>
            <surname>Laskey</surname>
          </string-name>
          .
          <article-title>PR-OWL: A bayesian ontology language for the semantic web</article-title>
          .
          <source>In International Semantic Web Conference, ISWC</source>
          <year>2005</year>
          , Galway, Ireland, Workshop 3:
          <article-title>Uncertainty Reasoning for the Semantic Web, 7 November 2005</article-title>
          , pages
          <fpage>23</fpage>
          {
          <fpage>33</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Francesco</surname>
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Donini</surname>
          </string-name>
          .
          <article-title>Complexity of reasoning</article-title>
          .
          <source>In The Description Logic Handbook: Theory, Implementation, and Applications</source>
          , pages
          <volume>96</volume>
          {
          <fpage>136</fpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Yuanbo</given-names>
            <surname>Guo</surname>
          </string-name>
          , Zhengxiang Pan, and
          <article-title>Je He in</article-title>
          . LUBM:
          <article-title>A benchmark for OWL knowledge base systems</article-title>
          .
          <source>Web Semantics: Science, Services and Agents on the World Wide Web</source>
          ,
          <volume>3</volume>
          (
          <issue>2</issue>
          ):
          <volume>158</volume>
          {
          <fpage>182</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Yevgeny</surname>
          </string-name>
          <article-title>Kazakov. RIQ and SROIQ are harder than SHOIQ</article-title>
          .
          <source>In Principles of Knowledge Representation and Reasoning: Proceedings of the Eleventh International Conference, KR</source>
          <year>2008</year>
          , Sydney, Australia,
          <source>September 16-19</source>
          ,
          <year>2008</year>
          , pages
          <fpage>274</fpage>
          {
          <fpage>284</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Kathryn</surname>
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Laskey</surname>
          </string-name>
          .
          <article-title>MEBN: a language for First-Order Bayesian knowledge bases</article-title>
          .
          <source>Arti cial Intelligence</source>
          ,
          <volume>172</volume>
          (
          <issue>2-3</issue>
          ):
          <volume>140</volume>
          {
          <fpage>178</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>Bijan</given-names>
            <surname>Parsia</surname>
          </string-name>
          and
          <string-name>
            <given-names>Evren</given-names>
            <surname>Sirin</surname>
          </string-name>
          .
          <article-title>Pellet: An OWL DL reasoner</article-title>
          . In Third International Semantic Web Conference-Poster, volume
          <volume>18</volume>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Rob</surname>
            <given-names>Shearer</given-names>
          </string-name>
          , Boris Motik, and Ian Horrocks.
          <article-title>HermiT: A highly-e cient OWL reasoner</article-title>
          . In Catherine Dolbear, Alan Ruttenberg, and Ulrike Sattler, editors,
          <source>OWLED</source>
          , volume
          <volume>432</volume>
          <source>of CEUR Workshop Proceedings. CEUR-WS.org</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Herman</surname>
          </string-name>
          J. ter Horst.
          <article-title>Combining RDF and part of OWL with rules: Semantics, decidability, complexity</article-title>
          .
          <source>In The Semantic Web - ISWC</source>
          <year>2005</year>
          , 4th International Semantic Web Conference,
          <string-name>
            <surname>ISWC</surname>
          </string-name>
          <year>2005</year>
          , Galway, Ireland, November 6-
          <issue>10</issue>
          ,
          <year>2005</year>
          , Proceedings, pages
          <volume>668</volume>
          {
          <fpage>684</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>Dmitry</given-names>
            <surname>Tsarkov</surname>
          </string-name>
          and
          <string-name>
            <given-names>Ian</given-names>
            <surname>Horrocks</surname>
          </string-name>
          .
          <article-title>FaCT++ description logic reasoner: System description</article-title>
          .
          <source>In Automated Reasoning</source>
          , Third International Joint Conference, IJCAR 2006, Seattle, WA, USA,
          <year>August</year>
          17-
          <issue>20</issue>
          ,
          <year>2006</year>
          , Proceedings, pages
          <volume>292</volume>
          {
          <fpage>297</fpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16. W3C.
          <article-title>OWL 2 Web Ontology Language document overview</article-title>
          . http://www.w3.org/TR/owl2-overview/,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17. W3C.
          <article-title>OWL 2 Web Ontology Language pro les</article-title>
          . http://www.w3.org/TR/owl2- pro les/,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>