Hi everybody
I'm trying to use iPlasma to parse Java source files, export the model
as MSE, then import them in SqMoose using Fame.
I ran into a couple of problems when doing this, specificall the MSE
format built with iPlasma is not well parsed by Fame.
Here is a sample generated by iPlasma:
Beginning of MSE file:
(Moose.Model (entity
A) According to the MSE spec, the file cant begin directly with a name
like that, should be ((Moose.Model (entity (....))
Besides, I dont see the point of this header, it works fine without it.
(FAMIX.Namespace
(id: 6)
(name 'java::lang')
)
B) Fame infers accessor 'smalltalk-style', ie it will call #name: to
set the name of the Namespace entity in the example above.
It works in Famix3 but not in Famix2, where the setter is declared as
#setName: . It's alright with the inference rule of Meta (as I far as
I remember) but not with the new one. We should add those accessors
in Famix2 for seamless access.
(FAMIX.Class
(id: 3)
(name 'Object')
(belongsTo (idref: 6))
(isAbstract false)
(isInterface false)
C) Fame does not recognize the idref: syntax, only the ref: syntax.
The MSE spec is inconsistent about that: the grammar only defines the
ref: syntax as Fame does, but the doc talks about both an IDREF
command and a 'REF command for metamodels only'.
D) Finally, the biggest hurdle is that we dont know directly with
which version of Famix the file was created. For example, the FAMIX
package in SqMoose matches Famix3, and Famix2 is defined in a FAMIX2
package. This leads to a mismatch when trying to load the above file
which was generated with Famix2 (unless batch editing all FAMIX ->
FAMIX2)
My suggestion is that each Famix metamodel should explicitely declare
its version in its Fame package name, either Famix2 or Famix3, like
that:
FAMIXClass class>>annotation
<MSEClass: #Class super: 'FAMIX3.Type'>
<package: #FAMIX3>
^self
Does it sound ok?
--
Simon