Le 20 janv. 2014 à 22:35, Tudor Girba a écrit :

Hi,


On Mon, Jan 20, 2014 at 4:48 PM, Anne Etien <anne.etien@univ-lille1.fr> wrote:
Hi,

I am working on MooseModels of Smalltalk code. There are some things that I feel strange:
- there are some FAMIXAnnotationTypes and thus also FAMIXAnnotationTypeAttribute in Smalltalk. The comments of these classes refer to Java and never to ST. It seems corresponding to pragma such as: <expected failure>.

Take a look at the diagram from here:

smalltalkMethodAnnotated
  <primitive: 'primAnyBitFromTo' module:'LargeIntegers'>

the method has one AnnotationInstance that is of AnnotationType <primitive:module:>. The AnnotationType has two AnnotationTypeAttributes that have no name in the case of Smalltalk. The AnnotationInstance has two associated AnnotationInstanceAttributes with 'primAnyBitFromTo' and 'LargeIntegers'.

OK. It corresponds to what I found. But while reading the comments, I thought there are annotations only in Java. Perhaps, the comments should be changed?

 
- the FAMIXGlobalVariables have their belongsTo equals to nil. Only the declaredType is defined.

Yes. Is this an issue?

We discussed with Nicolas yesterday. What should be the belongsTo since it is global? the namespace Smalltalk itself? or effectively nothing?

 
- some FAMIXInvocations have no receiver. It seems that when a method m1 refers to a method m2 that does not belong to the model, the receiver is considered as nil. In Java, due to the statically typed character, we would have had a stub corresponding to m2. But in ST, because of the dynamically typed character, the receiver is nil. It means that before performing actions on Invocations, we have to ensure that they have receiver. Are we aware of that? Do we agree with that?

No. The receiver refers to the variable that receives the message. Consider something like:

self foo bar

"self" is the receiver of "foo", but the receiver of "bar" is "self foo". In the second case, the receiver will be marked as nil.

Sorry, I was wrong on this point.

Thanks for your answers.
Anne


Cheers,
Doru



If I can get you feedback on that points, it would be great.
Thanks in advance.

Anne
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--
www.tudorgirba.com

"Every thing has its own flow"
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev