reps_of_logic_5 - ITACS | International Technology Alliance ...

schoolmistInternet και Εφαρμογές Web

22 Οκτ 2013 (πριν από 3 χρόνια και 7 μήνες)

176 εμφανίσεις

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

1

22/10/2013


Copyright © IBM 2009

1

Purpose

To define how
logical statements
may

be
explicitly
represented in
ontologies
expressed in
semantic web technologies
.

This document concentrates on basic logical
statements; a subsequent piece of work will define the representation of statements in
more complex logics.


This work is a deliverable of the ITA programme, project 12 task 2 “Collective
Intelligence and the Web”, for Q1 of the BPP09.

2

Introduction

We take an ontology to include
information on

structure (such as classes and
properties
) toget
her with

logical relationships between structural elements (such as
temporal relations between tasks to be undertaken in parallel). Such logical
relationships provide a reasoner with a “licence to entail” defining what new
information may be inferred from
any given state of knowledge and allows the
developer of applications or computer agents to know what may or may not be
inferred from other data. For example, an ontology of temporal relations would allow
a temporal reasoner to infer information about timi
ng constraints on tas
ks based on
temporal relations with other tasks

(
this reasoning is

used in the work reported in

[CPMEVAL]).


The semantic web technology

family of languages, OWL,
provides some inbuilt
logical relationships between structural elements
which may be used to capture and
represent information of relevance, and may be used by reasoners to infer new
information about entities represented in that ontology; these are the OWL
entailments. However, i
n constructing an
ITA
ontology for planning in
OWL, called
the Col
laborative Planning Model (CPM) [CPM]

it has been discovered that
the
inbuilt logical relations and the corresponding entailments are not sufficient
to
represent all that is needed in a model of planning.
An example has already been
give
n, that of temporal constraints (even OWL 2 is not able to represent some of these
constraints);
further

example
s are given in [PREDS, RECL
].


It is e
xpected that the
creation of on
tologies of other domains may also face the problem of lack of
expressibili
ty of the OWL family of languages.


It is therefore necessary to define how these more complex logical statements may be
represented and embedded within an OWL ontology. This will allow
, for example,

the definition of the logic and axioms of planning conc
epts within the CPM
. This
document proposes a
design

for how logical relationships may explicitly be embedded
within an OWL ontology
.
As

part of the ITA BPP09 project 12 task 2 (“Collective
Intelligence and the Web”), aimed at representing ontologies more
generally, it is
hoped that the proposed logical representation will be of relevance to other parts of
the ITA and more generally within the OWL community.
To this end, this document
describes general techniques,
and does not r
equir
e

an understanding of CP
M. There is
a separate document [
THISINCPM
]
, written under the BPP09 Project 12 task 3
(“Shared Understanding and Collaborative Planning”)

that defines how
the
CPM will
use the logic,
together with

a CPM
-
specific example.


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

2

22/10/2013


Copyright © IBM 2009

There are a number of different t
ypes of logics, and we have chosen to split
our effort
in to two parts:
bas
ic logics, such as First Order Predicate L
ogic (FOPL)
,

and
specialist logics, such as temporal logics. This document focuses on the first part, the
basic logics, and we have chosen
FOPL as the

gold standard


on which to
concentrate.
Future work will be undertaken, based on this document, to design a
representation for the specialist logics.


However, a key requirement for representing logic in the CPM (and
we believe more
generally

in other reasoning applications
) is the representation of rationale, whereby
the reasoning steps undertaken by reasoners (human and machine) are captured and
communicated to other collaborative problem solvers (such as the co
-
planners in a
multi
-
level col
laborative planning task)

[CPMRAT]
. We believe that rationale is a
fundamental part of the representation, and not something that may be grafted on at a
later date,
so this document also designs the representati
on of rationale as a core
component
. This doe
s require logics more “specialist”

than

FOPL, such as
assumption
-
based reasoning, so these logics, although specialist
,

are included in this
document.


A further
key
requirement

is that the human user (e
.
g
.

a planner) must be able to
understand the logical

relations and their implications as part of achieving a shared
understanding

with other collaborating humans
.

The achievement of

this requirement
is a significant research task, and will be addressed during the later stages of the
BPP09. However one of th
e starting points is that a Controlled Natural Language

(CNL)
, such as Common Logic Controlled English (CE) [CE] or Rabbit [Rabbit]
,
may be used as the

“human face” of the logic, to provide statements about the logic

in
a subset of English that is understa
ndable and unambiguous. This design takes
the use
of a CNL

into consideration.


T
his is a fir
st draft of the document, issued

for the purpose of discussion.

It is
acknowledged that there are several areas where further detailed proposals need to be
made, a
nd this will be done either in later versions of this document, o
r in the
subsequent
ITA
research in
to a proposal for more specialised logics.

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

3

22/10/2013


Copyright © IBM 2009

3

Possible Components


This section
reviews

the components that have been considered in the design. The
proposed
s
election and
combination

of some of these components is given in the next
chapter
.


It is not intended that these sections provide an exhaustive review of the app
roaches
cited in the literature, since
the focus
has been guided by existing
approaches

taken
over the last 3 years in the ITA programme.

3.1

Semantic Web languages


The semantic web defines a family of languages that may be used to represent entities
and their properties [RDF] and
ontologies to define
the structure and logic of the

entities

[RDFS],
[
OWL]
.

Each of these languages define
s

differing degrees of
structure, logic and semantics.


It is
one of the threads

in
the ITA programme’s effort in
ontologies and representation
that
a

semantic web
language

b
e used where possible. T
he precise selection

of this
language is not
prescribed
, although there is some preference for OWL
-
DL.


In this document it is assumed that
basic entities and properties are

represented in
RDF triples, but no assumptions are made as to the nature of the ontology language to
b
e used. To cover this situation the
(bespoke)
notation

RDF/S/OWL


is used as a
generic term for the ontology language.

3.2

First Order Predicate Logic (
FOPL
)


It i
s desirable to use an expressive

logical language when seeking to represent logical
expressions
and axioms in an ontology. It is not possible to define at this stage the
maximum expressibility needed for a planning (or any other) model. However it
seems reasonable that full first order predicate logic is at least a good candidate,
especially as other

relevant logics, such as assumption
-
based logic, may be expressed
in terms of FOPL, e.g. see [ATMS]
.


It may be that the actual language used as the syntactic basis for representing the logic
is not as powerful as FOPL. However it is still desirable to re
tain FOPL in some form
as the “gold standard” in which any proposition may be expressed on paper even if it
cannot be represented
digitally
in the chosen XML
-
based syntax.

3.3

Common Logic


Common Logic is an ISO standard framework for expressing logics up to

FOPL. [CL].

Common Logic

provides a semantics and several syntaxes for expressing logic,
including C
ommon Logic Interchange Format (CLIF)

a mathematical form based on
the round
-
bracket style of LISP. For example the statement that “Socrates is a man”
may

be stated as:


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

4

22/10/2013


Copyright © IBM 2009


(man Socrates)


and the statement that all men are mortal may be stated as:



(forall (x) (if (man x) (mortal x)))


Whereas this form is not easily readable by end users (such as military planners) it is
readable and writeable by mathemati
cally
-
inclined

readers.


There
is a more complex language, IKL,
[IKL]
that is
an extension

to Common Logic
.
It

is “extended with the ability to talk about the propositions that its own sentences
express”.

Such extension

could be useful for modelling of ag
ent’s beliefs and even
assum
ption
-
based reasoning. A
t present, IKL has not been s
elected for use in the
proposal, although t
his may change during the research into more specialist logics that
will be undertaken in the future.


3.4

R
ules in Semantic Web languag
es


There are a number
of
init
iatives for representing logic (usually in the form of rules)
in semantic web languages, such as RIF

[RIF
-
FLD] and RuleML [RULEML]
.

The
RIF specificati
on is particularly notable for

its

emphasis on the formal semantics of
the
language

(a fact confirmed by communication with the working group chair)
, and
the semantics of the correspondence between RIF (specifically RIF
-
BLD) and RDF. It
is principally for this reason that RIF is proposed as part of the design.


RIF
is a
set of
W3

draft standard
s

designed
to provide

a framework for representing
logics, in terms of the semantics of that logic, a mathematical presentation logic and
an XML serialisation. The
most
general level is defined by RIF
-
FLD (Framework for
Logic Dialects), whic
h
provides

a set of structures for constructing logics, each
structure having a
formal
semantics and syntax. It is the intention that different
dialects be constructed to represent different levels of expressivity

(reduced in
its
syntactic and semantic
com
plexity

in
comparison to
the generic
RIF
-
FLD)
, each
dialect being defined for a particular purpose or type of reasoning application. For
example there are
three

dialects currently defined

as draft W3 standards:





RIF
-
CORE
[RIF CORE],
based on definite Horn

clau
ses without function
symbols (i.e. “d
atalog

).



RIF
-
PRD
(Production Rule Dialect) [RIF
-
PRD],
intended for reasoning
applications that utilise Condition
-
Action
production

rul
es
.



RIF
-
BLD
(Basic Logic Dialect) [RIF
-
BLD],
based on
Horn clauses with
equa
lity.


The representation and semantics of datatypes is further defined in [RIF
-
DTB].


RIF
-
BLD is a key component to the proposal (although an extension
to it
is also
proposed, as described in the next chapter). RIF
-
BLD allows the use of And, Or,
Forall,
Exists, logical “implies”, variables, predicates, functions and a frame+slot
representation of objects. However it does not allow the use of negation nor does it
allow the use of disjunction on the conclusion of an “implies”. It is this former
r
estriction

that is unacceptable, and for which an extension needs to be found.

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

5

22/10/2013


Copyright © IBM 2009


RIF
-
BLD also defines the details of a mapping between the semantics of RIF
-
BLD
and RDF/S/OWL (i.e. all of the variant
s of the

semantic web languages). This is also
a key reason to select

RIF in the proposal, and is described in the next chapter.

3.5

Rationale

As noted above, the representation of rationale is a key requirement, to cover such as
aspects as representing the reasoning steps and assumptions used and to determine the
dependencies

between premises and conclusions in the cognitive artefact (e.g a plan).


There is no standard for representing rationale within RIF
. There is a working draft
for a language to represent proofs, PML [PML], although there are in the author’s
view some unr
esolved questions relation to the represent
at
ion in PML.


There is also
an existing, but bespoke, representation of rationale in the CPM
[CPMRAT]
, and it was decided that this representation should be upgraded to be
compatible with RIF.


3.6

Human Readability


There is a requirement
for a human readable textual
version

of the logical expressions,
by means of a Controlled Natural Language. Common Logic Controlled English

[CE]
has been

designed to be a CNL for Common Logic, and has been used extensively in
the IT
A. It is therefore considered as a suitable starting point for the proposal.


In fact CE has been extended in the ITA work to include a form of universally
quantified rules, with an informal semantics similar to that of RIF
-
BLD.

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

6

22/10/2013


Copyright © IBM 2009

4

Proposed Approach

4.1

Design

Decisions

The following components have been selected for the solution:




Common Logic,
as the
“gold standard”
f
or writing logical expressions (
should
other languages
prove insufficiently expressive)

because:

o


it is an ISO standard for FOPL

o

it provides a m
athematical form (CLIF) that is readable



Common Logic Controlled English (CE), as the “human face” of the logical
expressions, because:

