OML Examples

See also the CKML Examples
Note: Reification has been subsumed into OML.
The Relation metatype is a subtype of the Object
metatype. This means several things: (1) Relational
subtyping is projection-inclusion; (2) A relational
instance specifies all projection relations. (3) OML
relational instances do not correspond to the basic
level of CG conceptual relations, but instead correspond
to the first reification level of CG conceptual relations.
(4) OML no longer needs a step of reification translation.
Note: OML is a true two-tiered framework.
The enhanced OML ontology given below is too much.
It is not the root ontology, but instead illustrates how
ontologies can be described as instances. What we
need in OML ontological specification are the basic tags
(Assertion, Object, Relation, Collection, ...) for use
as generic types, and we need the basic semantics of
subtyping and disjointness. So, the basic OML ontology,
a subset of the enhanced ontology, works as the root
ontology.
Note: OML uses lambda expressions.
Lambda expressions are necessary for specifying the
definitions of objects and relations, and OML does use
lambda expressions for these purposes. However, you
will no longer see the Lambda element in OML, since
lambda expressions have been smoothly incorporated
into the XML syntax of OML.
Note: OML has binary relations.
Many relations are binary. For increased convenience
in their specification, binary relations have been added
to OML. This runs slightly counter to the above note
on reification, since instances of these binary relations
do correspond to the basic level of CG conceptual
relations. Reification for these takes the form of a
translation into relations: the names of the embedded
functions can be source and target. Binary relations
allow for a direct translation (embedding) of RDF into
OML. Also, although the frame slots of Ontolingua
often translate into functions, when unconstrained
they should translate into binary relations.
Note: Functions in OML have been enhanced.
In OML, functions are used for the attributes of objects
and the arguments of relations. These are cases of
embedded functions. In addition, OML has free functions,
which are specifications of functions as first-class OML
citizens. Also, both function source and target types
and values can now be specified.

Overview

To illustrate the ideas and terminology developed in OML, several examples from the Conceptual Graphs and Resource Description Framework communities are developed here in RDF and Standard OML. Standard OML is specified by the current Grammar. Please see the Technical Notes for OML design motivations.

Examples

Atomic Object Type
Judy
Bar
Executive Officer
Corporation
Atomic Relation Type
Cat on Mat
between
GoingTo
author
Atomic Function Type
Person's Age
Defined Object Type
Maine Farmer
Defined Relation Type
goingTo
Defined Function Type
Parameterized Collection
Parameterized Relation
Collection Type
students
source code
collection of collections
Ontology
Enhanced OML Ontology
CG Ontology
Context
Plumber carries Pipe
Tom believes
Assertion
author-publication
OML Axiomatics
Data Structures / Algebraic Semantics

 

 

 

 


Atomic Object Type

Judy

The following forms in CG and OML represent the English phrase taken from the 1984 book by John Sowa entitled "Conceptual Structures" (ISBN 0-201-14472-7).

