Hi,
On 16 Jun 2010, at 05:33, Ross Boylan wrote:
On Wed, 2010-06-16 at 02:43 +0200, Tudor Girba wrote:
Hi,
On 16 Jun 2010, at 02:27, Ross Boylan wrote:
On Wed, 2010-06-16 at 02:17 +0200, Tudor Girba
wrote:
I do not know SAS, but you should check to see if the concepts
present
in FAMIX are of use to you. If yes, you can directly instantiate
them
from your parser. If not, then you will want to code a new
meta-model,
or extend the current ones to accommodate your needs. You can then
describe this new meta-model using FM3 (this is achieved via
Smalltalk
pragmas) and you get a browser and import-export in the MSE format
for
free.
Once you have your Smalltalk objects as instances of the meta-
model,
you can then use Mondrian and Glamour for building visual tools, or
the MooseAlgos to express graph-specific algorithms.
Does this help?
Well, I was hoping that I would need to specify the meta-model or
the
meta-meta-model, but not both. That is, I was hoping the tools
could
build one out of the other. It sounds as if you're telling me I
need to
do both.
You do not define the meta-meta-model, you use the existing one (FM3)
by just describing in your meta-model elements (classes and
attributes) using pragmas. That is, the meta-model holds the
Smalltalk
implementation, while the pragmas provide a higher level description
for other kinds of manipulations.
I hope I'm misunderstanding :)
I think you are :)
Also, is there a guide to what the pragmas are?
We do not have much of a guide for the moment, but we have plenty of
examples. For a class named "C" with one attribute
"interestingAttribute" of type String, you have to define the
followings:
- On the class size:
annotation
<MSEClass: 'X'>
- On the instance side:
interestingAttribute
<MSEProperty: #interestingAttribute type: #String>
^ interestingAttribute
Cheers,
Doru
So, rephrasing the question slightly, is there a way to generate the
smalltalk implementation directly from the pragmas? Or, even
better, a
graphical tool that allows you to specify the model and produces
everything else from it?
At this moment, there is no graphical tool to define the meta-model.
On the pragmas, at least some of them are
"documented" by the methods
FMPragmaProcessor>>processCompiledMethod:
MSEPragmaProcessor>>processClass:
Those are all that are relevant for the meta-describing your meta-
model part.
There are some huge strings that are (meta-)*model
specifications,
e.g.,
FAMIXSpecifications>>famixCore30mse and their use by
FAMIXSpecifications>>generateFamixCore30. What role do they play in
the
system?
These strings are indeed the meta-model specifications written in the
MSE format. From an MSE format you can generate the Smalltalk
implementation and the other way around. For example, through the MSE
format we can import meta-models developed in another language and
generate the Smalltalk implementation.
As mentioned before, there is no support for graphical support for
writing MSE files. The main reason here is that Smalltalk already
provides a good enough solution for quickly building classes and
methods, and annotating them is a practical solution.
However, we do have a tool for browsing an existing meta-model:
http://www.themoosebook.org/book/internals/famix/meta-browser
Cheers,
Doru
Ross
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Not knowing how to do something is not an argument for how it cannot
be done."