o

it was originally intended as the CNL for Common Logic, although it
has been modified for use in the ITA

o

there is inves
tment in the ITA on existing parsers and inference
engines based on CE



RDF/S/OWL as the semantic web technology language, because:

o

these are the standards for the semantic web

o

these are the fundamental ontology languages for the ITA



RIF as the specificatio
n language for logics, because:

o

it is an emerging W3C standard for rule interchange

o

it provides a syntactic and semantic framework for defining different
logic subsets (or dialects)

o

it focuses heavily on the definition of the formal semantics of the logic
languages

o

it provides an XML serialisation of the logic




A semi
-
bespoke representation for rationale, integrating RIF and RDF/S/OWL,
based on
a new
besp
oke ontology

for RIF and
the existing ITA rationale
ontology
, because:

o

no other alternative was found to

be totally acceptable

o

This
retains

the
semantic
integration of RDF/S/OWL and RIF

o

significant investment has
already
been made

on the definition and
successful
use of the ITA rationale ontology

4.2

Example
s

To assist the description of the proposed solution,
two examples have been
constructed. The first, “Socrates revisited”, is a simple example of a single rule being
applied. The second, “temporal propagation rule”, is a more complex example based
upon a real inference that is defined for the CPM.



The Socra
tes example will be used within the text to il
lustrate the proposed approach.
The

temporal ex
ample
, being more focussed on the CPM,
will be given in a separate
document, relating to the specific use of this representation in CPM. [THISINCPM]

4.2.1


Socrates revi
sited


There is a traditional logical example based on the mortality of men and Socrates in
particular. This has been extended slightly here to exercise the use of frame slots and
type definitions in RIF

(see below for definition of RIF)
, and Assumptions i
n the
rationale
.

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

7

22/10/2013


Copyright © IBM 2009


The essential logic is

contained in a single inference (actually a “universal rule” as
defined
in a later section
)
:





All Greek Philosophers are mortal




Given the

following fact and assumption
:





Socrates is a Philosopher




It is a
ssumed

that Socrates is Greek


we may come to the following conclusion:





Socrates is mortal


as long as
(i.e. in all possible worlds where)
we hold the assumption of the
Greek
-
ness
of Socrates.


This
universal rule will be
given a name and some metadata
:





name= ex:1d27


creator = ex:DHM


T
his example cannot be represented in OWL 1.1 or
OWL
2, due to the need to
represent Assumptions, and the construction of truth values on the basis of
the

assumptions
that
are held.


The

examp
le uses the following sh
ortened namespace

for
the URIs of the entities:



ex

=

http://thisexample#


and the following namespaces for the representational infrastructure:



log

="http://logicalRepresentation#"


rir

="http://rifInRDF#"


rif

="http://www.w3.org/2007/rif#"


The compl
ete XML for this example is given in Appendix A.

4.3

Universal Rules

In common parlance, the term “rule” is frequently used to describe something that
generates new information from old information in a logical way. However this
terminology is quite confusing
and mixes up the concept of a rule of inference (i
.
e
.

a
process that does actually take a set of “premise” logical formulae and generate a
“conclusion” logical formula) and a logical implication (i.e. a logical formula that
connects two other logical formu
lae via an “implies” connective).


The common
parlance “rule

application
” is usually used to refer to

a combination of
the universally quantified logical implication
,

of the
CLIF
form:



(forall (v1 v2 … vn)

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

8

22/10/2013


Copyright © IBM 2009



(implies


premise statement


co
nclusion statement


))


together with

the application of
a

rule of inference that binds the variables to entities
in the logical universe, creating a specific instance of the “implies” formula, where the
variables are bound to entities in the universe s
o that the
premise statement
s

are true
in the universe, and then u
sing

modus pon
ens to entail the

conclusion
(with variables
bound)
as a new fact.


Such a situation
is called in RIF
-
FLD

a “universal rule”, and this terminology will be
used here. It should
be noted that this is not the only possible type of log
ical rule or
rule

of inference that could exist
.


We will also call a particular application of modus ponens in this way a “universal
rule application” (though this is not RIF terminology). Thus a univ
ersal rule
application is an instantiation of the implies statement wi
th a particular set of variable
bindings
, followed by the entailment of the instantiated conclusion statement.


Such universal rules form a significant component to many rule
-
based syste
ms, and
are in fact the only f
orm of reasoning in the example

given in this paper. However the
proposed approach does not exclude
other possible combinations of rule of inference
and logical
formulae
.

4.4

Common Logic
Controlled English

(CE)

The

example contai
ns a logical inference and an instance of an entity with attributes
on which, and about which, the inference is made.
The instances and the rule
s

may be
defined in Controlled English

(CE)
.


For the simple Socrates example, the instances are (in CE):



the
thing

Socrates is a philosopher.


it is assumed that


the
thing

Socrates has the value Greek as nationality.


and the logical inference is:



if


( the thing

X is a philosopher ) and


( the
thing

X has the value Greek as nationality )


then


( th
e
thing

X is a mortal )


.


From which it may be concluded

(using the normal interpretation of a universally
quantified rule

with X as a variable
)
:



the
thing

Socrates is a mortal.


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

9

22/10/2013


Copyright © IBM 2009

Alt
hough this

CE is readable, it
is a basic version of the language
,
and
with higher
level extensions

it could be made more elegant

[HCNL]
.

In addition the type of
“thing” (the topmost type) is used because the use of any other more
English
-
like

type
(such as “person”) would add implications (
e.g.
that Socrates is a person) tha
t are not
warranted by the definition of the example.

4.5

Common Logic


The logic
al formulae

of the initial facts and the
logical inference

may also be defined
in Common Logic, using the CLIF serialisation.
[CL]


The initial facts may be represented as:



(phi
losopher socrates)


(nationality socrates greek)


The
rule may be expressed as

a universally quantified logical implication
, i
.
e
.

a
“universal rule”
:



(forall (x)


(if


(and (philosopher x)


(nationality x greek)


)



(mortal x)


))


And the conclusion
, drawn by the process of “universal rule application”

may be
expressed:


(mortal socrates)


Note that this example
does not
represent
assumptions

explicitly
, which will require
additional “logical infrastructure”
on top of basic Common Logic.

4.6

RDF Triples

The proposed approach is intended for use when the relevant entities and their
relations are represented as RDF triples. In the Socrates example

the classes are:



ex:Philosopher


ex:Mortal


the entity is:



ex:Soc
rates


and the property is:



ex:nationality


The set of triples is

as follows (given the base namespace as being “ex”)
:

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

10

22/10/2013


Copyright © IBM 2009



<ex:Philosopher rdf:about="#Socrates"/>




<rdf:Description rdf:about="#Socrates">



<ex:nationality
r
df:datatype="http://www.w3.org/
2001/XMLSchema#string">








http://thisexample#Greek</ex:nationality>


</rdf:Description>





<ex:Mortal rdf:about="#Socrates"/>



4.7

RIF

4.7.1

Dialects

and Negation

Two dialects of RIF have been considered during the preparation of this proposal:




RIF
-
FLD, the
generic Framework for Logic Dialects



RIF
-
BLD, the Basic Logic Dialect


RIF
-
BLD provides reduced expressibility of logic, and in particular does not provide a
representation of negation. The semantics of negation is complex and has alternative
formulations
(eg negation
-
as
-
failure), and in the context of the semantic web there are
ongoing discussions as to whether it is
open or closed, whether it is monotonic and
what sort of negation should be used.

Thus the selection of a semantics of negation
has significa
nt implications on the modelling capabilities of an ontology language.


RIF
-
FLD provides a greater expressibility of logic and allows for alternative semantic
definitions of negation. However RIF
-
FLD does not provide an explicit semantic
mapping to RDF (wh
ich RIF
-
BLD does).


Although we have not decided upon the most suitable semantics of negation in the
general context of the semantic web, we feel

that the lack of negation
might

cause
serious
issues in the definition of CPM concepts, and we are reluctant t
o opt for a
logic such as RIF
-
BLD that will
,

in advance
,

not permit any form of negation (other
than by the
bespoke
definition of application
-
level negation concepts and their logical
implications). I
t is
therefore
proposed that
:


1)

The RIF
-
FLD generic diale
ct be used for now

2)

The restrictions imposed by RIF
-
BLD
(apart from the non
-
existence of
negation) will be retained. In particular the restrictions relating to RDF

(i.e. the
use only of type, class membership and frames

for representing the
propositions abo
ut the world
)
will be retained
to allow us to
use

the semantic
m
apping to RDF

3)

No decision about the semantics of negation will be made at this stage.
When
further work is done on specialist logics (i.e. in the Q2 of the BPP09) this will
be considered. As a

result, a new dialect of RIF, containing RIF
-
BLD +
negation may possible be constructed.

4.7.2

Mapping

between RIF
-
BLD and RDF/S/OWL


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

11

22/10/2013


Copyright © IBM 2009

According to the
RIF
-
BLD RDF C
ompatibility

document

[
RIF
-
COMPAT
]
,
there are
mappings between the syntax of
RDF triple
s

and cert
ain RIF
-
BLD syntactic
components
:


RIF Concept

RDF triple

RIF
-
BLD

Syntax

isa

sss rdf:type ooo

sss’ # ooo’

獵扣污獳

獳猠牤s猺s畢u污獳佦潯

sss’ ## ooo’

晲a浥⁳汯m

獳猠灰瀠潯p

⡷桥牥⁰灰⁩猠
湯琠牤n㩴y灥爠
牤r猺s畢u污獳佦F

sss’[ppp’
-
>ooo’]



where sss’,

ppp’ and ooo’ are the RIF symbols corresponding to the RDF symbols (in
practice, the symbols in RIF are written using compact IRIs, which are the same as in
RDF; see
[RIF
-
COMP
AT
]

section 3).

The Compatibility
document
defines the
semantics of these mappin
gs to ensure that the
equivalent RDF and RIF
-
BLD

statements have the same semantics.

It should also be noted that the RIF
-
BLD syntax
is also the RIF
-
FLD syntax
(from which it is inherited)
but it is only RIF
-
BLD that
defines the semantics of the RDF to RIF
-
BLD mapping.


Such a mapping in the Socrates example generates the foll
owing corresponde
nces:


RIF Concept

RDF triple

RIF
-
BLD

Syntax

isa

ex:Socrates rdf:type ex:Philosopher

ex:Socrates # ex:Philosopher


ex:Socrates rdf:type ex:Mortal

ex:Socrates # ex:Mo
rtal

frame slot

ex:Socrates ex:nationality ex:Greek

ex:Socrates[ex:nationality
-
>


ex:Greek]


Thus
, if
logic

written in RIF
-
BLD
is

to
be used in t
he RDF context (as in the CPM),
then the
logic

must
be restricted to

the
RIF
-
BLD syntact
ic constructs defined above to
reference RDF/S/OWL entities and properties.



The CE syntax is unaffected by this restriction,

but the mapping from CE to
RIF
-
BLD
Presentation Syntax and XML Serialisation will be.


Common Logic does not contain a frame
-
base
d syntax, and represents all properties
as:



(prop subj obj)


Thus this restriction does not affect the writing of Common Logic versions of the
logic.


Is there any real difference in the semantics of frames/slots and properties?


