Hi Andrea,
(and doru incidently)
The "more generic" part of your goal was not explicited in the previous email, so the mention of moosechef and the examples, led me on a wrong path.
you can safely ignore my previous comment :-)
Now, keeping an analogy with MooseChef, it implements thing that you might want to consider (at this level of abstraction it's a bit hard to tell):
- relation vs. entities
  can you filter the results to return either the relationships or the entities they relate?
  Is that what 'asMooseGroup' is doing? If so you might want to consider some other name (eg 'asEntities')
- relation roles
  MooseChef allows to request either the 'to' or 'from' end of an association, can you similarly specify the 'selector1' or 'selector2' (or 'selector3', ...) roles of your generic relationship?
- scoping
  Can you restrict the resulting entities/relationship to be of a given type?
as we are at a very abstract level, it might be better to offer a filterBlock and let the user define what kind of filter he whishes to apply?
nicolas
PS: I had a glance at your code. The mehtods look suspiciously long for a smalltalk implementation ...
De: "Andrea Caracciolo" <andyy.mailbox@gmail.com>
À: "Moose-related development" <moose-dev@iam.unibe.ch>
Envoyé: Mardi 19 Juin 2012 11:44:52
Objet: [Moose-dev] Re: Lift
Hi Nicolas, 
You are right, the syntax of moose chef is more elegant. 
But the point of creating a new extension was to offer the option to express more generic queries. 
If you are working on a moose model which represents a Java program, you can easily use moose chef and get what you need. 
But if the model you are analyzing is of a different kind (a famix extension or a generic moose model) and provides unforseen selectors and entities, what can you do ? 
You have to look at Lift as a less domain-bound version of chef, not necessarily as a chef replacement. 
Did i understand your question correctly ? 
Does it make sense to you ? 
Andrea
On Jun 19, 2012, at 11:06 AM, Nicolas Anquetil wrote:
  
    
  
  
    Hk Andrea,
    
    I had a quick look at Lift.
    Being able to express the queries on MooseGroups is a nice addon.
    
    But I think it would have been much nicer keeping the syntax of
    MooseChef.
    
    Instead of:
    
    (aNamespaceGroup lift: #incomingInvocations from:self mooseModel
    allMethods) asMooseGroup
    
    why don't you use:
    
    aNamespaceGroup queryIncomingInvocations atNamespaceScope
    
    which according to MooseChef syntax should return the same thing ?
    
    I trust you will agree the second is more elegant , and it has the
    advantage of keeping the same syntax, so we don't need to learn a
    new syntax
    
    nicolas
    
    On 18/06/12 14:39, Andrea Caracciolo wrote:
    
Hi, 
      
      
      I developed a small extension which allows to query a moose
        model to obtain a set of implicit associations derived from low
        level relationships. 
      What you can do concretely is for example to select a group
        of namespace entities, and ask for all implicit associations
        existing between the selected entities based on a specific
        relationship existing at a lower abstraction level (i.e.: the
        method level). 
      The end result is much similar to the one provided by Moose
        Chef, with the advantage of being much more generic and
        flexible. 
      Each generated association keeps a reference to the concrete
        relationships on which it is based on. 
      
      
      
      The wiki page contains some usage examples. 
      
      
      cheers,
      Andrea
      
        
              
                
                  _____________________________
                 
               
            Andrea Caracciolo
              -- caracciolo@iam.unibe.ch
            Software
                Composition Group
            University of Bern
           
       
      
      
      
      _______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
    
    
  
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev