XOL

~ Under Construction ~

Reminder: Because MS-Word 2000 is being used to generate these web pages, it is highly recommended that you use Microsoft Internet Explorer version 5.0 when viewing this site.

Overview

At its recent meeting the BioOntology Core Group reached the consensus to recommend the use of a frame-based language with an XML syntax for the exchange of ontologies for molecular biology. At that meeting the following points were made.

1)       A traditional frame-based approach for representation of biological entities is sufficient for current needs.  In addition, frame-based systems have been in use for a significant period of time and are, in general, stable representation systems.  Among frame-based systems Ontolingua is clearly one of the most prominent and has had extensive use for many years.

2)       XML has tremendous momentum with significant interest from commercial organisations and a serious standardisation effort.  We anticipate that XML-based tools and web servers supporting XML are beginning to appear and more are on the horizon. The belief of the group was that the language that we want for the exchange of ontologies should be a frame-based system with an XML expression.  However, the group also believed that we did not have such a language before us since Ontolingua is frame-based but without an XML expression and OML does have an XML expression, but is based on conceptual graphs, not frames.

In response to this recommendation, Peter Karp, in collaboration with Vinay Chaudhri and Jerome Thomere from SRI, have drafted a specification for a language called XOL ("XML Ontology Exchange Language") as another candidate exchange language for consideration by the BioOntology Group. XOL produces an XML expression for Ontolingua through OKBC. There will be a presentation of XOL at the meeting in Heidelberg to solicit feedback from the BioOntology group.

The point of the following exercise is to see how well the frame-based language XOL can be modeled by the description logic and conceptual graphs oriented language OML/CKML. Here we demonstrate how the simple example in the XOL paper of Peter Karp, et al, can be expressed in OML. And we also represent the XOL DTD in an OML ontology.

OML/CKML at a Glance

As justified by the following points, OML/CKML is in various senses both a description logic based language and a frame-based language.

·        CKML: Being based on conceptual graphs, formal concept analysis, and information flow, the CKML extension of OML is closely related to a description logic based approach for modeling ontologies. Conceptual scaling and concept lattice algorithms correspond to subsumption.

·        OML:  How and how well a knowledge representation language expresses constraints is a very important issue. OML has three levels for constraint expression:

o       top – sequents

o       intermediate – calculus of binary relations

o       bottom – logical expressions

The bottom level corresponds to conceptual graphs. Indeed, OML assertions (closed expressions) correspond exactly to conceptual graphs.

·        Simple OML: Because Simple OML is based upon the fundamental classification-projection diagram, the normal expression of types and instances is very frame-like. As shown below, a core aspect of XOL is closely related to Simple OML.

Interoperability between XOL and OML

The figures below represent the interoperability between XOL modules and OML ontologies and collections in generic style. For interoperability with specific style collections see the discussion on Simple OML parsing. The output from the internal representations, and the internal representations themselves, require suitiable application programming interfaces (APIs) for XOL and OML.

From OML to XOL

From XOL to OML

XOL Mathematical Model

 

 

Binary Relations

subclass-of

:

class

®

class

instance-of

:

[class + ] individual

®

class

slot-values

:

[class + slot + ] individual

®

slot ´ (individual + literal)

Functions

domain

:

slot

®

class

slot-value-type

:

slot

®

class + datatype

NOTE:

1        individual.type = individual.instance-of (DTD error??)

2        The bracketed types are (may be) less common occurrences; this is a point for optimization for the translation XOL to OML. Reminder (about Formal Concept Analysis and Information Flow): the set of instances and the set of types in a classification are not necessarily disjoint – in particular, XOL classes can appear as both types and instances. The slot type within the bracket in the domain of the slot-values relation will require the reification of slots.

3        There are four origins of XOL types:

i                      class, slot and individual are the standard frame types

ii                    datatype and literal have been added for completeness

iii                  slot-values is a reified type

