Author Topic: Abstraction of the Part_of Meronymy  (Read 1239 times)

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Abstraction of the Part_of Meronymy
« on: October 03, 2005, 09:57:03 am »
What would you consider to be a good abstraction of the Part_of Meronymy?

This question arises out of a desire to have code generators produce outputs that are enriched by the meronymic attributes specified in a UML model and to more clearly express the realization goals of the software development process (as communicated by a software engineer to a programmer).  That is, once I stereotype an association as a <<Part_of>>, and having published the conclusions from this discussion, what may I reasonably expect a programmer to code in response to that specification; and, what additional policy information do I need to communicate in, perhaps, another communication medium.

This discussion thread has been forked from a discussion on Collections Containers, Composites and Nests and conclusions drawn here can be brought back to the parent discussion.

Background Information

Meronimies
Meronimies describe the part-whole (a.k.a., Has-a) relation. It is a fairly complex relation which attempts to take into account the degree of differentiation of the parts with respect to the whole and also the role that these parts play with respect to their whole. For example, elements such as spatial cohesion and spatial differentiation, functional differentiation and nature of the links between the parts are crucial elements for determining meronomies. In fact, depending on the quality of these elements, we may have different kinds of meronomies, with different types of properties.
The meronomy relation has itself some properties (or attributes) which must be taken into account in any realistic model:
• optionality of a part,
• cardinality of a part with respect to the whole, e.g. a human has 2 legs, a car has 4 wheels,

There are 6 kinds of meronomies which differ according the functionalities, the spatial cohesion and the degree of dissimilarity between the parts and their whole.  In this thread, we are discussing the Part_of meronymy  I'll be setting up similar discussions for the other 5 meronymyies.

Policies
Some aspects of the following attributes and behaviors may be controlled by the adoption of various policy directions and their accompanying policy variant implementation.  For example, it can be a policy decision as to whether an item may self-remove from a collection or grouping.  The policy would be entitled: Item self-removal.  The two implementations would be: Item can self-remove and the other Item cannot self-remove.  As each instance of the whole is created, the appropriate policy implementations are applied and the behavior adjusted accordingly.

Where a behavior may be policy controlled the denotation [Policy] is added.  Policies allow for differences in the nature of the domain being modeled.  See:  sargasso

Now to the Abstraction...A work in progress.

Composite / integral Part
The Part_of meronymy describes a relation between a composite and its parts.  A Composite is a structure or an entity made up of distinct components.  In this context, Composite is similar to, but shouldn’t be constrained to the UML 2 definition of a composite.  Here, composite is a higher level abstraction that also includes the concepts  of UML 2 composites with inner structures, separately deployable components (as in J2EE or *.NET), browsers and the like.
• There is a clear structural and functional relation between the composite and its parts and possibly between the parts themselves, e.g. handle/cup, engine/wheel, etc. [Policy}
• The Parts are generally not of the same type as the Composite.
• When the Parts are of the same type as the Composite, there is a potential for recursion. [Policy]
• Instances of Parts can only be in one Composite instance at a time.
• Parts may need to know which composite object they are in. [Policy]
• Parts may collaborate with each other to effect the overall behavior of the Composite. [Policy]
• Some Parts are intrinsically part of the composite; others are extrinsically in the relationship for adornment. [Policy]
• If the part is intrinsic to the composite, the multiplicity of the component must be equal to or greater than 1.
• Destruction of the composite destroys the instances of its parts. [Policy]
• An integral part is not necessarily an intrinsic part.
• Destruction or modification of an intrinsic part always destroys the composite.   Question:  If the vocal chords of a goose (the part) are transplanted into a duck (the composite) so that the duck now ‘honks’ instead of ‘quacking’, has the duck been sufficiently modified to be considered destroyed?
• Destruction of an extrinsic part does not destroy the Composite. [Policy]
• Composite objects define the types of the intrinsic parts.
• Any given part may, or may not, be dereferenced through an attribute containing the referencing information. [Policy]
• Components may have their parts ‘wired in’ at instantiation or execution time.  For example:  under Inversion of Control (IoC), components my be given their part references via constructor and/or setter methods. [Policy}
• A Composite may, or may not, own its parts; but it does have exclusive stewardship responsibilities for, and usage rights to, the parts while they participate in the association. [Policy]

