ontolog-forum
[Top] [All Lists]

Re: [ontolog-forum] When to use pure subclassing and when to use subclas

To: "[ontolog-forum]" <ontolog-forum@xxxxxxxxxxxxxxxx>
From: Dave McComb <mccomb@xxxxxxxxxxxxxxxx>
Date: Sun, 26 Jul 2009 14:17:38 -0400
Message-id: <D65A20EF5890634BB49C04BDA61A13E46586E4F9C0@xxxxxxxxxxxxxxxxxxxxxxxxx>
Garz (and anyone else following this thread)    (01)

We teach a class in OWL.  My sense from our students confusion is that the main 
point of departure between what you understand and what's occurring in an 
ontology comes down to the distinction between intensional and extensional 
sets.  An extensional set has it's members individually assigned to the set.  
This is how almost all of OO and Relational works.  People are in the set of 
employees because you put them in the employee master table or your program did 
a new method on the employee class.    (02)

An intensional set is one where you get members via some sort of inclusion 
criteria.  OWL/DL employs both strategies.  Your interface strategy is taking 
advantage of the intensional definition (although as in OO you could also asert 
something to be a member of the intersection)    (03)

_____
From: ontolog-forum-bounces@xxxxxxxxxxxxxxxx 
[ontolog-forum-bounces@xxxxxxxxxxxxxxxx] On Behalf Of Rich Cooper 
[rich@xxxxxxxxxxxxxxxxxxxxxx]
Sent: Sunday, July 26, 2009 9:25 AM
To: '[ontolog-forum] '
Subject: Re: [ontolog-forum] When to use pure subclassing and when to use       
subclassing by intersecting    (04)

It seems to me that the major difference is that logic presumes a global 
dictionary, so all properties are specifically defined and associated with a 
globally unique identifier.  OOP classes have private symbols, and the meaning 
of symbols (read, write, …) depends on which class(es) interpret the symbols.  
In OOP, only the type names are globally uniquely defined.  All others are 
locally defined within a scope.    (05)

-Rich    (06)



Sincerely,
Rich Cooper
EnglishLogicKernel.com
Rich AT EnglishLogicKernel DOT com    (07)

________________________________
From: ontolog-forum-bounces@xxxxxxxxxxxxxxxx 
[mailto:ontolog-forum-bounces@xxxxxxxxxxxxxxxx] On Behalf Of Duane Nickull
Sent: Sunday, July 26, 2009 8:18 AM
To: [ontolog-forum]
Subject: Re: [ontolog-forum] When to use pure subclassing and when to use 
subclassing by intersecting    (08)

Agree here.  As a programmer first, the subclass relationship has special 
meaning.    (09)

//AS3 super class
Private class SuperClass():void {
 public var  name:String;    (010)

//methods
 private setName (String name) {
   name = this.name;
   }    (011)

 private getName():void {
  returns name;
  }
}    (012)

And now a subclass that extends the super    (013)

Private class SubClass():void extends SuperClass{
// this should do everything the super does but add something new.
// by using “extends” it will inherit the Superclasses methods.    (014)

 public var  age:Integer;    (015)

//methods. Using uint instead of int since age will normally be 0 >
 private setAge (uint age) {
   age = this.age;
   }    (016)

 private getAge():void {
  returns age;
  }
}    (017)

Now an intersection class is often used in UML where CEP principles are 
involved.   This is however not a true intersection so it is usually called an 
Association class. Association class In modeling an association, there are 
times when you need to include another class because it includes valuable 
information about the relationship. For this you would use an association class 
that you tie to the primary association. An association class is represented 
like a normal class. The difference is that the association line between the 
primary classes intersects a dotted line connected to the association class. An 
example might be a class called “Event” and another one called “Entity” and the 
association class might document how the two are related (An Entity can be a 
catalyst for an event).    (018)

A true intersection must take two classes unrelated by their hierarchies' 
(often difficult since most taxonomies of classes in programming all inherit 
from the same primitive.  For example, everything in Java inherits from the 
Object:object).  There are some times when these do exist though.  Imagine you 
have a HusbandNetWealth and a WifeNetWealth class, you could say there is an 
intersection called “MarriedCoupleNetWealth” however many OO languages allow 
for something called Multiple inheritance and polymorphisms.  The latter class 
in this case can inherit from both the previous classes therefore rendering the 
intersection class notion completely worthless for most programmers and they 
simply regard it as an unnecessary construct invented by people who do not 
understand class inheritance.    (019)

