On 8 juin 2011, at 23:12, Usman Bhatti wrote:

>    a = b; [reference to A + 2 accesses to A]

No. There is no reference to A, only an access to a and an access to b.

Ok. Now I understand. Merely, passing a type as a parameter creates a reference. It is not important how that parameter is used in the method.

Nope. A Famix reference in C# would be like:


-> one reference to ClassA and one invocation

So a reference has some kind of semantic meaning for the program (it is "used" during the execution, it's not just something for typechecking). If you want, ClassA is some kind of global variable which is accessed during execution (it's like that in Smalltalk actually).

Now the "reference" to a type in a parameter is modelled in a different manner: you actually have a FamixParameter entity which has a #declaredType property, which points to the referenced FamixType. Same thing with FamixAttribute. That's what I meant by "indirect" reference (although I don't like the term): you don't reify the dependency directly, but you can still access it through #declaredType.

One problem with this approach is that #declaredType property is often overlooked in dependency analysis (especially since in Smalltalk models this prop is rarely used or even set). I don't know what could be the impact of collecting #declaredType with the other dependencies.
---> This is actually a problem in MooseChef and could be largely discussed.

Simon Denier