Hi, I want to redefine the soft engineering metrics (in famix-extension-metrics) using MooseChef which is more concise and generic. But for this I need to remove the implicit withoutSelfLoops from some query. If anybody has something agains this removal, let him come forth and speak now or remain silent forever and ever. Here is an example of how nice MooseChef can be. Consider: myClasses collect: [:c | c queryAllOutgoingDependencies atClassScope withinMyPackage] instead of: myClasses collect: [:c | (c invokedClasses select: [:invoked | invoked packageScope = self]) union: ((c superclass isNil not and: [c superclass packageScope = self]) ifTrue: [{c superclass}] ifFalse: [#()])] _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
I think this is a valuable effort. Have you checked if the results are the same? I have the impression that chef may be slower. I am not sure why withoutSelfLoops may be problematic Alexandre
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Nicolas Anquetil
Hi Nicolas,
Indeed, withoutSelfLoops should be improved. I went over the archive and dug up my proposal for the reorganization (to find the overall discussion, search for the subject "MooseChef scoping should not exclude self loops"): ---- I would prefer to keep the previous separation. In fact, it seems to me that we can obtain the same results as you have now by simply commenting the reject statement from: MooseQueryResult>>collectAtScope: aScopeSymbol | sourceScope | sourceScope := receiver perform: aScopeSymbol. ^ self newObjectResultWith: ((self primCollectAtScope: aScopeSymbol) "reject: [ :scope | sourceScope mooseIncludes: scope ]") "exclude self loops" This is a tricky change and we should look into it closely. My solution would be to: - remove the default reject (see above) - add the receiver to MooseObjectQueryResult - implement MooseObjectQueryResult>>withoutSelfLoops to use it ---- Cheers, Doru On 27 Nov 2011, at 12:17, Nicolas Anquetil wrote: > Hi, > > I want to redefine the soft engineering metrics (in famix-extension-metrics) using MooseChef which is more concise and generic. > > But for this I need to remove the implicit withoutSelfLoops from some query. > If anybody has something agains this removal, let him come forth and speak now or remain silent forever and ever. > > > > Here is an example of how nice MooseChef can be. > Consider: > > myClasses collect: [:c | c queryAllOutgoingDependencies atClassScope withinMyPackage] > > instead of: > > myClasses collect: [:c | (c invokedClasses select: [:invoked | invoked packageScope = self]) > union: > ((c superclass isNil not and: [c superclass packageScope = self]) > ifTrue: [{c superclass}] > ifFalse: [#()])] > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "We cannot reach the flow of things unless we let go." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by abergel
De: "Alexandre Bergel" <[hidden email]>didn't test. Even if it is a bit slower, it might still be a huge gain. First because it is more concise, Second because it unify a gazillion different methods (sureInvoke, potentialInvoke, ...) Third because it avoids mistakes nicolas one never knows ...
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
+1 Alexandre
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Nicolas,
I saw that you removed the default rejection of the self loops and that you updated the tests. This is good, but now we miss the tests related to withoutSelfLoops (basically the previous assertions). Furthermore, we still need to add withoutSelfLoops to MooseObjectQueryResult. Cheers, Tudor On Mon, Nov 28, 2011 at 12:40 PM, Alexandre Bergel <[hidden email]> wrote: > +1 > > Alexandre > > > > Le 28 nov. 2011 à 06:04, Nicolas Anquetil <[hidden email]> a > écrit : > > De: "Alexandre Bergel" <[hidden email]> > À: "Moose-related development" <[hidden email]> > Envoyé: Dimanche 27 Novembre 2011 14:41:26 > Objet: [Moose-dev] Re: software engineering metrics and MooseChef > > I think this is a valuable effort. Have you checked if the results are the > same? I have the impression that chef may be slower. > > didn't test. > Even if it is a bit slower, it might still be a huge gain. > First because it is more concise, > Second because it unify a gazillion different methods (sureInvoke, > potentialInvoke, ...) > Third because it avoids mistakes > > nicolas > > I am not sure why withoutSelfLoops may be problematic > > one never knows ... > > Alexandre > > > > Le 27 nov. 2011 à 08:17, Nicolas Anquetil <[hidden email]> a > écrit : > > Hi, > > I want to redefine the soft engineering metrics (in famix-extension-metrics) > using MooseChef which is more concise and generic. > > But for this I need to remove the implicit withoutSelfLoops from some query. > If anybody has something agains this removal, let him come forth and speak > now or remain silent forever and ever. > > > > Here is an example of how nice MooseChef can be. > Consider: > > myClasses collect: [:c | c queryAllOutgoingDependencies atClassScope > withinMyPackage] > > instead of: > > myClasses collect: [:c | (c invokedClasses select: [:invoked | invoked > packageScope = self]) > union: > ((c superclass isNil not and: [c > superclass packageScope = self]) > ifTrue: [{c superclass}] > ifFalse: [#()])] > > _______________________________________________ > 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 > > > _______________________________________________ > 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 "Every thing has its own flow" _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |