<!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>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Borys Omelayenko</string-name>
          <email>borys@cs.vu.nl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science Vrije Universiteit</institution>
          ,
          <addr-line>De Boelelaan 1081, 1081hv, Amsterdam</addr-line>
          ,
          <country country="NL">the Netherlands</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Prolog has been often used to represent the axioms and inference over RDF data models often by converting all the data to plain-text Prolog facts and programs. In this paper we present the PRODEF infrastructure for using Prolog for inferencing over RDF data on the Web by representing Prolog programs in RDF, allowing them to be distributed over the Web and even incomplete, and represent reasoning results in a form suitable for further automatic processing.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>RDF and RDF Schema lack the means for representing
axioms and rules, which are still necessary to build any kind of
applications and different approaches originating from
different motivations and requirements have been proposed. The
same time Prolog [Bratko, 1990] has been extensively used
to inference over data models represented in RDF,1 however,
mostly RDF and Prolog have been connected in an ad-hoc
manner, primarily by converting everything to plain-text
Prolog facts and programs.</p>
    </sec>
    <sec id="sec-2">
      <title>We intend to build the infrastructure depicted in Figure 1,</title>
      <p>where a special wrapper connects the Prolog engine to the
Web. It parses a Prolog program represented in RDF and
downloads the RDF data modules to be processed with the
program. The program itself is distributed to several
locations and the predicates used in one location may be defined
in other places. The predicates, especially resource-critical or
performing some specific function, may even be implemented
in other languages and accessible as web services. Finally, the
inference results are represented in RDF for further automatic
processing.</p>
      <p>We believe that such an infrastructure should possess the
following basic properties:</p>
    </sec>
    <sec id="sec-3">
      <title>1. The language should have clear semantics, sufficient and stable tool support, and existing expertise in terms of available literature, courses, and skills</title>
      <p>1http://www.google.com/search?q=using+
prolog+rdf</p>
      <sec id="sec-3-1">
        <title>Data</title>
        <p>RDF</p>
      </sec>
      <sec id="sec-3-2">
        <title>Program</title>
        <p>RDF</p>
        <p>Infrastructure</p>
      </sec>
      <sec id="sec-3-3">
        <title>Prolog engine</title>
      </sec>
      <sec id="sec-3-4">
        <title>PRoDeF wrapper</title>
      </sec>
      <sec id="sec-3-5">
        <title>Predicates in other locations</title>
        <p>RDF
RDF</p>
      </sec>
      <sec id="sec-3-6">
        <title>Inference results</title>
        <p>RDF</p>
      </sec>
      <sec id="sec-3-7">
        <title>Predicates as</title>
      </sec>
      <sec id="sec-3-8">
        <title>Web Services</title>
        <p>2. The Prolog programs should be available on the Web in a
distributed manner possibly decomposed into pieces and
represented in RDF according to a certain RDF Schema
3. RDF data should be interpreted in Prolog
4. Program execution should assume that some parts of the
program may require some time to download from
different locations or being not available at the moment
5. A clear algorithm for converting plain-text Prolog
programs to and from their RDF representation should be
provided</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>6. The reasoning results should be represented in RDFand</title>
      <p>should allow updating the data</p>
    </sec>
    <sec id="sec-5">
      <title>7. The rule language should allow representing the constraints at the RDF Schema level and smoothly link them to instance data .</title>
    </sec>
    <sec id="sec-6">
      <title>We try to meet these requirements in the Prolog wrapper discussed in this Chapter.</title>
      <p>1.1</p>
      <sec id="sec-6-1">
        <title>Where are the Limits of Ontology Languages?</title>
        <p>The ontology languages for the Semantic Web incorporate
certain means for representing axioms that can be then used
without any additional rule language.</p>
        <p>RDF and RDF Schema contain the axioms needed