Does this have a signifi
cant effect, other than the p
sychological “focus” on the
subject in the case of RIF and the property in the case of CL and the lack of focus in
the triple representation?


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

12

22/10/2013


Copyright © IBM 2009

The mapping defined above may be used,

in effect,
to define the

reification of an RD
F
triple in RIF
-
BLD (and since we are retaining this mapping in this proposal, a
reification of an RDF triple in our proposed language).

Therefore, n
o additional
reification mechanism will be proposed.

4.7.3

RIF
-
FLD
P
resentation

s
yntax



L
ogical formula
e, such a
s universal rules,

may be stated in
RIF
-
FLD

Presentation
syntax
, as per the specification [RIF
-
FLD]
, as long as the RIF
-
BLD restrictions
defined above are adhered to
.



For the Socrates example, the universal rule may be written

as a Forall with an
embedde
d implication
connective
( :
-

):




Forall ?X (And (?X # ex:Philosopher


?X[ex:nationality
-
> ex:Greek])




:
-




?X # ex:Mortal)


Note that the implication is reversed syntactically, with
the

implication being written
i
n the style “conc :
-

ante”.


However this must be embedded with
in

a complete RIF
-
FLD Document, and it is
proposed to re
present each universal rule as
a

Forall (with op
tional metadata) within a
Group, as in the following RIF presentation syntax:



Documen
t (




Dialect(FOL)



Prefix (ex http://thisexample#)




Group (






(* ex:id27 ex:id27[dc:create
-
> ex:DHM] )





Forall ?X (And (?X # ex:Philosopher


?X[ex:nationality
-
> ex:Greek])




:
-




?X # ex:Mortal)




))


This adds the namespace prefixes, the dialect (First Order Logic) and the meta data
(id
and creator using Dublin Core)
about the universal rule.


Should there be different conventions defined for placing other types of logical
implication as and whe
n they are needed?

4.7.4

RIF
-
F
LD
Universal Rule
XML Serialisation

From the Presentation Syntax, it is possible to derive an XML serialisation, according
to the RIF
-
FLD document.


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

13

22/10/2013


Copyright © IBM 2009

In the Socrates example, the XML serialisation of the universal rule
from the
Prese
ntation Syntax
is:


<?xml version="1.0"?>

<!DOCTYPE Document [


<!ENTITY rif "http://www.w3.org/2007/rif#">


<!ENTITY dc "http://purl.org/dc/terms">


<!ENTITY ex "http://thisexample#">

]>



<Document xmlns="http://www.w3.org/2007/rif#"


xmlns:xsi="http://
www.w3.org/2001/XMLSchema
-
instance"


xsi:schemaLocation="http://www.w3.org/2007/rif#
FLDSkyline.xsd">


<payload>



<Group>




<sentence>





<Forall>






<id><Const type="&rif;iri">&ex;#id27</Const></id>






<meta>







<Frame>








<object>









<
Const type="&rif;iri">&ex;#id27</Const>








</object>








<slot ordered="yes">









<Const type="&rif;iri">&dc;create</Const>









<Const type="&rif;iri">&ex;#DHM</Const>








</slot>







</Frame>






</meta>






<declare><Var>X</Var></de
clare>






<formula>







<Implies>








<if>









<And>










<formula>











<Member>












<instance>













<Var>X</Var>












</instance>












<class>













<Const type="&rif;iri">














&ex;Philosopher<
/Const>












</class>











</Member>










</formula>










<formula>











<Frame>












<object>













<Var>X</Var>












</object>












<slot ordered="yes">













<Const type="&rif;iri">














&ex;
nationality</Const>

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

14

22/10/2013


Copyright © IBM 2009













<Const type="&rif;iri">














&ex;Greek</Const>












</slot>











</Frame>










</formula>









</And>








</if>








<then>









<Member>










<instance>











<Var>X</Var>










</instance>










<class>











<Const type="&rif;iri">












&ex;Mortal</Const>










</class>









</Member>








</then>







</Implies>






</formula>





</Forall>




</sentence>



</Group>


</payload>

</Document>


It should be n
oted that, as described below,
although this is a
valid RIF representation
of the universal rule, it is NOT the one that will actually be used. In this proposal we
will
actually
use an embedding of this file as a RIF ontology.



This Document

fails to conf
orm to the published schema (FLDSkyline.xsd), but so
does the reference example (Hamlet.rif), so it is assumed that the schema is incorrect.

4.7.5

Embedding the RIF into an OWL ontology

The RIF file show above is in XML, but it is not an RDF XML file. However we

wish
to use RIF within the RDF context (e
.
g
.

by adding the RIF for the more realistic
temporal rule example to a CPM OWL ontology defining temporal entities). There are
several possible ways to combine a RIF file with an OWL ontology
, including
:




maintain

separate OWL and RIF files, and define a mechanism for cross
referencing entities (e
.
g
.

via the RIF meta ids) and a mechanism for
maintaining the unity of the two files (e
.
g
.

via some form of “import”).



define an OWL ontology for RIF, and use that to emb
ed the RIF into an OWL
document

(such as is done for SWRL)


None of these mechanisms have been defined in the RIF specification, so any
solution must be bespoke. We consider that the
second route is the most flexible and
elegant, and an ontology of RIF is
partially developed, at the time of writing, called
“RIF in RDF” or “RIR”.


Each RIF entity (Document, Group, Forall, Implies, etc) is defined as an entity in the
RIR ontology, with properties relevant to
that

RIF entity. For example,
the RIF
ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

15

22/10/2013


Copyright © IBM 2009

formula for
an “isa”, defined in RIF presentation syntax as X # Y, is held in the RIR
ontology as an “Isa” with two properties (
subject to represent the X and type to
represent the Y):



<owl:Class rdf:about="http://rifInRDF#Isa"/>


<owl:DatatypeProperty rdf:about="h
ttp://rifInRDF#subject">


<rdfs:domain rdf:resource="http://rifInRDF#Isa"/>


</owl:DatatypeProperty>



<owl:DatatypeProperty rdf:about="http://rifInRDF#type">


<rdfs:domain rdf:resource="http://rifInRDF#Isa"/>


</owl:DatatypeProperty>


For example
the RIF fragment:



<Member>



<instance>




<Var>X</Var>



</instance>



<class>




<Const type="&rif;iri">






&ex;Philosopher</Const>



</class>


</Member>


is represented as the OWL/RDF fragment:



<rir:Isa rdf:about="#isa1">



<rir:subject



rd
f:datatype="http://rifInRDF#Var">X</rir:subject>



<rir:type rdf:datatype="http://rifInRDF#Const">


http://thisexample#Philosopher</rir:type>


</rir:Isa>


Here the datatype of the properties (subject and type) defines whether the reference is
to a con
stant (such as ex:Philosopher) or a variable (such as X).


The RIR ontology, in a partial state of completion is given in Appendix B.


The complete embedding of the
Scorates
example
universal rule
, via RIR

into a RDF
file is:


<rdf:RDF


xmlns:rdf="http://
www.w3.org/1999/02/22
-
rdf
-
syntax
-
ns#"


xmlns:rir="http://rifInRDF#"


xmlns:rif="http://www.w3.org/2007/rif#"


xmlns:ex="http://thisexample#"


xml:base="http://thisexample"


>



<rir:Document rdf:about="#doc1">



<rir:dialect
rdf:datatype="http://www.w3.or
g/2001/XMLSchema#string">FOL</rir:diale
ct>



<rir:payload rdf:resource="#group1"/>


</rir:Document>


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

16

22/10/2013


Copyright © IBM 2009


<!
--

the group in the document contains the rule
--
>


<rir:Group rdf:about="#group1">



<rir:sentence rdf:resource="#forall1"/>


</rir:Group>



<rir:Foral
l rdf:about="#forall1">



<rir:meta rdf:resource="#meta1"/>



<rir:declare rdf:datatype="http://rifInRDF#Var">X</rir:declare>



<rir:formula rdf:resource="#implies1"/>


</rir:Forall>




<rir:Implies rdf:about="#implies1">



<rir:if rdf:resource="#and1"/>



<rir:then rdf:resource="#isa2"/>


</rir:Implies>




<!
--

And (?X # ex:Philosopher ?X[ex:nationality
-
> ex:Greek])
--
>


<rir:And rdf:about="#and1">



<rir:formula rdf:resource="#isa1"/>



<rir:formula rdf:resource="#frame1"/>


</rir:And>




<!
--

?X #
ex:Philosopher
--
>


<rir:Isa rdf:about="#isa1">



<rir:subject rdf:datatype="http://rifInRDF#Var">X</rir:subject>



<rir:type
rdf:datatype="http://rifInRDF#Const">http://thisexample#Philosopher</
rir:type>


</rir:Isa>



<!
--

?X[ex:nationality
-
> ex:Greek]
-
-
>


<rir:Frame rdf:about="#frame1">



<rir:subject rdf:datatype="http://rifInRDF#Var">X</rir:subject>



<rir:frameSlot rdf:resource="#slot1.1"/>


</rir:Frame>




<!
--

A frameslot is an threesome of subject, slot, value



Note this corresponds to the struc
ture of a triple (where value ==
object)




--
>


<rir:FrameSlot rdf:about="#slot1.1" >



<rir:slot
rdf:datatype="http://rifInRDF#Const">http://thisexample#nationality</
rir:slot>



<rir:value
rdf:datatype="http://rifInRDF#Const">http://thisexample#Greek</ri
r:va
lue>


</rir:FrameSlot>





<!
--

?X # ex:Mortal
--
>


<rir:Isa rdf:about="#isa2">



<rir:subject rdf:datatype="http://rifInRDF#Var">X</rir:subject>



<rir:type
rdf:datatype="http://rifInRDF#Const">http://thisexample#Mortal</rir:t
ype>


</rir:Isa>



<!
--

m
etadata re id and author of rule (uses Dublin Core)
--
>




<rir:MetaData rdf:about="#meta1">

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

17

22/10/2013


Copyright © IBM 2009



<rir:metaID
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://thisexa
mple#id27</rir:metaID>



<rir:metaFrame rdf:resource="#frame4"/>


</rir:MetaData
>



<!
--

ex:id27[dc:creator
-
> ex:DHM])
--
>



<rir:Frame rdf:about="#frame4">



<rir:subject
rdf:datatype="http://rifInRDF#Const">http://thisexample#id27</rir:sub
ject>



<rir:frameSlot rdf:resource="#slot4.1"/>


</rir:Frame>




<rir:FrameSlot rdf:about="#s
lot4.1">



<rir:slot
rdf:datatype="http://rifInRDF#Const">http://purl.org/dc/terms/creator
</rir:slot>



<rir:value
rdf:datatype="http://rifInRDF#Const">http://thisexample#DHM</rir:valu
e>


</rir:FrameSlot>


4.7.6

Correspondence between RDF and RIR

Given the mappi
ng between RIF and the RIR ontology (outlined above) and the
mapping between RIF
-
BLD and RDF (defined in the
Compatibility

document and
outlined above), it is possible to
infer

a mapping between the RIR ontology and RDF

triples
.


To map between a RIR “isa”

(ie SUBJECT # TYPE) and RDF:




<rir:Isa rdf:about="XXX">




<rir:subject
rdf:datatype="http://rifInRDF#Const">SUBJECT</rir:subject>




<rir:type
rdf:datatype="http://rifInRDF#Const">TYPE</rir:type>



</rir:Isa>




transforms

to
:






<TYPE rdf:abou
t="SUBJECT"/>


Note that the
Isa has an identity XXX which is lost in the mapping.


To map between a RIR frame (ie SUBJECT[ SLOT
-
>VALUE]) and RDF:





<rir:Frame rdf:about="XXX">




<rir:frameSlot rdf:resource="YYY"/>



</rir:Frame>





<rir:FrameSlot rdf:
about="YYY">




<rir:subject
rdf:datatype="http://rifInRDF#Const">SUBJECT</rir:subject>




<rir:slot
rdf:datatype="http://rifInRDF#Const">SLOT</rir:slot>

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

18

22/10/2013


Copyright © IBM 2009




<rir:value
rdf:datatype="http://rifInRDF#Const">VALUE</rir:value>



</rir:FrameSlot>



transforms t
o:






<rdf:Description rdf:about="SUBJECT">




<SLOT rdf:dataType=XXX>VALUE</SLOT>



</rdf:Description>




where XXX is a type suitable for the type of the constant in the slot value
.




Note that in these transformations only Const is used, since
it is
not possible to

map a
pattern


(i
.
e
.
an Isa or Frame with a variable in it) into an
explicit
RDF triple
.


Since this is essentially a syntactic mapping (the
RIR
ontology just being another
XML serialisation

of RIF
) it is not thought necessary to construct
a complete formal
semantics of this ontology, but merely to p
oint out the syntactic mappings, as above.





Further work may be necessary to ensure the
full
definition of datatype mapping.

4.7.6.1

Adding the RIF
-
F
LD rules to the OWL ontology

The
domain

OWL ontolog
y
(such as CPM)
must reference
,

or in some way contain
,

the
logical relations

that are part of the ontology and are represent
ed in RIF
-
F
LD. The
relationship could be one of:




the ontology as a whole could have a property that is the complete set of
logical

relations

for the ontology



each entity in the ontology could have a property that is the set of
logical
relations

that relate to the entity; for example those
universal
rules that contain
the entity in either premise or conclusion


It is proposed that
th
e first type of relationship
be

represented,
using a

LogicSet


entity in the
domain
ontology file, which has a “logicalRelation” property for each
logical formula that is part of the
domain
ontology.
The (informal) semantics of
LogicSet is that any logica
l formula contained in it is defined to be part of the
ontology in which the LogicSet is embedded.
Should the name of the embedding
ontology be explicitly held in the logic set, allowing it to be contained in a separate
file if required?



T
o show
this
in
the Socrates example,
it is
first

necessary to define the base
domain
ontology of philosophers and mortals,
since
it is into that ontology that the universal
rule must be placed. The following defines

a fragment of

the
domain ontology:



<owl:Class rdf:abo
ut="#Philosopher"/>


<owl:Class rdf:about="#Mortal"/>




<owl:DatatypeProperty rdf:about="#nationality"/>




and the universal rule maybe added to the domain ontology by:



<log:LogicSet rdf:about="#rules">

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

19

22/10/2013


Copyright © IBM 2009



<log:logicalRelation rdf:resource="#doc1"/>


</
log:LogicSet>


4.8

Rationale

4.8.1

The need for a new approach

Considerable investment has gone in to the development of
a

rationale model in the
ITA programme, in the expectation that it can be used to model assumption
-
based
reasoning and potentially even paraconsi
stency and defeasible reasoning.
Work on the
visualisation of rationale and of the detection of reasons for conflicts
[VISRAT]

and
the evaluation of the CPM in multilevel planning [CPMEVAL]
has already been
undertaken using this representation.
So it is de
sirable to consider whether
this
approach is adequate or whether another approach should be taken.


The main disadvantages of the current approach are:




The representation is
bes
poke
, and

has required a modelling of logical
formulae; something that other
standard approaches are already doing

in
different ways



There is no formal semantics of the current representation. It is not thought
logically
impossible to provide such a semantics, but
it is complex and
to date
this has not been performed.



The rationale

representation must be consistent with the representation of the
logical formulae themselves, since a reasoning step is typically the result of
the application of a rule of inference on a logical formula. Thus
if we are
proposing the use of RIF, then
our
solution must be tightly integrated to RIF,
which currently is not the case.


Yet there do
es

not seem to be an obvious,
alternative
satisfactory
standard
approach.
RIF in particular does not define how
any form of rationale may be represented, never
mind
a
ssumption
-
base
d reasoning
.


One obvious candid
ate

is
the Proof Markup Language (PML)

[PML]
, developed by
one of the ITA contributors. However an initial review of PML has raised in the
author’s mind some questions about its use to capture the sorts of rati
onale already
captured in the current solution:

on whether it is possible to embed structured XML
representation of logical formulae as opposed to strings of KIF; on how reification of
RDF entities is done so that the relation between RIF formulae and the
equivalent
RDF triples are formed; the lack of an explicit Assumption entity; on the apparent
collocation of Assumption and inference (something that is explicitly separated in the
current CPM
rationale
solution); the semantics of NodeSets.


At the time of

writing, discussion is continuing about these points. However a
resolution has not yet been achieved and so a proposal for rationale not based on PML
is outlined below. It may be that in the future this proposal (or PML itself) be revised
to come more in
line with each other.

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

20

22/10/2013


Copyright © IBM 2009

4.8.2

Outline of
Proposed Rationale Model

In the
current
model of rationale constructed in the CPM, and that continued
in this
proposal
, rationale is considered to be a network of reasoning steps that link premises
to conclusions [CPMRAT
,
COL
-
RAT
]. In is most generic form it is intended to
capture a step in a
reasoning
process moving from existing information (or
propositions or facts) to new information. In most circumstances this will be a logical
step, a single application of a rule of i
nference, generating new information from old,
in such a way that the “new” conclusion information is logically entailed from the
“old” premise information. However we wish to retain the possibility that a reasoning
step may
also include

anything “reasonab
le”
undertaken by a human
reasoner

(eg
“intuition”)
, and may not therefore be strictly logical.


A reasoning step generates a (usually logical) dependency between propositions in the
universe of discourse, for example statements about plans. In the context

of RDF
artefacts, such as CPM plans, then the propositions are considered to be RDF triples
expressing entities and their properties.
However a proposition on its own is neither
true nor false, it merely expresses something that may or may not be truth, s
omething
that is truth
-
bearing. In order to define the truth value of a proposition, we introduce
the concept of a PropositionIndex, which refers to a proposition and states something
about the conditions under which it may be true. Such conditions may inc
lude:




it is universally true



it is assumed

to be true

(by an agent)



it is believed to be true
(
by an agent
)



it is true only at certain times


To represent some of

these cases there is a subtype of PropositionIndex, eg
UniversalPI and Assumption for the fi
rst two cases

respectively
.



A PropositionIndex
must
refer to a proposition about which it is stating a truth
condition, and this reference is obtain
ed

by a form of reification, as described below.


A reason
ing step connects propositions (
not PropositionI
ndexes
)
, since we assume
(like normal proofs) that the validity of the reasoning step itself is unaffected by the
belief status, etc of the premises. Thus in any possible world where the premises are
true then the conclusion
of a reasoning step
would be tr
ue.
(Whether the reasoning
step is actually made could be affected by the belief status of the premises, for
example there may be no point in reasoning from very uncertain premises. However
these considerations are about efficiency than logicality).


The a
ctual truth values of propositions
(in any given possible world)
are then defined
by the truth support through the netw
ork of rationale built from
reasoning steps and
PropositionIndexes. Some typical cases might be:




proposition A is supported by a Univers
alPI; therefore A is deemed as being
true in all possible worlds



proposition A is supported by a UniversalPI, and there is a reasoning step
where B is entailed from A; therefore B is deemed as being true in all possible
worlds

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

21

22/10/2013


Copyright © IBM 2009



proposition C is supported by

an Assumption A1; therefore C is deemed to be
true is all possible worlds where that assumption A1 is held



proposition C is supported by an Assumption A1, and there is a reasoning step
where D is entailed from C; therefore D is deemed to be true in all th
ose
worlds where assumption A1 is held


Note that the situation is more complex than these cases suggest. For example in the
fourth case, one should not conclude that in those worlds where A1 does not hold D is
NOT true, since there may be other truth sup
port pathways for D in these worlds. Also
it is possible that the creation of an assumption may lead logically to an inconsistency,
and it is necessary to decide how such inconsistencies are handled; for example
should the assumption be unmade in such worl
ds, thus removing the inconsistency,
as
might be required for defeasible reasoning,
or should the

inconsistency merely be
noted, as might be required for handling paraconsistency.


In addition, for generality
,
we propose that the logical formulae used in r
easoning
steps are
themselves

given truth by virtue of their support; thus logical formula
e
, or
even universal rules
might

themselves be assumed (thus permitting the construction of
assumed reasoning systems in other agents heads).
However we do not model
the
possibility that the rules of inference themselves change, only the formulae that are
used by a rule of inference to generate conclusions.


We
expect

that these structures will allow the modelling of more complex logical
systems such as paraconsistency
, assumption
-
ba
sed reasoning, and multiple agent
belief systems.

Many of the ideas for this model of rationale have been derived from
the work in ATMSs, [ATMS].


However we recognise that the nature of RDF triples as being propositions rather than
facts (
i
.e.

the existence of an RDF triple in a triple store does not of its own mean that
it is true)
may

introduce complexities.

There may be an advantage in adopting extra
conventions in certain applications, such as that all RDF triples are supported by
Univer
salPIs, and are hence universally true. Further research would be required to
establish the utility of such conventions.

4.8.3

ReasoningSteps as entailments

A ReasoningStep in its most generic form
is intended to capture a step in a process
moving from existing
information (or propositions or facts) to new information. This
is most likely to be a logical entailment, whereby a
Rule of Inference
is applied to

“premise” logical formulae (including “facts” and other more complex logical
relations such as Implies) to

produce further “conclusion” logical formulae.

However,
as noted above,
it is desirable to retain the generic idea of
a “reasoning step”
, and not
restrict it to pure logical entailment. Human “reasoners” may
legitimately
use
processes other than pure log
ic (eg intuition
, telepathy ?
) to come to conclusions, and
it is necessary to capture such non
-
logical reasoning if required.


However
, for the purpose of t
his document, which is focused

on the application of
pure logic, it will be taken that a ReasoningSt
ep
has

a subclass called Entailment, and
this subclass is the only type of
more specific
ReasoningStep to be considered.


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

22

22/10/2013


Copyright © IBM 2009

In the discussion below the term “entailment” will refer to the logical process itself
(of applying a rule of inference to premises) a
nd the term “Entailment” will refer to
the
rationale ontology
class that records the occurrence of an instance of entailment.

Similarly “reasoning step” refers to the human or automated reasoner’s process in
reasoning, whereas “ReasoningStep” refers to the

rationale ontology class that records
the occurrence of a reasoning step.


An Entailment (in the
rationale ontology

class
sense) will have properties of:



An id



The type of Rule of Inference used



The set of logical formulae that were used as “premises” (th
is may include
atomic formulae

(corresponding to “simple
facts
”)
or the logical connectives
themselves such as an Implies
logical relation
)



The set of logical formulae that were derived as “conclusion” (this may also
include
atomic formulae

or derived logi
cal connective statements



The set of zero or more variables bound to logical formulae in the premises
(and hence in the conclusions)

as a result of applying the Rue of Inference
.


I
n this definition,
it is not assumed that the conclusion logical formulae a
re
all
atomic
formulae
,

nor that they
are
free of
unbound
va
riables. Thus, for example, an
e
ntailment
might

generate another Implies
logical relation
which may act
(in the
future)
as a
new

universal rule
.


The common case of
universal
rule app
lication may
be modelled as an E
ntailment
generated by modus ponens with the premises as:




the premise
atomic formulae



the universally quantified Implies

logical relation



the bindings of constants to variables


and the conclusion as:




the conclusion
atomic

formulae
.


H
owever in
this case the conclusions
must not contain
free
variables.


In
the previous rationale model (currently encoded in
CPM
)
, it is assumed
(erroneously) that there is a one
-
one correspondence between a reasoning step and the
application of a universal
ly quantified Implies, and that a ReasoningStep
(or now an
Entailment)
is actually a
universal
rule application. Indeed in the current CPM

ontology
, there is a property of ReasoningStep that is intended to point to the id of a
quantified Implies, and an in
stance of ReasoningStep is intended as an instance of the
application of that Implies.

However
in reality
this is not the only type of Rule of
Inference that might occur, and in general there is not a one
-
one correspondence
between rule of inference and a
quantified implies
. Thus it is proposed that the
current rationale

representation be mor
e generic
,
and

the definition of Entailment
above breaks this one
-
one correspondence
.


An example of a specific Entailment entity is given in a later section.

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

23

22/10/2013


Copyright © IBM 2009

4.8.4

The link
ing of Entailments and
RIF
-
F
LD

This key aspect of this rationale proposal is that
RIF
-
FLD may be used to represent
the logical formulae in an Entailment
, that is the premises (including the logical
formula of a universal rule) and the conclusions.


Since w
e have defined the RIR

ontology to embed
RIF in RDF
, then this may be used
to define the RIF logical formulae

as RDF entities
, and the
Entailment

may point

directly to these RIR formulae (RDF entities).


There are other components to an Entailment that may

not easily be represented in
RIF, that is the id, the variable bindings and the rule of inference used. These entities
are therefore represented as basic bespoke (but newly defined)
rationale ontology

entities.


The representation of rationale is therefor
e a hybrid of RIF (in the form of RIR) and
bespoke

entities. However a
ll of these entities are
embedded in an OWL ontology, so
at the RDF level there is no apparent hybridisation
of RIF and OWL
(as might
have
occur
red

if the pure XML serialisation of RIF w
ere used).


The desire to represent all logical formulae (basic facts and logical relations) in a
single consistent manner (thus allowing a new logical formula as output of an
entailment) rules out the alternative possibility of using an rdf:Statement to
represent
the basic facts, and pointing the Entailment at these Statements. This approach would
require a different representation for basic facts (Statemen
ts) and logical relations
(RIR), and is not therefore acceptable.

4.8.4.1

Propositions,
PropositionIndexes a
nd Reification

Rationale provides meta information about the logical relationships between basic
propositions. Thus rationale “talks about” propositions and assumptions
, and there has
to be a stage where a “level jump” occurs from the basic proposition lev
el to the meta
rationale level. S
uch a jump is
a “reification” of the basic entities into the meta level.


The use of PropositionIndexes
(
and
their subclasses such as
Assumptions
)

to hold the
truth values of propositions (in order to support assumption
-
bas
ed reasoning) requires
that these entities refer to the basic propositions about which they are stating truth
values.

In the context of RDF and OWL, the propositions are RDF triples, and so the
PropositionIndexes must in some way refer to RDF triples that
represent instances of
entities and their properties. Note that the existence of an RDF triple does not
necessarily mean that the triple is true; it is the truth support of the triple (via the
PropositionIndex) that defines the truth of a triple.


The refe
rence from PropositionIndex to RDF tripl
e may be established from the
mapping between

RIR and RDF described in an earlier sectio
n which is itself based
on the C
orrespondence
document
between RIF
-
BLD and RDF.
The PropositionIndex
will have a property calle
d “proposition” that refers to a RIF logical formula
embedded in the RDF as a RIR entity.
This RIR formula will correspond to the reified
RDF triple via the mapping defined ab
ove (in the section “Correspondence

between
R
DF and RIR
).


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

24

22/10/2013


Copyright © IBM 2009

For Assumptions (a sub
type of PropositionIndex) there is an additional “believedBy”
property that refers to an Agent that believes

the Assumption. (Agent is a rationale
ontology

class).


In the Socrates
example, we define the proposition that “Socrates is a philosopher” as
bein
g a universal truth (i.e. true in all possible worlds) by creating an instance of
UniversalPI (
a sub
-
type of PropositionIndex):




<log:UniversalPI rdf:about="#pi1">



<log:proposition rdf:resource="#r_isa1"/>


</log:UniversalPI>


This has a

proposition


property referring to an RIR entity reifying the RDF triple
“Socrates rdf:type Philosopher”. The RIR entity is:


<rir:Isa rdf:about="#r_isa1">



<rir:subject
rdf:datatype="http://rifInRDF#Const">http://thisexample#Socra
tes</rir:subject>



<rir:type
rdf:dat
atype="http://rifInRDF#Const">http://thisexample#Philo
sopher</rir:type>


</rir:Isa>


It is possible to consider that such RIR entities have a canonical form, i
.
e
.

all
references to the same proposition (
Socrates is a philosopher) are to the same
RIR
entity
, or equivalently all references to the triple “Socrates rdf:type Philosopher” are
to the same
RDF triple
. This would correspond to the nature of a proposition as being
a general statement of something that may or may not be true;
it does not make sense

to

have multiple “insta
nces” of the same proposition (although having different
instances of truth support in different worlds does make sense). I
ndeed one could
“name” the RIR entity with the string concatenation of the subject+property+object of
the RDF tr
iple, thus ensuring a canonical identity of the prop
osition or RIR entity.
However there may be complexities in maintaining canonical representations in
distributed environments, and
we
do not
wish to
enforce the restriction that the same
proposition has t
he same name in all ontologies in which it occurs.



In the Socrates example we also assume the proposition “Socrates is Greek”. Here we
construct an Assumption to provide this truth support, and that it is
assumed

by an
agent “Agent1” (which is also defin
ed here):




<log:Agent rdf:about="#Agent1"/>



<log:Assumption rdf:about="#ass1">



<log:proposition rdf:resource="#r_frame1"/>



<log:believedBy rdf:resource="#Agent1"/>


</log:Assumption>


In this case the reified
proposition is actually a frame
-
based p
roperty

(ex:Socrates[ex:nationality
-
> ex:Greek])
:



<rir:Frame rdf:about="#r_frame1">

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

25

22/10/2013


Copyright © IBM 2009



<rir:subject
rdf:datatype="http://rifInRDF#Const">http://thisexample#Socrat
es</rir:subject>



<rir:frameSlot rdf:resource="#r_slot1.1"/>


</rir:Frame>




<rir:FrameSlo
t rdf:about="#r_slot1.1" >



<rir:slot
rdf:datatype="http://rifInRDF#Const">http://thisexample#nation
ality</rir:slot>



<rir:value
rdf:datatype="http://rifInRDF#Const">http://thisexample#Greek<
/rir:value>


</rir:FrameSlot>


In the Socrates example the conc
lusion that “Socrates is

Mortal” may be represented
as the

RIR entity:



<rir:Isa rdf:about="#r_isa2">



<rir:subject
rdf:datatype="http://rifInRDF#Const">http://thisexample#Socrat
es</rir:subject>



<rir:type
rdf:datatype="http://rifInRDF#Const">http://thi
sexample#Mortal
</rir:type>


</rir:Isa>


This proposition does not have a PropositionIndex since, in this example, there is no
direct statement of its truth value, other than
its
being the conclusion of a universal
rule application.

(
Thus t
he rationale for
this proposition will be the Entailment
described
in a later section
).


We also define the truth support for the universal rule as being universally true

(here
the reference is to the RIF rule itself)
:



<log:UniversalPI rdf:about="#pi2">




<log:propositi
on rdf:resource="#forall1"/>


</log:UniversalPI>

4.8.4.2

Variable Bindings

In some entailments
, variables may be bound
to the variables in a quantified formula
.
Since there may be more than one
quantified formula

in the premise of the Entailment,
it is necessary t
o identify both the variable name and the
formula

in which it was
substituted. A variable binding will be represented as
a VarBinding object, with
vbVar, vbQuantified

and vbValue properties.


For example, the variable binding of X to Socrates may be repre
sented:




<log:VarBinding rdf:about="#vb1">



<log:vbQuantified rdf:resource="#forall1"/>



<log:vbVar rdf:datatype="http://rifInRDF#Var">X</log:vbVar>

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

26

22/10/2013


Copyright © IBM 2009



<log:vbValue
rdf:datatype="http://rifInRDF#Const">http://thisexample#Socrat
es</log:vbValue>


</log:Va
rBinding>



Note that the bound value here is a constant, but it is theoretically possible for
entailments to bind one variable to another (as in unification).

4.8.4.3

The
Entailment entity

The E
ntailment
entity
with its
properties outlined above is defined as an
RDF entity
with properties called:




log:premise



log:conclusion



log:ruleOfInference



log:varbinding


In the Socrates example
,
the Entailment corresponding to the universal rule application
is:



<log:Entailment rdf:about="#ent1">



<log:premise rdf:resource="
#r_isa1"/>



<log:premise rdf:resource="#r_frame1"/>



<log:premise rdf:resource="#forall1"/>



<log:ruleOfInference
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ModusPo
nens</log:ruleOfInference>



<log:varbinding rdf:resource="#vb1"/>



<log:con
clusion rdf:resource="#r_isa2"/>


</log:Entailment>



The premises are the RIR reifications of “Socrates is a philosopher” (r_isa1) and
“Socrates is Greek” (f_frame1) and the
universal rule
(forall1)
that was
used to
generate the conclusion “Socrates is Mo
rtal”

(r_isa2). The

Modus Ponens


rule of
inference was used
together with
the var
iable binding of X to Socrates (vb1)
.


This Entailment provides the
truth support to the conclusion “Socrates is mortal”.

4.8.4.4

Representing the ReasoningStep in RDF

All of the e
ntities for the reasoning step deriving the mortality of Socrates have now
been defined, and these are all RDF entities, with suitable cross linkages via RDF
properties.


Such
rationale
information may therefore be generated by reason
ers, passed via RDF
fi
les (for example
as

part of CPM plans), and read

in by other reasoners or logic
visualisers.


The entire set of entities

for the Socrates example

is provided in a single RDF file in
Appendix A. Howeve
r

in practise, the various sub components (basic entitie
s, RIF
rule definitions, rationale, etc) might be provided in separate RDF files.

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

27

22/10/2013


Copyright © IBM 2009

4.8.5

Other types of Rules of Inference

Other types of rules of inference
, appropriate to different types of logic could
be
represented as
Entailments with a different ruleOfInfere
nce property
. For example,
cons
traint based reasoning has its own rules of inference, such as “forward checking”
(although these could be derived from the use of multiple applications of basic logical
rules of inference). The advantage of so doing is that
the reasoning may be
represented in a more efficient manner and at a level of abstraction more appropriate
to the reasoning task.

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

28

22/10/2013


Copyright © IBM 2009

5

Issues still to be resolved


This proposal leaves some issues unresolved, as follows:




How is

negation to be represented



How
is the
formal
semantics of the assumption based rea
soning (and more
generally the PropositionI
ndex
-
based reasoning) to be defined and linked to
the semantics of RIF?



How is
assumption based reasoning
to be
represented in Common Logic?



How is Controlled Eng
lish to be mapped onto CLIF and RIF?


The ITA programme will address these issues as part of the next phase of work in this
area.

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

29

22/10/2013


Copyright © IBM 2009

6

Summary of Proposed Approach

The following principles are propos
ed to represent logic within semantic web
languages:




Common
Logic will be used as the underlying FOPL and will give the model
-
theoretic semantics of all logical statemen
ts used in the
domain
ontologies
.



A presentation syntax of Common Logic,
CLIF
,

will be the underly
ing “gold
standard” language for
documenting

the
logic, if required



All other
ontology logic
languages proposed below (or in the future) must
ultimately be translatable into CLIF, and thus the semantics of any statement
in any of these languages could ultimately be defined in terms of CL semantics.



It i
s not mandated that all

ontology

statements

actually be written in CLIF.
However it is possible that there may be
statements

defining concepts th
at
cannot be written in the ontology
languages (because they require more
expressive logics), and for these sen
tences CLIF must be used.



Common Logic
Controlled English
(CE)
will be used as a means of expressing
the logics in as close a form to English as possible.



It is intended that
CE

be used as the textual means of
communicating logic to
human end users
.

Logic
ians and developers may of course use the ontology
languages and CLIF for this purpose.




A mapping between CE and CLIF, and CE and RIF,
will

be defined to provide
an implied semantics of CE, and to permit the construction of CE parsers that
generate RIF an
d OWL.



Other C
ontrolled
N
atural Languages
, such as Rabbit, may be used, as long as
th
ey are mapped onto either CE, CLIF or RIF
.




H
igher level versions of CE
may also in the future

be defined,
and these must
be

mapped onto CE via the translation language al
ready defined

elsewhere
[HCNL]
.

In this way the higher level CNLs may acquire
formal
semantics.



Graphic visualisation may also be used

as a language to represent logic
statements
,
but the graphic widgets must

mapped onto CE, CLIF or RIF.



RIF will be used a
s the basis for representing logic in ontologies.
The use of
an existing
RIF
dialect unchanged is not proposed, however the principles and
semantics of RIF
-
FLD will be followed together with the restrictions of RIF
-
BLD to ensure the compatibility with, and

semantic mapping to
,

RDF.



Thus all logical formulae will be required to use the RIF
-
FLD frame
representation for entity properties and the RIF
-
FLD “isa” for defining
the
type

to which individuals belong.



However the exclusion of negation from RIF
-
BLD wil
l not be followed, and
thus a dialect somewhere between RIF
-
BLD and RIF
-
FLD will be constructed.
This will require a decision as to the semantics of negation in our context, and
this is still to be undertaken.



RIF
-
BLD (with extensions) thus provides a link

to RDF (by virtue of the
compatibility document) to Common Logic and CLIF (by virtue of the
semantics of RIF
-
BLD and the semantics of Common Logic) and CE (by
virtue of the linking between CLIF and CE). In this way RIF
-
BLD effectively
links all of the dif
ferent languages to a common semantics.



However an RIF
-
BLD XML document is not in RDF form, and cannot
directly be “embedded” in RDF.
Therefore an ontology of RIF in OWL (which
ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

30

22/10/2013


Copyright © IBM 2009

we call RIR) will be defined and used to embed the RIF statements in an OWL
on
tology.



There are no formal mechanisms in RIF
-
BLD to represent ration
ale, so
rationale
will be represented via a bespoke mechanism
, as a combination of
embedded

RIR entities and
bespoke
rationale OWL entities.

(These are based
on the existing
rationale ont
ology

entities).



Rationale comprises a network of reasoning steps, each step defining a move
from premises to conclusions. In the majority of cases

a reasoning step
will be
a representation of a

logical entailment
, containing information about the rule
of

inference used, the logical formulae in the premises (for the case of modus
ponens this may i
nclude universally quantified logical implications

and also
any variable bindings used) and the logical formulae in the conclusion



Proposition indexes are used to

provide truth values for the basic propositions
contained as premises and conclusions in the reasoning steps. Such proposition
indexes provide the conditions for truth values such as “universally true”,
“assumed true” “believed to be true”. The network of

proposition indexes,
assumptions and entailments provides the truth support pathways for
propositions, and such a representation may be used to build non
-
monotonic
reasoning systems.
In addition the rationale may be used to determine
provenanc
e and depen
dencies for entities and their properties.


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

31

22/10/2013


Copyright © IBM 2009

7

Conclusion

A proposal for the representation of logic within the
semantic web technology
languages has been made, based
where possible
upon the current standards. It has
been found that some areas are not covere
d by standards, and in such places bespoke
solutions have been proposed, based in part on the existing
ITA
rationale ontology

representations.

There are, however certain areas that still need further work.


A separate document [
THISINCPM
] is available to e
xplore how this representation
may be used specifically within the CPM.


It is hoped that this proposal

may be of use more gen
erally across the ITA programme.

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

32

22/10/2013


Copyright © IBM 2009

8

References

8.1

Standards


[CE]
Sowa, J., Common Logic Controlled English, March 2007,
http://www.jfs
owa.com/clce/clce07.htm


[CL]
Common Logic
-

A framework for a family of Logic
-
Based Languages,

ed. Harry
Delugach. ISO/IEC JTC 1/SC 32N1377, International Standards Organization Final
Committee Draft, 2005
-
12
-
13
http://cl.tamu.edu/docs/cl/32N1377T
-
FCD2470
7.pdf


[IKL]
Hayes, P. & Menzel, C.,
IKL Specification Document
.
http://www.ihmc.us/users/phayes/IKL/SPEC/SPEC.html


[OWL] OWL Web Ontology Language Reference, Feb 2004,
http://www.w3.org/TR/2004/REC
-
owl
-
ref
-
20040210/



[PML] Proof Markup Language (PML) P
rimer, McGuinness, D. L., et al.

Working Draft 04 October 2007,
http://inference
-
web.org/2007/primer/


[Rabbit]
Hart, G., Johnson, M. and Dolbear, C. 2008. Rabbit: Developing a Control
Natural Language for Authoring Ontologies.
In Proceedings of ESWC2008.


[RDF]
Resource Description Framework (RDF): Concepts and Abstract Syntax
,
Klyne G., Carroll J. (Editors), W3C Recommendation, 10 February 2004,
http://www.w3.org/TR/2004/REC
-
rdf
-
concepts
-
20040210/
.


[RDFS]
RDF Vocabulary Description Language 1.0: RDF Sche
ma
, Dan Brickley and
R. V. Guha, Editors, W3C Recommendation, 10 February 2004,
http://www.w3.org/TR/2004/REC
-
rdf
-
schema
-
20040210/



[RIF
-
BLD]
RIF Basic Logic Dialect

Harold Boley, Michael Kifer, eds. W3C Working
Draft, 3 July 2009,
http://www.w3.org/TR/20
09/WD
-
rif
-
bld
-
20090703/
.


[RIF
-
COMPAT]
RIF RDF and OWL Compatibility

Jos de Bruijn, editor. W3C
Working Draft, 3 July 2009,
http://www.w3.org/TR/2009/WD
-
rif
-
rdf
-
owl
-
20090703/
.



[RIF
-
CORE]
RIF Core Dialect
, Boley H., Hallmark G., Kifer M., Paschke A.,
Poll
eres A., Reynolds, D. (Editors), W3C Rule Interchange Format Working Group
Draft.
http://www.w3.org/2005/rules/wiki/Core
.


[RIF
-
DTB]
RIF Datatypes and Built
-
Ins 1.0
, Polleres A., Boley H. and Kifer M.
(Editors), W3C Rule Interchange Format Working Group Dr
aft. Latest Version
available at
http://www.w3.org/2005/rules/wiki/DTB
.



[RIF
-
FLD]
RIF Framework for Logic Dialects

Harold Boley, Michael Kifer, eds.
W3C Working Draft, 3 July 2009,
http://www.w3.org/TR/2009/WD
-
rif
-
fld
-
20090703/
.


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

33

22/10/2013


Copyright © IBM 2009

[RULEML] The Rule Markup

Initiative.
http://ruleml.org/

8.2

Papers

[ATMS]
de Kleer, J. (1986).
An assumption
-
based TMS.
Artificial Intelligence
,
28:127
-
162.


[COL
-
RAT] Mott, D., & Giammanco, C.
The Use of Rationale in Collaborative
Planning. Proceedings of the 2nd Annual Conference
of the International Technology
Alliance, London, UK, September 2008.


[CPM]
Mott
, D.. and Hendler. J.

"Progress on the Collaborative Planning Model,"
paper presented at the 1st Annual Conference of the International Technology
Alliance (ACITA), Maryland,
USA, 2007


[CPMEVAL]
Dorneich, M.C., Mott, D., Patel, J. & Gentle, E. (2009).
“Using a
Structured Plan Representation to Support Multi
-
level Planning”.
Proceedings of the
Knowledge Systems for Coalition Operations
, Southampton, United Kingdom, March


[CPMR
AT]
Mott, D., Representing Dependencies in CPM, ITACS, March 2008,
https://www.usukitacs.com/?q=node/2884


[HCNL]
Mott, D., and
Hendler,
J.,
“Layered Controlled Natural Languages”, 3rd
Annual Conferen
ce of the International Technology Alliance (ACITA), Maryland,
USA, 2009


[PREDS] Mott D., Thoughts on representation of more complex concepts for CPM ,
October 2008, ITACS,
https://www.usukitacs.com/?q
=node/4126


[RECL] Mott, D., Representing More Complex Logic in OWL, October 2008, ITACS
https://www.usukitacs.com/?q=node/4075


[THISINCPM] Mott, D. Representation of Logic in the CPM, in progress.



[VISRAT]
Mott,
D.,
“Visualising rationale in the CPM”, 3rd Annual Conference of
the International Technology Alliance (ACITA), Maryland, USA, 2009


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

34

22/10/2013


Copyright © IBM 2009

9

Appendix A


Socrates revisited

The complete XML of the Socrates example is provided below.

This imports t
he RIR
ontology, which is defined in part in appendix B.


<?xml version="1.0"?>


<!
--

sample usage of RIF to express more complex logic in RDF/S/OWL.
This includes the


embedding of RIF
-
FLD into RDF and the explicit representation of
rationale via entailm
ents.




This does not show a full OWL ontology for the embedded RIF;


this is currently being worked on.




D Mott, Copyright IBM UK Ltd 2009




v5




--
>

<rdf:RDF


xmlns:rdf="http://www.w3.org/1999/02/22
-
rdf
-
syntax
-
ns#"


xmlns:rir="http://rifInRDF#"


xmlns:rif="http://www.w3.org/2007/rif#"


xmlns:ex="http://thisexample#"


xml:base="http://thisexample"


xmlns:log="http://logicalRepresentation#"


>




<!
--

namespace rir is intended for the embedding of RIF into RDF,



namespace log is part of the existi
ng Collaborative Planning Model




created as part of the ITA project



namespace ex is for all entities in this example



--
>




<!
--

example of embedding RIF in RDF



Rule id27, creator DHM:




All Greek Philosophers are mortal






Sample reaso
ning:




Socrates is a Philosopher




We Assume that Socrates is Greek





THEREFORE




Socrates is mortal






All of the entities and relations are assumed to be in the
namespace http://thisexample#






The encoding below uses # (ie "isa") to represent

"is Philosopher"



and a frame with "nationality" slot ="Greek" to represent "is
Greek"






In addition, when the property of an embedded RIF entity can have
either a Var or



a Const (eg the subject of an Isa) then the type of the value (Var
or Const)



is encoded in the datatype of the value. This avoids the need to
have a further



Var or Const resource that is then pointed to, thus reducing the
amount of data.

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

35

22/10/2013


Copyright © IBM 2009



If this is "ethically unacceptable" then we will have to resort to



the additional Va
r/Const resources.






The premises and conclusions are held as normal RDF triples






It is not expected that normally all of this information will be
held in the same file.



This is done here for simplicity.






--
>




<!
--

the base ontology of philo
sophers and mortals
--
>




<owl:Ontology rdf:about="philosophers">



<owl:imports
rdf:resource="file:/C:/projects/ita/clce/newlogic/rifInOWL.owl"/>


</owl:Ontology>




<owl:Class rdf:about="#Philosopher"/>


<owl:Class rdf:about="#Mortal"/>




<owl:Datat
ypeProperty rdf:about="#nationality"/>






<!
--

this fragment defines a set of logical formulae to the ontology



In this case it is the rule above



--
>




<log:LogicSet rdf:about="#rules">



<log:logicalRelation rdf:resource="#doc1"/>


</log:LogicSet>






<!
--

RIF components
--
>




<rir:Document rdf:about="#doc1">



<rir:dialect
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">FOL</rir:diale
ct>



<rir:directive rdf:resource="#imp1"/>



<rir:payload rdf:resource="#group1"/>


</rir:Document>



<!
--

not used, but included to explore encoding of import. The
profile chosen is arbitrary
--
>


<rir:Import rdf:about="#imp1">



<rir:location
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://com.ibm
.motto/animport</rir:location>



<rir:profile
rd
f:datatype="http://www.w3.org/2001/XMLSchema#string">simple</rir:pr
ofile>


</rir:Import>



<!
--

the group in the document contains the rule
--
>


<rir:Group rdf:about="#group1">



<rir:sentence rdf:resource="#forall1"/>


</rir:Group>




<!
--

the rule



Fora
ll ?X (And (?X # ex:Philosopher ?X[ex:nationality
-
> ex:Greek])

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

36

22/10/2013


Copyright © IBM 2009




:
-




?X # ex:Mortal)






This rule is in RIF
-
FLD presentation syntax, and uses the shorthand
ex: to



represent the namespace http://thisexample#



--
>




<rir:Forall r
df:about="#forall1">



<rir:meta rdf:resource="#meta1"/>



<rir:declare rdf:datatype="http://rifInRDF#Var">X</rir:declare>



<rir:formula rdf:resource="#implies1"/>


</rir:Forall>




<rir:Implies rdf:about="#implies1">



<rir:if rdf:resource="#and1"/>



<rir:then rdf:resource="#isa2"/>


</rir:Implies>




<!
--

And (?X # ex:Philosopher ?X[ex:nationality
-
> ex:Greek])
--
>


<rir:And rdf:about="#and1">



<rir:formula rdf:resource="#isa1"/>



<rir:formula rdf:resource="#frame1"/>


</rir:And>




<!
--

?X # ex:
Philosopher
--
>


<rir:Isa rdf:about="#isa1">



<rir:subject rdf:datatype="http://rifInRDF#Var">X</rir:subject>



<rir:type
rdf:datatype="http://rifInRDF#Const">http://thisexample#Philosopher</
rir:type>


</rir:Isa>



<!
--

?X[ex:nationality
-
> ex:Greek]
--
>


<!
--

A frame is comprised of an object and set of FrameSlots on that
object.



The id scheme used here is just for convenience in this example
--
>


<rir:Frame rdf:about="#frame1">



<rir:subject rdf:datatype="http://rifInRDF#Var">X</rir:subject>



<rir:f
rameSlot rdf:resource="#slot1.1"/>


</rir:Frame>




<!
--

A frameslot is an threesome of subject, slot, value



Note this corresponds to the structure of a triple (where value ==
object)




--
>


<rir:FrameSlot rdf:about="#slot1.1" >



<rir:slot
rdf:datatyp
e="http://rifInRDF#Const">http://thisexample#nationality</
rir:slot>



<rir:value
rdf:datatype="http://rifInRDF#Const">http://thisexample#Greek</rir:va
lue>


</rir:FrameSlot>





<!
--

?X # ex:Mortal
--
>


<rir:Isa rdf:about="#isa2">



<rir:subject rdf:datatyp
e="http://rifInRDF#Var">X</rir:subject>



<rir:type
rdf:datatype="http://rifInRDF#Const">http://thisexample#Mortal</rir:t
ype>

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

37

22/10/2013


Copyright © IBM 2009


</rir:Isa>



<!
--

metadata re id and author of rule (uses Dublin Core)



Should id be an IRI?
--
>




<rir:MetaData rdf:about="#m
eta1">



<rir:metaID
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://thisexa
mple#id27</rir:metaID>



<rir:metaFrame rdf:resource="#frame4"/>


</rir:MetaData>



<!
--

ex:id27[dc:creator
-
> ex:DHM])
--
>



<rir:Frame rdf:about="#frame4">



<rir:s
ubject
rdf:datatype="http://rifInRDF#Const">http://thisexample#id27</rir:sub
ject>



<rir:frameSlot rdf:resource="#slot4.1"/>


</rir:Frame>




<rir:FrameSlot rdf:about="#slot4.1">



<rir:slot
rdf:datatype="http://rifInRDF#Const">http://purl.org/dc/terms/cre
ator
</rir:slot>



<rir:value
rdf:datatype="http://rifInRDF#Const">http://thisexample#DHM</rir:valu
e>


</rir:FrameSlot>



<!
--

propositions held as basic RDF triples.






Note that "normally" the existence of a triple



would be taken to mean that the trip
le is ture. However with the
scheme below,



metainformation about the triple determines the truth value of the
triple.



This allows us to do defeasible reasoning, paraconsistency etc etc.






This is equivalent to "quad stores" where there is an extra

metainformation



for each triple.






It may be better to have the convention that if a triple is present



and there is no explicit entities providing support (ie
PropositionIndexes



see below) then the triple is deemed to be universally true. This
w
ould cause



"normal" RDF files to fall back to the position that presence =
"true". But



of course there wil be issues about Negation and Negation
-
As
-
Failure.





The following correspondences between RIF and basic triple are used,
based on the



RIF
-
BL
D compatibility document:






RIF s[p
-
> o] corresponds to RDF (s p o) [condition 4]



RIF x # c corresponds to RDF (x rdf:type c) [condition 7]




ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

38

22/10/2013


Copyright © IBM 2009



It is assumed that the DRF is generated without any knowledge of
RIF, and hence the



transformatio
ns may apply to any RDF file. Thus there should be no
entities, values,



properties in the RIF namespace present in the RDF.






The XML transformation for condition 7 is:






<rir:Isa rdf:about="XXX">




<rir:subject
rdf:datatype="http://rifInRDF#Cons
t">SUBJECT</rir:subject>




<rir:type rdf:datatype="http://rifInRDF#Const">TYPE</rir:type>



</rir:Isa>






<==>






<TYPE rdf:about="SUBJECT"/>






The XML transformation for condition 4 is:






<rir:Frame rdf:about="XXX">




<rir:frameSlot rdf:
resource="YYY"/>



</rir:Frame>





<rir:FrameSlot rdf:about="YYY">




<rir:subject
rdf:datatype="http://rifInRDF#Const">SUBJECT</rir:subject>




<rir:slot rdf:datatype="http://rifInRDF#Const">SLOT</rir:slot>




<rir:value rdf:datatype="http://rifInRDF#Con
st">VALUE</rir:value>



</rir:FrameSlot>




<==>






<rdf:Description rdf:about="SUBJECT">




<SLOT rdf:dataType=XXX>VALUE</SLOT>



</rdf:Description>






where XXX is a type suitable for the type of the constant in the
slot value






Note that in these

transformations only Const is used, since we
cant map a pattern



(ie an Isa or Frame with a variable in it) into an RDF triple






However more adjustments need to be made in respect of the mapping
of datatypes (TBD)



--
>




<!
--

the basic RDF triples.

--
>




<!
--

ex:Socrates # ex:Philosopher
--
>



<ex:Philosopher rdf:about="#Socrates"/>




<!
--
ex:Socrates[ex:nationality
-
> ex:Greek])
--
>




