|How do I add derived (cached) EOL operations to my EMF model? [message #1064918]
||Fri, 21 June 2013 16:06
| Darren Hurt
Registered: July 2009
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,
Powered by FUDForum
. Page generated in 0.01922 seconds