Ifg I understand correctly, you are talking about symbol resolution?
Yuriy started to work on a generic symbol resolver in FAST.
Maybe he can give some light on what he did and the design decisions he
made?
However, things may not be as simple as one might expect.
There are specificities linked to each language semantic:
- Java and others have visibility (public, protected, private) that
other languages (smalltalk) do not have. Java also has visibility
"default package" that might be uniq to it
- C++ has friend classes
- ...
nicolas
On 07/09/2013 10:48 AM, Stephan Eggermont wrote:
While building up the FAMIX model from the Delphi
AST,
we need to connect the references to the correct entities.
We first did this with referenced types, but are now trying to
build up the call graph.
We know in Delphi that everything we want to reference
has been defined earlier, so we need to look up references
in the FAMIX model we build up so far. Currently we do that
by searching through all entities, building up moosenames.
This is very slow, and error-prone, since we should
actually use the hierarchical scope of the current code point.
We would like to be able to ask the scopingEntity to resolve
the names we encounter into a famixNamedEntity. We think
this functionality is more general, and would like to implement
it. We believe we can make an algorithm that has the right
behaviour for smalltalk, c, java and Delphi (and likely others).
To do this we'd need to add referenced scopes to scopingentity.
Do you agree this is a good idea, or do you have other
suggestions to make these connections?
Diego & Stephan
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
Nicolas Anquetil -- RMod research team (Inria)