<rdf:Description rdf:about="#Socrates">



<ex:nationality
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">
http://thisexa
mple#Greek</ex:nationality>


</rdf:Description>

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

39

22/10/2013


Copyright © IBM 2009





<!
--

ex:Socrates # ex:Mortal
--
>



<ex:Mortal rdf:about="#Socrates"/>




<!
--

RATIONALE
--
>




<!
--

we assert that the proposition that Socrates is a Philosopher
is universally true.







A

PropositionIndex states something about the truth of a
proposition, eg



true in all possibleworlds, true in this world, only true at a
certain time,



assumed to be true by an agent, believed to be true by an agent etc
etc.






UniversalPI is a subtype
of PropositionIndex, meaning universally
true in all



possible worlds (check
-

or is it just always true in this world)
-
-
>




<log:UniversalPI rdf:about="#pi1">



<log:proposition rdf:resource="#r_isa1"/>


</log:UniversalPI>



<!
--

This is the embedded
RIF formula for the proposition that
Socrates is a Philosopher.







In effect this is a reification of the corresponding triple as a
RIF formula,



since we can map this onto a triple using the transformations
described above.



But we assume that there
is only one unique triple of a given (s p
o)



To ensure this we could define a implied "ID" for each triple as
being the concatenation



of s + p + o.