"the person named Judy"
Conceptual Graph Display Form
normal formabbreviated form
Conceptual Graph Linear Form
[Person:#3074]<-(Name)->["Judy"]       [Person:Judy#3074]
OML (Ontology Markup Language)
<Person text="Judy" id="3074"/>

Bar

The following forms in CG and OML represent the English phrase taken from the 1984 book by John Sowa.

"a bar with a length with a measure named 25.4 cm"
Conceptual Graph Display Form
Conceptual Graph Linear Form
[Bar]<-(Chrc)->[Length]<-(Meas)->[Measure]->(Name)->["25.4 cm"]
OML (Ontology Markup Language)
We have changed the name relation to two attributes (functions) of the Measure type: a value and a unit (of measure). The value function has codomain type Real, which is the primitive data type of real numbers. The unit function has codomain type Unit, which is a controlled vocabulary. Controlled vocabularies are treated appropriately in the CKML extension of OML. We are ignoring the ontology here. As with OML collections indexed by any type, two OML forms are possible (and equivalent) - the collection or an assertion. The collection form is the more normal networked information resource interchange format, whereas the assertion form is the form used by conceptual graphs - in OML the Assertion element corresponds to the CGIF CG nonterminal.
OML CollectionOML Assertion
<Bar>
  <length>
    <Measure>
      <value tgt="data.Real#25.4"/>
      <unit tgt="Unit.Metric.cm"/>
    </Measure>
  </length>
</Bar>
<Assertion>
  <Exists var="bar" type="Bar"/>
  <Exists var="len" type="Length"/>
    <and argcnt="2">
      <chrc>
        <object tgt="bar"/>
        <property tgt="len"/>
      </chrc>
      <meas>
        <dimension tgt="len"/>
        <measure>
          <Measure>
            <value tgt="data.Real#25.4"/>
            <unit tgt="Unit.Metric.cm"/>
          </Measure>
        </measure>
      </meas>
    </and>
  </Exists>
  </Exists>
</Assertion>

ExecutiveOfficer#grove

The following form in OML represents the description of Intel Executive Officer Andrew S. Grove.

"Andrew S. Grove is chairman of Intel Corporation. He was born in Budapest, Hungary, in 1936. He graduated from the City College of New York in 1960 with a Bachelor of Chemical Engineering degree and received his Ph.D. from the University of California, Berkeley in 1963. Upon graduation, he joined the Research and Development Laboratory of Fairchild Semiconductor and became Assistant Director of Research and Development in 1967. In 1979 he was named its President of Intel Corporation, in 1987 he was named Chief Executive Officer, and in May 1997, he was named Chairman and CEO. His latest book, `Only the Paranoid Survive,' was published by Doubleday in September of 1996. In December, 1997, Dr. Grove was named Time Magazine’s `Man of the Year.' "
OML (Ontology Markup Language)
(ontology located at http://wave.eecs.wsu.edu/WAVE/Ontologies/Intel/Intelontology.html)
<OML>
  <Ontology id="Intel Corporation" version="1.0">
    <comment>The ontology for Intel Corporation.</comment>
    <extends ontology="http://www.oml.org/ontology/" prefix="OML"/>
    <extends ontology="http://www.bibtex.org/ontology/" prefix="BibTeX"/>
    <extends ontology="http://www.univ.org/ontology/" prefix="UNIV"/>
    ...
    <Object type="ExecutiveOfficer">
      <Function type="position" tgtType="data.String"/>
      <Function type="birth.date" tgtType="data.Date"/>
      <Function type="birth.city" tgtType="City"/>
    </Object>
    ...
    <Relation type="award">
      <Function type="person" tgtType="Employee"/>
      <Function type="organization" tgtType="Corporation"/>
      <Function type="title" tgtType="data.String"/>
      <Function type="date" tgtType="data.Date"/>
    </Relation>
    ...
    <Collection type="Object.Collection" genus="OML:Object"/>
    <Collection type="Relation.Collection" genus="OML:Relation"/>
    <Collection type="Framed.Collection" genus="OML:Collection"/>
    ...
  </Ontology>
</OML>
(collections: object & relation)
<OML>
  <Framed.Collection id="companyDescription1998"
    ontology="http://www.ontologos.org/WAVE/Ontologies/Commerce&Industry/ontology/">
    <Object.Collection>
      ...
      <ExecutiveOfficer id="grove" 
        about="http://www.intel.com/pressroom/kits/bios/grove.htm"
        text="Andrew S. Grove" 
        picture="http://www.intel.com/pressroom/images/bios/grove.gif">
        <comment>Andrew S. Grove is chairman of Intel Corporation.</comment>
        <position>Chairman</position>
        <birth.year tgt="data.Year#1936"/>
        <birth.city tgt="City#Budapest"/>
      </ExecutiveOfficer>
      ...
    </Object.Collection>
    <Relation.Collection>
      ...
      <birth>
        <person tgt="ExecutiveOfficer#grove"/>
        <date tgt="data.Date#//1936"/>
        <city tgt="City#Budapest"/>
        <country tgt="Country#Hungary"/>
      </birth>
      <degree>
        <person tgt="ExecutiveOfficer#grove"/>
        <level tgt="UNIV:Bachelor"/>
        <school tgt="UNIV:University#CUNY"/>
        <major>Chemical Engineering</major>
        <date tgt="data.Year#1960"/>
      </degree>
      <degree>
        <person tgt="ExecutiveOfficer#grove"/>
        <level tgt="UNIV:Doctorate"/>
        <school tgt="UNIV:University#UC.Berkeley"/>
        <date tgt="data.Year#1963"/>
      </degree>
      <BibTeX#author>
        <person tgt="ExecutiveOfficer#grove"/>
        <document>
          <BibTeX:book>
            <key tgt="BibTeX:ISBN#0-553-47783-8"/>
            <author tgt="ExecutiveOfficer#grove"/>
            <title>Only the Paranoid Survive</title>
            <publisher tgt="Corporation#Doubleday"/>
            <year tgt="1996"/>
          </BibTeX:book>
        </document>
      </BibTeX:author>
      <award>
        <person tgt="ExecutiveOfficer#grove"/>
        <organization tgt="Corporation#Time_Magazine"/>
        <title>Man of the Year</title>
        <date tgt="data.Year#1997"/>
      </award>
      ...
    </Relation.Collection>
  </Framed.Collection>
</OML> 

Corporation#NYSE.DAL

The following form in OML represents the description of the Commerce & Industry Corporation Delta Airlines.

"Delta Air Lines is the nation's third-largest airline (after UAL's United and AMR's American). Leo F. Mullin is President and Chief Executive Officer for Delta Air Lines at its world headquarters in Atlanta, Georgia. Its stock ticker symbol on the NYSE is `DAL.' In 1998 its Fortune 500 revenue ranking is 101. The 1997 sales for Delta was $M13,590. Its 1997 net was $M854. Delta Air Lines had 63,441 employees in 1997."
OML (Ontology Markup Language)
(ontology)
<OML>
  <Ontology id="Commerce-Industry" version="1.0">
    <comment>The commerce and industry ontology</comment>
    <extends ontology="http://www.oml.org/ontology/" prefix="OML"/>
    ...
    <Collection type="Object.Collection" genus="OML:Object"/>
    <Collection type="Relation.Collection" genus="OML:Relation"/>
    <Collection type="Framed.Collection" genus="OML:Collection"/>
    ...
  </Ontology>
</OML>
(collections: object & relation)
<OML>
  <Framed.Collection id="companyDescription1998"
    ontology="http://www.ontologos.org/WAVE/Ontologies/Commerce&Industry/ontology/">
    <Object.Collection>
      ...
      <Company id="NYSE.DAL" 
        about="http://www.delta-air.com/"
        text="Delta Air Lines" 
        picture="http://www.delta-air.com/home/Images/top.gif">
        <comment>
          Delta Air Lines is the nation's third-largest airline 
          (after UAL's United and AMR's American). It flies to about 150 cities 
          across the US and to more than 40 cities in 25 other countries. Its 
          hubs include Atlanta, Dallas-Fort Worth, Cincinnati, and Salt Lake
          City. The company has built up a low-fare regional carrier service 
          and owns 38% of computer reservation service WORLDSPAN (TWA and 
          Northwest Airlines, among others, own the rest). It also has minority 
          stakes in three regional carriers. With a new CEO hired to turn around 
          Delta's image, the carrier is focusing on transatlantic operations and 
          attracting more business passengers.
        </comment>
        <sector tgt="Transportation"/>
        <industry tgt="Airline"/>
        <location tgt="City#Atlanta"/>
        <ceo>Leo F. Mullin</ceo>
        <founded tgt="data.Year#1924"/>
      </Company>
      ...
    </Object.Collection>
    <Relation.Collection>
      ...
      <competitor>
        <company1 tgt="NYSE.DAL"/>
        <company2 tgt="NYSE.AMR"/>
      </competitor>
      <competitor>
        <company1 tgt="NYSE.DAL"/>
        <company2 tgt="Nasdaq.NWAC"/>
      </competitor>
      <competitor>
        <company1 tgt="NYSE.DAL"/>
        <company2 tgt="NYSE.UAL"/>
      </competitor>
      <employees>
        <company tgt="NYSE.DAL"/>
        <number tgt="data.Natno#63441"/>
        <year tgt="data.Year#1997"/>
      </employees>
      <fortune500>
        <company tgt="NYSE.DAL"/>
        <kind tgt="revenue"/>
        <ranking tgt="data.Natno#101/>
        <year tgt="data.Year#1998"/>
      </fortune500>
      <sales>
        <company tgt="NYSE.DAL"/>
        <amount tgt="data.Natno#13590/>
        <year tgt="data.Year#1997"/>
      </sales>
      <net>
        <company tgt="NYSE.DAL"/>
        <amount tgt="data.Natno#854/>
        <year tgt="data.Year#1997"/>
      </net>
      ...
    </Relation.Collection>
  </Framed.Collection>
</OML> 


Atomic Relation Type

Cat on Mat

The following forms in CG, KIF, RDF, and OML represent the English sentence taken from an early version of the CGIF (Conceptual Graph Interchange Format) Standard.

"A cat is on a mat."
Conceptual Graph Display Form
Conceptual Graph Linear Form
[Cat]<-(On)->[Mat]
CGIF (Conceptual Graph Interchange Format
[Cat: *x] [Mat: *y] (On ?x ?y)
OML (Ontology Markup Language), briefly
<On><Cat/><Mat/></On>
KIF (Knowledge Interchange Format)
(exists ((?x cat) (?y mat)) (On ?x ?y))
RDF (Resource Description Framework) with Schemas
(schema located at http://www.cg.org/example/)
<RDF:RDF> 
  <RDFS:comment>A simple example schema.</RDFS:comment>
  <RDFS:Class ID="Entity"/>   
  <RDFS:Class ID="Cat">
    <RDFS:subClassOf resource="#Entity"/>
    <RDFS:allowedPropertyType>
      <RDF:PropertyType ID="On">
        <RDFS:comment>The preposition "On".</RDFS:comment>
        <RDFS:range resource="#Mat"/>
      </RDF:PropertyType>
    </RDFS:allowedPropertyType>
  </RDFS:Class>
  <RDFS:Class ID="Mat">   
    <RDFS:subClassOf resource="#Entity"/>
  </RDFS:Class>
</RDF:RDF>
(object: inline version)
<?xml:namespace name="http://www.w3.org/TR/WD-rdf-syntax#" as="RDF"?> 
<?xml:namespace name="http://www.cg.org/example/" as="EG"?> 
<RDF:RDF> 
  <RDF:Description>
    <RDF:instanceOf resource="EG#Cat"/>
    <EG:On>
      <RDF:Description>
        <RDF:instanceOf resource="EG#Mat"/>
      </RDF:Description>
    </EG:On>
  </RDF:Description>
</RDF:RDF>
(object: distributed version)
<?xml:namespace name="http://www.w3.org/TR/WD-rdf-syntax#" as="RDF"?> 
<?xml:namespace name="http://www.cg.org/example/" as="EG"?> 
<RDF:RDF> 
  <RDF:Description>
    <RDF:instanceOf resource="EG#Cat"/>
    <EG:On resource="#y"/>
  </RDF:Description>
  <RDF:Description ID="y">
    <RDF:instanceOf resource="EG#Mat"/>
  </RDF:Description>
</RDF:RDF>
OML (Ontology Markup Language)
(ontology located at http://www.cg.org/example/)
<OML>
  <Ontology id="Example" version="1.0">
    <comment>A simple example ontology.</comment>
    <extends ontology="http://www.oml.org/ontology/" prefix="OML"/>
    <Object type="Cat"/>   
    <Object type="Mat"/>   
    <Relation type="on">
      <comment>The preposition "On"</comment>
      <Function type="agent" tgtType="Cat"/>
      <Function type="object" tgtType="Mat"/>
    </Relation>
    <Collection type="Object.Collection" genus="OML:Object"/>
    <Collection type="Relation.Collection" genus="OML:Relation"/>
    <Collection type="Framed.Collection" genus="OML:Collection"/>
  </Ontology>
</OML>
(object: inline version)
<OML>
  <Relation.Collection id="on"
    ontology="http://www.cg.org/example/">
    <On>
      <agent><Cat/></agent>
      <object><Mat/></object>
    </On>
  </Relation.Collection>
</OML>
(object: distributed version)
<OML>
  <Framed.Collection id="cat-on-mat"
    ontology="http://www.cg.org/example/">
    <Object.Collection>
      <Cat id="x"/>
      <Mat id="y"/>
    </Object.Collection>
    <Relation.Collection>
      <On>
        <agent tgt="x"/>
        <object tgt="y"/>
      </On>
    </Relation.Collection>
  </Framed.Collection>
</OML>

between

The following forms in CG, KIF, RDF, and OML represent the English sentence taken from the current CGIF (Conceptual Graph Interchange Format) Standard.

"A person is between a rock and a hard place."
Conceptual Graph Display Form
Conceptual Graph Linear Form
[Person]<-(Betw)-
 <-1-[Rock]
 <-2-[Place]->(Attr)->[Hard]
OML (Ontology Markup Language)
We omit the ontology.

<between>
  <agent><Person/></agent>
  <object1><Rock/></object1>
  <object2><Place id="o2"></object2>
</between>
<attribute>
  <object tgt="o2">
  <property><Hard/></property>
</attribute>

Going To

The following forms in CG, KIF, RDF, and OML represent the English sentence taken from the current CGIF (Conceptual Graph Interchange Format) Standard.

"John is going to Boston by bus."
Conceptual Graph Display Form
Conceptual Graph Linear Form
[Go]-
(Agnt)->[Person: John]
(Dest)->[City: Boston]
(Inst)->[Bus]
CGIF (Conceptual Graph Interchange Format
There are two forms: direct and canonical. Canonical is more KIF-like. In the canonical, all concept nodes are moved to the front and all arcs are represented by bounded variables.
directcanonical
[Go *x]
(Agnt ?x [Person 'John'])
(Dest ?x [City 'Boston'])
(Inst ?x [Bus])
[Go *x] [Person 'John' *y] [City 'Boston' *z] [Bus *w]
(Agnt ?x ?y) (Dest ?x ?z) (Inst ?x ?w)
KIF (Knowledge Interchange Format)
(exists ((?x Go) (?y Person) (?z City) (?w Bus)) 
(and (Name ?y John) (Name ?z Boston)
(Agnt ?x ?y) (Dest ?x ?z) (Inst ?x ?w)))
OML (Ontology Markup Language)
(ontology)
<OML>
  <Ontology id="GoJohnBostonBus" version="1.0">
    <extends ontology="http://www.oml.org/ontology/" prefix="OML"/>
    <Object type="Person"/>
    <Object type="City"/>   
    <Object type="Bus"/>   
    <Relation type="go">   
      <Function type="agent" tgtType="Person"/>
      <Function type="destination" tgtType="City"/>
      <Function type="instrument" tgtType="Bus"/>
    </Relation>
  </Ontology>
</OML>
(versions)
The OML inline version is like the CGIF direct version, and the OML distributed version is like the CGIF canonical version, except that functions (object type attributes) are inline in OML.
inlinedistributed
<go>
  <agent><Person text="John"/></agent>
  <destination><City text="Boston"/></destination>
  <instrument><Bus/></instrument>
</go>
<Person id="y" text="John"/>
<City id="z" text="Boston"/>
<Bus id="w"/>
<go>
  <agent tgt="y"/>
  <destination tgt="z"/>
  <instrument tgt="w"/>
</go>

author

The following forms in CG, KIF, RDF, and OML represent an example description taken from a recent (1998) version of the RDF (Resource Description Framework) Standard.

"A person is the author of the document whose URL is http://www.bar.com/some.doc. His name is `John Smith', his email is `john@smith.com', and his phone is "+1 (555) 123-4567'."
RDF Directed Graph Form
RDF (Resource Description Framework) with Schemas
(object: inline version)
<?xml:namespace name="http://docs.r.us.com/bibliography-info/" as="BIB"?> 
<?xml:namespace name="http://www.w3.org/TR/WD-rdf-syntax#" as="RDF"?> 
<RDF:RDF> 
  <RDF:Description about="http://www.bar.com/some.doc"> 
    <BIB:Author> 
      <RDF:Description> 
        <BIB:Name>John Smith</BIB:Name> 
        <BIB:Email>john@smith.com</BIB:Email> 
        <BIB:Phone>+1 (555) 123-4567</BIB:Phone> 
      </RDF:Description> 
    </BIB:Author> 
  </RDF:Description> 
</RDF:RDF>
(object: distributed version)
<?xml:namespace name="http://docs.r.us.com/bibliography-info/" as="BIB"?> 
<?xml:namespace name="http://www.w3.org/TR/WD-rdf-syntax#" as="RDF"?> 
<RDF:RDF> 
  <RDF:Description about="http://www.bar.com/some.doc"> 
    <BIB:Author resource="#John_Smith"/> 
  </RDF:Description> 
  <RDF:Description ID="John_Smith"> 
    <BIB:Name>John Smith</BIB:Name> 
    <BIB:Email>john@smith.com</BIB:Email> 
    <BIB:Phone>+1 (555) 123-4567</BIB:Phone> 
  </RDF:Description>
</RDF:RDF>
OML (Ontology Markup Language)
(ontology located at http://docs.r.us.com/bibliography-info/)
<OML>
  <Ontology id="Bibliography" version="1.0">
    <comment>A bibliographic ontology</comment>
    <extends ontology="http://www.oml.org/ontology/" prefix="OML"/>
    <Object type="Person">   
      <Function type="name" tgtType="data.String"/> 
      <Function type="email" tgtType="data.EmailAddress"/> 
      <Function type="phone" tgtType="data.TelephoneNumber"/> 
    </Object>
    <Object type="Document"/>   
    <Relation type="author">
      <comment>
        The authorship binary relation between documents and people
      </comment>
      <Function type="agent" tgtType="Person"/>
      <Function type="object" tgtType="Document"/>
    </Relation>
    <Collection type="Objects" genus="OML:Object"/>
    <Collection type="Authorship" genus="OML:Relation"/>
    <disjoint><Document/><Person/><Author/></disjoint>
  </Ontology>
</OML>
(object: inline version)
<OML>
  <Authorship id="JohnSmithPublications"
    ontology="http://docs.r.us.com/bibliography-info/">
    <author>
      <agent>
        <Person>
          <name>John Smith</Name> 
          <email tgt="data.EmailAddress#john@smith.com"/>
          <phone tgt="data.TelephoneNumber#+1-555-123-4567"/>
        </Person>
      </agent>
      <object><Document about="http://www.bar.com/some.doc"/></object>
    </author>
  </Authorship>
</OML>
(object: distributed version)
<OML>
  <Objects id="objects1998"
    ontology="http://docs.r.us.com/bibliography-info/">
    <Person id="john-smith">
      <name>John Smith</Name> 
      <email tgt="data.EmailAddress#john@smith.com"/>
      <phone tgt="data.TelephoneNumber#+1-555-123-4567"/>
    </Person>
    <Document id="somedoc" about="http://www.bar.com/some.doc"/>
  </Objects>
</OML>

<OML>
  <Authorship id="publications1998"
    ontology="http://docs.r.us.com/bibliography-info/">
    <author>
      <agent tgt="john-smith"/>
      <object tgt="somedoc"/>
    </author>
  </Authorship>
</OML>


Atomic Function Type

Person's Age

A person's age can be represented as an OML function. This function can be specified either by embedding within the Person object type or in free form. Here we give the free form version and show how it is used.

(function specification)
<Function type="age" srcType="Person" tgtType="data.Natno"/>
(function use)
<age src="Bill" tgt="52"/>


Defined Object Type

Maine Farmer

Here is an example of a defined object type that was taken from the CGIF (Conceptual Graph Interchange Format) Standard. We paraphrase the standard. The type hierarchy starts with some set of primitive types, which includes at least top and bottom. The subtype order between primitive types can be specified in OML. The definitional mechanisms introduce new types, both object and relational, whose place in the hierarchy is determined through subsumption by their definitions.

The following forms in CG and OML represent the definition:

"A MaineFarmer is a Farmer located in the state of Maine."
Conceptual Graph Linear Form - version 1
The following gives a definition for the object type MaineFarmer. Two versions are given. The first is expressed by a lambda expression for a farmer located (Loc) in Maine. The symbol l (lambda) indicates that the concept Farmer is the formal parameter, and the sequence <Farmer> is the signature of the lambda expression. The type of the formal parameter is always a supertype of the newly defined type: MaineFarmer v Farmer.
MaineFarmer = [Farmer: λ]->(Loc)->[State: Maine]
Conceptual Graph Linear Form - version 2
As an alternate notation, types can be defined with the keyword type and a variable:
type MaineFarmer(*x) is [Farmer: ?x]->(Loc)->[State: Maine]
Standard OML
The Standard OML form is closest to the CGLF version 2.
<Object type="MaineFarmer" var="x" genus="Farmer">
  <Farmer src="x"><location tgt="State#Maine"/></Farmer>
</Object>


Defined Relation Type

goingTo

The following example of a defined relation is taken from the CGIF Standard.

Conceptual Graph Linear Form - version 1
The relation type GoingTo could be defined by an equation that makes GoingTo a synonym for a dyadic lambda expression:
GoingTo = [Person: λ1]<-(Agnt)<-[Go]->(Dest)->[City: λ2]
This definition says that the relation GoingTo relates a person (marked by λ1), who is the agent (Agnt) of the concept [Go], to a city (marked by λ2), which is the destination (Dest) of [Go]. With this relation, the graph for the sentence John is going to Boston could be represented by the following CG:
[Person: John]<-(GoingTo)->[City: Boston]
Conceptual Graph Linear Form - version 2
An alternative notation is to use the keyword relation, as in the following definition of GoingTo:
relation GoingTo(*x,*y) is
[Person: ?x]<-(Agnt)<-[Go]->(Dest)->[City: ?y]
Standard OML
The Standard OML form uses functional lambda expressions to define relations. Functional lambda expressions are typed lambda expressions with typed relational arguments. In other words, they are doubly typed lambda expressions.
<Relation type="goingTo">
  <Function type="person" var="x" tgtType="Person>
  <Function type="place" var="y" tgtType="City">
    <Go><agent tgt="x"/><object tgt="y"/></Go>
  </Function>
  </Function>
</Relation>


Defined Function Type

Multi-valued functions are specifiable in OML. These are functions that return collections as results. Multi-valued functions can be viewed as parameterized collections. The notion of a parameterized collection can be extended to the notion of a parameterized relation.

Parameterized Collection

The function Person.age has an associated binary relation "person older than a certain age", and this relation has an associated multi-valued function.

<Object type="Person">   
  <Function type="age" valuetype="data.Natno"/>
</Object>
 
<Function type="peopleOlderThan" var="age" srcType="data.Natno">
  <Collection var="person" genus="Person">
    <Person src="person"><age order="geq" tgt="age"/></Person>
  </Collection>
</Function>

We can generalize the above to the specification of multi-valued function (parameterized collection) associated with any binmary relation.

(specification of binary relation)
<Relation type="R">
  <Function type="source" tgtType="A"/>
  <Function type="target" tgtType="B"/>
</Relation>
(specification of associated multi-valued function)
<Function type="F" var="a" srcType="A">
  <Collection var="b" genus="B">
    <Exists var="r" type="R">
      <R obj="r">
        <source order="eq" tgt="a"/>
        <target order="eq" tgt="b"/>
      </R>
    </Exists>
  </Collection>
</Function>

Parameterized Relation

We can extend the above from a parameterized collection to a parameterized relation. This example appears in the KnowMore language.

<Object type="Person">   
  <Function type="age" valuetype="data.Natno"/>
  <Function type="father" valuetype="Person"/>
  <Function type="mother" valuetype="Person"/>
</Object>
 
<Function type="childOf_older_than" var="age" srcType="data.Natno">
  <Relation var="childOf">
    <Function type="child" var="c" tgtType="Person">
    <Function type="parent" var="p" tgtType="Person">
      <or>
        <Person obj="c"><father tgt="p"><age order="greater" obj="age"/></Person>
        <Person obj="c"><mother tgt="p"><age order="greater" obj="age"/></Person>
      </or>
    </Function>
    </Function>
  </Relation>
</Function>


Collection Type

students

The following forms in RDF and OML represent the natural language description taken from the current RDF (Resource Description Framework) Standard.

"The students in course 6.001 are Amy, Tim, John, Mary, and Sue."

This education example has the following semantics represented in natural language.

"If a student is enrolled in a course, then the student is a member of the student enrollment collection for that course."
RDF Directed Graph Form
RDF (Resource Description Framework) with Schemas
(object: bag)
  <rdf:RDF>
    <rdf:Description about="http://mycollege.edu/courses/6.001">
      <s:students>
        <rdf:Bag>
          <rdf:li resource="http://mycollege.edu/students/Amy"/>
          <rdf:li resource="http://mycollege.edu/students/Tim"/>
          <rdf:li resource="http://mycollege.edu/students/John"/>
          <rdf:li resource="http://mycollege.edu/students/Mary"/>
          <rdf:li resource="http://mycollege.edu/students/Sue"/>
        </rdf:Bag>
      </s:students>
    </rdf:Description>
  </rdf:RDF>
OML (Ontology Markup Language)
(ontology located at http://www.education.org/ontology/)
<OML>
  <Ontology id="Education" version="1.0">
    <comment>An education ontology</comment>
    <extends ontology="http://www.oml.org/ontology/" prefix="OML"/>
    <Collection type="Student.Collection" genus="Student"/>
    <Collection type="Course.Collection" genus="Course"/>
    <Object type="Student"/>   
    <Object type="Course">   
      <Function type="enrollment" tgtType="Student.Collection"/> 
    </Object>
    <Relation type="Member">
      <comment>
        The membership binary relation
        between students and student collections.
      </comment>
      <Function type="student" tgtType="Student"/>
      <Function type="collection" tgtType="Student.Collection"/>
    </Relation>
    <Relation type="Enrolled">
      <comment>
        The enrolled binary relation
        between students and courses.
      </comment>
      <Function type="student" tgtType="Student"/>
      <Function type="course" tgtType="Course"/>
    </Relation>
    <subtype specific="Student" generic="Person"/>
    <disjoint><Student/><Course/></disjoint>
    <Assertion>
      <Forall var="s" type="Student">
      <Forall var="c" type="Course">
      <Forall var="sc" type="Student.Collection">
        <implies>
          <and>
            <Enrolled><student tgt="s"/><course tgt="c"/></Enrolled>
            <Course src="c"><enrollment tgt="sc"/></Course> 
          </and>
          <Member><student tgt="s"/><collection tgt="sc"/></Member>
        </implies>
      </Forall>
      </Forall>
      </Forall>
    </Assertion>
  </Ontology>
</OML>
(object: collection)
<OML>
  <Course.Collection id="mycollege-courses" 
    ontology="http://www.education.org/ontology/">
    ...
    <Course id="6.001" about="http://mycollege.edu/courses/6.001">
      <enrollment>
        <Student.Collection>
          <Student id="Amy"  about="http://mycollege.edu/students/Amy"/>
          <Student id="Tim"  about="http://mycollege.edu/students/Tim"/>
          <Student id="John" about="http://mycollege.edu/students/John"/>
          <Student id="Mary" about="http://mycollege.edu/students/Mary"/>
          <Student id="Sue"  about="http://mycollege.edu/students/Sue"/>
        </Student.Collection>
      </enrollment>
    </Course>
    ...
  </Course.Collection>
</OML>

source code

The following forms in RDF and OML represent the natural language description taken from the current RDF (Resource Description Framework) Standard.

"The source code for X11 may be found at ftp.x.org, ftp.cs.purdue.edu, or ftp.eu.net."
RDF Directed Graph Form
RDF (Resource Description Framework) with Schemas
(object: alternative)
  <rdf:RDF>
    <rdf:Description about="http://x.org/packages/X11">
      <s:DistributionSite>
        <rdf:Alt>
          <rdf:li resource="ftp://ftp.x.org"/>
          <rdf:li resource="ftp://ftp.cs.purdue.edu"/>
          <rdf:li resource="ftp://ftp.eu.net"/>
        </rdf:Alt>
      </s:DistributionSite>
    </rdf:Description>
  </rdf:RDF>
OML (Ontology Markup Language)
(ontology located at http://www.sourcecode.org/ontology/)
<OML>
  <Ontology id="SourceCode" version="1.0">
    <extends ontology="http://www.oml.org/ontology/" prefix="OML"/>
    <Object type="Code.Source"/>   
    <Object type="Package">   
      <Function type="distributionSite" tgtType="Collection.Code.Source"/>
    </Object>   
    <Collection type="Collection.Code.Source" genus="Code.Source"/>
    <Collection type="Collection.Package" genus="Package"/>
  </Ontology>
</OML>
(object: collection)
<OML>
  <Collection.Package id="X11-packages" 
    ontology="http://www.sourcecode.org/ontology/">
    ...
    <Package id="mypackage">
      <distributionSite>
        <Collection.Code.Source>
          <Code.Source id="x-org" about="ftp://ftp.x.org"/>
          <Code.Source id="cs-purdue" about="ftp://ftp.cs.purdue.edu"/>
          <Code.Source id="eu-net" about="ftp://ftp.eu.net"/>
        </Collection.Code.Source>
      </distributionSite>
    </Package>
    ...
  </Collection.Package>
</OML>

collection of collections

The following form in OML represents the natural language description.

"The western states consist of the northwestern states Alaska, Idaho, Oregon and Washington and the southwestern states Arizona, California, Nevada, New Mexico and Texas."

This can be represented as a collection of collections. In general, since collections are typed, we can nest collections to any depth. The above description is an example of nesting to depth two.

OML (Ontology Markup Language)
(ontology located at http://www.collections.org/ontology/)
<OML>
  <Ontology id="NestedCollection" version="1.0">
    <comment>An ontology representing nested collections.</comment>
    <extends ontology="http://www.oml.org/ontology/" prefix="OML"/>
    <Object type="State"/>   
    <Collection type="Collection.State" genus="State"/>
    <Collection type="Collection.Collection.State" genus="Collection.State"/>
  </Ontology>
</OML>
(object: collection)
<OML>
  <Collection.Collection.State id="western-states" 
    ontology="http://www.collections.org/ontology/">
    <Collection.State id="northwestern-states">
      <State id="AK" text="Alaska" about="http://www.state.ak.us/"/>
      <State id="ID" text="Idaho" about="http://www2.state.id.us/"/>
      <State id="OR" text="Oregon" about="http://www.state.or.us/"/>
      <State id="WA" text="Washington" about="http://access.wa.gov/"/>
    </Collection.State>
    <Collection.State id="southwestern-states">
      <State id="AZ" text="Arizona" about="http://www.state.az.us/"/>
      <State id="CA" text="California" about="http://www.state.ca.us/s/"/>
      <State id="NV" text="Nevada" about="http://www.state.nv.us/"/>
      <State id="NM" text="New Mexico" about="http://www.state.nm.us/" 
        picture="http://www.state.nm.us/state/montage_pbutt.jpg"/>
      <State id="TX" text="Texas" about="http://www.state.tx.us/"/>
    </Collection.State>
  </Collection.Collection.State>
</OML>


Ontology

CG Ontology

The following OML ontology represents as a terminologoical ontology the Appendix B: Top Ontology of the 1999 book by John F. Sowa entitled "Knowledge Representation: Logical, Philosophical, and Computational Foundations". A more refined representation of this uses the theory and theory summation ideas in CKML, in order to factor the Top Ontology in terms of the three distinctions: physical-abstract; firstness-secondness-thirdness; and continuant-occurrent.

Conceptual Graph Ontological Categories - Concept Type Hierarchy
Lattice generated by the top three distinctions
[Figure 2.6 of Sowa, 1999]

 

OML (Ontology Markup Language)
(ontology)
<OML>
  <Ontology id="TopCGontology" version="1.0">
    <extends ontology="http://www.oml.org/ontology/" prefix="OML"/>
    <Object type="Entity"/>      <comment>root</comment>
<Object type="Thing"/> <comment>generator</comment> <Object type="Relation"/> <comment>generator</comment> <Object type="Mediation"/> <comment>generator</comment> <Object type="Physical"/> <comment>generator</comment> <Object type="Abstract"/> <comment>generator</comment> <Object type="Continuant"/> <comment>generator</comment> <Object type="Occurrent"/> <comment>generator</comment>
<Object type="Actuality"/> <comment>a physical thing</comment> <Object type="Form"/> <comment>an abstract thing</comment> <Object type="Prehension"/> <comment>a physical relation</comment> <Object type="Proposition"/> <comment>an abstract relation</comment> <Object type="Nexus"/> <comment>a physical mediation</comment> <Object type="Intention"/> <comment>an abstract mediation</comment>
<Object type="Object"/> <comment>an actuality considered as a continuant</comment> <Object type="Process"/> <comment>an actuality considered as an occurrent</comment> <Object type="Schema"/> <comment>a form considered as a continuant</comment> <Object type="Script"/> <comment>a form considered as an occurent</comment> <Object type="Condition"/> <comment>a prehension considered as a continuant</comment> <Object type="Behavior"/> <comment>a prehension considered as an occurrent</comment> <Object type="Description"/> <comment>a proposition considered as a continuant</comment> <Object type="History"/> <comment>a proposition considered as an occurrent</comment> <Object type="Situation"/> <comment>a nexus considered as a continuant</comment> <Object type="Execution"/> <comment>a nexus considered as an occurrent</comment> <Object type="Reason"/> <comment>an intention considered as a continuant</comment> <Object type="Purpose"/> <comment>an intention considered as an occurrent</comment>
<subtype specific="Thing" generic="Entity"/> <subtype specific="Relation" generic="Entity"/> <subtype specific="Mediation" generic="Entity"/> <subtype specific="Physical" generic="Entity"/> <subtype specific="Abstract" generic="Entity"/> <subtype specific="Continuant" generic="Entity"/> <subtype specific="Occurrent" generic="Entity"/> <disjoint><Thing/><Relation/><Mediation/></disjoint> <disjoint><Physical/><Abstract/></disjoint> <disjoint><Continuant/><Occurrent/></disjoint>
<subtype specific="Actuality" generic="Thing"/> <subtype specific="Actuality" generic="Physical"/> <subtype specific="Form" generic="Thing"/> <subtype specific="Form" generic="Abstract"/> <subtype specific="Prehension" generic="Relation"/> <subtype specific="Prehension" generic="Physical"/> <subtype specific="Proposition" generic="Relation"/> <subtype specific="Proposition" generic="Physical"/> <subtype specific="Nexus" generic="Mediation"/> <subtype specific="Nexus" generic="Physical"/> <subtype specific="Intention" generic="Mediation"/> <subtype specific="Intention" generic="Abstract"/>
<subtype specific="Object" generic="Actuality"/> <subtype specific="Object" generic="Continuant"/> <subtype specific="Process" generic="Actuality"/> <subtype specific="Process" generic="Occurrent"/> <subtype specific="Schema" generic="Form"/> <subtype specific="Schema" generic="Continuant"/> <subtype specific="Script" generic="Form"/> <subtype specific="Script" generic="Occurrent"/> <subtype specific="Condition" generic="Prehension"/> <subtype specific="Condition" generic="Continuant"/> <subtype specific="Behavior" generic="Prehension"/> <subtype specific="Behavior" generic="Occurrent"/> <subtype specific="Description" generic="Proposition"/> <subtype specific="Description" generic="Continuant"/> <subtype specific="History" generic="Proposition"/> <subtype specific="History" generic="Occurrent"/> <subtype specific="Situation" generic="Nexus"/> <subtype specific="Situation" generic="Continuant"/> <subtype specific="Execution" generic="Nexus"/> <subtype specific="Execution" generic="Occurrent"/> <subtype specific="Reason" generic="Intention"/> <subtype specific="Reason" generic="Continuant"/> <subtype specific="Purpose" generic="Intention"/> <subtype specific="Purpose" generic="Occurrent"/>
[and types below the top] </Ontology> </OML>


Context

Plumber carries Pipe

The following forms in CG and OML represent the English sentence

"A plumber is carrying a pipe."

This was taken from the current (June 1998) version of the CGIF (Conceptual Graph Interchange Format) Standard. Here we use an assertion to represent the logical expression that corresponds to the appropriate conceptual graph. There are several files associated with this example: [typing file] the PP ontology file, [metadata files] file(s) for the two collections, and [object files] two multimedia files (*.au and *.gif).

We paraphrase the CGIF standard. To illustrate descriptors and literals in the referent field, the following diagram shows the object type Situation with an assertion description. In the assertion, the agent function indicates that the plumber is the one who is doing the action, and the object function indicates that the pipe is the thematic object of the action. The situation instance is linked via the binary conceptual relation Image to an object of type Picture, whose reference contains a literal that illustrates the situation. It is also linked via another Image relation to an object of type Sound, whose reference contains another literal that encodes the associated sound." The verb "carry" is represented by a reified binary relation named "Carry".

Conceptual Graph Display Form
OML (Ontology Markup Language)
(ontology)
<OML>
  <Ontology id="PlumberPipe" version="1.0">
    <extends ontology="http://www.oml.org/ontology/" prefix="OML"/>
    <Object type="Situation"/>   
    <Object type="Person"/>   
    <Object type="Inanimate Object"/>   
    <Object type="Act"/>   
    <Object type="Plumber"/>   
    <Object type="Pipe"/>   
    <BinaryRelation type="carry" srcType="Person" tgtType="Inanimate Object"/>
    <Relation type="Carry" binrel="carry">
      <Function type="agent" tgtType="Person"/>
      <Function type="object" tgtType="Inanimate_Object"/>
    </Relation>
    <subtype specific="Plumber" generic="Person"/>
    <subtype specific="Pipe" generic="Inanimate Object"/>
    <subtype specific="Carry" generic="Act"/>
  </Ontology>
</OML>
(object)
We define an OML assertion to represent the expression "A plumber is carrying a pipe." This is placed in the context of a situation type object by pointing to the assertion with the description attribute of the situation. The OML assertion corresponds to the conceptual graph nested in the situation context. We use OML "object abbreviation" here, and do not declared specific objects (with ids) for the plumber and pipe, since we do not describe them in detail, but only make existential reference to them. Alternatively, we could use an inline existentially quantified object of the form <Plumber/>. Another OML abbreviation is to include text, picture, and sound as attributes of objects. These are intended to be used for display purposes. However, multiple references to multimedia would need an Image relation.
<Situation description="assertion-pcp"
  text="A plumber is carrying a pipe."
  picture="http://www.plumberpipe.com/PlumberPipe.gif"
  sound="http://www.plumberpipe.com/PlumberPipe.au"/>
 
<Assertion id="assertion-pcp">
  <Carry><agent tgt="Plumber"/><object tgt="Pipe"/></Carry>
</Assertion>

Tom believes

The following forms in CG and OML represent the English sentence taken from the current CGIF (Conceptual Graph Interchange Format) Standard.

"Tom believes that Mary wants to marry a sailor."
Conceptual Graph Display Form
Conceptual Graph Linear Form
[Person: Tom]<-(Expr)<-[Believe]->(Thme)- 
[Proposition: 
  [Person: Mary *x]<-(Expr)<-[Want]->(Thme)- 
  [Situation: 
    [?x]<-(Agnt)<-[Marry]->(Thme)->[Sailor]
  ]
] 
OML (Ontology Markup Language)
(ontology)
<OML>
  <Ontology id="Context" version="1.0">
    <extends ontology="http://www.oml.org/ontology/" prefix="OML"/>
    <Object type="Person"/>
    <Object type="Sailor"/>
    <Object type="Proposition"/>
    <Object type="Situation"/>
    <Relation type="Believe">   
      <Function type="expression" tgtType="Person"/>
      <Function type="object" tgtType="Assertion"/>
    </Relation>   
    <Relation type="Want">   
      <comment>The noun "want"</comment>
      <Function type="expression" tgtType="Person"/>
      <Function type="object" tgtType="Situation"/>
    </Relation>   
    <Relation type="Marry">   
      <comment>The noun "marry"</comment>
      <Function type="agent" tgtType="Person"/>
      <Function type="object" tgtType="Person"/>
    </Relation>   
    <subtype specific="Sailor" generic="Person"/>
  </Ontology>
</OML>
(object: inline version)
<Person id="t" text="Tom"/>
<Person id="m" text="Mary"/>
 
<Believe>
  <expression tgt="t"/>
  <theme><Proposition description="assertion-wants"/></theme>
</Believe>
 
<Assertion id="assertion-wants">
  <Wants>
    <expression tgt="m">
    <theme><Situation description="assertion-marry"/></theme>
  </Wants>
</Assertion>
 
<Assertion id="assertion-marry">
  <Marry>
    <agent tgt="m"/>
    <theme><Sailor/></theme>
  </Marry>
</Assertion>


Assertion

author-publication

The following axiomatization in OML represents the English sentence

"A person is an author of a document iff that document is a publication of that person."
<Assertion>
  <comment>
    If a person is an author of a document, 
    then that document is a publication of that person.
  </comment>
  <Forall var="p" type="Person">
  <Forall var="d" type="Document">
    <equiv>
      <author><agent tgt="p"><document tgt="d"></author>
      <publication><document tgt="d"><agent tgt="p"></publication>
    </equiv>
  </Forall>
  </Forall>
</Assertion>

Using both the binary relation basic type and the transpose involution operation in the base OML ontology, the above axiom becomes the following much simpler specification.

<transpose src="author" tgt="publication"/>

 

Please send questions, comments and
suggestions about this page to:
Robert E. Kent rekent@ontologos.org

Last modification date: April 2000