On Mon, Sep 29, 2014 at 1:46 PM, Cường Phạm <cuongpham92(a)gmail.com> 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/
Hi!
I will try to answer you more in detail ASAP. But you are missing the notion of prototype and attributes. A prototype may contains attributes and functions. If things are missing in Famix, the. We can easily extend it. It is made to be expandable.
I reply to the moose mailing list since many expert in modeling will we this email.
Alexandre
> Le 26-09-2014 à 19:18, Leonardo Silva <leonardo.humberto(a)gmail.com> a écrit :
>
> Hi Alexandre,
>
> I've checked the JS2Moose project.
>
> Suppose the following JS code:
>
> function circle (radius) {
> this.radius = radius;
> }
> circle.prototype.getArea = function () {
> return (this.radius * this.radius * 3.14);
> }
>
>
> For this code, JS2Moose generated the following MSE:
>
> (
> (FAMIX.Function (id: 4)
> (name 'window')
> (staticUseStrictEnabled true)
> (numberOfLinesOfCode 1)
> (numberOfStatements 1))
>
> (FAMIX.Function (id: 5)
> (name 'circle')
> (parentScope (ref: 4))
> (staticUseStrictEnabled true)
> (numberOfLinesOfCode 52)
> (numberOfStatements 1))
>
> (FAMIX.Function (id: 6)
> (name '$5_27')
> (parentScope (ref: 4))
> (staticUseStrictEnabled true)
> (numberOfLinesOfCode 60)
> (numberOfStatements 1))
> )
>
> So, I am not sure this MSE has all the data we need. For example:
>
> - "radius" is not described in the MSE
> - "getArea" in the MSE is represented using another name, "$5_27"
> - there is not association between getArea (id: 6) and circle (id: 5)
>
> Of course, maybe we are doing something wrong, but it seems the MSE
> does not include many important nodes that are available in a JSON file
> generated by Esprima.
>
> We can also have a skype meeting to better clarify this question.
>
> Leonardo
It would be great to be able to have the GTInspector ability to keep the view when selecting variables. For example:
If I click on t2, I would love to see the items tab, and not the state. I guess the fact that t2 has the same class than t1 should be a hint good enough no?
By the way, shouldn’t the items view be the default view when I inspect a collection?
Again guys, I want to say, again, that you are doing a fantastic job. The Glamourous team rules!!!!
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
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.
Hi,
I removed DSM from the ConfigurationOfMoose. The problem is that it is
based on Roassal1 and porting it would take quite long. Also, the model
should also be reconsidered.
It should still be loadable separately.
Cheers,
Doru
--
www.tudorgirba.com
"Every thing has its own flow"
Hi!
Milton is currently working on a UML diagram renderer in Roassal2. This will help migrating code from Roassal1 -> Roassal2.
Is this relevant? I have the impression that yes. anyone can confirm?
Cheers,
Milton & Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.