Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » How do I add derived (cached) EOL operations to my EMF model?(Want something like what OCLInEcore does, but doesn't seem to exist in EMFatic/Epsilon)
How do I add derived (cached) EOL operations to my EMF model? [message #1064918] Fri, 21 June 2013 12:06 Go to next message
Darren Hurt is currently offline Darren Hurt
Messages: 15
Registered: July 2009
Junior Member
I want to be able to specify derived operations for my model. I've written the model using EMFatic, and expected to be able to insert derived EOL operations (and even evl invariants) like what you can do with OCLInEcore etc. I would use OCLInECore, but the Pivot implementation is still quite buggy in my opinion (I've found a fundamental bug with its dynamic dispatching that's made it impractical for my project). Also, the ability to create graphical editors via the annotations seems an attractive proposition in Epsilon, so I thought I'd give it a try.

However, it seems that you cannot include derived EOL ops and validations within the EMFatic file. A language for specifying derived EOL operations and EVL invariants etc. all in the same file as your EMF model and types (within the type definitions in fact) would seem like a nice potential addition to the Epsilon suite. I assume there is a good reason that hasn't been done?

Anyway, assuming this suggestion is dumb, I see that there is such a thing as a cached operation that you can include in EOL files, 'To simulate derived properties,' as it says.

How do I relate this to my statically defined model? I want my model to have a number of derived operations so that I can make use of polymorphism within my validations and also within code generation. I don't mind if I have to specify them in a separate file (so long as the separate file is validated in case types are deleted or attributes change type etc.). Whilst I'm here, if the answer is that the operations are only useful in contexts like the ones I mention, how can I specify the operations in an EOL file and then call them from both the validation and M2T transformations (to avoid duplicating such functions)?


Thanks in advance for any guidance in this matter,

Darren
Re: How do I add derived (cached) EOL operations to my EMF model? [message #1064927 is a reply to message #1064918] Fri, 21 June 2013 12:56 Go to previous messageGo to next message
Darren Hurt is currently offline Darren Hurt
Messages: 15
Registered: July 2009
Junior Member
OK, well I see that you can import libraries of EOL functions into evl files etc.
My next question is how can I make eol files model aware so that they are validated against and provide content assist against my EMF model?

Thanks,
Darren
Re: How do I add derived (cached) EOL operations to my EMF model? [message #1065015 is a reply to message #1064927] Sun, 23 June 2013 08:10 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 797
Registered: July 2009
Senior Member
Hi Darren,

All languages in Epsilon are dynamically typed so there's no support for Ecore-driven code completion I'm afraid.

Cheers,
Dimitris
Re: How do I add derived (cached) EOL operations to my EMF model? [message #1065620 is a reply to message #1065015] Wed, 26 June 2013 13:36 Go to previous message
Darren Hurt is currently offline Darren Hurt
Messages: 15
Registered: July 2009
Junior Member
That's a shame. I find that a lack of such validation (and content assistance) is slightly ironic considering that they include the evl language for OCL like validation constraints. So we can specify constraints for the model, but we can't validate that the constraints are themselves valid at the meta level (refer to valid meta-types etc.).... It's a shame as it seemed that the epsilon languages had everything I needed otherwise.
But with a large meta-model, and a lot of constraints and cached operations etc. I think it would be hard to maintain. I got the major OCL Pivot dispatching bug fixed now, so I'll probably use OCLInEcore instead....
Thanks for response.
Previous Topic:[ETL] Generated model can't be read or modified
Next Topic:Flock standalone
Goto Forum:
  


Current Time: Wed Jul 30 03:18:27 EDT 2014

Powered by FUDForum. Page generated in 0.03588 seconds