exporting model to mse? do they keep the metrics

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

Re: exporting model to mse? do they keep the metrics

Stéphane Ducasse
Hi doru

        LOC
        cyclomatic complexity for java method

> I do not understand what "non recomputable" means. Right now, everything that is not derived is saved.

was it fixed?
the last time I checked the metrics where not saved.

is numberOfMethod derived?
Stef



> Why is this not enough? I need a use case to understand :)
>
> Cheers,
> Doru
>
>
> On 15 Jul 2011, at 21:19, Stéphane Ducasse wrote:
>
>> doru
>>
>> I was discussing with andre and I would like to be able to tag a property as essential = non recomputable so that we can garantee that
>> we always save them.
>> what do you think about that?
>>
>>
>> Stef
>>
>> On Jul 15, 2011, at 12:23 PM, Tudor Girba wrote:
>>
>>> Hi Andre,
>>>
>>> I just saw that the latest Moose build failed because of mismatch between the names of metric properties. For example:
>>>
>>> FAMIXType>>numberOfLinesOfCode
>>> " <property: #WLOC longName: 'Number of lines of code' description:
>>> 'The number of lines of code in a class'>"
>>>
>>> <MSEProperty: #numberOfLinesOfCode type: #Number>
>>> <MSEComment: 'The number of lines of code in a class'>
>>>
>>> ^self
>>> lookUpPropertyNamed: #numberOfLinesOfCode
>>> computedAs: [self methodsGroup sum: #numberOfLinesOfCode]
>>>
>>>
>>> The name of the metric should be WLOC. This is historical and it is a metric used to communicate with external parsers.
>>>
>>> So, all in all we need the name of the old properties in the Fame description. Could you take care of that?
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>>
>>> On 14 Jul 2011, at 23:05, Tudor Girba wrote:
>>>
>>>> Hi,
>>>>
>>>> On 14 Jul 2011, at 19:46, Andre Hora wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> Yes Stef.
>>>>> Doru thanks for the feedback. You can check the code in (remember to use the last Merlin and updated the meta-model):
>>>>>
>>>>> Gofer new
>>>>> squeaksource: 'HoraExp';
>>>>> package: 'FameExportMSE';
>>>>
>>>> I tried this one. The idea is nice, but the problem is that the second step of the exporter wizard is too tall and goes out of my screen. We would need another layout.
>>>>
>>>>> package: 'FameExportProperties';
>>>>
>>>> Very cool. This needs to go in Moose-Finder. The only thing to fix here is the label in the first wizard step when we have to choose type of exported file.
>>>>
>>>>> package: 'Famix-Extensions';
>>>>
>>>> This is cool. I already copied it to the Moose repo. It's that easy :)
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>>> load.
>>>>>
>>>>> regards,
>>>>>
>>>>> On Thu, Jul 14, 2011 at 5:56 PM, Stéphane Ducasse <[hidden email]> wrote:
>>>>> grab me next time I'm around because I want to have a look at that.
>>>>>
>>>>> Stef
>>>>>
>>>>> On Jul 14, 2011, at 1:51 PM, Andre Hora wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> Just returning to this topic.
>>>>>>
>>>>>> As most of the metrics are not described at the Fame level we are losing this information when we export a model to MSE in Moose. We know that most of the metrics can be recalculated in the model, but in some cases they cannot.
>>>>>> For example, when exporting in Moose a Java (VerveineJ) model we lose the metrics cyclomaticComplexity (CYCLO) and numberOfStatements (NOS) and we cannot recalculate them.
>>>>>>
>>>>>> So, to avoid it, I changed some metrics (some I think are important, but we can change them if we integrate in Moose) to be described at the Fame level and like that we can export them into a MSE. In this case, as the we could have a huge MSE, I implemented a filter and you can select the metrics to be exported through a wizard. It solves, for example, the lose of information with VerveineJ if you decide to export CYCLO and NOS.
>>>>>>
>>>>>> To try you can run the script below and the right-click in a MooseModel and: Import / Export -> Export model to MSE with metrics. Use the last version of Merlin.
>>>>>>
>>>>>> Gofer new
>>>>>> squeaksource: 'FameImportExportEx';
>>>>>> package: 'Fame-ImportExport-Extensions';
>>>>>> package: 'Fame-ImportExport-Extensions-MSE';
>>>>>> load.
>>>>>>
>>>>>> regards,
>>>>>>
>>>>>> On Thu, Jun 23, 2011 at 3:32 PM, Stéphane Ducasse <[hidden email]> wrote:
>>>>>>> At one point metrics were described in the meta-model but then MSE files were very large, slow to export (because you have to compute all metrics), and slow to load (this was a long time ago). We decided to remove them from the Smalltalk MSE export (although the MSE importer can still handle metrics and other data, like for example when importing from infusion/verveinej).
>>>>>>
>>>>>> but even in Smalltalk you need to keep loc
>>>>>>
>>>>>>> Now is the interface to select what to export/import functional?
>>>>>>
>>>>>> I do not know but this is something you we should definitively do
>>>>>>    : select what to save
>>>>>>    : select the format
>>>>>>    -> tab separated, mse, xml
>>>>>>
>>>>>>
>>>>>>> That would be the way to go. Then describe metrics as part of a Fame package 'Metrics', then we can select group of data by package. I would still like to be able to not export metrics in the MSE file.
>>>>>>>
>>>>>>>
>>>>>>> On 22 juin 2011, at 15:27, Stéphane Ducasse wrote:
>>>>>>>
>>>>>>>> Hi guys
>>>>>>>>
>>>>>>>> I could not find metrics in the saved MSE metrics like LOC that cannot be computed by moose.
>>>>>>>> Are metrics saved? I remember writing tests to make sure that this was correct.
>>>>>>>>
>>>>>>>> In addition it would be good to be able to select some metrics to be exported to other formats.
>>>>>>>>
>>>>>>>> Stef
>>>>>>>> _______________________________________________
>>>>>>>> Moose-dev mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>
>>>>>>> --
>>>>>>> Simon Denier
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Andre Hora
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Andre Hora
>>>>>
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>>
>>>> "Beauty is where we see it."
>>>>
>>>>
>>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Being happy is a matter of choice."
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>
> --
> www.tudorgirba.com
>
> "Speaking louder won't make the point worthier."
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: exporting model to mse? do they keep the metrics

Tudor Girba-2
Hi,

On 15 Jul 2011, at 21:47, Stéphane Ducasse wrote:

> Hi doru
>
> LOC
> cyclomatic complexity for java method
>
>> I do not understand what "non recomputable" means. Right now, everything that is not derived is saved.
>
> was it fixed?

This is what Andre did and it is in Famix-Extensions.

> the last time I checked the metrics where not saved.

They are now because of the recent changes.

> is numberOfMethod derived?

Right now it is not derived:
numberOfMethods
        <MSEProperty: #numberOfMethods type: #Number>
        <MSEComment: 'The number of methods in a class'>

        ^self
                lookUpPropertyNamed: #NOM
                computedAs: [self methods size]

But probably it should be. LOC on the other hand should definitely not be derived.

Cheers,
Doru



> Stef
>
>
>
>> Why is this not enough? I need a use case to understand :)
>>
>> Cheers,
>> Doru
>>
>>
>> On 15 Jul 2011, at 21:19, Stéphane Ducasse wrote:
>>
>>> doru
>>>
>>> I was discussing with andre and I would like to be able to tag a property as essential = non recomputable so that we can garantee that
>>> we always save them.
>>> what do you think about that?
>>>
>>>
>>> Stef
>>>
>>> On Jul 15, 2011, at 12:23 PM, Tudor Girba wrote:
>>>
>>>> Hi Andre,
>>>>
>>>> I just saw that the latest Moose build failed because of mismatch between the names of metric properties. For example:
>>>>
>>>> FAMIXType>>numberOfLinesOfCode
>>>> " <property: #WLOC longName: 'Number of lines of code' description:
>>>> 'The number of lines of code in a class'>"
>>>>
>>>> <MSEProperty: #numberOfLinesOfCode type: #Number>
>>>> <MSEComment: 'The number of lines of code in a class'>
>>>>
>>>> ^self
>>>> lookUpPropertyNamed: #numberOfLinesOfCode
>>>> computedAs: [self methodsGroup sum: #numberOfLinesOfCode]
>>>>
>>>>
>>>> The name of the metric should be WLOC. This is historical and it is a metric used to communicate with external parsers.
>>>>
>>>> So, all in all we need the name of the old properties in the Fame description. Could you take care of that?
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>>
>>>> On 14 Jul 2011, at 23:05, Tudor Girba wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> On 14 Jul 2011, at 19:46, Andre Hora wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> Yes Stef.
>>>>>> Doru thanks for the feedback. You can check the code in (remember to use the last Merlin and updated the meta-model):
>>>>>>
>>>>>> Gofer new
>>>>>> squeaksource: 'HoraExp';
>>>>>> package: 'FameExportMSE';
>>>>>
>>>>> I tried this one. The idea is nice, but the problem is that the second step of the exporter wizard is too tall and goes out of my screen. We would need another layout.
>>>>>
>>>>>> package: 'FameExportProperties';
>>>>>
>>>>> Very cool. This needs to go in Moose-Finder. The only thing to fix here is the label in the first wizard step when we have to choose type of exported file.
>>>>>
>>>>>> package: 'Famix-Extensions';
>>>>>
>>>>> This is cool. I already copied it to the Moose repo. It's that easy :)
>>>>>
>>>>> Cheers,
>>>>> Doru
>>>>>
>>>>>
>>>>>> load.
>>>>>>
>>>>>> regards,
>>>>>>
>>>>>> On Thu, Jul 14, 2011 at 5:56 PM, Stéphane Ducasse <[hidden email]> wrote:
>>>>>> grab me next time I'm around because I want to have a look at that.
>>>>>>
>>>>>> Stef
>>>>>>
>>>>>> On Jul 14, 2011, at 1:51 PM, Andre Hora wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> Just returning to this topic.
>>>>>>>
>>>>>>> As most of the metrics are not described at the Fame level we are losing this information when we export a model to MSE in Moose. We know that most of the metrics can be recalculated in the model, but in some cases they cannot.
>>>>>>> For example, when exporting in Moose a Java (VerveineJ) model we lose the metrics cyclomaticComplexity (CYCLO) and numberOfStatements (NOS) and we cannot recalculate them.
>>>>>>>
>>>>>>> So, to avoid it, I changed some metrics (some I think are important, but we can change them if we integrate in Moose) to be described at the Fame level and like that we can export them into a MSE. In this case, as the we could have a huge MSE, I implemented a filter and you can select the metrics to be exported through a wizard. It solves, for example, the lose of information with VerveineJ if you decide to export CYCLO and NOS.
>>>>>>>
>>>>>>> To try you can run the script below and the right-click in a MooseModel and: Import / Export -> Export model to MSE with metrics. Use the last version of Merlin.
>>>>>>>
>>>>>>> Gofer new
>>>>>>> squeaksource: 'FameImportExportEx';
>>>>>>> package: 'Fame-ImportExport-Extensions';
>>>>>>> package: 'Fame-ImportExport-Extensions-MSE';
>>>>>>> load.
>>>>>>>
>>>>>>> regards,
>>>>>>>
>>>>>>> On Thu, Jun 23, 2011 at 3:32 PM, Stéphane Ducasse <[hidden email]> wrote:
>>>>>>>> At one point metrics were described in the meta-model but then MSE files were very large, slow to export (because you have to compute all metrics), and slow to load (this was a long time ago). We decided to remove them from the Smalltalk MSE export (although the MSE importer can still handle metrics and other data, like for example when importing from infusion/verveinej).
>>>>>>>
>>>>>>> but even in Smalltalk you need to keep loc
>>>>>>>
>>>>>>>> Now is the interface to select what to export/import functional?
>>>>>>>
>>>>>>> I do not know but this is something you we should definitively do
>>>>>>>   : select what to save
>>>>>>>   : select the format
>>>>>>>   -> tab separated, mse, xml
>>>>>>>
>>>>>>>
>>>>>>>> That would be the way to go. Then describe metrics as part of a Fame package 'Metrics', then we can select group of data by package. I would still like to be able to not export metrics in the MSE file.
>>>>>>>>
>>>>>>>>
>>>>>>>> On 22 juin 2011, at 15:27, Stéphane Ducasse wrote:
>>>>>>>>
>>>>>>>>> Hi guys
>>>>>>>>>
>>>>>>>>> I could not find metrics in the saved MSE metrics like LOC that cannot be computed by moose.
>>>>>>>>> Are metrics saved? I remember writing tests to make sure that this was correct.
>>>>>>>>>
>>>>>>>>> In addition it would be good to be able to select some metrics to be exported to other formats.
>>>>>>>>>
>>>>>>>>> Stef
>>>>>>>>> _______________________________________________
>>>>>>>>> Moose-dev mailing list
>>>>>>>>> [hidden email]
>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>
>>>>>>>> --
>>>>>>>> Simon Denier
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Andre Hora
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Andre Hora
>>>>>>
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>> --
>>>>> www.tudorgirba.com
>>>>>
>>>>> "Beauty is where we see it."
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>>
>>>> "Being happy is a matter of choice."
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>> --
>> www.tudorgirba.com
>>
>> "Speaking louder won't make the point worthier."
>>
>>
>> _______________________________________________
>> 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

--
www.tudorgirba.com

"One cannot do more than one can do."




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

Re: exporting model to mse? do they keep the metrics

Stéphane Ducasse

On Jul 15, 2011, at 9:54 PM, Tudor Girba wrote:

> Hi,
>
> On 15 Jul 2011, at 21:47, Stéphane Ducasse wrote:
>
>> Hi doru
>>
>> LOC
>> cyclomatic complexity for java method
>>
>>> I do not understand what "non recomputable" means. Right now, everything that is not derived is saved.
>>
>> was it fixed?
>
> This is what Andre did and it is in Famix-Extensions.

ok

He filtered also only number and I think that this should not be like that.
We can also want to save other types of properties

>
>> the last time I checked the metrics where not saved.
>
> They are now because of the recent changes.
>
>> is numberOfMethod derived?
>
> Right now it is not derived:
> numberOfMethods
> <MSEProperty: #numberOfMethods type: #Number>
> <MSEComment: 'The number of methods in a class'>
>
> ^self
> lookUpPropertyNamed: #NOM
> computedAs: [self methods size]

Ok I was confused.
I was not thinking that derived was the opposite of non recomputable but if this is the case then this is good

>
> But probably it should be. LOC on the other hand should definitely not be derived.
>
> Cheers,
> Doru
>
>
>
>> Stef
>>
>>
>>
>>> Why is this not enough? I need a use case to understand :)
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> On 15 Jul 2011, at 21:19, Stéphane Ducasse wrote:
>>>
>>>> doru
>>>>
>>>> I was discussing with andre and I would like to be able to tag a property as essential = non recomputable so that we can garantee that
>>>> we always save them.
>>>> what do you think about that?
>>>>
>>>>
>>>> Stef
>>>>
>>>> On Jul 15, 2011, at 12:23 PM, Tudor Girba wrote:
>>>>
>>>>> Hi Andre,
>>>>>
>>>>> I just saw that the latest Moose build failed because of mismatch between the names of metric properties. For example:
>>>>>
>>>>> FAMIXType>>numberOfLinesOfCode
>>>>> " <property: #WLOC longName: 'Number of lines of code' description:
>>>>> 'The number of lines of code in a class'>"
>>>>>
>>>>> <MSEProperty: #numberOfLinesOfCode type: #Number>
>>>>> <MSEComment: 'The number of lines of code in a class'>
>>>>>
>>>>> ^self
>>>>> lookUpPropertyNamed: #numberOfLinesOfCode
>>>>> computedAs: [self methodsGroup sum: #numberOfLinesOfCode]
>>>>>
>>>>>
>>>>> The name of the metric should be WLOC. This is historical and it is a metric used to communicate with external parsers.
>>>>>
>>>>> So, all in all we need the name of the old properties in the Fame description. Could you take care of that?
>>>>>
>>>>> Cheers,
>>>>> Doru
>>>>>
>>>>>
>>>>>
>>>>> On 14 Jul 2011, at 23:05, Tudor Girba wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> On 14 Jul 2011, at 19:46, Andre Hora wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> Yes Stef.
>>>>>>> Doru thanks for the feedback. You can check the code in (remember to use the last Merlin and updated the meta-model):
>>>>>>>
>>>>>>> Gofer new
>>>>>>> squeaksource: 'HoraExp';
>>>>>>> package: 'FameExportMSE';
>>>>>>
>>>>>> I tried this one. The idea is nice, but the problem is that the second step of the exporter wizard is too tall and goes out of my screen. We would need another layout.
>>>>>>
>>>>>>> package: 'FameExportProperties';
>>>>>>
>>>>>> Very cool. This needs to go in Moose-Finder. The only thing to fix here is the label in the first wizard step when we have to choose type of exported file.
>>>>>>
>>>>>>> package: 'Famix-Extensions';
>>>>>>
>>>>>> This is cool. I already copied it to the Moose repo. It's that easy :)
>>>>>>
>>>>>> Cheers,
>>>>>> Doru
>>>>>>
>>>>>>
>>>>>>> load.
>>>>>>>
>>>>>>> regards,
>>>>>>>
>>>>>>> On Thu, Jul 14, 2011 at 5:56 PM, Stéphane Ducasse <[hidden email]> wrote:
>>>>>>> grab me next time I'm around because I want to have a look at that.
>>>>>>>
>>>>>>> Stef
>>>>>>>
>>>>>>> On Jul 14, 2011, at 1:51 PM, Andre Hora wrote:
>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> Just returning to this topic.
>>>>>>>>
>>>>>>>> As most of the metrics are not described at the Fame level we are losing this information when we export a model to MSE in Moose. We know that most of the metrics can be recalculated in the model, but in some cases they cannot.
>>>>>>>> For example, when exporting in Moose a Java (VerveineJ) model we lose the metrics cyclomaticComplexity (CYCLO) and numberOfStatements (NOS) and we cannot recalculate them.
>>>>>>>>
>>>>>>>> So, to avoid it, I changed some metrics (some I think are important, but we can change them if we integrate in Moose) to be described at the Fame level and like that we can export them into a MSE. In this case, as the we could have a huge MSE, I implemented a filter and you can select the metrics to be exported through a wizard. It solves, for example, the lose of information with VerveineJ if you decide to export CYCLO and NOS.
>>>>>>>>
>>>>>>>> To try you can run the script below and the right-click in a MooseModel and: Import / Export -> Export model to MSE with metrics. Use the last version of Merlin.
>>>>>>>>
>>>>>>>> Gofer new
>>>>>>>> squeaksource: 'FameImportExportEx';
>>>>>>>> package: 'Fame-ImportExport-Extensions';
>>>>>>>> package: 'Fame-ImportExport-Extensions-MSE';
>>>>>>>> load.
>>>>>>>>
>>>>>>>> regards,
>>>>>>>>
>>>>>>>> On Thu, Jun 23, 2011 at 3:32 PM, Stéphane Ducasse <[hidden email]> wrote:
>>>>>>>>> At one point metrics were described in the meta-model but then MSE files were very large, slow to export (because you have to compute all metrics), and slow to load (this was a long time ago). We decided to remove them from the Smalltalk MSE export (although the MSE importer can still handle metrics and other data, like for example when importing from infusion/verveinej).
>>>>>>>>
>>>>>>>> but even in Smalltalk you need to keep loc
>>>>>>>>
>>>>>>>>> Now is the interface to select what to export/import functional?
>>>>>>>>
>>>>>>>> I do not know but this is something you we should definitively do
>>>>>>>>  : select what to save
>>>>>>>>  : select the format
>>>>>>>>  -> tab separated, mse, xml
>>>>>>>>
>>>>>>>>
>>>>>>>>> That would be the way to go. Then describe metrics as part of a Fame package 'Metrics', then we can select group of data by package. I would still like to be able to not export metrics in the MSE file.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 22 juin 2011, at 15:27, Stéphane Ducasse wrote:
>>>>>>>>>
>>>>>>>>>> Hi guys
>>>>>>>>>>
>>>>>>>>>> I could not find metrics in the saved MSE metrics like LOC that cannot be computed by moose.
>>>>>>>>>> Are metrics saved? I remember writing tests to make sure that this was correct.
>>>>>>>>>>
>>>>>>>>>> In addition it would be good to be able to select some metrics to be exported to other formats.
>>>>>>>>>>
>>>>>>>>>> Stef
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Moose-dev mailing list
>>>>>>>>>> [hidden email]
>>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Simon Denier
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Andre Hora
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Andre Hora
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Moose-dev mailing list
>>>>>>> [hidden email]
>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>
>>>>>> --
>>>>>> www.tudorgirba.com
>>>>>>
>>>>>> "Beauty is where we see it."
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> www.tudorgirba.com
>>>>>
>>>>> "Being happy is a matter of choice."
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Speaking louder won't make the point worthier."
>>>
>>>
>>> _______________________________________________
>>> 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
>
> --
> www.tudorgirba.com
>
> "One cannot do more than one can do."
>
>
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: exporting model to mse? do they keep the metrics

Tudor Girba-2
Hi,

On 15 Jul 2011, at 22:29, Stéphane Ducasse wrote:

>
> On Jul 15, 2011, at 9:54 PM, Tudor Girba wrote:
>
>> Hi,
>>
>> On 15 Jul 2011, at 21:47, Stéphane Ducasse wrote:
>>
>>> Hi doru
>>>
>>> LOC
>>> cyclomatic complexity for java method
>>>
>>>> I do not understand what "non recomputable" means. Right now, everything that is not derived is saved.
>>>
>>> was it fixed?
>>
>> This is what Andre did and it is in Famix-Extensions.
>
> ok
>
> He filtered also only number and I think that this should not be like that.
> We can also want to save other types of properties
>>
>>> the last time I checked the metrics where not saved.
>>
>> They are now because of the recent changes.
>>
>>> is numberOfMethod derived?
>>
>> Right now it is not derived:
>> numberOfMethods
>> <MSEProperty: #numberOfMethods type: #Number>
>> <MSEComment: 'The number of methods in a class'>
>>
>> ^self
>> lookUpPropertyNamed: #NOM
>> computedAs: [self methods size]
>
> Ok I was confused.
> I was not thinking that derived was the opposite of non recomputable but if this is the case then this is good

derived means that it should not be stored because it can be recomputed from the information available in the model. Anything that is not declared as derived gets saved.

Doru


>>
>> But probably it should be. LOC on the other hand should definitely not be derived.
>>
>> Cheers,
>> Doru
>>
>>
>>
>>> Stef
>>>
>>>
>>>
>>>> Why is this not enough? I need a use case to understand :)
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>> On 15 Jul 2011, at 21:19, Stéphane Ducasse wrote:
>>>>
>>>>> doru
>>>>>
>>>>> I was discussing with andre and I would like to be able to tag a property as essential = non recomputable so that we can garantee that
>>>>> we always save them.
>>>>> what do you think about that?
>>>>>
>>>>>
>>>>> Stef
>>>>>
>>>>> On Jul 15, 2011, at 12:23 PM, Tudor Girba wrote:
>>>>>
>>>>>> Hi Andre,
>>>>>>
>>>>>> I just saw that the latest Moose build failed because of mismatch between the names of metric properties. For example:
>>>>>>
>>>>>> FAMIXType>>numberOfLinesOfCode
>>>>>> " <property: #WLOC longName: 'Number of lines of code' description:
>>>>>> 'The number of lines of code in a class'>"
>>>>>>
>>>>>> <MSEProperty: #numberOfLinesOfCode type: #Number>
>>>>>> <MSEComment: 'The number of lines of code in a class'>
>>>>>>
>>>>>> ^self
>>>>>> lookUpPropertyNamed: #numberOfLinesOfCode
>>>>>> computedAs: [self methodsGroup sum: #numberOfLinesOfCode]
>>>>>>
>>>>>>
>>>>>> The name of the metric should be WLOC. This is historical and it is a metric used to communicate with external parsers.
>>>>>>
>>>>>> So, all in all we need the name of the old properties in the Fame description. Could you take care of that?
>>>>>>
>>>>>> Cheers,
>>>>>> Doru
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 14 Jul 2011, at 23:05, Tudor Girba wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> On 14 Jul 2011, at 19:46, Andre Hora wrote:
>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> Yes Stef.
>>>>>>>> Doru thanks for the feedback. You can check the code in (remember to use the last Merlin and updated the meta-model):
>>>>>>>>
>>>>>>>> Gofer new
>>>>>>>> squeaksource: 'HoraExp';
>>>>>>>> package: 'FameExportMSE';
>>>>>>>
>>>>>>> I tried this one. The idea is nice, but the problem is that the second step of the exporter wizard is too tall and goes out of my screen. We would need another layout.
>>>>>>>
>>>>>>>> package: 'FameExportProperties';
>>>>>>>
>>>>>>> Very cool. This needs to go in Moose-Finder. The only thing to fix here is the label in the first wizard step when we have to choose type of exported file.
>>>>>>>
>>>>>>>> package: 'Famix-Extensions';
>>>>>>>
>>>>>>> This is cool. I already copied it to the Moose repo. It's that easy :)
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Doru
>>>>>>>
>>>>>>>
>>>>>>>> load.
>>>>>>>>
>>>>>>>> regards,
>>>>>>>>
>>>>>>>> On Thu, Jul 14, 2011 at 5:56 PM, Stéphane Ducasse <[hidden email]> wrote:
>>>>>>>> grab me next time I'm around because I want to have a look at that.
>>>>>>>>
>>>>>>>> Stef
>>>>>>>>
>>>>>>>> On Jul 14, 2011, at 1:51 PM, Andre Hora wrote:
>>>>>>>>
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> Just returning to this topic.
>>>>>>>>>
>>>>>>>>> As most of the metrics are not described at the Fame level we are losing this information when we export a model to MSE in Moose. We know that most of the metrics can be recalculated in the model, but in some cases they cannot.
>>>>>>>>> For example, when exporting in Moose a Java (VerveineJ) model we lose the metrics cyclomaticComplexity (CYCLO) and numberOfStatements (NOS) and we cannot recalculate them.
>>>>>>>>>
>>>>>>>>> So, to avoid it, I changed some metrics (some I think are important, but we can change them if we integrate in Moose) to be described at the Fame level and like that we can export them into a MSE. In this case, as the we could have a huge MSE, I implemented a filter and you can select the metrics to be exported through a wizard. It solves, for example, the lose of information with VerveineJ if you decide to export CYCLO and NOS.
>>>>>>>>>
>>>>>>>>> To try you can run the script below and the right-click in a MooseModel and: Import / Export -> Export model to MSE with metrics. Use the last version of Merlin.
>>>>>>>>>
>>>>>>>>> Gofer new
>>>>>>>>> squeaksource: 'FameImportExportEx';
>>>>>>>>> package: 'Fame-ImportExport-Extensions';
>>>>>>>>> package: 'Fame-ImportExport-Extensions-MSE';
>>>>>>>>> load.
>>>>>>>>>
>>>>>>>>> regards,
>>>>>>>>>
>>>>>>>>> On Thu, Jun 23, 2011 at 3:32 PM, Stéphane Ducasse <[hidden email]> wrote:
>>>>>>>>>> At one point metrics were described in the meta-model but then MSE files were very large, slow to export (because you have to compute all metrics), and slow to load (this was a long time ago). We decided to remove them from the Smalltalk MSE export (although the MSE importer can still handle metrics and other data, like for example when importing from infusion/verveinej).
>>>>>>>>>
>>>>>>>>> but even in Smalltalk you need to keep loc
>>>>>>>>>
>>>>>>>>>> Now is the interface to select what to export/import functional?
>>>>>>>>>
>>>>>>>>> I do not know but this is something you we should definitively do
>>>>>>>>> : select what to save
>>>>>>>>> : select the format
>>>>>>>>> -> tab separated, mse, xml
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> That would be the way to go. Then describe metrics as part of a Fame package 'Metrics', then we can select group of data by package. I would still like to be able to not export metrics in the MSE file.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 22 juin 2011, at 15:27, Stéphane Ducasse wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi guys
>>>>>>>>>>>
>>>>>>>>>>> I could not find metrics in the saved MSE metrics like LOC that cannot be computed by moose.
>>>>>>>>>>> Are metrics saved? I remember writing tests to make sure that this was correct.
>>>>>>>>>>>
>>>>>>>>>>> In addition it would be good to be able to select some metrics to be exported to other formats.
>>>>>>>>>>>
>>>>>>>>>>> Stef
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Moose-dev mailing list
>>>>>>>>>>> [hidden email]
>>>>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Simon Denier
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> 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
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Andre Hora
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Andre Hora
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Moose-dev mailing list
>>>>>>>> [hidden email]
>>>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>>
>>>>>>> --
>>>>>>> www.tudorgirba.com
>>>>>>>
>>>>>>> "Beauty is where we see it."
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> www.tudorgirba.com
>>>>>>
>>>>>> "Being happy is a matter of choice."
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>>
>>>> "Speaking louder won't make the point worthier."
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>> --
>> www.tudorgirba.com
>>
>> "One cannot do more than one can do."
>>
>>
>>
>>
>> _______________________________________________
>> 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

--
www.tudorgirba.com

"What is more important: To be happy, or to make happy?"


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

Re: exporting model to mse? do they keep the metrics

Stéphane Ducasse
>>
>
> derived means that it should not be stored because it can be recomputed from the information available in the model. Anything that is not declared as derived gets saved.
>
> Doru

ok
we wrote a test that shows that a model saved and reloaded as the same entities and properties than the one it originates from.
Now since andre filters and keep only Number we may have problems.

We should check that because I would save everything that is not derived regardless of its type.

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

Re: exporting model to mse? do they keep the metrics

Andre Hora
"I do not understand what "non recomputable" means. Right now, everything that is not derived is saved. Why is this not enough? I need a use case to understand :)"

Right now yes, but in a near future (working in FameExportMSE) we will choose which properties we want to export, and the point is that you can choose not exporting a "non recomputable" property and it may not be good. I think Stef talking about that :)
So, I think that there are two points: (1) you can choose not export a property/entity because you want to deal with a smaller model - OK
(2) you can choose not export a property/entity because you just don't want a big file (in this case you can miss metrics unaware, eg, CYCLO and NOS)

On Fri, Jul 15, 2011 at 10:58 PM, Stéphane Ducasse <[hidden email]> wrote:
>>
>
> derived means that it should not be stored because it can be recomputed from the information available in the model. Anything that is not declared as derived gets saved.
>
> Doru

ok
we wrote a test that shows that a model saved and reloaded as the same entities and properties than the one it originates from.
Now since andre filters and keep only Number we may have problems.

We should check that because I would save everything that is not derived regardless of its type.

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



--
Andre Hora


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