We expect that there will be only 1 instance of an Isa or Frame
when the components



are identical
. Ie there is a canonical representation of these
entities.



How this is achieved expecially across distributed reasoning
systems is not defined here.



One way is to define the name of the Isa/Frame as the concatenation
of the



components.



--
>


<rir:
Isa rdf:about="#r_isa1">



<rir:subject
rdf:datatype="http://rifInRDF#Const">http://thisexample#Socrates</rir
:subject>



<rir:type
rdf:datatype="http://rifInRDF#Const">http://thisexample#Philosopher</
rir:type>


</rir:Isa>



<!
--

we ASSUME that Socrates is
Greek



An Assumption is a subtype of PropositionIndex, stating also the
agent that

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

40

22/10/2013


Copyright © IBM 2009



assumed it (Agent1)




--
>




<log:Agent rdf:about="#Agent1"/>



<log:Assumption rdf:about="#ass1">



<log:proposition rdf:resource="#r_frame1"/>



<log:believedBy rdf:re
source="#Agent1"/>


</log:Assumption>



<rir:Frame rdf:about="#r_frame1">



<rir:subject
rdf:datatype="http://rifInRDF#Const">http://thisexample#Socrates</rir
:subject>



<rir:frameSlot rdf:resource="#r_slot1.1"/>