Strictly speaking, from a programming perspective, most people will try to 
maintain some lineage of a hierarchy rather than trying to make an 
“intersection class” which is why ontologists who do this have a hard time 
trying to find programmers willing to implement their work.    (020)

Of course, this is all my personal opinion and others on the list will probably 
argue against it.    (021)

Duane Nickull    (022)

On 7/25/09 7:49 AM, "garz" <garz@xxxxxxx> wrote:
Hi Patrick,    (023)

i'm an object-oriented programmer, maybe thats why i have problems
understanding the concepts of an ontology. I dont want to model
anything, i want to write some components that enable you to create and
use ontologies in a some program. Therefor i need to understand the
concepts, so that those components can offer the full spectrum and in a
convenient way.    (024)

In object-oriented programming there are also classes and inheritance.
There i subclass a class so that i can add new properties to it (besides
adding new methods, which arent relevant for ontologies). You write,
that i cant have properties in a subclass that arent also in the
parentclass, but instances of a subclass can have properties that
instances of the superclass dont have because those properties arent
required in the superclass, but are required in the subclass. Is that right?    (025)

my question arose by studying the two example ontologies food.rdf and
wine.rdf in the ontology guide on the w3-site:
http://www.w3.org/TR/2004/REC-owl-guide-20040210/food.rdf
http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine.rdf    (026)

in the food.rdf, there are the classes:
<owl:Class rdf:ID="ConsumableThing"/>    (027)

<owl:Class rdf:ID="PotableLiquid">
<rdfs:subClassOf rdf:resource="#ConsumableThing"/>
<owl:disjointWith rdf:resource="#EdibleThing"/>
</owl:Class>    (028)

and in the wine.rdf there is the class:
<owl:Class rdf:ID="Wine">
<rdfs:subClassOf
rdf:resource="http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid"/<http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid>>
<rdfs:subClassOf>
   <owl:Restriction>
      <owl:onProperty rdf:resource="#hasMaker"/>
         <owl:cardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger";>1</owl:cardinality<http://www.w3.org/2001/XMLSchema#nonNegativeInteger>>
   </owl:Restriction>
</rdfs:subClassOf>
.....
</owl:Class>    (029)

<owl:ObjectProperty rdf:ID="hasMaker">
<rdf:type 
rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/<http://www.w3.org/2002/07/owl#FunctionalProperty>>
</owl:ObjectProperty>    (030)

Here, the class Wine defines new properties, that the class
PortableLiquid doesnt posses. But this is done via anonymous classes
that are defined between the <rdfs:subClassOf>-tags? So the Wine class
is subclass of PortableLiquid and a anonymous class that defines the
property hasMaker and that it this property required, right? So to say,
the new properties that the Wine class posseses are tricked into the
Wine class? Tricked because subclasses cant have new properties, like
you wrote respectively like i hope to have understood it in the right way.    (031)

I want to very much thank you, both Patrick and Alex, for taking your
time to answer my questions.
@Alex, i will come back to your explanation, as soon as i understand a
little more.    (032)

Best regards
Mario Uhlig    (033)