iv                   several types have been defined in order to organize the other types:

xol-thing

=

module +  xol-entity

xol-entity

=

entitytype + slot + entity + slot-values

entitytype

=

class + datatype

entity

=

individual + literal

Correspondences

The element/attribute correspondences are as follows. For simplicity of explanation, in the table of correspondences below we have abbreviated the mathematical model above by ignoring types within brackets. This is one extreme, but a sensible one since it seems to occur often in practice. The other extreme is to include all classes as instances, along with individuals and literals. The XOL to OML translator can modify this as seems appropriate. The optimum approach would be to include only those classes that are specified as instances or can be inferred to be instances.

XOL

Simple OML

module, ontology, kb, database, dataset elements

ontology, collection elements

class element

Type.Object element

name element (within class)

name attribute of object type

subclass-of element

subtype element

datatype (added type)

Type.Data element

class + datatype

Type.Entity element

slot element

Type.BinaryRelation element

name element (within slot)

name attribute of binary relation type

domain element

source.Type attribute of binary relation type

slot-value-type element

target.Type attribute of binary relation type

individual element

Instance.Object element

name element (within individual)

id attribute of object instance

instance-of element

classification element

literal (added type)

Instance.Data element

individual + literal

Instance.Entity element

slot-values element

Instance.BinaryRelation element

name element (within slot-values)

type name for binary relation or function

value

target.Instance attribute of binary relation instance

slot-inverse element

transpose element

documentation element

comment element

The XOL DTD

 

<!ELEMENT

  (module | ontology | kb | database | dataset)

  ( name, (kb-type | db-type)?, package?, version?, documentation?,

    class*, slot*, individual*)

>

 

