Hi
It seems totalNumberOfLinesOfCode disappeared from FamixTypeGroup recently.
Now I wonder if the new implementation is correct because it would be nice to take into account class definition size.
MooseAbstractGroup >> numberOfLinesOfCode <MSEProperty: #numberOfLinesOfCode type: #Number> <MSEComment: 'The number of classes in the model'> ^ self lookUpPropertyNamed: #numberOfLinesOfCode computedAs: [ self allMethods sum: #numberOfLinesOfCode ]
What do you think?
Stef
-------------------------------------------- Stéphane Ducasse http://stephane.ducasse.free.fr http://www.synectique.eu / http://www.pharo.org 03 59 35 87 52 Assistant: Julie Jonas FAX 03 59 57 78 50 TEL 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, Bât.A, Park Plaza Villeneuve d'Ascq 59650 France
From: Moose-dev [mailto:moose-dev-bounces@list.inf.unibe.ch] On Behalf Of Stéphane Ducasse Sent: vendredi 29 septembre 2017 13:22 To: Moose-related development Subject: [Moose-dev] About numberofLines of code
Hi
Hi,
It seems totalNumberOfLinesOfCode disappeared from FamixTypeGroup recently.
Indeed. I removed it because it was a duplication of numberOfLinesOfCode.
Now I wonder if the new implementation is correct because it would be nice to take into account class definition size.
MooseAbstractGroup >> numberOfLinesOfCode
<MSEProperty: #numberOfLinesOfCode type: #Number>
<MSEComment: 'The number of classes in the model'>
^ self
lookUpPropertyNamed: #numberOfLinesOfCode
computedAs: [ self allMethods sum: #numberOfLinesOfCode ]
What do you think?
That it is only for Smalltalk because with do not have this problem in Java. I do not even think that in Smalltalk the class definition is represented in the moose model by an entity.
I have no time to check it now.
If you want to specialize it, it should be language dependent.
Cheers,
Vincent
Stef
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr
http://www.synectique.eu / http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
Le 1 oct. 2017 à 01:25, Vincent BLONDEAU Vincent.Blondeau@polytech-lille.net a écrit :
From: Moose-dev [mailto:moose-dev-bounces@list.inf.unibe.ch] On Behalf Of Stéphane Ducasse Sent: vendredi 29 septembre 2017 13:22 To: Moose-related development Subject: [Moose-dev] About numberofLines of code
Hi
Hi,
It seems totalNumberOfLinesOfCode disappeared from FamixTypeGroup recently.
Indeed. I removed it because it was a duplication of numberOfLinesOfCode.
Now I wonder if the new implementation is correct because it would be nice to take into account class definition size.
MooseAbstractGroup >> numberOfLinesOfCode <MSEProperty: #numberOfLinesOfCode type: #Number> <MSEComment: 'The number of classes in the model'> ^ self lookUpPropertyNamed: #numberOfLinesOfCode computedAs: [ self allMethods sum: #numberOfLinesOfCode ]
What do you think?
That it is only for Smalltalk because with do not have this problem in Java. I do not even think that in Smalltalk the class definition is represented in the moose model by an entity. I have no time to check it now.
It is wrong. In Java, the number of lines of code of a class DOES NOT EQUAL to the sum of the number of lines of code of its methods. You have all the class definition part with the imports, the variable instance definitions and so on. Stephane’s remark does not mean that the old definition was correct. In any case, the new one is wrong.
Cheers,
Anne
If you want to specialize it, it should be language dependent.
Cheers, Vincent
Stef
Stéphane Ducasse http://stephane.ducasse.free.fr http://www.synectique.eu / http://www.pharo.org 03 59 35 87 52 Assistant: Julie Jonas FAX 03 59 57 78 50 TEL 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, Bât.A, Park Plaza Villeneuve d'Ascq 59650 France
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
From: Moose-dev [mailto:moose-dev-bounces@list.inf.unibe.ch] On Behalf Of Anne Etien Sent: dimanche 1 octobre 2017 10:36 To: Moose-related development Subject: [Moose-dev] Re: About numberofLines of code
Le 1 oct. 2017 à 01:25, Vincent BLONDEAU <Vincent.Blondeau@polytech-lille.net mailto:Vincent.Blondeau@polytech-lille.net > a écrit :
From: Moose-dev [ mailto:moose-dev-bounces@list.inf.unibe.ch mailto:moose-dev-bounces@list.inf.unibe.ch] On Behalf Of Stéphane Ducasse Sent: vendredi 29 septembre 2017 13:22 To: Moose-related development Subject: [Moose-dev] About numberofLines of code
Now I wonder if the new implementation is correct because it would be nice to take into account class definition size.
MooseAbstractGroup >> numberOfLinesOfCode
<MSEProperty: #numberOfLinesOfCode type: #Number>
<MSEComment: 'The number of classes in the model'>
^ self
lookUpPropertyNamed: #numberOfLinesOfCode
computedAs: [ self allMethods sum: #numberOfLinesOfCode ]
What do you think?
That it is only for Smalltalk because with do not have this problem in Java. I do not even think that in Smalltalk the class definition is represented in the moose model by an entity.
I have no time to check it now.
It is wrong.
In Java, the number of lines of code of a class DOES NOT EQUAL to the sum of the number of lines of code of its methods. You have all the class definition part with the imports, the variable instance definitions and so on.
Stephanes remark does not mean that the old definition was correct. In any case, the new one is wrong.
Ok, you are right.
In Java IVs initialization are already represented inside a method so only the imports are missing, but the imports are not even in the model, this kind of data have to be integrated in the parsing if you what the right value.
Cheers,
Vincent
Cheers,
Anne
If you want to specialize it, it should be language dependent.
Cheers,
Vincent
Stef
--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr/ http://stephane.ducasse.free.fr
http://www.synectique.eu/ http://www.synectique.eu / http://www.pharo.org/ http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France
_______________________________________________ Moose-dev mailing list mailto:Moose-dev@list.inf.unibe.ch Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev https://www.list.inf.unibe.ch/listinfo/moose-dev