</rir:Frame>




<rir:FrameSlot rdf:about="
#r_slot1.1" >



<rir:slot
rdf:datatype="http://rifInRDF#Const">http://thisexample#nationality</
rir:slot>



<rir:value
rdf:datatype="http://rifInRDF#Const">http://thisexample#Greek</rir:va
lue>


</rir:FrameSlot>



<!
--

Here we even provide the truth support
for the rule formula
itself,



stating that the rule/formula is universally true.






By providing rule truth status, we can model different agents
believing different



sets of rules, or provide support form rules that have been
generated by inference




rules.






NOTE we assume that the inference rules themselves CANNOT be
changed and therefore



do not require explicit truth support (they are always meta
-
true)







--
>




<log:UniversalPI rdf:about="#pi2">



<log:proposition rdf:resource="#forall
1"/>


</log:UniversalPI>



<!
--

The Entailment applies the Forall to the premises, by doing a
variable binding



and leads to a conclusion. Note that the forall itself is just
treated as another



premise formula. This allows great flexibility in the defi
nition of
the entailment.



Since the conclusion is also a formula, it is even possible to have
the conclusion



be another forall!






Entailment is actually a subclass of ReasoningStep, where some
reasonably logical



process is occurring



--
>



ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

41

22/10/2013


Copyright © IBM 2009