<!ELEMENT name (#PCDATA)>

<!ELEMENT kb-type (#PCDATA)>

<!ELEMENT documentation (#PCDATA)>

 

<!ELEMENT class

  ( name, documentation?,

    (subclass-of | instance-of | slot-values)* )

>

 

<!ELEMENT slot

  ( name, documentation?,

    (domain | slot-value-type

    | slot-inverse

    | slot-cardinality | slot-maximum-cardinality | slot-minimum-cardinality

    | slot-numeric-minimum | slot-numeric-maximum

    | slot-collection-type | slot-values)* )

>

<!ATTLIST slot

  type ( template | own ) "own">

 

<!ELEMENT individual

  ( name, documentation?,

    (type | slot-values)* )

>

 

<!ELEMENT slot-values

  ( name, value*,

    (facet-values | value-type | inverse

    | cardinality | maximum-cardinality | minimum-cardinality

    | numeric-minimum | numeric-maximum | some-values

    | collection-type | documentation-in-frame)* )

>

 

<!ELEMENT facet-values

  ( name, value* )

>

 

<!ELEMENT subclass-of     (#PCDATA)>

<!ELEMENT instance-of     (#PCDATA)>

<!ELEMENT domain          (#PCDATA)>

<!ELEMENT slot-value-type (#PCDATA)>

 

<!ELEMENT slot-inverse             (#PCDATA)>

<!ELEMENT slot-cardinality         (#PCDATA)>

<!ELEMENT slot-maximum-cardinality (#PCDATA)>

<!ELEMENT slot-minimum-cardinality (#PCDATA)>

<!ELEMENT slot-numeric-minimum     (#PCDATA)>

<!ELEMENT slot-numeric-maximum     (#PCDATA)>

<!ELEMENT slot-collection-type     (#PCDATA)>

<!ELEMENT value-type               (#PCDATA)>

<!ELEMENT inverse                  (#PCDATA)>

<!ELEMENT cardinality              (#PCDATA)>

<!ELEMENT maximum-cardinality      (#PCDATA)>

<!ELEMENT minimum-cardinality      (#PCDATA)>

<!ELEMENT numeric-minimum          (#PCDATA)>

<!ELEMENT numeric-maximum          (#PCDATA)>

<!ELEMENT some-values              (#PCDATA)>

<!ELEMENT collection-type          (#PCDATA)>

<!ELEMENT documentation-in-frame   (#PCDATA)>

 

An OML Ontology for the XOL DTD

 

<Ontology>

 

  <Type.Object name=“xol-thing”>

    <partition>

      <li type=“module”/>

      <li type=“xol-entity”/>

    </partition>

  </Type.Object>

 

  <Type.Object name=“module”>

  <Type.Object name=“xol-entity”>

    <partition>

      <li type=“class”/>

      <li type=“slot”/>

      <li type=“individual”/>

      <li type=“slot-values”/>

    </partition>

  </Type.Object>

 

  <Type.Object name=“class”>

  <Type.Object name=“slot”>

  <Type.Object name=“individual”>

  <Type.Object name=“slot-values”> /* reified binary relation */

 

  /* xol-thing relations & functions */

  <Type.Function name=“name”

    source.Type=“xol-thing” target.Type=“String” card=“1”/>

  <Type.Function name=“documentation”

    source.Type=“xol-thing” target.Type=“String”/>

 

  /* class relations & functions */

  <Type.BinaryRelation name=“subclass-of”

    source.Type=“class” target.Type=“class”/>

  <Type.BinaryRelation name=“instance-of”

    source.Type=“class” target.Type=“class”/>

 

  /* slot relations & functions */

  <Type.Function name=“domain”

    source.Type=“slot” target.Type=“class”/>

  <Type.Function name=“slot-value-type”

    source.Type=“slot” target.Type=“class”/>

  <Type.BinaryRelation name=“slot-inverse”

    source.Type=“slot” target.Type=“slot”/>

  <Type.Function name=“slot-cardinality”

    source.Type=“slot” target.Type=“Natno”/>

  /* also,

    slot-maximum-cardinality, slot-minimum-cardinality,

    slot-numeric-minimum, slot-numeric-maximum */

  <Type.Function name=“slot-collection-type”

    source.Type=“slot” target.Type=“Collection”/>

  <Type.Function name=“type”

    source.Type=“slot” target.Type=“Slot”/>

 

  /* individual relations & functions */

  <Type.BinaryRelation name=“type”

    source.Type=“individual” target.Type=“class”/>

 

  /* slot-values relations & functions */

  <Type.Function name=“slot-values-source”

    source.Type=“slot-values” target.Type=“xol-entity”/> /* reified part */

  <Type.Function name=“value”

    source.Type=“slot-values” target.Type=“individual”/>

  <Type.BinaryRelation name=“name”

    source.Type=“slot-values” target.Type=“slot”/>

 

 /* defined data types */

  <Type.Data name=“Collection” ordered=“no”>

    <li value=“set”/>

    <li value=“list”/>

    <li value=“bag”/>

  </Type.Data>

 

  <Type.Data name=“Slot” ordered=“no”>

    <li value=“template”/>

    <li value=“own”/>

  </Type.Data>

 

</Ontology>

 

Example

Example in XOL

 

<?xml version="1.0" ?>

<!DOCTYPE module SYSTEM "module.dtd">

 

<module>

  <name>genealogy</name>

  <kb-type>ocelot-kb</kb-type>

  <package>user</package>

 

  <class>

    <name>person</name>

    <documentation>The class of all persons</documentation>

  </class>

 

  <class>

    <name>man</name>

    <documentation>The class of all persons whose sex is male</documentation>

    <subclass-of>person</subclass-of>

  </class>

 

  <class>

    <name>woman</name>

    <documentation>

      The class of all persons whose sex is female.

    </documentation>

    <subclass-of>person</subclass-of>

  </class>

 

  <slot>

    <name>year-of-birth</name>

    <documentation>An integer that represents the year the person was born.

    </documentation>

    <domain>person</domain>

    <slot-cardinality>1</slot-cardinality>

    <slot-numeric-min>1800</slot-numeric-min>

    <slot-value-type>integer</slot-value-type>

  </slot>

 

  <slot>

    <name>brothers</name>

    <documentation>The brothers of a person.</documentation>

    <domain>person</domain>

    <slot-value-type>man</slot-value-type>

  </slot>

 

  <slot>

    <name>citizenship</name>

    <documentation>

      Describes the citizenship status of a person.

    </documentation>

    <domain>person</domain>

    <slot-value-type>

      (set-of citizen resident-alien permanent-resident)

    </slot-value-type>

  </slot>

 

  <slot>

    <name>life-history</name>

    <documentation>A written history of the person’s life.</documentation>

    <slot-value-type>string</slot-value-type>

  </slot>

 

  <slot>

    <name>father-of</name>

    <documentation>

      father-of(X,Y) holds when X is the father of Y.

    </documentation>

    <domain>man</domain>

    <slot-value-type>person</slot-value-type>

    <slot-inverse>father</slot-inverse>

  </slot>

 

  <slot>

    <name>has-father</name>

    <documentation>

      has-father(X,Y) holds when the father of X is Y.

    </documentation>

    <domain>person</domain>

    <slot-value-type>man</slot-value-type>

    <slot-inverse>father-of</slot-inverse>

  </slot>

 

  <individual>

    <name>John</name>

    <instance-of>man</instance-of>

    <slot-values>

       <name>year-of-birth</name>

       <value>1987</value>

    </slot-values>

    <slot-values>

      <name>citizenship</name>

      <value>permanent-resident</value>

    </slot-values>

    <slot-values>

      <name>has-father</name>

      <value>Carl</value>

    </slot-values>

  </individual>

 

  <individual>

    <name>Carl</name>

    <instance-of>man</instance-of>

    <slot-values>

       <name>year-of-birth</name>

       <value>1961</value>

    </slot-values>

    <slot-values>

      <name>father-of</name>

      <value>John</value>

    </slot-values>

    <slot-values>

      <name>life-history</name>

      <value>Carl worked hard all his life.</value>

    </slot-values>

  </individual>

 

</module>

 

Example in OML

As shown below, a relabeling of XOL examples gives a variant of Simple OML examples.

Ontology

located at http://www.xol.org/example/ (fictitious)

 

<?xml version="1.0" ?>

<!DOCTYPE module SYSTEM "oml.dtd">

 

<OML>

<Ontology>

 

  /* classes */

  <Type.Object name=“person”>

    <comment>The class of all persons</comment>

    <partition>

      <li type=“man”/>

      <li type=“woman”/>

    </partition>

  </Type.Object>

 

  <Type.Object name=“man”>

    <comment>The class of all persons whose sex is male</comment>

  </Type.Object>

 

  <Type.Object name=“woman”>

    <comment>The class of all persons whose sex is female</comment>

  </Type.Object>

 

  /* data types */

  <Type.Data name=“citizenship_status” ordered=“no”/>

    <li value=“citizen”/>

    <li value=“resident-alien”/>

    <li value=“permanent-resident”/>

  </Type.Data>

 

  /* roles */

  <Type.Function name=“year-of-birth”

    source.Type=“person” target.Type=“Natno”>

    <comment>

      An natural number that represents the year the person was born.

    </comment>

  </Type.Function>

 

  <Type.BinaryRelation name=“brothers”

    source.Type=“person” target.Type=“man”>

    <comment>The brothers of a person.</comment>

  </Type.BinaryRelation>

 

  <Type.Function name=“citizenship”

    source.Type=“person” target.Type=“citizenship_status”>

    <comment>

      Describes the citizenship status of a person.

    </comment>

  </Type.Function>

 

  <Type.BinaryRelation name=“life-history”

    source.Type=“person” target.Type=“String”>

    <comment>A written history of the person’s life.</comment>

  </Type.BinaryRelation>