Notation:  An Association stereotyped as <<partOf>>.  Association ends may be adorned with navigation arrowheads, cardinallity and Ownership Diamonds.  An optional link name (formed by the conjunction of two verbs, or verb phrases, separated by a slash) assists the reader in verbalizing the association from either of its ends. Serious consideration should be given to the use of an Association Class to provide information about, and methods to manage, the nature of the association.

And back to the question...
This thread is a Request For Comments (RFC). I would like to hear your thoughts on this abstraction of the Part_of meronymy.  Is it valid?  Are parts of it invalid or missing?  Do you have a contribution to make?  Feel like pontificating?  ;)  What??
« Last Edit: October 03, 2005, 10:02:05 am by jeshaw2 »
Verbal Use Cases aren't worth the paper they are written upon.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6033
  • Karma: +73/-83
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Abstraction of the Part_of Meronymy
« Reply #1 on: October 03, 2005, 03:00:20 pm »
Quote
[size=13][SNIP][/size]
• If the part is intrinsic to the composite, the multiplicity of the component must be equal to or greater than 1.
• An integral part is not necessarily an intrinsic part.
• Destruction or modification of an intrinsic part always destroys the composite.[size=13][SNIP][/size]
Can you expand on: An integral part is not necessarily an intrinsic part?

Also, where the multiplicity of the parts is greater then the minimum, you can keep destroying the parts to your heart's content...  You still meet the minimum criteria for a valid whole.
You also need to consider the Specification vs the Realization.  If the Specification calls for three wheels, I have a tricycle.  If the instance loses one of them, I have a broken tricycle, not a bicycle.

Pontificating Pope Paolo  ;D

BTW:  The root of Pontificate comes from Pontifex, builder of bridges..
« Last Edit: October 03, 2005, 03:00:57 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Abstraction of the Part_of Meronymy
« Reply #2 on: October 03, 2005, 09:50:31 pm »
Quote
Can you expand on: An integral part is not necessarily an intrinsic part?

Sure. These two terms are very close, but I don't think they are full synonyms.  The differences are subtile and I'm still formulating thoughts about them.  I could use some help...

Quote
You also need to consider the Specification vs the Realization.  If the Specification calls for three wheels, I have a tricycle.  If the instance loses one of them, I have a broken tricycle, not a bicycle.
I think this observation starts to get at the difference between the two terms.

From www.dictionary.com:

Quote
integral adj. Essential or necessary for completeness; constituent:

intrinsic adj. Of or relating to the essential nature of a thing. Situated within or belonging solely to the organ or body part on which it acts.

bicycle n. A vehicle consisting of a light frame mounted on two wire-spoked wheels one behind the other and having a seat, handlebars for steering, brakes, and two pedals or a small motor by which it is driven.  

tricycle n. A vehicle, used especially by small children, that has three wheels, one at the front and two at the back, and is usually propelled by pedals.
If the wheel that the trycycle looses is a rear wheel, I think one could argue that you have an integral set of parts to make a bicycle, but you would not have an intrinsic set of parts.  Even though the set of integral parts all performed to the contract their interface specifies, as an assembly they don't meet the 'spirit' of the composit's design and function and thus, they are not an intrinsic set of parts.

Let me try this another way...Do you folks have a soup called chili?  Its made from tomatoes, ground beef, hot peppers, beans, and onions.  We have cook-off contests to discover who makes the best chili.  Well, the basic chili recipe calls for ground beef, but the contestors say that a #3 extruding die in the beef grinder is a must.   They say: "If it ain't #3, it ain't chili".  My wife says: "They are nuts, it tastes the same with any grind."  I think the contestors are closer to the essential nature of chili than my wife.  At least theirs have a better texture than  my wife's chili.  Of course I can't tell her that. ;D  What I'm trying to get a grip on here is a sense of quality about achiving the essence of the component rather than just its minimum requirements; and, also something about configuration management of the component parts.  Intuatively, I'm feeling that embedded in here is something I can and should expect from programmers implementing the design.

