Extracting CK+OO metrics from .mse file by Moose

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

Extracting CK+OO metrics from .mse file by Moose

Cường Phạm
Hi everyone,

My name is Cuong, from Post and Telecommunication of Information Technology in Vietnam. I am new to Moose, so can I ask you a question about how to use Moose to compute CK+OO metrics? I already exported .mse file for my project from Infusion tool, but it could not import to Moose (version 4.9) to calculate CK+OO metrics. Can you tell me how to do it?

Another question I want to ask you is that there is a function in Infosion tool that allows us to extract CK+OO metrics to html file, which is very convenient. The problem here is that I need to have license of Infusion to extract metrics for big projects (more than 100000 lines of code). It is quite expensive and I could not afford it. So do you have any suggestion about this problem? I really need this for my final thesis at my university.

Thank you so much.
Cheers,
Cuong.

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

Re: Extracting CK+OO metrics from .mse file by Moose

Tudor Girba-2
Hi Cuong,

Welcome.

What do you mean by CK+OO metrics? Could you explain in more details?

Cheers,
Doru



On Sat, Sep 27, 2014 at 7:32 AM, Cường Phạm <[hidden email]> wrote:
Hi everyone,

My name is Cuong, from Post and Telecommunication of Information Technology in Vietnam. I am new to Moose, so can I ask you a question about how to use Moose to compute CK+OO metrics? I already exported .mse file for my project from Infusion tool, but it could not import to Moose (version 4.9) to calculate CK+OO metrics. Can you tell me how to do it?

Another question I want to ask you is that there is a function in Infosion tool that allows us to extract CK+OO metrics to html file, which is very convenient. The problem here is that I need to have license of Infusion to extract metrics for big projects (more than 100000 lines of code). It is quite expensive and I could not afford it. So do you have any suggestion about this problem? I really need this for my final thesis at my university.

Thank you so much.
Cheers,
Cuong.

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




--

"Every thing has its own flow"

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

Re: Extracting CK+OO metrics from .mse file by Moose

SergeStinckwich
I guess this one:

http://www.aivosto.com/project/help/pm-oo-ck.html



On Sat, Sep 27, 2014 at 8:14 AM, Tudor Girba <[hidden email]> wrote:

> Hi Cuong,
>
> Welcome.
>
> What do you mean by CK+OO metrics? Could you explain in more details?
>
> Cheers,
> Doru
>
>
>
> On Sat, Sep 27, 2014 at 7:32 AM, Cường Phạm <[hidden email]> wrote:
>>
>> Hi everyone,
>>
>> My name is Cuong, from Post and Telecommunication of Information
>> Technology in Vietnam. I am new to Moose, so can I ask you a question about
>> how to use Moose to compute CK+OO metrics? I already exported .mse file for
>> my project from Infusion tool, but it could not import to Moose (version
>> 4.9) to calculate CK+OO metrics. Can you tell me how to do it?
>>
>> Another question I want to ask you is that there is a function in Infosion
>> tool that allows us to extract CK+OO metrics to html file, which is very
>> convenient. The problem here is that I need to have license of Infusion to
>> extract metrics for big projects (more than 100000 lines of code). It is
>> quite expensive and I could not afford it. So do you have any suggestion
>> about this problem? I really need this for my final thesis at my university.
>>
>> Thank you so much.
>> Cheers,
>> Cuong.
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/

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

Re: Extracting CK+OO metrics from .mse file by Moose

SergeStinckwich
In reply to this post by Cường Phạm
On Sat, Sep 27, 2014 at 7:32 AM, Cường Phạm <[hidden email]> wrote:

> Hi everyone,
>
> My name is Cuong, from Post and Telecommunication of Information Technology
> in Vietnam. I am new to Moose, so can I ask you a question about how to use
> Moose to compute CK+OO metrics? I already exported .mse file for my project
> from Infusion tool, but it could not import to Moose (version 4.9) to
> calculate CK+OO metrics. Can you tell me how to do it?
>
> Another question I want to ask you is that there is a function in Infosion
> tool that allows us to extract CK+OO metrics to html file, which is very
> convenient. The problem here is that I need to have license of Infusion to
> extract metrics for big projects (more than 100000 lines of code). It is
> quite expensive and I could not afford it. So do you have any suggestion
> about this problem? I really need this for my final thesis at my university.

Chao Em Cuong,

I think this better to use MOOSE 5.0 instead of 4.7. You will find the
last version here:
http://www.moosetechnology.org/#install

In order to use .mse file, you have to select in the world menu, Moose
tools and then Moose Panel.
After that, you have to select mse on the right, find your mse file in
your file system.
After that you will be able to browse your model and have a look at
various metrics.

Some metrics are already defined in MOOSE, but not sure that all the
metrics you want are defined.
In that case, you will have to define your own, i.e write some Smalltalk code.

Regards,
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/

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

Re: Extracting CK+OO metrics from .mse file by Moose

SergeStinckwich
In reply to this post by Cường Phạm
On Mon, Sep 29, 2014 at 1:46 PM, Cường Phạm <[hidden email]> wrote:

> Dear Mr Serge Stinckwich,
>
> It is me again, sorry for disturbing. I have asked Mai Anh and Fabrice about
> this issue, but unfortunately they do not work in this specific topic. May I
> ask you about the way I export CK+OO metrics from MOOSE?
>
> As you suggested, I use MOOSE 5.0 and successfully imported mse file into
> MOOSE. Now I do see these metrics in section "Properties" of tab "All
> modelclasses", but I could not find any button to export this to some kind
> of document such as xml or html file. Do I have to write any code to extract
> them out?
There is no generic way to dump all the information of a model. MOOSE
is a platform to analyse and visualize your model depending of what
you want to do.
Normally people who want to analyze some properties of their system,
write a specific script in Pharo in order to visit their model in an
appropriate way.

For example, if you want to generate a collection with the number of
methods (WMC metrics) for each classes of your model, you can do:

self allClasses collect: [:eachClass | eachClass numberOfMethods].

If you want to generate a result html file, you can do the following:

FileLocator desktop / 'result.html' writeStreamDo: [:out|
   out << '<html><head><title>Results</title></head><body><table border=1>'.
   out << '<tr bgcolor=silver>'; << '<th>Class</th><th>number of
methods</th></tr>'.
   self allClasses collect: [ :eachClass| out << '<tr>'; << '<th>'; <<
eachClass asString; << '</th>'; << '<th>' ;
   << eachClass numberOfMethods; << '</th>' ; << '</tr>'
   ].
   out << '</table></body></html>'.
]

For exemple, with a model with all the Collection classes, I will
obtain the attached html table.
After that you need to adapt the html dump to your needs.

Regards,
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/

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

Screen Shot 2014-09-29 at 17.20.45.png (1010K) Download Attachment