Home » Modeling » UML2 » Code generator problem with redefinitions
|
Re: Code generator problem with redefinitions [message #477609 is a reply to message #477608] |
Wed, 16 July 2008 14:15 |
Lutz Wrage Messages: 181 Registered: July 2009 |
Senior Member |
|
|
That was so misleading... Here the clarification:
The stack overflow occurs if the feature is accessed using eGet and
eIsSet, which are used in the generated editor, for example. That's
where I ran into the problem.
The generated isSet and getB methods are obviously fine, and there
certainly is code to handle multiple inheritance. It seems that it's not
enough, though.
- Lutz
Lutz Wrage wrote, on 7/16/2008 9:41 AM:
> Hi,
>
> I ran into the following problem when generating code from my metamodel.
> It's when I use a combination of multiple inheritance an redefinition.
> See the attached file for a minimal example.
> I have a class C that specializes two classes A and B. A and B have
> properties a and b, respectively. In C I redefine both properties. I
> generate code for this model (with processing duplicate features). The
> generated Java implementation class CImpl extends AImpl.
>
> However, the generated code has the problem that it is impossible to get
> the value of feature b in C, because eGet, etc., only go up the Java
> inheritance hierarchy. Accessing C.b in any way leads to a stack
> overflow. To me this looks like an oversight in the UML code generator
> because it creates no code that takes UML multiple inheritance into
> account for this scenario.
>
> I changed my metamodel to use subsetting instead, but that's not quite
> the correct semantics in my situation.
>
> - Lutz
>
|
|
|
Re: Code generator problem with redefinitions [message #477619 is a reply to message #477609] |
Fri, 18 July 2008 16:03 |
Lutz Wrage Messages: 181 Registered: July 2009 |
Senior Member |
|
|
No need to reply to this. I've reported a bug (patch attached):
https://bugs.eclipse.org/bugs/show_bug.cgi?id=241411
- Lutz
Lutz Wrage wrote, on 7/16/2008 10:15 AM:
> That was so misleading... Here the clarification:
>
> The stack overflow occurs if the feature is accessed using eGet and
> eIsSet, which are used in the generated editor, for example. That's
> where I ran into the problem.
>
> The generated isSet and getB methods are obviously fine, and there
> certainly is code to handle multiple inheritance. It seems that it's not
> enough, though.
>
> - Lutz
>
> Lutz Wrage wrote, on 7/16/2008 9:41 AM:
>> Hi,
>>
>> I ran into the following problem when generating code from my
>> metamodel. It's when I use a combination of multiple inheritance an
>> redefinition. See the attached file for a minimal example.
>> I have a class C that specializes two classes A and B. A and B have
>> properties a and b, respectively. In C I redefine both properties. I
>> generate code for this model (with processing duplicate features). The
>> generated Java implementation class CImpl extends AImpl.
>>
>> However, the generated code has the problem that it is impossible to
>> get the value of feature b in C, because eGet, etc., only go up the
>> Java inheritance hierarchy. Accessing C.b in any way leads to a stack
>> overflow. To me this looks like an oversight in the UML code generator
>> because it creates no code that takes UML multiple inheritance into
>> account for this scenario.
>>
>> I changed my metamodel to use subsetting instead, but that's not quite
>> the correct semantics in my situation.
>>
>> - Lutz
>>
|
|
|
Re: Code generator problem with redefinitions [message #477620 is a reply to message #477619] |
Fri, 18 July 2008 18:06 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Thanks Lutz,
I'll have a look at the defect in detail for the next iteration of UML2.
Cheers,
- James.
"Lutz Wrage" <lwrage@sei.cmu.edu> wrote in message
news:g5qet7$uh7$1@build.eclipse.org...
> No need to reply to this. I've reported a bug (patch attached):
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=241411
>
> - Lutz
>
> Lutz Wrage wrote, on 7/16/2008 10:15 AM:
>> That was so misleading... Here the clarification:
>>
>> The stack overflow occurs if the feature is accessed using eGet and
>> eIsSet, which are used in the generated editor, for example. That's where
>> I ran into the problem.
>>
>> The generated isSet and getB methods are obviously fine, and there
>> certainly is code to handle multiple inheritance. It seems that it's not
>> enough, though.
>>
>> - Lutz
>>
>> Lutz Wrage wrote, on 7/16/2008 9:41 AM:
>>> Hi,
>>>
>>> I ran into the following problem when generating code from my metamodel.
>>> It's when I use a combination of multiple inheritance an redefinition.
>>> See the attached file for a minimal example.
>>> I have a class C that specializes two classes A and B. A and B have
>>> properties a and b, respectively. In C I redefine both properties. I
>>> generate code for this model (with processing duplicate features). The
>>> generated Java implementation class CImpl extends AImpl.
>>>
>>> However, the generated code has the problem that it is impossible to get
>>> the value of feature b in C, because eGet, etc., only go up the Java
>>> inheritance hierarchy. Accessing C.b in any way leads to a stack
>>> overflow. To me this looks like an oversight in the UML code generator
>>> because it creates no code that takes UML multiple inheritance into
>>> account for this scenario.
>>>
>>> I changed my metamodel to use subsetting instead, but that's not quite
>>> the correct semantics in my situation.
>>>
>>> - Lutz
>>>
|
|
|
Re: Code generator problem with redefinitions [message #626799 is a reply to message #477608] |
Wed, 16 July 2008 14:15 |
Lutz Wrage Messages: 181 Registered: July 2009 |
Senior Member |
|
|
That was so misleading... Here the clarification:
The stack overflow occurs if the feature is accessed using eGet and
eIsSet, which are used in the generated editor, for example. That's
where I ran into the problem.
The generated isSet and getB methods are obviously fine, and there
certainly is code to handle multiple inheritance. It seems that it's not
enough, though.
- Lutz
Lutz Wrage wrote, on 7/16/2008 9:41 AM:
> Hi,
>
> I ran into the following problem when generating code from my metamodel.
> It's when I use a combination of multiple inheritance an redefinition.
> See the attached file for a minimal example.
> I have a class C that specializes two classes A and B. A and B have
> properties a and b, respectively. In C I redefine both properties. I
> generate code for this model (with processing duplicate features). The
> generated Java implementation class CImpl extends AImpl.
>
> However, the generated code has the problem that it is impossible to get
> the value of feature b in C, because eGet, etc., only go up the Java
> inheritance hierarchy. Accessing C.b in any way leads to a stack
> overflow. To me this looks like an oversight in the UML code generator
> because it creates no code that takes UML multiple inheritance into
> account for this scenario.
>
> I changed my metamodel to use subsetting instead, but that's not quite
> the correct semantics in my situation.
>
> - Lutz
>
|
|
|
Re: Code generator problem with redefinitions [message #626810 is a reply to message #477609] |
Fri, 18 July 2008 16:03 |
Lutz Wrage Messages: 181 Registered: July 2009 |
Senior Member |
|
|
No need to reply to this. I've reported a bug (patch attached):
https://bugs.eclipse.org/bugs/show_bug.cgi?id=241411
- Lutz
Lutz Wrage wrote, on 7/16/2008 10:15 AM:
> That was so misleading... Here the clarification:
>
> The stack overflow occurs if the feature is accessed using eGet and
> eIsSet, which are used in the generated editor, for example. That's
> where I ran into the problem.
>
> The generated isSet and getB methods are obviously fine, and there
> certainly is code to handle multiple inheritance. It seems that it's not
> enough, though.
>
> - Lutz
>
> Lutz Wrage wrote, on 7/16/2008 9:41 AM:
>> Hi,
>>
>> I ran into the following problem when generating code from my
>> metamodel. It's when I use a combination of multiple inheritance an
>> redefinition. See the attached file for a minimal example.
>> I have a class C that specializes two classes A and B. A and B have
>> properties a and b, respectively. In C I redefine both properties. I
>> generate code for this model (with processing duplicate features). The
>> generated Java implementation class CImpl extends AImpl.
>>
>> However, the generated code has the problem that it is impossible to
>> get the value of feature b in C, because eGet, etc., only go up the
>> Java inheritance hierarchy. Accessing C.b in any way leads to a stack
>> overflow. To me this looks like an oversight in the UML code generator
>> because it creates no code that takes UML multiple inheritance into
>> account for this scenario.
>>
>> I changed my metamodel to use subsetting instead, but that's not quite
>> the correct semantics in my situation.
>>
>> - Lutz
>>
|
|
|
Re: Code generator problem with redefinitions [message #626811 is a reply to message #477619] |
Fri, 18 July 2008 18:06 |
james bruck Messages: 1724 Registered: July 2009 |
Senior Member |
|
|
Thanks Lutz,
I'll have a look at the defect in detail for the next iteration of UML2.
Cheers,
- James.
"Lutz Wrage" <lwrage@sei.cmu.edu> wrote in message
news:g5qet7$uh7$1@build.eclipse.org...
> No need to reply to this. I've reported a bug (patch attached):
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=241411
>
> - Lutz
>
> Lutz Wrage wrote, on 7/16/2008 10:15 AM:
>> That was so misleading... Here the clarification:
>>
>> The stack overflow occurs if the feature is accessed using eGet and
>> eIsSet, which are used in the generated editor, for example. That's where
>> I ran into the problem.
>>
>> The generated isSet and getB methods are obviously fine, and there
>> certainly is code to handle multiple inheritance. It seems that it's not
>> enough, though.
>>
>> - Lutz
>>
>> Lutz Wrage wrote, on 7/16/2008 9:41 AM:
>>> Hi,
>>>
>>> I ran into the following problem when generating code from my metamodel.
>>> It's when I use a combination of multiple inheritance an redefinition.
>>> See the attached file for a minimal example.
>>> I have a class C that specializes two classes A and B. A and B have
>>> properties a and b, respectively. In C I redefine both properties. I
>>> generate code for this model (with processing duplicate features). The
>>> generated Java implementation class CImpl extends AImpl.
>>>
>>> However, the generated code has the problem that it is impossible to get
>>> the value of feature b in C, because eGet, etc., only go up the Java
>>> inheritance hierarchy. Accessing C.b in any way leads to a stack
>>> overflow. To me this looks like an oversight in the UML code generator
>>> because it creates no code that takes UML multiple inheritance into
>>> account for this scenario.
>>>
>>> I changed my metamodel to use subsetting instead, but that's not quite
>>> the correct semantics in my situation.
>>>
>>> - Lutz
>>>
|
|
|
Goto Forum:
Current Time: Thu Sep 26 02:12:04 GMT 2024
Powered by FUDForum. Page generated in 0.02799 seconds
|