to form the object-attribute language for
representing the conceptual models: rdfs:subClassOf and
rdfs:subPropertyOf are used to organize classes
and properties into hierarchies, rdfs:domain and
rdfs:range specify the attachment of properties to
classes. This set of axioms is often difficult to use in practice,
e.g. the conjunctive semantics of multiple occurrences of
rdfs:domain or rdfs:range means that a property
may be attached to an intersection of one or more classes,
and not a union (disjunctive semantics). This poses some
problems whenever a property has to be attached to several
classes.</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>In OWL RDF Schema is extended and several groups of axioms are introduced. These are:</title>
      <p>Equality axioms sameClassAs,
samePropertyAs, sameIndividualAs and
differentIndividualFrom to denote that two
classes, properties or individual are equivalent;
Property characteristics are introduced to
define property characteristics inverseOf,
TransitiveProperty, SymmetricProperty
to define inverse, transitive and symmetric properties;
allValuesFrom and someValuesFrom to define
property range restrictions;</p>
    </sec>
    <sec id="sec-8">
      <title>Cardinality constraints of properties.</title>
      <p>This set of axioms allows modelling numerous frequently
needed constraints. For example the bossOf relation is
often used to represent organizational structures. To model its
transitivity in RDF Schema one needs to create and interpret
a special rule, while it can be directly modelled in OWL with
the TransitiveProperty property. However, in many
organizations the set of bosses of an employee who can
actually give him the orders is limited to two levels: the
immediate boss and his/her immediate boss, and not a single step
further. This axiom can not be modelled in OWL directly and
a rule is needed to model this two-steps transitivity.</p>
    </sec>
    <sec id="sec-9">
      <title>Another sort of examples include the axioms using value</title>
      <p>constraints, e.g. to classify some offers according to price
where cheap offers would assume 0 EUR &lt; price &lt;
500 EUR.
1.2</p>
      <sec id="sec-9-1">
        <title>Rule Languages for RDF</title>
        <p>Many applications require rules and axioms that can not be
directly represented in RDF Schema or OWL. However, RDF
and RDF Schema do not possess any rule language, that is
caused by numerous difficulties that are expected in
standardization of such a language at present time. However, this need
has been widely understood in the Semantic Web community
and several approaches for such a rule language have been
proposed.</p>
        <p>Triple [Sintek and Decker, 2001] is proposed as an RDF
query and inference language, providing full support for
resources and their namespaces, models represented with sets
of RDF triples, reification, RDF data transformation, and an
expressive rule language for RDF. The language is intended
to be used with a Horn-based inference engine.</p>
        <p>The RuleML2 initiative aims at defining a shared rule
markup language to specify forward (bottom-up) and
backward (top-down) rules in XML. The language being
devel2http://www.dfki.uni-kl.de/ruleml/
oped within the initiative is essentially an XML serialization
for the rules, and it specifies the rules in a generic form of
a head and a body consisting of atomic predicates with
parameters that can be also interpreted in Prolog. RuleML is
probably the only rule language for RDF that defines an RDF
syntax for the rules themselves.</p>
      </sec>
    </sec>
    <sec id="sec-10">
      <title>However, there are several differences in the goals pursued</title>
      <p>in RuleML and PRODEF. These are:
RDF facts. RuleML focuses at a universal representation of
the rule on the (Semantic) Web and thus makes no
assumptions about the structure and arity of the facts,
while any inference engine dealing with RDF naturally
deals with binary RDF facts only;
Implementation. RuleML is not linked to a specific
inference engine and thus needs to provide its own
interpretation of the rules together with a linkage to
inference engines. PRODEF follows the opposite
approach tightly connecting the RDF serialization to
standard Prolog semantics. From the engine implementation
side, PRODEF relies on the decades-long experiences
in making Prolog engines;
RDF Schema interpretation. The RDF serialization used
in RuleML makes no commitment to RDF Schema and
uses rdf:Bags and rdf:Sequences to represent the
rules that are not representable in RDF Schema.</p>
    </sec>
    <sec id="sec-11">
      <title>The RuleML initiative has been hosting a workshop on rule</title>
      <p>languages for the Semantic Web where a number of initiatives
have been presented.3</p>
      <p>Squish4 also known as RDQL is somewhat similar to SQL
but is further elaborated to query RDF triples. This similarity
to SQL allows seamless integration with database back-ends.
However, querying in Squish is bounded to plain RDF,
without any support for RDF Schema or high-level languages.</p>
      <p>The Sesame RDF querying engine [Broekstra et al., 2002]