Patrick Cassidy schrieb:
> Garz,
>    I am not quite clear about the question, and the distinctions you are
> making.   Every subclass merely picks out of some parent class instances
> that have specific properties.  So you cannot have in a subclass properties
> that are not also in the parent class, but you can *require* that the
> instances of the subclasses have a specific property, even if that property
> is not "mentioned" (i.e. not required) for every instance of the parent
> class.
>
>   The term "intersection" is usually used to refer to an intersection of
> classes - the intersection is the class of entities, each of which is an
> instance of both parent classes.  That intersection is a subclass of each of
> the parent classes.  If you have a class of "RedThings" (anything that is
> red) and a class of "Wines" and you define a class of "RedWines" it could be
> a subclass of both RedThings and of "Wines", and would be the same as the
> intersection of "RedThings" and "Wines", unless you also add other
> restrictions to the "RedWines" class.  [[ this is a bad example, because
> colors are too heterogeneous in application for "RedThings" to be a useful
> class]].  You seem to be using "intersection" in a different sense.
>
>   Perhaps you could give a more specific example of what you would like to
> do.
>
> Pat
>
> Patrick Cassidy
> MICRA, Inc.
> 908-561-3416
> cell: 908-565-4053
> cassidy@xxxxxxxxx
>
>
>
>> -----Original Message-----
>> From: ontolog-forum-bounces@xxxxxxxxxxxxxxxx [mailto:ontolog-forum-
>> bounces@xxxxxxxxxxxxxxxx] On Behalf Of garz
>> Sent: Friday, July 24, 2009 12:35 PM
>> To: ontolog-forum@xxxxxxxxxxxxxxxx
>> Subject: [ontolog-forum] When to use pure subclassing and when to use
>> subclassing by intersecting
>>
>> Hi,
>>
>> i'm trying to create an ontology and there is a problem that i have in
>> understanding the difference between a pure subclass and a subclass
>> defined as intersection. my own explanation for this is the following:
>>
>> a subclass defined as intersection relates to the properties the
>> superclass has and constraints them. for example redwine constraints
>> the
>> property color of the superclass wine by constraining its value to red.
>> redwine is like an aspect or a view on a class, in this case on the
>> aspect color. or its like an alias picking a subset out of the related
>> superclass. a class defined that way introduces a new concept or term
>> by
>> just using the already existing, its not capable of creating new
>> content, so to speak.
>>
>> a pure subclass should then be used, if there is something new to it,
>> represented as a property that isnt mentioned in the superclass and the
>> subclass is free to introduce this property or not. if the property
>> already was in the superclass, a subclass defined by intersection would
>> be sufficient.
>>
>> am i correct with this thinking? i dont really get it. or is
>> intersection always applicable, but in this case i really dont
>> understand the sense behind it. plz enlighten me.
>>
>> regards
>>
>> _________________________________________________________________
>> Message Archives: http://ontolog.cim3.net/forum/ontolog-forum/
>> Config Subscr: http://ontolog.cim3.net/mailman/listinfo/ontolog-forum/
>> Unsubscribe: mailto:ontolog-forum-leave@xxxxxxxxxxxxxxxx
>> Shared Files: http://ontolog.cim3.net/file/
>> Community Wiki: http://ontolog.cim3.net/wiki/
>> To join: http://ontolog.cim3.net/cgi-bin/wiki.pl?WikiHomePage#nid1J
>> To Post: mailto:ontolog-forum@xxxxxxxxxxxxxxxx
>>
>>
>
>
> _________________________________________________________________
> Message Archives: http://ontolog.cim3.net/forum/ontolog-forum/
> Config Subscr: http://ontolog.cim3.net/mailman/listinfo/ontolog-forum/
> Unsubscribe: mailto:ontolog-forum-leave@xxxxxxxxxxxxxxxx
> Shared Files: http://ontolog.cim3.net/file/
> Community Wiki: http://ontolog.cim3.net/wiki/
> To join: http://ontolog.cim3.net/cgi-bin/wiki.pl?WikiHomePage#nid1J
> To Post: mailto:ontolog-forum@xxxxxxxxxxxxxxxx
>
>
>    (034)


_________________________________________________________________
Message Archives: http://ontolog.cim3.net/forum/ontolog-forum/
Config Subscr: http://ontolog.cim3.net/mailman/listinfo/ontolog-forum/
Unsubscribe: mailto:ontolog-forum-leave@xxxxxxxxxxxxxxxx
Shared Files: http://ontolog.cim3.net/file/
Community Wiki: http://ontolog.cim3.net/wiki/
To join: http://ontolog.cim3.net/cgi-bin/wiki.pl?WikiHomePage#nid1J
To Post: mailto:ontolog-forum@xxxxxxxxxxxxxxxx    (035)


_________________________________________________________________
Message Archives: http://ontolog.cim3.net/forum/ontolog-forum/  
Config Subscr: http://ontolog.cim3.net/mailman/listinfo/ontolog-forum/  
Unsubscribe: mailto:ontolog-forum-leave@xxxxxxxxxxxxxxxx
Shared Files: http://ontolog.cim3.net/file/
Community Wiki: http://ontolog.cim3.net/wiki/ 
To join: http://ontolog.cim3.net/cgi-bin/wiki.pl?WikiHomePage#nid1J
To Post: mailto:ontolog-forum@xxxxxxxxxxxxxxxx    (036)

<Prev in Thread] Current Thread [Next in Thread>