Content uploaded by Marco Giunti
Author content
All content in this area was uploaded by Marco Giunti on Aug 26, 2019
Content may be subject to copyright.
Representing n-ary relations in the Semantic Web
Marco Giunti, Giuseppe Sergioli, Giuliano Vivanet, and Simone Pinna
Università di Cagliari
ALOPHIS (Applied Logic Philosophy and HIstory of Science)
Dipartimento di Pedagogia Psicologia Filosofia
via Is Mirrionis 1, 09123 Cagliari, Italy
giunti@unica.it
giuseppe.sergioli@gmail.com
giuliano.vivanet@unica.it
simonepinna@hotmail.it
Abstract. Knowledge representation is a central issue for Artificial In-
telligence and the Semantic Web. In particular, the problem of represent-
ing n-ary relations in RDF-based languages such as RDFS or OWL by
no means is an obvious one. With respect to previous attempts, we show
why the solutions proposed by the well known W3C Working Group
Note on n-ary relations are not satisfactory on several scores. We then
present our abstract model for representing n-ary relations as directed
labeled graphs, and we show how this model gives rise to a new ontolog-
ical pattern (parametric pattern) for the representation of such relations
in the Semantic Web. To this end, we define PROL (Parametric Rela-
tional Ontology Language). PROL is an ontological language designed
to express any n-ary fact as a parametric pattern, which turns out to be
a special RDF graph. The vocabulary of PROL is defined by a simple
RDFS ontology. We argue that the parametric pattern may be particu-
larly beneficial in the context of the Semantic Web, in virtue of its high
expressive power, technical simplicity, and faithful meaning rendition.
Examples are also provided.
Keywords: Knowledge representation, semantic net, Semantic Web,
RDF, RDFS, n-ary relation, formal ontology, ontological language, on-
tological pattern, relation reification, reified relation
1 Introduction
The development of the Semantic Web originated from the view that the whole
complex of our knowledge may eventually be translated into a machine-readable
language, which will be interpreted and understood by artificial agents, and will
thus promote cooperation and exchange between humans and machines (Berners
Lee, Hendler and Lassila [1]). A fundamental requirement for this language is
that the complex of its statements constitutes a net (in mathematical terms, a
directed, labeled graph), in which the semantic relations between statements are
made explicit.
2 Marco Giunti et al.
The idea that the entire human knowledge may ultimately form a complex
semantic net is by no means new. For instance, consider Hempel’s metaphor of
scientific theories as nets ([13], p. 36), or Quine’s holistic conception of meaning
([19], Sect. VII). Nevertheless, in the context of the Semantic Web this old idea
gains a new strength as, for the first time, it is supported by a set of information
technologies, which may very well transform that mere metaphor into reality.
RDF is the declarative language that, together with its ontological extension
RDFS (RDF Schema) and the more powerful OWL (an ontological language
based on description logics and compatible with RDF), may allow us to represent
an arbitrary knowledge base as a directed labeled graph. In fact, according to the
W3C specifications of RDF, any set of its statements can be formally identified
with an appropriate directed labeled graph. Each node of the graph is an IRI
(Internationalized Resource Identifier) of a resource. A resource is an entity of
any kind (document, thing, event, concept, etc.), while its IRI is an appropriate
string of Unicode characters that globally and univocally identifies the resource.
Each arrow of the graph is labeled by an IRI that identifies a two-place relation
(called a “property” in RDF, RDFS, and OWL). Such a relation is intended to
hold for the ordered pair of resources that corresponds to the source and target
node of the arrow.
However, the expressive power of RDF is quite limited, for the following
reasons. (i) RDF does not have any means to express the negation of a sentence;
(ii) RDF can only express the conjunction of two or more atomic sentences, but it
does not have any inbuilt capacities to express the other connectives (disjunction,
implication, double implication); (iii) RDF has very limited facilities (called
“blank nodes”) to express quantified statements. Blank nodes only allow for a
purely existential quantification of the conjunction of an arbitrary number of
atomic sentences; (iv) all predicates of RDF have two places. This means that
RDF can directly express only those statements that involve two-place relations.
Statements that involve unary relations (John is tall) or relations with three or
more places (John gives a rose to Mary) can only be indirectly expressed in RDF,
by first translating such relations into convenient binary ones. As far as unary
relations are concerned, RDF provides inbuilt facilities for their translation (RDF
classes and the special property rdf:type). Nevertheless, for n-ary relations with
n≥3there are no approved W3C standards (known as “Recommendations”) for
their expression in either RDF, RDFS, or OWL. Even though, so far, the W3C
has not released approved standards for representing arbitrary n-ary relations,
it has nonetheless suggested a number of ontological patterns. These suggestions
have the status of a “Working Group Note” (W3C [23]), but we will show in
detail (see Sects. 3 and 4.2) why they cannot be accepted as definitive solutions.
The severe expressive limits of RDF are partially overcome by its ontological
extension RDFS and, to a larger extent, by OWL. However, even OWL 2 (the
most recent version of OWL) does not reach the full expressive power of a first
order language. An unfortunate consequence of this fact is that, at the moment,
huge portions of our knowledge cannot be made available on the Semantic Web
as linked data, not even in principle.
Representing n-ary relations 3
The main aim of this work is to propose a new ontological pattern for repre-
senting n-ary relations, which we call parametric pattern. In Sect. 2, we introduce
and define the general notion of a n-ary relation. In Sect. 3, we analyze and dis-
cuss the ontological patterns proposed by the W3C. In Sect. 4, we develop an
abstract graph model (first presented in Giunti [9]) for the representation of n-
ary relations by means of binary ones. This abstract graph model constitutes the
theoretical basis of the new parametric pattern. Finally, in Sect. 5, we show how
it is possible to transform our graph model into an actual ontological pattern,
which allows us to represent an arbitrary n-ary relation by means compatible
with RDF.
To this end, we define PROL (Parametric Relational Ontology Language).
PROL is a simple ontological language designed to express any fact that in-
volves a n-ary relation (i.e., any n-ary fact) as a parametric pattern, which is
indeed a special RDF graph. The vocabulary of PROL includes just 6 terms (2
RDF classes and 4 RDF properties) defined by a simple RDFS ontology. Two
terms (prol:type, prol:next) serve to represent any n-ary fact as a parametric
pattern. The remaining four terms (prol:Relation, prol:Domain, prol:hasPlaces,
prol:represents) serve to express the ontology that (a) defines the n-ary relations
involved in the facts to be represented, and (b) allows for the correct detection
and interpretation of the representing parametric patterns.
We maintain that, to date, our proposal is one of the simplest and most
effective solutions to the problem of representing n-ary relations in the Semantic
Web. However, the interest of this proposal is not limited to the solution of
this particular problem, namely, to remove the specific expressive limit of RDF
described in (iv) above. In a wider perspective, we maintain that the parametric
pattern may be a crucial first step to tackle and solve also the other three
expressive limits of RDF, or related ontological languages (see Sect. 6). As soon
as these further developments give rise to widespread and shared standards, we
may finally obtain a new ontological language compatible with RDF that, on
the one side, will be as expressive as any first order language and, on the other
one, will also be able (like the present RDF) to connect all its statements in a
graph. This will produce a very powerful semantic net, which in principle will
be able to realize the original vision of the Semantic Web.
In addition, our proposal can be seen as an application of model based reason-
ing (Magnani, Nersessian and Thagard [15]; Magnani and Bertolotti [16]) to the
logical analysis of current practices of knowledge representation in the Semantic
Web and, specifically, with respect to the role of diagrammatic representation
and the ontology of models.
2 N-ary relations
According to the definition proposed by Gruber, an ontology
[. . .]defines a set of representational primitives with which to model a
domain of knowledge or discourse. The representational primitives are
4 Marco Giunti et al.
typically classes (or sets), attributes (or properties), and relationships
(or relations among class members). (Gruber [12], p. 1963)
In the relevant literature, however, the meaning attributed to each of the above
terms (classes or sets, attributes or properties, relations) is not always univocal.
For example, let us consider the following statement: “this apple is red”. Even
though being red is usually conceived as a property of the apple or, in other
words, as one of its attributes, this statement is interpreted in RDF as involving
a relation (rdf:type) between the apple and the class of red things. Also note
that, in RDF, the term “property” is not a synonym of “attribute”, but rather of
“binary relation” (W3C [24], Sect. 3).
There are also cases in which an attribute is intended as a modifier of a binary
relation (i.e., a property in RDF sense). For instance, one of the W3C use cases
discussed in Sect. 3 is “Christine has breast tumor with high probability”, where
the expression “with high probability” is meant as an attribute which modifies
the binary relation of Christine’s having breast tumor.
Furthermore, in RDF, classes are not intended as just sets of elements, but
rather as concepts or classifications (intensions) whose extensions are sets (W3C
[22], Sect. 1.1). For example, the Math exam candidates and the English exam
candidates are two different classes, but their elements may be exactly the same.
Analogously, RDF distinguishes between a property, namely, a binary relation
intensionally defined, and its extension, i.e., the set of ordered pairs for which
the given relation holds.
In this paper, we are mainly concerned with the general concept of a relation
and, in particular, with the problem of representing n-ary (n≥3) relations
by only employing binary ones. As suggested by common usage, a relation is
a connection that does or does not hold for a certain number of individuals.
For instance, the relation less than does hold for the numbers one and three,
but it does not for three and two. This simple example already shows that
order is a fundamental feature of the general concept of a relation. In general,
a relation holds, or does not, for a certain number of individuals in a given
order. Relations that hold irrespectively of the order of the individuals involved
are called symmetric and they are in fact a proper subclass of the relations in
general.
Another fundamental feature of a relation is its arity, which indicates the
number of individuals involved.1In the previous example we have considered
the relation ()less than(), which holds for two individuals in a given order. In
this case, the arity of the relation is 2, and it is called a binary relation. The
elements of this relation are all the ordered pairs of individuals for which the
relation holds. Consider now the statement “two is between one and three”. Here
the individuals involved are three, so that the relation ()is between()and() has
arity 3. In general, a relation with arity n≥1holds, or does not, for exactly
1The individuals involved may only be numerically distinct, that is to say, the same
individual may be involved more than once in the same relation. The typical example
is the identity relation, which only holds for any pair of individuals whose first and
second member are the same.
Representing n-ary relations 5
nindividuals in a given order, and its elements are all the ordered n-tuples
of individuals for which the relation holds. A n-ary relation is a relation whose
arity is n. In this paper, we do not consider relations whose arity is not definitely
fixed.2
To formally express the fact that a n-ary relation Rnholds for nordered
individuals a1, ... , an, we write: Rn(a1, ... , an). We adopt the usual convention
that the individuals involved in the relation are indicated by lowercase letters,
while predicates are denoted by uppercase letters combined with a superscript
that indicates the arity of the relation for which the predicate stands. As usual,
we intend that the arity of a predicate is equal to the arity of the relation for
which it stands.
In set theory and formal semantics it is customary to identify a n-ary relation
with the class of its elements, that is, with the class of all ordered n-tuples
for which the relation holds. We adopt here a similar identification. However,
in order to be consistent with RDF conception of classes, we intend classes
intensionally. This means that we take any n-ary relation to be identical to a
class of ordered n-tuples, but two n-ary relations whose elements are exactly
the same not necessarily are the same class (in other terms, the extensionality
principle does not hold).
In RDFS, a domain of a property Pis defined as any class C1such that,
∀x1∀x2, if x1P x2, then x1is a C1. Analogously, a range of Pis any class C2
such that, ∀x1∀x2, if x1P x2, then x2is a C2. We generalize these notions to
any n-ary relation as follows. Let Rnbe an arbitrary n-ary relation, and Cibe
a class (1≤i≤n). Ciis an i-th domain of Rniff ∀x1...∀xn, if Rn(x1, ... , xn),
then xiis a Ci.
According to RDFS, a property P2is a subproperty of a property P1just
in case ∀x1∀x2, if x1P2x2, then x1P1x2. We generalize this concept to n-ary
relations as follows. With the notation Z[1,m]we mean the set of all positive
integers ksuch that 1≤k≤m, where m∈Z. Let Rnbe a n-ary relation, and
1≤m≤n; we say that pis a choice of mplaces of Rniff pis an injective
function from Z[1,m]to Z[1,n]. Let Rmbe a m-ary relation and Snbe a n-ary
relation, where 1≤m≤n; let pbe a choice of mplaces of Sn;Snis a subrelation
of Rmwith respect to piff ∀x1...∀xn, if Sn(x1, ... , xn), then Rm(xp(1), ... , xp(m)).
The logical structure of relations described above allows us to formally rep-
resent many facts usually expressed by statements of the natural language. For
example, the statement “Mario buys a jacket” can be analyzed as “(Mario) buys
a (jacket)”, where the binary relation represented by “()buys a()” holds for the
individuals denoted by “Mario” and “jacket”, in this order. We can thus intro-
duce the predicate “B2” to stand for the binary relation ()buys a(), and the
two constants “m” and “ j” for Mario and the bought jacket, namely, the two
individuals involved in the relation ()buys a(). This leads to formally represent
the unanalyzed statement “Mario buys a jacket” as “B2(m, j)”, which in fact is
just an abbreviation for the analyzed form “(Mario) buys a (jacket)”.
2See Oliver and Smiley [18] for so called “multigrade predicates”.
6 Marco Giunti et al.
These analytical tools have been traditionally used for formalizing the argu-
mentative structure of natural language. Consider the statement “Giuliano hits
Giuseppe hard”. For the sake of reconstructing an argument in which this state-
ment might be involved, the most natural analysis would probably be “(Giu-
liano) hits (Giuseppe)”, where the further information brought by the adverb
“hard”, which modifies the meaning of the binary predicate “()hits()”, would be
discarded.
However, an encoding in a Semantic Web context would not necessarily be
aimed at the argumentative structure of natural language. Hence, in this wider
context, a finer grained analysis might be needed. In the previous example,
it might be useful to consider three individuals: Giuliano, Giuseppe, and the
force with which Giuliano hits Giuseppe (not so hard, hard, really hard, etc.).
The term “hard” now stands for a further individual involved in the relation.
Consequently, the statement “Giuliano hits Giuseppe hard” should be analyzed
as “(Giuliano) hits (Giuseppe) (hard)”, which would involve the three ordered
individuals Giuliano, Giuseppe, hard, and the ternary relation ()hits()(). Note
that, according to our definition of a subrelation, the ternary relation ()hits()()
is a subrelation of the binary relation ()hits(), with respect to the choice pof
two places of ()hits()() such that p(1) = 1 and p(2) = 2.
In this paper, a relation is intended in a wider sense than the traditional one
rooted in argumentation theory. A relation is thought as a connection between
nindividuals in a given order, but some of these individuals may result from a
process of reification (Brachman and Levesque [3], p. 41) similar to the one just
considered.
As noted above, in RDF, as well as in RDFS and OWL, properties are in
fact binary relations. However, in some cases, we need to represent relations that
involve more than two individuals, namely, relations of arity n≥3, as seen in
the previous example. In the literature, we can find several different approaches
to the treatment of relations of this kind. Many of them have originated from the
field of Artificial Intelligence and the related problems of knowledge represen-
tation, and may be traced back to the introduction of semantic nets as models
for representing generic knowledge domains. Semantic nets are interconnected
systems of nodes and arrows, which can be thought as special kinds of directed
and labeled graphs (Brachman [2]; Sowa [20]).
The problem of representing n-ary relations with arity n≥3was explicitly
treated in this context by Deliyanni and Kowalski, who proposed to represent
the statement “John gives the book to Mary” as a special semantic net formed
by five nodes and four arrows ([4], p. 184). The general model they employed for
representing an arbitrary n-ary relation ([4], p. 186) by means of binary ones is
today known as relation reification (Galton [5]; Gangemi [6]; Hobbs [14]; Masolo
[17]; Welty and Fikes [21]).
The basic idea of relation reification consists in thinking of each n-tuple
of individuals for which a n-ary relation holds as an instance of a specially
introduced class, which is thought as a reification of the relation itself, and can
thus be called a relation-class. The instance of the relation-class is then connected
Representing n-ary relations 7
to each of the nindividuals by means of nbinary relations, sometimes called
roles, which are specifically introduced to collectively approximate the meaning
of the original n-ary relation. In Sect. 4.2 we highlight several weaknesses of this
approach.
As mentioned before, in the literature we can find a number of different ap-
proaches to the representation of n-ary relations. For a good annotated bibliog-
raphy and a comparison of seven ontological patterns, see Gangemi and Presutti
([7], [8]). In the next Sect. 3, we analyze probably the most influential ontological
patterns based on the relation reification model, which can be found in the well
known Working Group Note on n-ary relations (W3C [23]).
3 Two ontological patterns based on relation reification:
The W3C Working Group proposal
The Working Group Note on n-ary relations (W3C [23]) considers four use case
examples in which n-ary (n≥3) relations are involved:
1. Christine has breast tumor with high probability.
2. Steve has temperature, which is high, but falling.
3. John buys a “Lenny the Lion” book from books.example.com for $15 as a
birthday gift.
4. United Airlines flight 1377 visits the following airports: LAX, DFW, and
JFK.
In Example 1, the meaning of the binary predicate “()has()” is modified by
the attribute “high”, which specifies a qualitative probability value. Besides the
two individuals Christine and breast tumor, for which the binary relation ()has()
holds, the attribute “high” is interpreted as standing for a third individual. There-
fore, the statement “Christine has breast tumor with high probability” turns out
to be analyzed as “(Christine) has (breast tumor) with (high) probability”, which
involves the ternary relation ()has()with()probability.
In Example 2, the meaning of the unary predicate “()has temperature” is
modified by two attributes, “high” and “falling”, which respectively specify a
qualitative temperature value and its trend. Besides the individual Steve, for
which the unary relation ()has temperature holds, the two attributes “high” and
“falling” are then interpreted as two further individuals. Therefore, the statement
“Steve has temperature, which is high, but falling” is in fact analyzed as “(Steve)
has temperature, which is (high), but (falling)”, which involves the ternary rela-
tion ()has temperature, which is(), but().3
3One might wonder why not considering instead the binary predicate “()has()” and
the further individual constant “temperature”, so that, in the end, the unanalyzed
statement would be analyzed as involving the 4-ary relation ()has(), which is(),
but(). According to the W3C Working Group Note, however, this alternative analysis
is excluded because: “In most intended interpretations, this instance of a relation
cannot be viewed as an instance of a binary relation with additional attributes
attached to it.” (W3C [23], Sect. 3.2.2).
8 Marco Giunti et al.
Fig. 1. Ontological pattern 1 – subject version – for: Christine has breast tumor with
high probability.
Fig. 2. Ontological pattern 1 – subject version – for: Steve has temperature, which is
high, but falling.
Representing n-ary relations 9
In Example 3, it is clear from the start that a n-ary (n≥3) relation holds
for the five individuals John, “Lenny the Lion” book, books.example.com, $15,
birthday gift. Therefore, the statement “John buys a ‘Lenny the Lion’ book
from books.example.com for $15 as a birthday gift” is analyzed as “(John) buys
a (‘Lenny the Lion’ book) from (books.example.com) for ($15) as a (birthday
gift)”, which involves the 5-ary relation ()buys a()from()for()as a().
Fig. 3. Ontological pattern 1 – no subject version – for: John buys a “Lenny the Lion”
book from books.example.com for $15 as a birthday gift.
In Example 4, “[...] the relation holds between the flight and the airports
it visits, in the order of the arrival of the aircraft at each airport in turn.”
(W3C [23], Sect. 3.3). Therefore, the statement “United Airlines flight 1377 visits
the following airports: LAX, DFW, and JFK” is in fact analyzed as “(United
Airlines flight 1377) visits the following airports: (LAX), (DFW), and (JFK)”,
which involves the 4-ary relation ()visits the following airports:(),(), and().
Fig. 4. Ontological pattern 2 – subject version – for: United Airlines flight 1377 visits
the following airports: LAX, DFW, and JFK.
10 Marco Giunti et al.
The Working Group Note maintains that the four examples differ on two
different respects. First, only in Example 4 would the order of the individuals
make a real difference. In the first three examples, instead, individuals’ order
would not seem to be essential. Second, in Examples 1, 2, and 4 it is possible
to distinguish one of the individuals as the main subject of the whole relation
(respectively, Christine, Steve, and United Airlines flight 1377), while in Exam-
ple 3 there is no “[...] single individual standing out as the subject or the ‘owner’
of the relation.” (W3C [23], Sect. 3.2.3).
Due to the first difference, the Working Group Note proposes two different
ontological patterns to represent, on the one hand, Examples 1, 2, 3, and on the
other one, Example 4. Both patterns are special versions of the relation reifi-
cation model, which are expressed in either RDFS or OWL. The corresponding
representations of the four examples by means of the two ontological patterns
are shown in Figures 1, 2, 3, and 4.
The first ontological pattern is nothing more than a straightforward RDFS or
OWL translation of the relation reification model. This is evident from Figure 3,
which shows exactly the same kind of graph as the one employed by Deliyanni
and Kowalski for representing the statement “John gives the book to Mary”
([4], p. 184). The special relation-class Purchase (not represented in Figure 3)
is the reification of the 5-ary relation ()buys a()from()for()as a(). The instance
Purchase_1 of the relation-class can be thought as the 5-tuple for which the
relation holds, and it is connected to each of the five individuals by an outgoing
arrow. The arrows stand for five binary relations whose respective meanings, as
well as the meaning of the relation-class Purchase, are specified in the RDFS
or OWL ontology, in such a way that they should collectively approximate the
meaning of the original 5-ary relation ()buys a()from()for()as a().
A slightly different version of the first pattern is provided for Examples 1
and 2, as shown in Figures 1 and 2. Recall that, according to the Working
Group Note, in either example one of the individuals would stand out as the
subject of the whole relation. This is indicated by introducing exactly one arrow
whose direction is reversed: the individual from which the reversed arrow orig-
inates is the subject, while all other arrows originate from the instance of the
relation-class. Also note that, like in Figure 3, the relation-class and the binary
relation (rdf:type) that connects its instance to it are not represented in either
Figure 1 or 2.
The second pattern is a somewhat more complex version of the relation-
reification model, which takes care of the special feature of Example 4: “[...] all
but one participant in a relation do not have a specific role and essentially form
an ordered list” (W3C [23], Sect. 3.3).
The relation-class FlightSegment (not represented in Figure 4) is introduced
as the reification of the original 4-ary relation ()visits the following airports:(),(),
and(). However, in order to take care of the special feature of Example 4, any
instance of the relation-class should now be thought as an ordered list of flight
destinations. This leaves out United Airlines flight 1377, the single participant
with a specific role, which does not belong to any destination list. United Air-
Representing n-ary relations 11
lines flight 1377 can thus be thought as the subject of the whole relation, similar
to Christine and Steve in, respectively, Examples 1 and 2. In order to represent
the original n-ary fact, as many instances of the relation-class should be created
as the number of ordered individuals; thus, in this specific case, the three in-
stances UA_1377_1, UA_1377_2, UA_1377_3 are introduced. Each of them
should be thought as, respectively, the complete flight destination list, the com-
plete list except its first element, and the final list whose only element is the
last destination. This is obtained by means of the two binary relations destina-
tion and next_segment, and the subclass FinalFlightSegment (not represented
in Figure 4) of the relation-class FlightSegment. The three destinations and the
corresponding instances of the relation-class are in fact connected to each other
in a typical list structure, as shown in Figure 4. The subclass FinalFlightSeg-
ment identifies the final destination list, for the third instance UA_1377_3 is
also an instance of this class. United Airlines flight 1377, the subject of the whole
relation, is finally connected to the first instance of the list structure by means
of the binary relation flight_sequence. The meanings of the three binary rela-
tions, destination, next_segment and flight_sequence, as well as those of the
two classes FlightSegment and FinalFlightSegment, are specified in the RDFS
or OWL ontology, in such a way that they should collectively approximate the
meaning of the original 4-ary relation ()visits the following airports:(),(), and().
4 An abstract graph model for representing n-ary
relations
In this Section, we present an abstract model for representing n-ary relations as
directed labeled graphs.4We will then reconsider the four use case examples of
the previous Section and show how this model leads to improved representation.
We have seen in Sect. 2 that a n-ary (n≥1) predicate is usually formalized
by means of an uppercase letter, for instance “R”, together with a superscripted
“n” that indicates its arity: “Rn”. For our present purposes, however, it is more
convenient to indicate the arity nof a predicate by means of a corresponding
number of left and right parentheses “()” to the right of the uppercase letter.
Thus, according to this notation, “Rn” will be written “R()...()”, where there are
exactly ncopies of “()” to the right of “R”.
Consider now an arbitrary n-ary (n≥3) relation R()()...(), indicated by the
predicate “R()()...()”. Let us first of all recall that, according to the definition
given in Sect. 2, the n-ary relation R()()...() is a class, intensionally understood,
of ordered n-tuples. Let (a1, a2, ... , an)be an arbitrary element of R()()...(); we
express this n-ary fact (n≥3) with the statement “R(a1)(a2)...(an)”.5Now, we
ask how it is possible, in general, to represent the n-ary fact R(a1)(a2)...(an)by
means of statements that only involve binary relations.
4A seminal version of this model can be found in Giunti [9].
5It should be noticed that the quoted text “R(a1)(a2)...(an)” indicates a statement
that expresses a n-ary fact, while the unquoted text R(a1)(a2)...(an)states the fact
itself.
12 Marco Giunti et al.
Given the relational fact R(a1)(a2)...(an), we first consider the individuals
a3, ..., an, and we then use them as parameters to define the binary relation
R()()[a3]...[an]by means of the n-ary one R()()...(). Formally, this is obtained
by defining6the new binary predicate “R()()[a3]...[an]” by means of the n-ary
predicate “R()()...()”, the n−2individual constants “a3”, . . . , “ an”, and two
individual variables “x” and “y”, as follows:
R(x)(y)[a3]...[an] := R(x)(y)(a3)...(an)
We then consider again the relational fact R(a1)(a2)...(an)and we repeat the
above procedure, now taking as parameters all the individuals except the second
and the third, then all the individuals except the third and the fourth, and so on,
until the last two individuals are excluded. This is formally obtained by means of
the following definitions of the new n−2binary predicates “R[a1]()()[a4]...[an]”,
“R[a1][a2]()()[a5]...[an]”, . . . , “ R[a1]...[an−2]()()”:
R[a1](x)(y)[a4]...[an] := R(a1)(x)(y)(a4)...(an)
R[a1][a2](x)(y)[a5]...[an] := R(a1)(a2)(x)(y)(a5)...(an)
. . . := . . .
. . . := . . .
. . . := . . .
R[a1]...[an−2](x)(y) := R(a1)...(an−2)(x)(y)
Note now that, for each of the n−1binary predicates, its definition entails
the corresponding equivalence below:
R(a1)(a2)[a3]...[an]↔R(a1)(a2)(a3)...(an)
R[a1](a2)(a3)[a4]...[an]↔R(a1)(a2)(a3)(a4)...(an)
R[a1][a2](a3)(a4)[a5]...[an]↔R(a1)(a2)(a3)(a4)(a5)...(an)
. . . ↔. . .
. . . ↔. . .
. . . ↔. . .
R[a1]...[an−2](an−1)(an)↔R(a1)...(an−2)(an−1)(an)
6As usual, each of the definitions below should be intended as the non-creative axiom
that is obtained by replacing the definition sign “:=” with the biconditional “ ↔” and
by then taking the universal closure of the resulting open formula α(x, y), in which
the only two free variables are “x” and “y”.
Representing n-ary relations 13
This means that the n-ary fact R(a1)(a2)...(an)can be expressed by any of
the statements on the left hand side of the above equivalences. It is important
to notice that each of these statements only involves a binary relation whose
meaning is just a parametric specification of the meaning of the n-ary relation
R()()...(), for it is obtained from it by taking as parameters n−2individuals
involved in the original n-ary fact R(a1)(a2)...(an). This means that the equiv-
alences above are not just extensional, but they are in fact fully intensional.
Furthermore, given the previous n−1equivalences, the following one obviously
follows:
R(a1)(a2)...(an)↔R(a1)(a2)[a3]...[an]∧R[a1](a2)(a3)[a4]...[an]∧. . .
. . . ∧R[a1]...[an−2](an−1)(an)(1)
Formula (1) gives us a formal solution to our problem. In accordance to it,
the n-ary fact R(a1)(a2)...(an)can always be represented by the conjunction of
n−1chained statements in which only binary relations are involved. The n−1
statements are chained in the sense that (i) each of them involves a parametric
binary relation and (ii) these parametric binary relations can be ordered in
such a way that the parameters of the first relation R()()[a3]...[an]are all the
ordered individuals a1, a2, ..., anexcept the first and the second, the parameters
of the second relation R[a1]()()[a4]...[an]are all the ordered individuals except
the second and the third, and so on, until the last relation R[a1]...[an−2]()(),
whose parameters are all the ordered individuals except the last two.
This kind of chained representation of R(a1)(a2)...(an), where the order of
the parametric binary relations reproduces the order of the individuals in the n-
tuple (a1, a2, ..., an), is of special interest to us, for it is immediately translatable
into an oriented labeled graph. Figure 5 shows the graph that corresponds to
the conjunction on the right of the biconditional in Formula (1).
R()()[a_3]...[a_n]
a_1 a_3a_2 a_n-1 a_n
R[a_1]()()[a_4]...[a_n]
R[a_1]...[a_n-2]()()
Fig. 5. The oriented labeled graph that corresponds to the chained conjunction in the
right hand side of Formula (1).
4.1 Applying the abstract graph model to the W3C Working Group
examples
We show below how our abstract graph model can be applied to the four W3C
Working Group examples discussed in Sect. 3.
14 Marco Giunti et al.
Example 1. Christine has breast tumor with high probability
(Christine) has (breast tumor) with (high) probability
H()()() = ()has()with()probability;c=Christine;t=breast tumor;h=high.
Definition of H()()[h]:H(x)(y)[h] := H(x)(y)(h)
Definition of H[c]()():H[c](x)(y) := H(c)(x)(y)
Thus we get: H(c)(t)(h)↔H(c)(t)[h]∧H[c](t)(h)
Figure 6 shows the graph representation that corresponds to the chained
conjunction on the right of the biconditional above:
H()()[h] H[c]()()
c ht
Fig. 6. The abstract graph model for: Christine has breast tumor with high probability.
Example 2. Steve has temperature, which is high, but falling
(Steve) has temperature, which is (high), but (falling)
T()()() = ()has temperature, which is(), but();s=Steve;h=high;f=falling.
Definition of T()()[f]:T(x)(y)[f] := T(x)(y)(f)
Definition of T[s]()():T[s](x)(y) := T(s)(x)(y)
Thus we get: T(s)(h)(f)↔T(s)(h)[f]∧T[s](h)(f)
Figure 7 shows the graph representation that corresponds to the chained
conjunction on the right of the biconditional above:
T()()[f] T[s]()()
s fh
Fig. 7. The abstract graph model for: Steve has temperature, which is high, but falling.
Example 3. John buys a “Lenny the Lion” book from books.example.com
for $15 as a birthday gift
(John) buys a (“Lenny the Lion” book) from (books.example.com) for ($15) as
a (birthday gift)
B()()()() = ()buys a()from()for()as a();j=John;l=“Lenny the Lion” book;b=
books.example.com;p=$15;g=birthday gift.
Definition of B()()[b][p][g]:B(x)(y)[b][p][g] := B(x)(y)(b)(p)(g)
Definition of B[j]()()[p][g]:B[j](x)(y)[p][g] := B(j)(x)(y)(p)(g)
Representing n-ary relations 15
Definition of B[j][l]()()[g]:B[j][l](x)(y)[g] := B(j)(l)(x)(y)(g)
Definition of B[j][l][b]()():B[j][l][b](x)(y) := B(j)(l)(b)(x)(y)
Thus we get: B(j)(l)(b)(p)(g)↔B(j)(l)[b][p][g]∧B[j](l)(b)[p][g]∧
B[j][l](b)(p)[g]∧B[j][l][b](p)(g)
Figure 8 shows the graph representation that corresponds to the chained
conjunction on the right of the biconditional above:
B()()[b][p][g]
j bl pg
B[j]()()[p][g]
B[j][l]()()[g]
B[j][l][b]()()
Fig. 8. The abstract graph model for: John buys a “Lenny the Lion” book from
books.example.com for $15 as a birthday gift.
Example 4. United Airlines flight 1377 visits the following airports:
LAX, DFW, and JFK
(United Airlines flight 1377) visits the following airports: (LAX), (DFW), and
(JFK)
V()()()() = ()visits the following airports:(),(), and();u=United Airlines flight
1377; l=LAX;d=DFW;j=JFK.
Definition of V()()[d][j]:V(x)(y)[d][j] := V(x)(y)(d)(j)
Definition of V[u]()()[j]:V[u](x)(y)[j] := V(u)(x)(y)(j)
Definition of V[u][l]()():V[u][l](x)(y) := V(u)(l)(x)(y)
Thus we get: V(u)(l)(d)(j)↔V(u)(l)[d][j]∧V[u](l)(d)[j]∧V[u][l](d)(j)
Figure 9 shows the graph representation that corresponds to the chained
conjunction on the right of the biconditional above:
V()()[d][j]
u dl j
V[u]()()[j]
V[u][l]()()
Fig. 9. The abstract graph model for: United Airlines flight 1377 visits the following
airports: LAX, DFW and JFK.
4.2 The abstract graph model vs. the two ontological patterns
based on relation reification
In this subsection, we compare how the abstract graph model and the two on-
tological patterns based on relation reification (see Sect. 3) respectively fare on
16 Marco Giunti et al.
three issues: the order problem, the meaning problem, and the subject problem.
We maintain that all three problems are serious for the reification patterns, but
they are easily handled by the abstract graph model.
The order problem
We have seen in Sect. 2 that order is a fundamental feature of relations in general.
This is to be intended in the precise sense that any n-ary (n≥1) relation holds,
or does not, for any nindividuals a1, ... , anin a given order. In other words, the
order in which the individuals are considered is an essential feature of any n-ary
fact or, to put it in a different way, it does not even make sense to ask whether
a relation holds for nindividuals if they are not listed in some order. Thus,
independently of the nature of the relation involved, the order of the individuals
is always relevant to single out a relational fact.
Quite obviously, this is not to say that order is always relevant for the relation
itself. For example, when a binary relation is symmetric, if it holds for two
individuals in a given order, it holds as well for the same individuals in the
reversed order. But note that symmetry is a property of the relation, it is not a
property of any single fact in which the symmetric relation is involved.
Ontological patterns for n-ary relations, as well as the abstract graph model,
are primarily designed to faithfully represent n-ary facts, and we have just argued
that individuals’ order is an essential feature of any n-ary fact. Let us then ask
how well the two reification patterns on the one hand, and the abstract graph
model on the other one, are able to represent this essential feature of n-ary facts.
As far as the first reification pattern is concerned, it is quite obvious that there
is no way to retrieve any particular order of the individuals from a representation
of a n-ary fact based on either version of this pattern (subject version or no
subject one). One might think that this is not a serious problem, for the first
pattern is supposed to be applied only to those n-ary facts for which individuals’
order does not matter. But we have just seen that there are no such facts, so that
when a n-ary fact is represented by means of this pattern, an essential feature
of the fact itself is irremediably lost.
The second reification pattern, instead, is able to correctly represent indi-
viduals’ order. However, we have seen that this is obtained by increasing the
technical complexity of the pattern, which now includes a full-blown list struc-
ture, and by resorting to a quite unnatural interpretation of the relation-class.
In the first reification pattern, the elements of the relation-class can be thought
to be just the n-tuples for which the original n-ary relation holds. This natural
interpretation is no longer possible for the relation-class of the second pattern,
for now the class also has as elements all k-tuples of length 1≤k < n that are
obtained from the previous n-tuples by repeatedly discarding their first items.
The abstract graph model, by contrast, represents the order of the individuals
of a n-ary fact in the most straightforward and natural way, for the n-tuple for
which the n-ary relation holds can be immediately retrieved from the connected
and oriented graph that represents the whole fact.
Representing n-ary relations 17
The meaning problem
We now consider the following question: How faithful are the two reification
patterns, or the abstract graph model, to the intended meaning of the n-ary
relation involved in a fact they represent?
We have seen in Sect. 3 that, for either reification pattern, the answer to
this question entirely depends on how well the ontologically specified meanings
of the relation-class and the specially introduced binary relations are going to
collectively approximate the meaning of the original n-ary relation. However,
the main problem with this approach is that it is not at all clear how a good
approximation might ever be reached, for neither pattern provides any principled
way to correlate the meanings of the relation-class and binary relations to the
one of the original n-ary relation.
For the abstract graph model, instead, the answer entirely depends on how
the meanings of the n−1parametric binary relations are related to the meaning
of the original n-ary relation. As noted above (Sec. 4, par. 7), the meaning of
each binary relation is correlated to the meaning of the n-ary relation in a clear
and principled way, for it is in fact a parametric specification of the meaning
of the n-ary relation, which is obtained by taking as parameters n−2of the
individuals involved in the n-ary fact to be represented. As previously remarked,
it thus follows that the abstract graph model that represents a n-ary fact can
always be identified with the conjunction of n−1chained statements, where each
of them is intensionally equivalent to the statement that expresses the original
n-ary fact.
The subject problem
As mentioned above (Sect. 3, par. 6), according to the Working Group Note, it is
sometimes possible to distinguish one of the individuals involved in a relational
fact as the main subject of the n-ary relation. This motivates the introduction
of two different versions of the first pattern, as well as the special role accorded
to one of the individuals in the second pattern.
However, this particular feature of either pattern is in fact in sharp contrast
with the very notion of a relational fact, in which none of the individuals involved
can be thought as the subject or the “owner” of the relation, because it is just the
n-th entity for which the relation holds. For the abstract graph model, instead,
the subject problem does not even arise, because each node of its linear oriented
graph just plays the role of the n-th individual for which the relation holds.
5 PROL and the parametric pattern
We have seen in the previous section how the abstract graph model leads to im-
proved representation of a n-ary fact as regards at least three scores: (i) capacity
to represent individuals’ order in a simple and effective way; (ii) faithfulness to
the meaning of the original n-ary relation; (iii) overall technical simplicity and
naturalness of the graph representation.
18 Marco Giunti et al.
In this final section, we show how the abstract graph model gives rise to a
new ontological pattern (parametric pattern) for representing n-ary relations in
the Semantic Web. To this end, we preliminarily define PROL (Parametric Rela-
tional Ontology Language). PROL is a simple ontological language, compatible
with RDF, which is designed to express an arbitrary n-ary fact (n≥1) as a para-
metric pattern. The vocabulary of PROL includes just 6 terms (2 RDF classes
and 4 RDF properties) defined by a simple RDFS ontology. Two terms (prol:type,
prol:next) serve to represent any n-ary fact as a parametric pattern. The re-
maining four terms (prol:Relation, prol:Domain, prol:hasPlaces, prol:represents)
serve to express the ontology that (a) defines the n-ary relations involved in the
facts to be represented, as well as the corresponding parametric binary relations,
and (b) allows for the correct detection and interpretation of the representing
parametric patterns.
5.1 PROL – Parametric Relational Ontology Language
In this subsection, we briefly review the six terms of PROL and the RDF triples
which fix their meaning. The complete RDFS ontology (TURTLE version) that
defines the PROL vocabulary is available at <http://semrapcon.altervista.org/
prol/prol.ttl>.7
The intended meaning of the term “prol:Relation” is the class of all n-ary
relations (n≥1). Recall that, according to the definition given in Sect. 2, any
n-ary relation is a class, intensionally understood, of ordered n-tuples. This can
be expressed by the following three RDF triples:
prol:Relation rdf:type rdfs:Class.
prol:Relation rdfs:subClassOf rdfs:Class.
prol:Relation rdfs:subClassOf rdfs:Seq.
The first and the second triple state that prol:Relation is a RDF class whose
elements are RDF classes as well. The third one states that every n-ary relation
is also a RDF sequence-container, that is to say, an entity for which it makes
sense to specify a first item, a second item, . . . , a n-th item, by means of the
RDF properties rdf:_1, rdf:_2, . . . , rdf:_n. Moreover, it is understood that any
such i-th item (1 ≤i≤n)is an i-th domain of the n-ary relation.
The intended meaning of the term “prol:Domain” is the class of all classes
that are domains of some n-ary relation. This is expressed by the following two
triples:
prol:Domain rdf:type rdfs:Class.
prol:Domain rdfs:subClassOf rdfs:Class.
The intended meaning of the term “prol:hasPlaces” is a RDF property that
expresses the arity nof a relation. Therefore, the domain of this property is the
7For the RDF/XML version: <http://semrapcon.altervista.org/prol/prol>.
Representing n-ary relations 19
class prol:Relation, while its range is the integer data-type of XML Schema, i.e.,
xsd:integer. This is conveyed by the following three triples:
prol:hasPlaces rdf:type rdf:Property.
prol:hasPlaces rdfs:domain prol:Relation.
prol:hasPlaces rdfs:range xsd:integer.
The intended meaning of the term “prol:represents” is a RDF property that
applies to a property and whose value is a n-ary relation of arity n≥2. The prop-
erty to which prol:represents applies is to be thought as the parametric binary
relation obtained from the n-ary relation by taking as parameters nindividuals
in a given order, except the first and the second one. The n−2parameters will
be specified by means of the RDF properties rdf:_3, . . . , rdf:_n. When n= 2,
this property has no parameter, and it can thus be identified with the n-ary
relation itself. This is partly expressed by the following four triples:
prol:represents rdf:type rdf:Property.
prol:represents rdfs:domain rdf:Property.
prol:represents rdfs:domain rdfs:Seq.
prol:represents rdfs:range prol:Relation.
The first three triples state that prol:represents is a RDF property, which
always applies to properties that are sequence-containers as well; the fourth one
states that the range of prol:represents is the class of all n-ary relations.
The term “prol:type” stands for a RDF property that applies to an individ-
ual, and has as value a n-ary (n≥1) relation. This is expressed by the following
three triples:
prol:type rdf:type rdf:property.
prol:type rdfs:domain rdfs:Resource.
prol:type rdfs:range prol:Relation.
It is intended that the individual to which prol:type applies is always the
first node of an oriented linear graph, called parametric path, which is a straight-
forward RDF translation of an abstract graph model. The parametric path,
together with the triple that connects its first node to the n-ary relation by
means of prol:type, form a parametric pattern, whose overall intended meaning
is that the n-ary relation holds for the n-tuple of individuals determined by the
parametric path.
The first triple of a parametric path with n≥3individuals always has as
predicate the parametric property obtained from the n-ary relation by taking as
parameters all the nindividuals of the path except the first and the second one.
All the remaining n−2triples of the parametric path have as predicate the term
“prol:next”.
20 Marco Giunti et al.
The intended meaning of the term “prol:next” is thus a RDF property that
applies to arbitrary individuals and whose values are arbitrary individuals as
well. This is expressed by the following three triples:
prol:next rdf:type rdf:Property.
prol:next rdfs:domain rdfs:Resource.
prol:next rdfs:range rdfs:Resource.
When a parametric path has just two individuals, it is formed by just one
triple, whose predicate is the parametric property with 0parameters obtained
from the binary relation by taking as parameters the 2individuals of the path
except the first and the second one. This 0-parameter property can be identified
with the binary relation itself.
Finally, when a parametric path has just one individual, it does not include
any triple, and the whole parametric pattern thus reduces to the single triple
that connects the unique individual of the path to the unary relation by means
of the prol:type property.
5.2 How to define in PROL a n-ary relation, the corresponding
parametric property, and the parametric pattern that
represents a n-ary fact in which the relation is involved
Having defined in RDFS all the terms of PROL, it is now possible to use them
to define n-ary relations, as well as the parametric properties that represent
them. Finally, we will be able to use these relations and properties, together
with the properties prol:type and prol:next, to implement parametric patterns
that represent corresponding n-ary facts. Depending on the arity n≥1of the
relation to be defined, three different cases must be considered. We give below
a typical example for each of the three cases. The complete ontology (TURTLE
version) with the three examples of this section, as well as those of Sect. 4, is
available at <http://semrapcon.altervista.org/prol/onto/prol_example.ttl>.8
Case 1 (n≥3). Example: Christine has breast tumor with high prob-
ability
Suppose we want to represent the statement: Christine has breast tumor with
high probability. By the analysis previously discussed (Sect. 3, par. 2) we get:
(Christine) has (breast tumor) with (high) probability. Thus, according to this
analysis, the given statement involves the three individuals Christine, breast
tumor, high, in this order, and the ternary relation ()has()with()probability.
The ternary relation ()has()with()probability can be defined by means of
the following RDF triples, which employ the three terms prol:Relation,
prol:hasPlaces, prol:Domain, as well as terms of the RDF or RDFS vocabulary:
8For the RDF/XML version: <http://semrapcon.altervista.org/prol/onto/prol_
example>.
Representing n-ary relations 21
ex:R_-has_-with_-probability rdf:type prol:Relation.
ex:R_-has_-with_-probability rdfs:label "()has()with()probability"@en.
ex:R_-has_-with_-probability prol:hasPlaces "3"^^xsd:integer.
ex:R_-has_-with_-probability rdf:_1 ex:HumanBeing.
ex:HumanBeing rdf:type prol:Domain.
ex:HumanBeing rdfs:comment "The class of all human beings."@en.
ex:R_-has_-with_-probability rdf:_2 ex:Disease.
ex:Disease rdf:type prol:Domain.
ex:Disease rdfs:comment "The class of all diseases of human beings."@en.
ex:R_-has_-with_-probability rdf:_3 ex:QualProbValues.
ex:QualProbValues rdf:type prol:Domain.
ex:QualProbValues rdfs:comment "The class of all qualitative probability val-
ues."@en.
The first two triples state that ex:R_-has_-with_-probability is a n-ary re-
lation whose English label is “()has()with()probability”, while the third triple
states that its arity is 3. The second three triples state that the first domain
of the ternary relation ex:R_-has_-with_-probability is the class of all human
beings. The third three triples state that the second domain of the ternary
relation ex:R_-has_-with_-probability is the class of all diseases of human be-
ings. The last three triples state that the third domain of the ternary relation
ex:R_-has_-with_-probability is the class of all qualitative probability values.
We then define the parametric property which is obtained from the ternary
relation ()has()with()probability by taking as parameters the three individuals
involved in the fact to be represented, except the first two. Thus, in this particular
case, there is just one parameter, the third individual, which is the qualitative
probability value high. The definition is expressed by the following two RDF
triples, which employ the term prol:represents and the RDF term rdf:_3:
ex:_-has_-with_highPr-probability
prol:represents ex:R_-has_-with_-probability.
ex:_-has_-with_highPr-probability rdf:_3 ex:highPr.
We are finally in the position to represent the ternary fact (Christine) has
(breast tumor) with (high) probability by means of an appropriate paramet-
ric pattern, whose triples employ the previously defined ternary re-
lation ex:R_-has_-with_-probability and the parametric property
ex:_-has_-with_highPr-probability, as well as the two terms prol:type
and prol:next:
ex:christine prol:type ex:R_-has_-with_-probability.
ex:christine ex:_-has_-with_highPr-probability ex:breastTumor.
ex:breastTumor prol:next ex:highPr.
22 Marco Giunti et al.
The last two triples of the parametric pattern form the parametric path that
is a straightforward PROL translation of the abstract graph model of Figure 6.
The first triple completes the parametric pattern by connecting the first individ-
ual (Christine) of the parametric path to the ternary relation by means of the
property prol:type. The whole parametric pattern is shown in Figure 10.
ex:_-has_-with_highPr-probability
prol:type
prol:next
ex:cristine
ex:R_-has_-with_-probability
ex:highPrex:breastTumor
Fig. 10. The parametric pattern for: Christine has breast tumor with high probability
Case 2 (n= 2). Example: The Divine Comedy is written by Dante
Suppose we want to represent the statement: The Divine Comedy is written by
Dante. We first analyze this statement in the obvious way: (The Divine Comedy)
is written by (Dante). Thus, according to this analysis, the given statement
involves the two individuals The Divine Comedy and Dante, in this order, and
the binary relation ()is written by().
The binary relation ()is written by() can be defined by means of the fol-
lowing RDF triples, which employ the three terms prol:Relation, prol:hasPlaces,
prol:Domain, as well as terms of the RDF or RDFS vocabulary:
ex:R_-isWrittenBy_- rdf:type prol:Relation.
ex:R_-isWrittenBy_- rdfs:label "()is written by()"@en.
ex:R_-isWrittenBy_- prol:hasPlaces "2"^^xsd:integer.
ex:R_-isWrittenBy_- rdf:_1 ex:WrittenText.
ex:WrittenText rdf:type prol:Domain.
ex:WrittenText rdfs:comment "The class of all written texts."@en.
ex:R_-isWrittenBy_- rdf:_2 ex:WrittenTextAuthor.
ex:WrittenTextAuthor rdf:type prol:Domain.
ex:WrittenTextAuthor rdfs:comment "The class of all authors of written
texts."@en.
The first two triples state that ex:R_-isWrittenBy_- is a n-ary relation whose
English label is “()is written by()”, while the third triple states that its arity is
2. The subsequent three triples state that the first domain of the binary relation
Representing n-ary relations 23
ex:R_-isWrittenBy_- is the class of all written texts. The last three triples state
that the second domain of the binary relation ex:R_-isWrittenBy_- is the class
of all authors of written texts.
We then define the parametric property which is obtained from the binary
relation ()is written by() by taking as parameters the two individuals involved
in the fact to be represented, except the first two. Thus, in this case, there is
no parameter. The definition is expressed by the following RDF triple, which
employs the term prol:represents:
ex:_-isWrittenBy_- prol:represents ex:R_-isWrittenBy_-.
We are finally in the position to represent the binary fact (The Divine Com-
edy) is written by (Dante) by means of an appropriate parametric pattern, whose
triples employ the previously defined binary relation ex:R_-isWrittenBy_- and
the parametric property ex:_-isWrittenBy_-, as well as the term prol:type:
ex:divineComedy prol:type ex:R_-isWrittenBy_-.
ex:divineComedy ex:_-isWrittenBy_- ex:dante.
The parametric pattern for the case n= 2 is shown in Figure 11.
ex:_-isWrittenBy_-
prol:type
ex:divineComedy
ex:R_-isWrittenBy_-
ex:dante
Fig. 11. The parametric pattern for: The Divine Comedy is written by Dante
Case 3 (n= 1). Example: Pluto is a dog
Suppose we want to represent the statement: Pluto is a dog. We first analyze this
statement in the obvious way: (Pluto) is a dog. Thus, according to this analysis,
the given statement involves the individual Pluto and the unary relation ()is a
dog.
The unary relation ()is a dog can be defined by means of the following RDF
triples, which employ the three terms prol:Relation, prol:hasPlaces, prol:Domain,
as well as terms of the RDF or RDFS vocabulary:
ex:R_-dog rdf:type prol:Relation.
24 Marco Giunti et al.
ex:R_-dog rdfs:label "()is a dog"@en.
ex:R_-dog prol:hasPlaces "1"^^xsd:integer.
ex:R_-dog rdf:_1 ex:Animal.
ex:Animal rdf:type prol:Domain.
ex:Animal rdfs:comment "The class of all animals."@en.
The first two triples state that ex:R_-dog is a n-ary relation whose english
label is “()is a dog”, while the third triple states that its arity is 1. The last three
triples state that the domain of the unary relation ex:R_-dog is the class of all
animals.
We are finally in the position to represent the unary fact (Pluto) is a dog by
means of an appropriate parametric pattern. In this case (n= 1), the parametric
path has just one individual, so that it does not include any triple. The whole
parametric pattern thus reduces to the single triple that connects the unique in-
dividual of the path to the unary relation ex:R_-dog by means of the prol:type
property:
ex:pluto prol:type ex:R_-dog.
The parametric pattern for the case n= 1 is shown in Figure 12.
prol:type
ex:pluto
ex:R_-dog_-
Fig. 12. The parametric pattern for: Pluto is a dog
6 Conclusion
The problem of representing n-ary relations in the Semantic Web originates
from a fundamental expressive limit of RDF based ontological languages, such
as RDFS and OWL, which only allow for the direct representation of binary
relations. In this paper, we have developed a new twofold solution to this prob-
lem. First (sec. 4), we have described an abstract graph model for representing
n-ary relations. Through this model, it is possible to represent an arbitrary n-ary
fact, in a standard and principled way, by means of statements that only involve
Representing n-ary relations 25
binary relations. Furthermore, our model fares better than the usual relation
reification model on three issues: the order problem, the meaning problem and
the subject problem. Second (sec. 5), we have shown how our abstract graph
model can be transformed into an actual ontological pattern, the parametric
pattern, by means of PROL, a new and simple ontological language compatible
with RDF.
As a final remark, we would like to add that the parametric pattern can
also be used to express all the standard connectives and quantifiers of a first
order language. This can be obtained by means of FOOL (First Order Ontology
Language), a natural ontological extension of PROL, compatible with RDF and
at least as expressive as any first order language. Each first order formula, once
expressed in FOOL, turns out to be a connected RDF graph made up of the
parametric patterns that represent all its subformulas (Giunti [10]; Giunti et al.
[11]). These further developments lead us to conjecture that it will eventually
be possible to express the whole complex of our knowledge as linked data, thus
actually realizing the original vision of the Semantic Web.
References
1. Berners-Lee T., Hendler J., Lassila O. (2001). The Semantic Web. Scientific Amer-
ican, 284(5), pp. 28-37.
2. Brachman R. J. (1985). On the epistemological status of semantic networks. In
Brachman R. J. and Levesque H. J. (eds.), Readings in knowledge representation.
Los Altos CA: Morgan Kaufmann, pp. 191-215.
3. Brachman R. J., Levesque H. L. (2004). Knowledge representation and reasoning.
San Francisco: Morgan Kaufmann.
4. Deliyanni A., Kowalski R. A. (1979). Logic and semantic networks. Communica-
tions of the ACM, 22(3), pp. 184-192.
5. Galton A. (1995). Time and Change for AI. In Gabbay D. M., Hogger C. J.,
Robinson J. A. (eds.), Handbook of logic in Artificial Intelligence and Logic Pro-
gramming. Vol. 4. Oxford: Clarendon Press, pp. 175-240.
6. Gangemi A. (2008). Norms and plans as unification criteria for social collectives.
Autonomous Agents and Multi-Agent Systems,16(3), pp. 70-112.
7. Gangemi A., Presutti, V. (2013). A multi-dimensional comparison of ontology de-
sign patterns for representing n-ary relations. In van Emde Boas P. et al. (eds.),
SOFSEM 2013: Theory and practice of computer science. Berlin: Springer, pp.
86-105.
8. Gangemi A., Presutti, V. (2016). Multi-layered n-ary patterns. In Hitzler P. et al.
(eds.), Ontology engineering with ontology design patterns. Berlin: AKA Verlag,
pp. 105-131.
9. Giunti M. (2010). Grafi pesati e relazioni n-arie: un approccio generale
all’organizzazione automatica di dati secondo rapporti di rilevanza. In Storari P.,
Gola E. (eds.), Forme e formalizzazioni. Cagliari: CUEC Editrice, pp. 229-245.
10. Giunti M. (2017). How to FOOL the expressive power of RDF. Triennial Inter-
national Conference of the Italian Society for Logic and Philosophy of Science.
https://doi.org/10.13140/RG.2.2.36509.10723
11. Giunti M., Sergioli G., Vivanet G., Pinna S. (2019). Representing n-ary relations
in the Semantic Web. MBR18_SPAIN 20th Anniversary – Model-Based Reasoning
26 Marco Giunti et al.
In Science and Technology, University of Seville (Spain), 24-26 October 2018.
https://doi.org/10.13140/RG.2.2.10713.36960
12. Gruber T. (2009). Ontology. In Ling Liu, Tamer Özsu M. (eds.), Encyclopedia of
database systems. New York: Springer, pp. 1963-1965.
13. Hempel C. G. (1952). Fundamentals of concept formation in empirical science.
Chicago: The University of Chicago Press.
14. Hobbs J. R. (1985). Ontological Promiscuity. In Mann W. C. (ed.), Proceedings of
the 23rd annual meeting of the Association for Computational Linguistics. Chicago:
Association for Computational Linguistics, pp. 60-69.
15. Magnani L., Nersessian N., Thagard P. (eds.) (1999). Model-Based Reasoning in
Scientific Discovery. New York: Springer US.
16. Magnani L., Bertolotti T. (eds.) (2017). Springer Handbook of Model-Based Sci-
ence. Cham: Springer CH.
17. Masolo C., Vieu L., Bottazzi E., Catenacci C., Ferrario R., Gangemi A., Guarino N.
(2004). Social roles and their descriptions. In Welty C., Dubois D. (eds.), Principles
of knowledge representation and reasoning: Proceedings of the ninth international
conference (KR2004). Menlo Park (CA): AAAI Press, pp. 267-277.
18. Oliver A., Smiley T. (2004). Multigrade predicates. Mind, 113(452), pp. 609-681.
19. Quine W. V. O. (1951). Two dogmas of empiricism. The Philosophical Review,
60(1), pp. 20-43.
20. Sowa J. F. (1992). Semantic networks. In Shapiro S. C. (ed.), Encyclopedia of
Artificial Intelligence. 2nd edition. New York: Wiley, pp. 1493-1511.
21. Welty C., Fikes R. (2006). A Reusable Ontology for Fluents in OWL. In Bennett
B., Fellbaum C. (eds.), Formal Ontology in Information Systems. Proceedings of
the Fourth International Conference (FOIS 2006). Amsterdam: IOS Press, pp. 226-
236.
22. W3C (2004). RDF Semantics. W3C Recommendation, 10 February 2004. http:
//www.w3.org/TR/2004/REC-rdf-mt-20040210
23. W3C (2006). Defining n-ary relations on the Semantic Web. W3C Working Group
Note, 12 April 2006. http://www.w3.org/TR/swbp-n-aryRelations
24. W3C (2014). RDF Schema 1.1. W3C Recommendation, 25 February 2014. http:
//www.w3.org/TR/2014/REC-rdf-schema-20140225