uses the RDF Query Language RQL.5 Similar to Squish,
RQL statements contain the select-from-where construct,
however, an RQL interpreter is supposed to understand RDF
Schema axioms: transitivity of the subclass-of relation, its
connection to rdf:type, etc.</p>
    </sec>
    <sec id="sec-12">
      <title>A comparison of different RDF query languages is pub</title>
      <p>lished on the W3C web site6 together with query samples and
may serve as an interesting information source.</p>
      <p>The Object Constraint Language OCL7 is the expression
language for the Unified Modeling Language (UML) that
allows specifying constraints about the objects, links, and
property values of UML models. OCL is a pure expression
language and any OCL expression is guaranteed not to change
anything in the model. Whenever an OCL expression is
evaluated, it simply delivers a value. OCL is a modelling
lan3http://www.soi.city.ac.uk/˜msch/conf/
ruleml/
4http://swordfish.rdfweb.org/rdfquery/
5http://sesame.aidministrator.nl/
publications/rql-tutorial.html</p>
      <p>6http://www.w3.org/2001/11/
13-RDF-Query-Rules/
7www.omg.org/docs/ad/97-08-08.pdf
6:Res.
(pla+n–––––?ned)
tttaapvCiaoneioocpcrdnahntaisfcesrcyocsidad,efetnershwtaosrenRhttedimhehDteoreeadewFcpdsudicretdmetohofioitiesoncntgnhtuiaoytatemgiponoaagievonlcinoetonahrtonaledfgttslrhehcaetfiafiehp,tnnclereteoaohhrdrnpaaaisdsoestitnrfristaaasyhsa,i.oPncn:iewtonRIirattntOshtaruPDeDiiernnrrfEenoefiFF,lfcrolisodieggnep.tunofisprretIoanerntdgraeh2sirdBteenahtyrthmoidsnavea.lteeifiwnedrnaTadkeitbyoss--attached to the predicates and extract their definitions from
different locations on the Web. At certain moment all the
predicates would be collected, defined in terms of l triple
and o triple’s, and the constraint can be verified.</p>
    </sec>
    <sec id="sec-13">
      <title>Query string</title>
    </sec>
    <sec id="sec-14">
      <title>RDF and Triple</title>
      <p>RDF and OCL</p>
    </sec>
    <sec id="sec-15">
      <title>RDF and RuleML</title>
    </sec>
    <sec id="sec-16">
      <title>RDF and Prolog</title>
    </sec>
    <sec id="sec-17">
      <title>Papers in CiteSeer</title>
      <p>4
2
11
31</p>
    </sec>
    <sec id="sec-18">
      <title>Google results</title>
      <p>282
591
803
16,100
guage rather than a programming language and it is not
possible to write program logic or flow-control in OCL. As a side
effect, not everything in OCL is promised to be directly
executable.</p>
      <p>The Prote´ge´ axiom language PAL8 is used together with
the Prote´ge´ editor9 to specify knowledge base constraints.
The syntax of PAL is a variant of the Knowledge Interchange
Format (KIF) and it supports KIF connectives but not all of
KIF predicates and statements. PAL is not really targeted
towards RDF and RDF Schema.</p>
    </sec>
    <sec id="sec-19">
      <title>The RDF parser for SWI Prolog is a very relevant and pop</title>
      <p>ular initiative on using Prolog with RDF. The parser is
capable of converting RDF documents into Prolog facts and then
utilize Prolog for reasoning, but it does not address RDF
representation of Prolog programs themselves.</p>
    </sec>
    <sec id="sec-20">
      <title>Interesting to mention the estimate of the popularity of the</title>
      <p>rule and query languages. We queried the Web for relevant
documents as presented in Table 2. The table illustrates that
Prolog has been frequently used with RDF, however, with a
relatively small amount of publications made on that.
Obviously, these results are a subject of various distortions and
they do not indicate more than they do. However, it is
obvious that none of the newly proposed languages has the tool
support able to compete with the decades-long experience in</p>
    </sec>
    <sec id="sec-21">
      <title>Prolog tool development.</title>
      <p>8http://protege.stanford.edu/plugins/
