Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cme-dev] extraction

Hi Karel,

I am sorry to hear you've been having a hard time with this, and I wish you
had contacted us before suffering for so long! I'm very excited to hear
about the work on JAsCo artifacts.

You are right that the CME extraction support has not been built yet - we
have in mind an extraction component, and some thought has been given to
it, but it has not been designed or implemented yet, so it is not going to
be of help to you given your timeframe. However, there are implemented
parts of the CME that help, and that we intend to use when building the
extraction component. I'll respond to your specific question first, then
mention these.

Your immediate problem seems to be getting suitable information about the
units you put in a concern. This description is all about the ConcernSpace
in which concerns are modeled, implemented in the ConMan project. The
interfaces I refer to here are in package org.eclipse.cme.conman in that
package. When you make a concern from a query result, the concern goes into
the ConcernSpace under the name you specify. Suppose you have a pointer to
the concern in "myConcern" (if you don't have such a pointer, if this is
being done in the UI, say, there's a separate issue of how to get hold of
the ConcernSpace; once you have it, you can search for your concern based
on the name, with getElementWithNameTransitive(), for example).
myConcern.getElements() should give you the Units that make up the concern
- those you put in it. In the case of calls, these units will represent
what we call "methoid occurrences" - occurences of patterns that occur
within the code. In general, concerns might contain units of any kinds,
such as classes, methods, fields... The Unit object, say "unit", is the
representative in the ConcernSpace, and you can get a variety of
information from it. You can also call unit.getDefinition(), which gets you
an Artifact object corresponding to the unit. The Unit is always language-
and representation-independent. The Artifact might be specific to
particular kinds of artifacts, and if you know which you're getting, you
can downcast. In the case of methoid occurrences, we use a
CIMethoidOccurrenceArtifact (package ...conman.jdt). From it you can
navigate to get further information, including parameter signature. Once
your using interfaces that start with CI you are in the "Concern Informant
Toolkit". This provides means to navigate software, rather like the Java
reflection API or bytecode toolkits.

There are definitely lots of holes in the documentation, but there is some
general information on the web site beyond the javadoc that might help you.
Take a look at the 3 new tech. reports that recently went up under the
"technical publications" section. The one pertinent to the discussion above
is the one on concern modeling, but the others might also be of interest as
you progress.

In terms of extraction itself, the composition component, CCC (described in
the composition tech. report), and its back-end, the Concern Assembly
Toolkit (CAT, described in an older tech. report) can be used to create
classes containing subsets of material from the input. The challenging part
of extraction is dealing with dangling references ("declaration completion"
or the like), and that's the area where we don't have support yet. In CCC,
one would deal with this through a plugin "rectifier" (see the report). In
CAT, one can specify mapping of references to stubs that you can generate.

This is pretty sketchy, I know, but I'm running out of time for now, and
will be away the rest of the of the week. I hope it helps you make some
progress.

Regards, Harold



                                                                           
             Karel Bernolet                                                
             <kbernole@xxxxxx.                                             
             be>                                                        To 
                                       cme-dev@xxxxxxxxxxx                 
             11/17/2004 05:52                                           cc 
             AM                                                            
                                                                   Subject 
                                       [cme-dev] extraction                
             Please respond to                                             
                  cme-dev                                                  
                                                                           
                                                                           
                                                                           
                                                                           




Hi all,

I am a last year student computer science at the VUB (Free University of
Brussels). For my apprenticeship I have to provide support support for
extracting concerns towards JAsCo Artifacts in the CME.
(http://ssel.vub.ac.be/jasco)

I have been suffering on this issue for about 1 month now and the
deadline for this project is in about 1 month. The main problem is the
lack of information (I can only find a java-doc) about the CME in
general and specific about extraction.

Is there anybody who has been busy on the issue of extraction already
(the CME seems not te support it at all in this stage), or is there
anybody who can help me getting started?

At the moment I made a concern from the results of a query
(call (* log(*)). In this case the concern has 3 calls to methods.
I am now able to extract those parts of the strings from that
'concernElementSelected' wich are used to build the elements of that
concern: "Calls <returnType> <classname>.<method> in <returntype>
<classname>.<method>". I cant find the arguments used in those methods
(only the type, not the value).

Any help or hints are appreciated.


a desperate student,
Karel

_______________________________________________
cme-dev mailing list
cme-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cme-dev




Back to the top