There is an ownership issue here.  Intrinsic implys sole ownership of the parts, integral implys shared access to the parts without sole ownership (whatever ownership means  ;) )

Does that help?

Quote
Also, where the multiplicity of the parts is greater then the minimum, you can keep destroying the parts to your heart's content...  You still meet the minimum criteria for a valid whole.
 I did say "equal to or greater than 1".  That is an outside minimum to state a part is intrinsic or integral.  If we are dealing with a tricycle, the minimum should be set to three, which is greater than one but not equal to one.  There is also the issue of configuring myWheels on myTricycle and not yourWheels on myTricycle.  This along, with the cardinality issues, would be reenforced and clarified on the Composite Structure diagrams.  

Perhaps we can abstract something from all of this to improve the above list of abstractions?


« Last Edit: October 03, 2005, 09:53:34 pm by jeshaw2 »
Verbal Use Cases aren't worth the paper they are written upon.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6033
  • Karma: +73/-83
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Abstraction of the Part_of Meronymy
« Reply #3 on: October 04, 2005, 04:55:43 am »
Quote
[size=13][SNIP][/size]
Jim,

I was going to reply in detail to your post which was very interesting.  But on the way home, I was discussing Integral vs Intrinsic with my car pool buddy David Payne and he suggested a difference between the two that has good modelling implications.  So I'm going to take his observation and run with it in the context of your example and posting...

We (that's David and I) agree that integral and intrinsic are very close but not full synonyms.  I use dictionaries as a starting point, but I create Glossaries or Ontologies which are more rigorous than Dictionaries - especially these days where Dictionary compilers have abdicated the provision of meaning and only provide usage.  (As an aside, I once accused the (then) compiler of the Macquarie Australian Dictionary of "adding to the entropy of the language" - on live radio.  Funnily enough, I got cut off... ;D)

Anyway, back to the issue at hand.  To our mind, the essential difference between the two terms has to do with to what they apply.

Integral applies to the instance!  Intrinsic applies to the definition or specification![/i]

Thus:
bicycle n. A vehicle consisting of a light frame mounted on two wheels one behind the other and having a seat, a mechanism for steering, brakes, and two pedals or a small motor by which it is driven.

tricycle n. A vehicle consisting of a light frame mounted on three wheels, one at the one end and two at the other and having a seat, a mechanism for steering, brakes, and two pedals or a small motor by which it is driven.


Notice how I have changed the definitions such that it is more obvious that we are dealing with two subtypes of some, more general, concept.
We could similarly add unicycle and quadricycle.

Now back to integral and intrinsic.  Given our definition above, we can say that having three wheels is intrinsic to a tricycle and that this particular wheel is integral to that tricycle!

Quote
Quote: Also, where the multiplicity of the parts is greater then the minimum, you can keep destroying the parts to your heart's content...  You still meet the minimum criteria for a valid whole.
I did say "equal to or greater than 1".
Jim, here I was referring to the statement:
• Destruction or modification of an intrinsic part always destroys the composite

It should read: Destruction or modification of an intrinsic part, such that the minimum cardinality is unavailable, always destroys the composite

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Abstraction of the Part_of Meronymy
« Reply #4 on: October 04, 2005, 06:20:56 am »
Paolo;

Quote
It should read: Destruction or modification of an intrinsic part, such that the minimum cardinality is unavailable, always destroys the composite

This is a very nice enhancement to the abstraction.  I agree.

Quote
To our mind, the essential difference between the two terms has to do with to what they apply. Integral applies to the instance!  Intrinsic applies to the definition or specification!

Yes... This gets at the completness or wholeness of the composite. I'm reminded of my  
man with a prosthetic arm situation.

Going further:
Quote
If the Specification calls for three wheels, I have a tricycle.  If the instance loses one of them, I have a broken tricycle, not a bicycle.
 I suggest that the lost wheel is an integral part whose loss has changed the tricycle's state, but has left you with an unwhole tricycle to return to the store.  If it were an intrinsic part, you'd have nothing to return for credit.   :D
Verbal Use Cases aren't worth the paper they are written upon.