paltabs/pal-documentation/
9http://protege.stanford.edu/
3</p>
      <sec id="sec-21-1">
        <title>The Ontology for PRODEF</title>
        <p>The ontology for PRODEF represents the syntactic structure
of Prolog programs and is depicted in Figure 3. In this
ontology we do not try to represent the execution semantics of
the programs, but treat program text as data and encode it as
data, leaving its interpretation to a Prolog engine.</p>
      </sec>
    </sec>
    <sec id="sec-22">
      <title>The modules of Prolog code are modelled with the class</title>
      <p>PrologModule that contains module’s logical name
represented with the rdf:id attribute and physical location
of the module encoded with the rdfs:isDefinedBy
attribute.10 A module may export several predicates linked with
the export property, call several directives, e.g. consult,
as mentioned in the calls property, and contain rule
definitions. PrologModules are instantiated with
RDF files with program code located somewhere on the Web.</p>
    </sec>
    <sec id="sec-23">
      <title>The class PredicateName represents a predicate name</title>
      <p>that requires certain numberOfParameters. The name
tag is targeted at a human user while the rdf:id’s of the
PredicateName instances represent their identifiers used
by the parser. The ontology includes several pre-defined
instances of PredicateName reserved for o triple and
l triple that correspond to the fact names reserved in
PRODEF to represent RDF data, and bagof, setof and
forall that correspond to the special Prolog constructs.
The PredicateName’s represent the predicate names
without any connection to their possible use with different
parameters.</p>
    </sec>
    <sec id="sec-24">
      <title>These are represented with the</title>
      <p>ClauseWithParameters class that connects a
predicate name to a list of parameters. The
parameters are organized as a list of instances of the Parameter
class, where each instance corresponds to one parameter
(a variable or a constant) and points to the next parameter in
the list.</p>
    </sec>
    <sec id="sec-25">
      <title>For example, an instance of PredicateName may look like the following:</title>
      <p>&lt;PredicateName rdf:id="MyPredicate"
name="myPredicate" numberOfParameters="3"/&gt;
and correspond to myPredicate/3,11 and an instance of
ClauseWithParameters may look like this:</p>
      <p>10rdfs:isDefinedBy belongs to RDF and RDF Schema and
are not presented in the figure.</p>
      <p>11Some of the conventions on encoding predicate names in Prolog
that are lifted in PRODEF as described later
Linking Prolog Programs on the
Web</p>
      <sec id="sec-25-1">
        <title>Data.rdf</title>
      </sec>
      <sec id="sec-25-2">
        <title>Product</title>
        <p>supplier
price
55€
Data.rdf
goal
a</p>
      </sec>
      <sec id="sec-25-3">
        <title>Supplier</title>
        <p>name</p>
        <p>HP
a_in_Prolog.rdf
a(X,X):-b(X),c(Y).
b(X):- …
isDefinedBy
isDefinedBy</p>
        <p>Missing
isDefinedBy
means ‘here’</p>
      </sec>
      <sec id="sec-25-4">
        <title>Other_rules.rdf</title>
        <p>c(Z):- …