<lo
g:Entailment rdf:about="#ent1">



<log:premise rdf:resource="#r_isa1"/>



<log:premise rdf:resource="#r_frame1"/>



<log:premise rdf:resource="#forall1"/>



<log:ruleOfInference
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ModusPonens</l
og:ruleOf
Inference>



<log:varbinding rdf:resource="#vb1"/>



<log:conclusion rdf:resource="#r_isa2"/>


</log:Entailment>




<!
--

the variable binding of X to Socrates



Here the bound value is defined as a Const. Could it ever be a Var?



The syntax allows this,

but is it meaningful, eg in unification?



--
>




<log:VarBinding rdf:about="#vb1">



<log:vbQuantified rdf:resource="#forall1"/>



<log:vbVar rdf:datatype="http://rifInRDF#Var">X</log:vbVar>



<log:vbValue
rdf:datatype="http://rifInRDF#Const">http://this
example#Socrates</log
:vbValue>


</log:VarBinding>




<!
--

the conclusion (Socrates is Mortal). Note that there is no
PropositionIndex here,



since the support for the conclusion is just this entailment.



We have defined one premise to be universally true
, and one as an
assumption.



Also that the rule formula itself is universally true.



So in all those possible worlds where we hold the assumption
(Socrates is Greek)



there the conclusion will also hold. (Unless it leads to an
inconsistency in that wo
rld)






