Book a Demo

Author Topic: Is Specification - should it inherit?  (Read 5834 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Is Specification - should it inherit?
« on: June 15, 2005, 05:30:27 am »
You can define a class as a specification by setting the Is Specification checkbox in the Class|General|Advanced dialog.

If you inherit from such a class, should (conceptually) the Is Specification value also inherit?

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

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Is Specification - should it inherit?
« Reply #1 on: June 15, 2005, 06:30:20 pm »
(Conceptually) I wouldn't expect it to.  IsSpecification and other thingos like it seem to me to be an aspect/feature/characteristic of the class not an attribute as they are "commonly" understood in OO.

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Is Specification - should it inherit?
« Reply #2 on: June 15, 2005, 07:14:38 pm »
Quote
(Conceptually) I wouldn't expect it to.  Is Specification and other thingos like it seem to me to be an aspect/feature/characteristic of the class not an attribute as they are "commonly" understood in OO.

bruce
In my model, which I imported from Rose, I had stereotype «specification» for those classes that are specifications (=> Is Specification = True).  I set the bit at a top node and wrote a query that says: "find me those classes where stereotype «specification» and IsSpec (the DB field) are inconsistent" ;)
I then wrote a query to propagate the bit settings.  After I got it working properly, I discovered a couple of conceptual errors in my model! 8) 8)  So I think it is conceptually valid!

This, to me reinforces the idea of inheriting stereotypes.  I'll implement queries to do that once I figure out  how to get around the arcane implementation of multiple stereotypes within the EA DB.

YMMVW4M, ;D

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

alexander

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Is Specification - should it inherit?
« Reply #3 on: July 01, 2005, 12:36:57 pm »
I agree with Paolo, specification should be inherited, but only if u are trying to create a new specification, it instead u are trying to create a class that is built to that specification u should use 'realize' (wich doesn't inherit the stereotype). For that purposse, the 'IsSpecification' property should also be inherited.

I remember that discussion about stereotype inheratage, i would like to know if u (Paolo) have been working to build something to implement this in EA and the problems you've discovered. If there is a topic where u have continue discussing this, can u point me to it?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Is Specification - should it inherit?
« Reply #4 on: July 02, 2005, 06:30:54 am »
Quote
I agree with Paolo, specification should be inherited, but only if u are trying to create a new specification, it instead u are trying to create a class that is built to that specification u should use 'realize' (which doesn't inherit the stereotype). For that purpose, the 'IsSpecification' property should also be inherited.
Alexander, I'm not clear on what you are saying here.  Your words seem a bit self-contradictory.

Are you saying that for normal inheritance (Generalization), IsSpecification should inherit, and for Realization (the creation of a client according to the supplied specification), IsSpecification shouldn't inherit?  If you are, then I agree.
Quote
I remember that discussion about stereotype inheritance, i would like to know if u (Paolo) have been working to build something to implement this in EA and the problems you've discovered. If there is a topic where u have continue discussing this, can u point me to it?

The discussion on inheritability of stereotypes is found here:
http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.pl?board=UMLPRO;action=display;num=1115649626
Additional discussions on multiple inheritance are found here:
http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.pl?board=UMLPRO;action=display;num=1118716834;start=0#0
I have been working on some things, which may or may not be of interest to you.

The issue is compounded by EA's (self-)inconsistent behaviour when creating Generalization links.  Thomas Kilian was the first to raise the question as to whether EA has been built using OO principles, but he only beat me to it by a couple of days.
The way in which EA implements multiple stereotypes also doesn't help...

As it happens, based on my experiences over the last few weeks I was about to publish some thoughts on the questions of Generalization, Realization, Parameterized Classes, UML 2 Templates and so on.

If you are interested I can start a new thread on these.

Cheerz,
Paolo
« Last Edit: July 04, 2005, 06:17:10 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

alexander

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Is Specification - should it inherit?
« Reply #5 on: July 04, 2005, 05:41:38 am »
That was exactly what i was trying to say, i was trying to point out that inheritage was not the way to 'implement' a specification (usually is the way you do it when coding, so i thought it was important to separate the two)

I am interested, please do, i have a few ideas of my own i would like to discuss