and correspond to myPredicate(A,’This is a
string constant’).</p>
      </sec>
    </sec>
    <sec id="sec-26">
      <title>Similar to the predicates, the RDF data triples are modelled as the instances of ClauseWithParameters. Figure 5 shows the relation between the standard RDF modelling of RDF triples and the one used in PRODEF.</title>
      <p>A certain triple Product01, price, 55 EUR (e.g.
triple #23) is modelled in RDF with an instance of
rdf:Statement with the property rdf:Predicate
pointing to the property name, and in PRODEF – with
an instance of ClauseWithParameters with the
property predicate. The rdf:Subject is
modelled in PRODEF with the first Parameter linked
to ClauseWithParameters with the property
parameters. The rdf:Object is modelled with
the second Parameter linked to the previous one with the
nextParameter property.</p>
      <p>However, the modelling and interpretation of RDF triples
is primarily done with the supporting tools and not by a
human user. Accordingly, the different ways of modelling the
triples in RDF and PRODEF may not affect the utility of the
rdf:Statement</p>
      <p>rdf:Subject
rdf:Predicate
rdf:Object
23:
rdf:Property
price
rdf:Resource rdf:Resource</p>
      <p>Product01 55 EUR
PredicateName</p>
      <p>Parameter</p>
      <p>Parameter
predicate</p>
      <p>parameters
ClauseWithParameters
nextParameter
ontology.</p>
      <p>Figure 4 illustrates how a piece of a Prolog program may
be encoded in PRODEF. The figure contains the sample code
defining transitive subClassOf predicate and the tree
illustrating its RDF representation in PRODEF. The tree contains
two branches: RULE000 and RULE001 corresponding to
the two (disjunctive) definitions of subClassOf and point
to the PiR:predicate name subClassOf. RULE000
comes with the list PAR000 of PiR:parameters,
containing PiR:parameter X and PiR:nextParameter
Y. The PiR:body of the rule consists of the clause
CLS000 pointing to the name o triple and its
parameters X, Y, and constant ’...#subClassOf’.
In a similar way RULE001 has its PiR:body clause
CLS001 with PiR:parameters X, Z, and constant
’...#subClassOf’, and the PiR:nextClause
CLS002 pointing to PiR:predicate subClassOf
P
t
x
e
n
m
a
r
a
p
m
a
r
a
p
e
l
b
a
i
r
a
V
t
n
a
t
s
n
o
C
u
a
l
C
t
x
e
n
m
a
r
a
P
h
t
i
W
e
s
u
a
l
C
e
m
a
n
e
u
l
a
v
a
s
i
l
a
o
g
*
s
l
l
a
c
r
o
t
c
e
n
n
o
c
,
P
f
O
r
e
b
m
u
n
l
l
a
d
n
i
f
e
l
p
i
r
t
_
l
e
l
p
i
r
t
_
o
f
o
t
e
s
f
o
g
a
b
m
a
r
a
p
:
R
i
P
0
0
0
R
A
P
m
a
r
a
p
:
R
i
P
e
s
u
a
l
C
t
x
e
n
:
R
i
P
m
a
r
a
P
t
x
e
n
:
R
i
P
1
0
0
R
A
P
A
P
Y
A
P
1
0
0
T
S
N
O
C
The facts used by the rule language should not be abstract and
disconnected but need to be grounded to RDF statements.</p>
    </sec>
    <sec id="sec-27">
      <title>The facts in Prolog are represented with statements of an</title>
      <p>arbitrary arity indicating that one or more string-valued
concepts are in a certain relation to each other.</p>
    </sec>
    <sec id="sec-28">
      <title>For example, the statement price(’Product’,’55 EUR’) denotes that something called ‘Product’ is in relation ‘price’ to something called ‘55 EUR’.</title>
    </sec>
    <sec id="sec-29">
      <title>In RDF the facts are represented with the RDF triples.</title>
      <p>Each triple of the form (object,property,value)
denotes that two objects, object and value are in relation
property to each other.</p>
    </sec>
    <sec id="sec-30">
      <title>For example, the previous statement can be re-written</title>
      <p>as RDF triple (’Product’,price,’55 EUR’), which
may be encoded in RDF/XML as the following:</p>
      <p>&lt;rdf:Description rdf:about="Product"
price="55 EUR"/&gt;</p>
      <p>In RDF only binary facts are allowed and a thus only
binary facts need to be represented to Prolog. We
interpreted them in a uniform way: each RDF triple
(object, property, value) where value takes
rdfs:Literal strings is represented with Prolog fact
l triple(object,property,value), a triple with
an rdf:Resource value is translated into Prolog fact
o triple(object,property,value). No other
facts are allowed.</p>
    </sec>
    <sec id="sec-31">
      <title>This interpretation is similar to the one used in SWI</title>
      <p>Prolog12 where the result of importing an RDF file is a list of
rdf(Subject, Predicate, Object) triples, where
Subject is either a plain resource (an atom), or one of
the terms each(URI) or prefix(URI) with the
obvious meaning. Predicate is either a plain atom for
explicitly non-qualified names or a term NameSpace:Name. If
NameSpace is the defined RDF name space it is returned as
the atom rdf. Finally, an Object is represented by its URI,
a Predicate or a term has the format literal(Value)
if they take literal values.
3.2</p>
      <sec id="sec-31-1">
        <title>Names for Predicates and Variables</title>
        <p>Historically, Prolog imposes certain constraints on the names
for predicates and variables that originate from the plain-text
encoding used in Prolog programs. In standard Prolog
predicate names are represented with the identifiers starting with a
small letter, and variable names start with a capital letter. This
way of name encoding looks a bit archaic from the XML and</p>
      </sec>
    </sec>
    <sec id="sec-32">
      <title>RDF perspective.</title>
    </sec>
    <sec id="sec-33">
      <title>We encode both predicates and variables as RDF objects whose rdf:ID’s correspond to their identifiers (or names). These objects are easily distinguished because they are defined as the instances of a certain class, either</title>
      <p>PredicateName, Variable or a Constant.
Accordingly, we lift the restriction on the case for the first letter, and
12http://www.swi-prolog.org/packages/rdf2pl.
html
allow the use of different namespaces as the qualifiers to
distinguish different predicates with the same names on the Web.</p>
    </sec>
    <sec id="sec-34">
      <title>Opposite to the predicates, the variables are used only lo</title>
      <p>cally within a single rule definition and may not be accessed
from the outside.</p>
      <p>Predicate names make some sense only if there is a link
to the location where they are actually defined. We use
the rdfs:isDefinedBy property of a resource to denote
the file where the predicate is actually defined. [?] defines
rdfs:isDefinedBy as ‘an instance of rdf:Property
that is used to indicate a resource defining the subject
resource. This property may be used to indicate an RDF
vocabulary in which a resource is described’ and thus is perfectly
suitable for this purpose.
3.3</p>
      <sec id="sec-34-1">
        <title>Namespaces</title>
        <p>In XML and RDF namespaces are used as qualifiers for the
names allowing two equivalent names to be distinguished
globally by having different qualifiers. We use the
namespaces as parts of predicate and variable names. Essentially
the namespaces for the variables that are used only within the
predicate definitions are not that important as for the
predicates that may be accessed globally.
4</p>
      </sec>
      <sec id="sec-34-2">
        <title>The Execution of PRODEF Web</title>
      </sec>
      <sec id="sec-34-3">
        <title>Modules on the</title>
        <p>The Prolog programs on the Web are executed in a different
way than in classical Prolog systems and the inference results
are produced for further automatic processing rather than
direct human consumption.
4.1</p>
      </sec>
      <sec id="sec-34-4">
        <title>Modules and Goals</title>
        <p>Prolog programs are decomposed into modules that are
imported by the engine by executing the directive consult. In
the Web scenario the modules may well be distributed all over
the Web and consulting a module would require prior
downloading of the correspondent RDF file. Accordingly, instead
of a local file name consult need to receive an URL of the
module.</p>
      </sec>
    </sec>
    <sec id="sec-35">
      <title>In PRODEF each RDF data module contains two parts:</title>
      <p>RDF data itself and a possible annotation of the rdf:RDF
tag with the special pir:goal property linking it to the goal
description, a set of axioms that are applicable to the data
module:
&lt;rdf:RDF pir:goal="http://...goal.rdf"&gt;
here goes RDF data
&lt;/rdf:RDF&gt;</p>
    </sec>
    <sec id="sec-36">
      <title>The goal descriptions are special objects that define the ax</title>
      <p>ioms, the applicable data modules, and the interpretation of
the axioms. It consists of (Figure 6):
axioms pointing to the axiom with the name property and
its definition with the rdf:isDefinedBy property.</p>
    </sec>
    <sec id="sec-37">
      <title>The axioms are subclassed into PositiveAxioms and</title>
    </sec>
    <sec id="sec-38">
      <title>NegativeAxioms to specify whether the predicate is a positive test those results represent correct data, or a negative test that results in the incorrect data.</title>
      <p>l
a
o
G
datasets that are applicable to the axioms. Each dataset
may consist of several locations pointed with their urls,
or a query made in a repository.</p>
      <p>Quite often it happens that a certain location with a piece
of a program is not accessible at the moment. What should
if the definition of a certain predicate can not be found? A
possible solution path is to provide the Prolog engine with
a parameter specifying server’s behavior: to wait, to ignore
the predicate, or to fail. This failure is then included in the
reasoning results.
4.2</p>
      <sec id="sec-38-1">
        <title>Reasoning Results</title>
        <p>The Prolog engine and the wrapper return two types of
information:
The list of failed locations that could not be accessed and
the data or program modules could not be downloaded;
Prolog inference result: success, failure, yes, or
no;
The list of solutions in form of tuples (x1, ..., xn) that
correspond to the goal predicate with arguments
(X1, ..., Xn) returned in case of success.</p>
      </sec>
    </sec>
    <sec id="sec-39">
      <title>We naturally represent the solutions as a bag of RDF ob</title>
      <p>jects, each of which contains n properties with the names
X1, ..., Xn and the values x1, ..., xn.</p>
      <p>If a goal is defined as a conjunction of several predicates
goal(X1, ..., Xn) : −P1(X1, ..., Xm), ..., Pk(X1, ..., Xm)
where each Pi receives some or all of the n arguments of
goal, then we may represent each resulting object as a set
of objects P1, ..., Pk, each of which corresponds to one of
the predicates defining the goal. It may then make sense to
explicitly represent these predicates in the reasoning results
and process them further separately.</p>
    </sec>
    <sec id="sec-40">
      <title>Accordingly, the Prolog interpreter receives a parameter</title>
      <p>‘detail level of the results’ 1, 2, ..., ∞ that specifies the
number of objects representing each result, where ∞ forces the
results to be fully decomposed. However, further elaboration
of this scheme is rather a subject of further research.
5</p>
      <sec id="sec-40-1">
        <title>Summary</title>
        <p>In the paper we propose a solution for the problem of
representing Prolog programs on the (Semantic) Web and dealing
with distributed data modules in RDF.</p>
        <p>A number of questions remain open:
• How the language should be restricted (or better to say,
which extensions to Prolog should be prohibited).
Primarily this refers to the problems of batch execution of
the programs that may not use any graphic user interface
nor console output;
• The definition of an interface between PRODEF and the
predicates implemented with the other languages and
available as web services;
• A number of issues concerning distributed program
execution remain open.</p>
      </sec>
    </sec>
    <sec id="sec-41">
      <title>Extra information together with the ontologies, exam</title>
      <p>ples and occasional tool support is available at the PRODEF
homepage.13</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [Bratko, 1990] Ivan Bratko.
          <source>Prolog Programming for Artificial Intelligence. Addison-Wesley</source>
          ,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [Broekstra et al.,
          <year>2002</year>
          ]
          <string-name>
            <given-names>Jeen</given-names>
            <surname>Broekstra</surname>
          </string-name>
          , Arjohn Kampman, and Frank van Harmelen.
          <article-title>Sesame: A Generic Architecture for Storing and Querying RDF and RDF Schema</article-title>
          . In Ian Horroks and James Hendler, editors,
          <source>Proceedings of the First International Semantic Web Conference (ISWC2002)</source>
          ,
          <source>number 2342 in LNCS</source>
          , pages
          <fpage>54</fpage>
          -
          <lpage>68</lpage>
          , Sardinia, Italy, June 9-12
          <year>2002</year>
          . Springer-Verlag.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <source>[Sintek and Decker</source>
          , 2001]
          <string-name>
            <given-names>Michael</given-names>
            <surname>Sintek</surname>
          </string-name>
          and
          <string-name>
            <given-names>Stefan</given-names>
            <surname>Decker</surname>
          </string-name>
          .
          <article-title>TRIPLE - An RDF Query, Inference, and Transformation Language</article-title>
          .
          <source>In Proceedings of the Workshop on Deductive Databases and Knowledge Management (DDLP-2001), October</source>
          <volume>20</volume>
          -22
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>