Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Is-a
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{lowercase title}} {{Short description|Subsumption relationship between abstractions}} {{multiple issues| {{essay-like|date=August 2018}} {{technical|date=August 2018}} }} In [[knowledge representation and reasoning|knowledge representation]], [[ontology components]] and [[ontology engineering]], including for [[object-oriented programming]] and [[Object-oriented design|design]], '''is-a''' (also written as '''is_a''' or '''is a''') is a [[wikt:subsume|subsumptive]]{{efn|See [[Liskov substitution principle]].}} relationship between [[abstractions]] (e.g., [[type (disambiguation)|types]], [[class (knowledge representation)|classes]]), wherein one [[Class (knowledge representation)|class]] ''A'' is a [[subclass (knowledge representation)|subclass]] of another class ''B'' (and so ''B'' is a [[superclass (knowledge representation)|superclass]] of ''A''). In other words, type A is a [[subtyping|subtype]] of type B when A's [[Formal specification|specification]] implies B's specification. That is, any object (or class) that satisfies A's specification also satisfies B's specification, because B's specification is weaker.<ref>{{cite web|title=Subtypes and Subclasses|url=http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-170-laboratory-in-software-engineering-fall-2005/lecture-notes/lec14.pdf|publisher=MIT OCW|access-date=2 October 2012}}</ref> For example, a cat 'is a[n]' animal, but not vice versa. All cats are animals, but not all animals are cats. Behaviour that is relevant to all animals is defined on an animal class, whereas behaviour that is relevant only for cats is defined in a cat class. By defining the cat class as 'extending' the animal class, all cats 'inherit' the behaviour defined for animals, without the need to explicitly code that behaviour for cats. == Related concepts == The ''is-a'' relationship is to be contrasted with the ''[[has-a]]'' (''has_a'' or ''has a'') relationship between types (classes); confusing the relations ''has-a'' and ''is-a'' is a common error when designing a model (e.g., a [[computer program]]) of the real-world relationship between an object and its subordinate. The ''is-a'' relationship may also be contrasted with the ''[[Typeof|instance-of]]'' relationship between objects (instances) and types (classes): see [[Type–token distinction]]. To summarize the relations, there are: * [[hyperonym]]–[[hyponym]] (supertype/superclass–subtype/subclass) relations between types (classes) defining a taxonomic hierarchy, where ** for a [[Inheritance (object-oriented programming)|subsumption]] relation: a hyponym (subtype, subclass) has a ''type-of'' (''is-a'') relationship with its hyperonym (supertype, superclass); * [[holonym]]–[[meronym]] (whole/entity/container–part/constituent/member) relations between types (classes) defining a possessive hierarchy, where ** for an [[Aggregation (object-oriented programming)|aggregation]] (i.e. without ownership) relation: *** a holonym (whole) has a ''has-a'' relationship with its meronym (part), ** for a [[Composition (object-oriented programming)|composition]] (i.e. with ownership) relation: *** a meronym (constituent) has a ''[[part-of]]'' relationship with its holonym (entity), ** for a [[Object composition#Containment|containment]]<ref>See also [[Containment (computer programming)]].</ref> relation: *** a meronym (member) has a ''member-of'' relationship with its holonym ([[Container (abstract data type)|container]]); * concept–object (type–token) relations between types (classes) and objects (instances), where ** a token (object) has an ''[[Instance (computer science)|instance-of]]'' relationship with its type (class). ==See also== * [[Inheritance (object-oriented programming)]] * [[Liskov substitution principle]] (in [[object-oriented programming]]) * [[Subsumptive containment hierarchy|Subsumption]] * Is-a ** [[Hypernymy]] (and [[supertype]]) ** [[Hyponymy]] (and [[Subtyping|subtype]]) * [[Has-a]] ** [[Holonymy]] ** [[Meronymy]] ==Notes== {{notelist}} ==Citations== {{reflist|30em}} ==References== * [[Ronald J. Brachman]]; "[http://dblp.uni-trier.de/rec/bibtex/journals/computer/Brachman83 What IS-A is and isn't. An Analysis of Taxonomic Links in Semantic Networks]". IEEE Computer, 16 (10); October 1983 * Jean-Luc Hainaut, Jean-Marc Hick, Vincent Englebert, Jean Henrard, Didier Roland: [https://web.archive.org/web/20070211062250/http://www.informatik.uni-trier.de/~ley/db/conf/er/HainautHEHR96.html Understanding Implementations of IS-A Relations]. ER 1996: 42-57 [[Category:Object-oriented programming]] [[Category:Knowledge representation]] [[Category:Abstraction]] [[Category:Articles with example Java code]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:Efn
(
edit
)
Template:Lowercase title
(
edit
)
Template:Multiple issues
(
edit
)
Template:Notelist
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)