Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Problem with EMFATIC file
Problem with EMFATIC file [message #857884] Thu, 26 April 2012 23:13 Go to next message
Freddy OrdonezFriend
Messages: 2
Registered: April 2012
Junior Member
Hello all,

I have a frustrating issue. I have tried generated a diagram from Emfatic file below, but EUGENIA don´t generated GMF .gmfgraph, .gmftool and .gmfmap models.
I´m not sure but I belive that problem there are the classes ContentPackage and ProcessPackage


@gmf.node(label = "name")
class ContentPackage extends MethodContentPackageableElement {

@gmf.compartment(foo="bar")
val ContentPackage[*] contentPackages;


}

@gmf.node(label = "name")
class ProcessPackage extends ProcessPackageableElement {
@gmf.compartment(foo="bar")
val ProcessElement[*] ownedProcessElements;
@gmf.compartment(foo="bar")
val ProcessPackage[*] subProcessPackages;

}


Does anyone know what may cause this problem? Thanks in advance.

Best regards
Re: Problem with EMFATIC file [message #859376 is a reply to message #857884] Fri, 27 April 2012 15:58 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Yes, you're right in that those seem to be the root of the problem. Removing them allows Eugenia to finish its execution safely.

I've ran the process through a debugger and it seems that ECoreUtil#isAncestor (which checks that a certain EObject belongs to the content tree of a ResourceSet) ends up in an endless loop when going through the parent of ContentPackage's "contentPackages" compartment. I believe this is probably an Eugenia issue, due to the way the GMF models are generated. I think Eugenia doesn't support recursively nested compartments yet, but I'm not quite sure of how we could map such a thing to the GMF models myself. Perhaps someone else could shed a bit of light on this issue?
Re: Problem with EMFATIC file [message #860576 is a reply to message #859376] Sat, 28 April 2012 05:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Antonio,

I see that two of the EcoreUtil.isAncestor methods aren't guarded
against infinite loops in the face of circular containment; see their
implementations. No doubt the source of that problem needs to be
tracked down, but it would be easier if there were no infinite loops.
Feel free to open an bugzilla and I'll ensure that the other two forms
behave like isAncestor(EObject, EObject).


On 27/04/2012 5:58 PM, Antonio Garcia-Dominguez wrote:
> Yes, you're right in that those seem to be the root of the problem.
> Removing them allows Eugenia to finish its execution safely.
>
> I've ran the process through a debugger and it seems that
> ECoreUtil#isAncestor (which checks that a certain EObject belongs to
> the content tree of a ResourceSet) ends up in an endless loop when
> going through the parent of ContentPackage's "contentPackages"
> compartment. I believe this is probably an Eugenia issue, due to the
> way the GMF models are generated. I think Eugenia doesn't support
> recursively nested compartments yet, but I'm not quite sure of how we
> could map such a thing to the GMF models myself. Perhaps someone else
> could shed a bit of light on this issue?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Problem with EMFATIC file [message #868353 is a reply to message #860576] Tue, 01 May 2012 19:24 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Dear Ed,

Yes, shielding ECoreUtil#isAncestor against these problems would make it much easier to debug the problem in Eugenia. I've reported the issue here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=378187

If you need any more information, I'd be happy to provide it.

Thank you for your help!
Re: Problem with EMFATIC file [message #869700 is a reply to message #868353] Thu, 03 May 2012 21:42 Go to previous messageGo to next message
Freddy OrdonezFriend
Messages: 2
Registered: April 2012
Junior Member
Thanks for taking in count our issue. We added to root element an element of the most abstract class and it allows to define circular containment. However, we still need constraint the root's child elements (only several elements should be added to the root). However the circular containment is allowed in any hierarchy different of the root element. Why it problem is presented only when the root element?.

Maybe the identified bug is the response, where we could download the latest version which this bug has been removed?

Thank you very much for your help!
Re: Problem with EMFATIC file [message #869792 is a reply to message #869700] Fri, 04 May 2012 10:14 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
In general circular containment is an error. Containment must always
induce a strict Directed Acyclic Graph. It's hard to even induce
circular containment because adding an object to a containment reference
will always remove it from its current container before adding it to the
new container, so the only possible way to produce such a result is to
add a root object (one for which EObject.eContainer() is null) to a
containment reference of one of its descendants. One might argue we
should check for that and prevent it, but that would involve navigating
the entire containment chain of the new container and would badly impact
performance for all modification of containment references. So better
we live with the problem and try to avoid it. If you need circularity,
you should use non-containment references.


On 03/05/2012 11:42 PM, Freddy Ordonez wrote:
> Thanks for taking in count our issue. We added to root element an
> element of the most abstract class and it allows to define circular
> containment. However, we still need constraint the root's child
> elements (only several elements should be added to the root). However
> the circular containment is allowed in any hierarchy different of the
> root element. Why it problem is presented only when the root element?.
>
> Maybe the identified bug is the response, where we could download the
> latest version which this bug has been removed?
>
> Thank you very much for your help!


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Problem with EMFATIC file [message #871785 is a reply to message #869700] Mon, 14 May 2012 21:33 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Just a quick heads up: according to the bug report, the fix seems to be available in the 2.8M7 build of EMF.
Previous Topic:[Doubt] About Eugenia
Next Topic:Weird problem/observation with Sequence remove()
Goto Forum:
  


Current Time: Fri Apr 19 05:19:41 GMT 2024

Powered by FUDForum. Page generated in 0.02912 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top