Hi Yann, Hi all
Since two weeks, there is implementation of MSE and Famix in Java, which can be used to load MSE files and learn more about FAMIX 2.2 without having to be a Smalltalk guru.
https://www.iam.unibe.ch/scg/svn_repos/akuhn/MSE/
- what are "FAMIX.Access"?
A FAMIX.Access represents how a variable is accessed by a method/ function. So, if you have something like "method() { ... anObject ... }", then you will get a FAMIX.Access that has anObject variable as "accesses" and method as "accessedIn".
Please note that in FAMIX 2, the property FAMIX.Access.accesses can refer not only to structural entities (ie attributes, variables and globals) but alas also to classes or namespaces! Yet another Smalltalk oddity :)
This will change in FAMIX 3.0, accesses to classes or namespaces will be modeled with a new FAMIX.Reference entity. And FAMIX.Access.accesses restricted to structural entities only.
- what is the difference/similarity of "(candidate (idref: 37))" and
"(invokes 'yourself()')" in a "FAMIX.Invocation"?
In dynamically typed languages, it happens that we not know for sure which method is actually invoked. So, in this case, we compute several "candidates". So, the "candidate" property is a collection of pointers to FAMIX.Method / Function. "invokes" on the other hand represents just the string of the call.
The same for static typing when methods are overwritten! For example the following invocation
Object o; o.toString();
would have (invokes 'toString()') and have ALL implementations of toString as candidates.
Personally I am not happy with that way of modelling invocations, but did not yet figure out how we can do better.
- what to do when there is no "(receivingVariable (idref: 24))" in a
"FAMIX.Invocation"?
There are two possibilities. Either the parser did not work for some reason, or the call is to a function, and not to a method. In any case, our analyses hardly depend on the receivingVariable information.
Third reason (and by far the most common!) is that the invocation was sent to an intermediate result rather than a variable, for example the following coll to length()
String a = "a"; String b = "b"; ("a" + "b").length();
or another example, the following call to next()
Collection coll; coll.iterator().next();
- what means "(hasClassScope false)" in a "FAMIX.Attribute"?
hasClassScope corresponds with "static" in Java.
- what is a "FAMIX.FormalParameter" and are they referenced in
"FAMIX.Invocation"?
FAMIX.FormalParameter represents parameters of a method/function. As variables, they can be the receivingVariable of an invocation.
- what is a "FAMIX.LocalVariable" and are they references in
"FAMIX.Method"?
FAMIX.LocalVariable represents a variable that is defined locally in a method or a function, so LocalVariable "belongsTo" a FAMIX.Method/ Function.
cheers, AA