In a world that does not hold the assumption then this entailment
will not



generate the conclusion. This does not necessarily mean the
conclusion is false



in that world, since other support pathways could exist.






There could be other Pro
positionIndexes pointing to the conclusion,
prior or subsequent to



the Entailment, which would add a different pathway of support for
the conclusion



--
>




<rir:Isa rdf:about="#r_isa2">



<rir:subject
rdf:datatype="http://rifInRDF#Const">http://thisexa
mple#Socrates</rir
:subject>



<rir:type
rdf:datatype="http://rifInRDF#Const">http://thisexample#Mortal</rir:t
ype>


</rir:Isa>


</rdf:RDF>


ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

42

22/10/2013


Copyright © IBM 2009

10

Appendix B


A partial

ontology for RIF
-
FLD in OWL
(RIR)


A partial ontology for embedding RIF
-
FLD in OWL
, created i
n Protégé

is given
below:


<?xml version="1.0"?>

<rdf:RDF


xmlns:p1="http://logicalRepresentation#"


xmlns:owl="http://www.w3.org/2002/07/owl#"


xmlns="http://rifInOWL.owl#"


xmlns:rdfs="http://www.w3.org/2000/01/rdf
-
schema#"


xmlns:xsd="htt
p://www.w3.org/2001/XMLSchema#"


xmlns:rir="http://rifInRDF#"


xmlns:rdf="http://www.w3.org/1999/02/22
-
rdf
-
syntax
-
ns#"


xml:base="http://rifInOWL.owl">


<owl:Ontology rdf:about=""/>


<owl:Class rdf:about="http://logicalRepresentation#LogicSet"/>



<owl:Class rdf:about="http://rifInRDF#Equal">


<rdfs:subClassOf>


<owl:Class rdf:about="http://rifInRDF#Formula"/>


</rdfs:subClassOf>


</owl:Class>


<owl:Class rdf:about="http://rifInRDF#Isa"/>


<owl:Class rdf:about="http://rifInRDF#Implies
"/>


<owl:Class rdf:about="http://rifInRDF#And"/>


<owl:Class rdf:about="http://rifInRDF#Expr"/>


<owl:Class rdf:about="http://rifInRDF#Forall">


<rdfs:subClassOf rdf:resource="http://rifInRDF#Formula"/>


</owl:Class>


<owl:Class rdf:about="http://
rifInRDF#Document"/>


<owl:Class rdf:about="http://rifInRDF#Group"/>


<owl:Class rdf:about="http://logicalRepresentation#Entailment"/>


<owl:Class rdf:about="http://rifInRDF#Import"/>


<owl:Class rdf:about="http://rifInRDF#FrameSlot"/>


<owl:Class rdf
:about="http://rifInRDF#Frame"/>


<owl:Class rdf:about="http://logicalRepresentation#VarBinding"/>


<owl:Class rdf:about="http://rifInRDF#MetaData"/>


<owl:ObjectProperty rdf:about="http://rifInRDF#arg">


<rdfs:domain rdf:resource="http://rifInRDF#Ex
pr"/>


</owl:ObjectProperty>


<owl:ObjectProperty
rdf:about="http://logicalRepresentation#logicalRelation">


<rdfs:domain
rdf:resource="http://logicalRepresentation#LogicSet"/>


<rdfs:range rdf:resource="http://rifInRDF#Document"/>


</owl:ObjectPr
operty>


<owl:ObjectProperty rdf:about="http://rifInRDF#then"/>


<owl:ObjectProperty rdf:about="http://rifInRDF#if"/>


<owl:ObjectProperty rdf:about="http://rifInRDF#op">


<rdfs:domain rdf:resource="http://rifInRDF#Expr"/>


</owl:ObjectProperty>


<
owl:ObjectProperty
rdf:about="http://logicalRepresentation#premise">


<rdfs:domain
rdf:resource="http://logicalRepresentation#Entailment"/>


</owl:ObjectProperty>


<owl:ObjectProperty rdf:about="http://rifInRDF#sentence">

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

43

22/10/2013


Copyright © IBM 2009


<rdfs:domain rdf:resource
="http://rifInRDF#Group"/>


<rdfs:range rdf:resource="http://rifInRDF#Formula"/>


</owl:ObjectProperty>


<owl:ObjectProperty rdf:about="http://rifInRDF#formula">


<rdfs:domain rdf:resource="http://rifInRDF#Formula"/>


</owl:ObjectProperty>


<owl:
ObjectProperty rdf:about="http://rifInRDF#subject1">


<rdfs:domain rdf:resource="http://rifInRDF#Equal"/>


</owl:ObjectProperty>


<owl:ObjectProperty rdf:about="http://rifInRDF#meta"/>


<owl:ObjectProperty rdf:about="http://rifInRDF#metaFrame"/>


<o
wl:ObjectProperty rdf:about="http://rifInRDF#subject2">


<rdfs:domain rdf:resource="http://rifInRDF#Equal"/>


</owl:ObjectProperty>


<owl:ObjectProperty rdf:about="http://rifInRDF#frameSlot">


<rdfs:domain rdf:resource="http://rifInRDF#Frame"/>


<
/owl:ObjectProperty>


<owl:ObjectProperty rdf:about="http://rifInRDF#payload">


<rdfs:domain rdf:resource="http://rifInRDF#Document"/>


<rdfs:range rdf:resource="http://rifInRDF#Group"/>


</owl:ObjectProperty>


<owl:ObjectProperty
rdf:about="http:
//logicalRepresentation#varbinding">


<rdfs:domain
rdf:resource="http://logicalRepresentation#Entailment"/>


</owl:ObjectProperty>


<owl:ObjectProperty
rdf:about="http://logicalRepresentation#conclusion">


<rdfs:domain
rdf:resource="http://logicalR
epresentation#Entailment"/>


</owl:ObjectProperty>


<owl:ObjectProperty rdf:about="http://rifInRDF#directive">


<rdfs:domain rdf:resource="http://rifInRDF#Document"/>


<rdfs:range rdf:resource="http://rifInRDF#Import"/>


</owl:ObjectProperty>


<o
wl:DatatypeProperty rdf:about="http://rifInRDF#location"/>


<owl:DatatypeProperty
rdf:about="http://logicalRepresentation#vbValue">


<rdfs:domain
rdf:resource="http://logicalRepresentation#VarBinding"/>


</owl:DatatypeProperty>


<owl:DatatypeProperty

rdf:about="http://logicalRepresentation#ruleOfInference">


<rdfs:domain
rdf:resource="http://logicalRepresentation#Entailment"/>


</owl:DatatypeProperty>


<owl:DatatypeProperty rdf:about="http://rifInRDF#type">


<rdfs:domain rdf:resource="http://r
ifInRDF#Isa"/>


</owl:DatatypeProperty>


<owl:DatatypeProperty rdf:about="http://rifInRDF#slot">


<rdfs:domain rdf:resource="http://rifInRDF#FrameSlot"/>


</owl:DatatypeProperty>


<owl:DatatypeProperty rdf:about="http://rifInRDF#metaID"/>


<owl:Dat
atypeProperty rdf:about="http://rifInRDF#dialect">


<rdfs:domain rdf:resource="http://rifInRDF#Document"/>


</owl:DatatypeProperty>


<owl:DatatypeProperty rdf:ID="DatatypeProperty_3"/>


<owl:DatatypeProperty rdf:about="http://rifInRDF#profile"/>


<o
wl:DatatypeProperty rdf:about="http://rifInRDF#declare">


<rdfs:domain rdf:resource="http://rifInRDF#Forall"/>


</owl:DatatypeProperty>

ITA P12 Task2

The Representation of Logic
in Semantic Web languages
v5

D Mott, IBM UK

44

22/10/2013


Copyright © IBM 2009


<owl:DatatypeProperty rdf:about="http://rifInRDF#subject">


<rdfs:domain>


<owl:Class>


<owl:unionO
f rdf:parseType="Collection">


<owl:Class rdf:about="http://rifInRDF#Frame"/>


<owl:Class rdf:about="http://rifInRDF#Isa"/>


</owl:unionOf>


</owl:Class>


</rdfs:domain>


</owl:DatatypeProperty>


<owl:DatatypeProperty
rdf
:about="http://logicalRepresentation#vbVar">


<rdfs:domain
rdf:resource="http://logicalRepresentation#VarBinding"/>


</owl:DatatypeProperty>


<owl:DatatypeProperty rdf:about="http://rifInRDF#value">


<rdfs:domain rdf:resource="http://rifInRDF#Frame
Slot"/>


</owl:DatatypeProperty>

</rdf:RDF>


<!
--

Created with Protege (with OWL Plugin 3.3.1, Build 430)
http://protege.stanford.edu
--
>