FAME, some examples?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

FAME, some examples?

Alberto Bacchelli
Hi,

  Other than reading the paper
FAME—A Polyglot Library for Metamodeling at Runtime*,
where can I find some *simple* examples/tutorials
on how to deal with FAME?

Thank you.

Cheers,
  Alberto
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: FAME, some examples?

Simon Denier-3

On 2 sept. 2010, at 16:59, Alberto Bacchelli wrote:

> Hi,
>
> Other than reading the paper
> FAME—A Polyglot Library for Metamodeling at Runtime*,
> where can I find some *simple* examples/tutorials
> on how to deal with FAME?

- There are some examples in Fame-Example
- Read the code belonging to Famix-Core package, it only contains Fame-generated code (so ignore all extensions). You actually only need to care about pragmas, since code can be generated.

Now the tricky part in Fame is to understand the bi-directional relationship and how to declare them with pragmas. Fortunately there are very few pragmas to learn. They are described there if you need (it should be put on the website actually):

http://code.google.com/p/moose-technology/wiki/FameMetaDescriptions

So what's my usual process basically:
1) create classes
2) create methods for attributes with just pragmas (no instance variable, no definition in method body)
3) export this metamodel as mse
4) import mse as a metamodel into a fresh image and generate classes from the metamodel
5) check that the generated classes are as expected

For 3-4, take a look in MooseModel class-side, categories import-export and meta

What else? The other tricky part is to check the consistency of pragmas declaration. For that there are some Lint rules dedicated to Fame, accessible from the meta browser. (BTW, there are still remaining issues in this area right now)


--
 Simon




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: FAME, some examples?

Simon Denier-3

As a meta-conclusion, there lots of pieces to handle meta-modeling issues in Moose right now: although the process is not streamlined, it's not difficult if you take the right steps as indicated.

And someone should put that on the website :) (not necessarily me, someone should proofread what I wrote)



On 2 sept. 2010, at 17:52, Simon Denier wrote:

>
> On 2 sept. 2010, at 16:59, Alberto Bacchelli wrote:
>
>> Hi,
>>
>> Other than reading the paper
>> FAME—A Polyglot Library for Metamodeling at Runtime*,
>> where can I find some *simple* examples/tutorials
>> on how to deal with FAME?
>
> - There are some examples in Fame-Example
> - Read the code belonging to Famix-Core package, it only contains Fame-generated code (so ignore all extensions). You actually only need to care about pragmas, since code can be generated.
>
> Now the tricky part in Fame is to understand the bi-directional relationship and how to declare them with pragmas. Fortunately there are very few pragmas to learn. They are described there if you need (it should be put on the website actually):
>
> http://code.google.com/p/moose-technology/wiki/FameMetaDescriptions
>
> So what's my usual process basically:
> 1) create classes
> 2) create methods for attributes with just pragmas (no instance variable, no definition in method body)
> 3) export this metamodel as mse
> 4) import mse as a metamodel into a fresh image and generate classes from the metamodel
> 5) check that the generated classes are as expected
>
> For 3-4, take a look in MooseModel class-side, categories import-export and meta
>
> What else? The other tricky part is to check the consistency of pragmas declaration. For that there are some Lint rules dedicated to Fame, accessible from the meta browser. (BTW, there are still remaining issues in this area right now)
>
>
> --
> Simon
>
>
>

--
 Simon




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: FAME, some examples?

Stéphane Ducasse
I went with doru and I tried to add comments to the all the core FAME classes in the past. so may be reading them and improving would be good.
There is a also the help system in pharo and I think that it would be great to put information there.

Stef

On Sep 2, 2010, at 5:56 PM, Simon Denier wrote:

>
> As a meta-conclusion, there lots of pieces to handle meta-modeling issues in Moose right now: although the process is not streamlined, it's not difficult if you take the right steps as indicated.
>
> And someone should put that on the website :) (not necessarily me, someone should proofread what I wrote)
>
>
>
> On 2 sept. 2010, at 17:52, Simon Denier wrote:
>
>>
>> On 2 sept. 2010, at 16:59, Alberto Bacchelli wrote:
>>
>>> Hi,
>>>
>>> Other than reading the paper
>>> FAME—A Polyglot Library for Metamodeling at Runtime*,
>>> where can I find some *simple* examples/tutorials
>>> on how to deal with FAME?
>>
>> - There are some examples in Fame-Example
>> - Read the code belonging to Famix-Core package, it only contains Fame-generated code (so ignore all extensions). You actually only need to care about pragmas, since code can be generated.
>>
>> Now the tricky part in Fame is to understand the bi-directional relationship and how to declare them with pragmas. Fortunately there are very few pragmas to learn. They are described there if you need (it should be put on the website actually):
>>
>> http://code.google.com/p/moose-technology/wiki/FameMetaDescriptions
>>
>> So what's my usual process basically:
>> 1) create classes
>> 2) create methods for attributes with just pragmas (no instance variable, no definition in method body)
>> 3) export this metamodel as mse
>> 4) import mse as a metamodel into a fresh image and generate classes from the metamodel
>> 5) check that the generated classes are as expected
>>
>> For 3-4, take a look in MooseModel class-side, categories import-export and meta
>>
>> What else? The other tricky part is to check the consistency of pragmas declaration. For that there are some Lint rules dedicated to Fame, accessible from the meta browser. (BTW, there are still remaining issues in this area right now)
>>
>>
>> --
>> Simon
>>
>>
>>
>
> --
> Simon
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev