Hi,
In general, a relationship requires your knowledge about both ends.
If you have only half of the information, the model will be in an
incomplete state, and analyses typically suppose the model is complete.
But, in particular, you are asking if a class having no children
shouldn't appear in Inheritance Relationships. Well, in this case, it
is not that you do not know the other half of the information, but
you certainly know there is no relationship. To state this, the
simplest thing is to not have the relationship in the model :).
Perhaps the confusion comes from not knowing what is required and
what is not. But, the problem of required is only valid for
properties of entities, not for entities. Thus, the properties
"superclass" and "subclass" are required for an
InheritanceDefinition, but we do not require an InheritanceDefinition
for each Class.
And please ask as many questions as you need, and do not be stressed
about our time too much (at least not until we said so) :).
Cheers,
Doru
On May 18, 2007, at 6:07 PM, Muhammad Bhatti wrote:
> Thanx Tudor, the response was quick and it worked!!
> I would like some more precision regarding my question about
> absence of child
> classes: what do we do for the relationships whose one entity
> doesn't exist, do
> we not consider them? For example, a class having no children
> shouldn't appear
> in Inheritance Relationship? If no, how do we represent them? I am
> working on a
> system where inheritance is very rarely used and thus these
> relationships will
> not appear in MOOSE.
>
> thanx once more for your time,
>
> usman
>
> Selon Tudor Girba <girba(a)iam.unibe.ch>:
>
>> Hi Usman,
>>
>>> 1. What I understood from the earlier discussion: we do generate
>>> Inheritance
>>> definitions for framework classes/system classes that are
>>> referenced by user
>>> defined classes. My questions is that what does their inheritance
>>> definition
>>> look like. In the simplest case, the inheritance definition for a
>>> system class
>>> may look like this (my assumption: we discard the belongsTo
>>> attribute):
>>>
>>> FAMIX.Class
>>> {
>>> id: 121
>>> name: 'FrameworkClass'
>>> stub: true
>>> }
>>
>> I do not understand this question.
>>
>>> 2. What about the inheritance definition of user definied classes
>>> that do not
>>> have any children. How do we assign their subclass attribute. I
>>> have tried the
>>> following by putting stub: true
>>>
>>> (FAMIX.InheritanceDefinition
>>> (id: 18)
>>> (stub true)
>>> (subclass 0)
>>> (superclass 5)
>>> )
>>> But it didn't work.
>>
>> There are several reasons why it did not work.
>>
>> First, the inheritance definition is between 2 ***existent***
>> classes, not between a class and its non existent children. So, in
>> this case, because an entity with id = 0 does not exist you would get
>> an error when loading the file.
>>
>> Second, it also would not work because whenever you make a reference
>> to an entity via an id, you have to use (idref: xxx). Thus, an
>> inheritance definition would look like:
>> (FAMIX.InheritanceDefinition
>> (id: ZZZ)
>> (subclass (idref: XXX))
>> (superclass (idref: YYY))
>> )
>>
>> Furthermore, we usually do not mark stub the relationships, but we
>> mark as stub only the structural entities. Thus, if the superclass is
>> stub, we know the inheritance points to an outside class.
>>
>> I attached here the corrected file.
>>
>> For a more detailed example of a valid MSE file, please take a
>> look at:
>> http://smallwiki.unibe.ch/moose/lansamplemodel/?action=MimeView
>>
>> --
>> Ce message a ete verifie par MailScanner
>> pour des virus ou des polluriels et rien de
>> suspect n'a ete trouve.
>>
>>
>
>
> --
> Muhammad Bhatti
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> --
> Ce message a ete verifie par MailScanner
> pour des virus ou des polluriels et rien de
> suspect n'a ete trouve.
>
--
Tudor Girba
www.iam.unibe.ch/~girbawww.iam.unibe.ch/~girba/blog/
"No matter how many recipes we'll know, we'll still value a chef."
Hi,
I am trying to see what it is possible to do with Hismo. After
building a ModelHistory, I tried to inspect different entities here.
The first problem that I bumped into is with NamespaceHistory. If I
try to call allClassHistories on a NamespaceHistory instance, it
tries to call
#computeSubHistories:computedForEachVersionAs:withDescription:, which
does not seem to be implemented anywhere.
Any clues on how to make this work? The purpose of this is to be able
to build package histories from namespace histories of Java systems
(for instance, org.bla.foo namespace will produce three nested
packages).
I am working with the more-or-less-latest version of Moose, in VW7.5.
Thanks,
Ricky
Hi pipole,
I would like to ask two novice questions.
1. What I understood from the earlier discussion: we do generate Inheritance
definitions for framework classes/system classes that are referenced by user
defined classes. My questions is that what does their inheritance definition
look like. In the simplest case, the inheritance definition for a system class
may look like this (my assumption: we discard the belongsTo attribute):
FAMIX.Class
{
id: 121
name: 'FrameworkClass'
stub: true
}
2. What about the inheritance definition of user definied classes that do not
have any children. How do we assign their subclass attribute. I have tried the
following by putting stub: true
(FAMIX.InheritanceDefinition
(id: 18)
(stub true)
(subclass 0)
(superclass 5)
)
But it didn't work.
I generate a file keeping the above defined hypotheses: minimal root definition
and subclass=0 definition for classes having no children but the file fails to
load in MOOSE. I am attached the file with this mail, just in case. The program
defines a simple inheritance hierarchy with only one method. The inheritance
hierarchy looks like this:
shape <- rectangle,circle,trapezoid
rectangle <- square,rectangle1
Circle <- Eclipse
For this problem, I would greatly appreciate your help coz IMHO the
documentation found on the Web provides several interpretations and can be a
misleading.
thanx in advance,
Usman
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.
Hi,
Doru introduced me to the SetUp package. I just thought I would share
with you one of my favorite prerequisites from the Cincom store, one
which I have just realized can't live without:
RBCodeModelWithVariables - shows a panel with the instance variables
for the current class
Hope you find it useful,
Mircea.
Hi moosers,
This is not directly related to moose, but still...
Does anybody know any article which does a survey of the questions
that the users ask themselves when faced with the task of
understanding a new software system?
Thanks,
Mircea.
Thanx for the earlier responses. I think I got my answer. One more thing if
you people can elaborate.
How do we represent system classes.... Do we create Famix.Class entries for
System classes?
thanx once more,
usman
Hi guys
Just that you know with mathieu and hani we are working on an
extension of the smalltalk importer
that merges class and metaclass so it may introduce some problems and
we will fix them.
We are writing new tests, cleaning and deprecated methods around the
importing context, uzw.
Stef
Hello all,
while extracting the inheritance definition of a class, this question poped up
in my mind: how do we specify multiple child classes for a class? Do we create
a new InheritanceDefinition for each one of them, which seems to be the case
with existing MSE files? For example
X <- Y <- A,Z (X is the base class, Y inherits from X, A,Z inherit from Y)
In this case, inheritancedefinition parameter for Y will be (format *Class* for
elaboration)
(FAMIX.InheritanceDefinition
(id: 6)
(superclass (idref: 1 *X*))
(subclass (idref: 3 *A*))
)
(FAMIX.InheritanceDefinition
(id: 7)
(superclass (idref: 1 *X*))
(subclass (idref: 4 *Z*))
)
thanx
Usman
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.
Hi,
when I look at the OMG EMOF spec, I can see Enumeration as a subclass of
DataType.
But it is not implemented in the Meta-EMOF-Model package.hank
Unfortunately, Enums also exits in Ecore model, so I will certainly need
it (as well as EnumLiterals) for my ecore importer.
Do you want I to implement them or do you prefer I assimilate them to
Emof.Type ?
thanks,
BOUAZZA Pierrick