Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [MOFScript] Inconsistent handling of subpackages
[MOFScript] Inconsistent handling of subpackages [message #606585] Tue, 14 August 2007 12:46
Eclipse User
Originally posted by: matt.mcgill.gmail.com

Hello again,

This is a bit of a continuation of my previous post. Since I suspected I
was having classloader issues resulting from some interaction among the
Acceleo plugin/EMF/MOFScript/Eclipse, I went ahead and wrote a JUnit
test to execute my MOFScript programmatically, manually registering the
Acceleo UML 1.4 metamodel with EMF at runtime. My simple test script
still does not function correctly, and I think I have identified the
problem (which does not, at least this time, appear to be
classloader-related).

It appears that subpackages in metamodels are not handled consistently
throughout the MOFScript code. For example, in
MofScriptModelChecker.checkRuleContext(...), when checking that the type
associated with a rule is present in the source metamodel, a method
named getMetaModelClassifier(...) is called which searches subpackages
recursively for the classifier in question. This would seem to imply
that MOFScript conceptually 'flattens' subpackages in the metamodel. On
the other hand, in IteratorStatementExecutor.executeStatement(...),
only the root metamodel package is checked for the classifier referenced
in the type constraint, meaning that no classifiers found in subpackages
will ever be matched during iteration. These two ways of dealing with
subpackages are obviously inconsistent.

Should this be considered a bug (in which case I will submit it, if
someone will point me at the bugtracker for this project), or was this
intended? If the latter, what is the rationale for ignoring subpackages?

I'd really appreciate some feedback on this issue. If this turns out to
be a systemic problem (i.e. the same type of code is scattered
throughout the implementations of many language features), it would
render MOFScript unusable for my current project. That would be tragic,
because MOFScript is great! =) I think the language itself is very clean
and expressive, without sacrificing power. I nice blending of
declarative, imperative, and template-based approaches to model
transformation.

-Matt McGill
Previous Topic:[TCS - Transformations Outside Eclipse ]
Next Topic:[MOFScript] Inconsistent handling of subpackages
Goto Forum:
  


Current Time: Sat Aug 23 07:42:32 EDT 2014

Powered by FUDForum. Page generated in 0.01533 seconds