FAMIXFunction>>packageScope is missing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

FAMIXFunction>>packageScope is missing

abergel
Hi!

We are importing C++ code in Moose and are bumping into problem when using Chef.
packageScope is missing on FAMIXFunction. We could have something like:

FAMIXFunction>>packageScope
        ^ self declatedType
                ifNotNil: [ self declatedType packageScope ]
                ifNil: [ nil ]

Any better idea?

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: FAMIXFunction>>packageScope is missing

Tudor Girba-2
*scope methods are supposed to return a scope of the entity, and not a dependency. Declared type is a dependency, so it does not fit the purpose.

But, how are you importing c++?

Cheers,
Doru



On Dec 9, 2011, at 17:21, Alexandre Bergel <[hidden email]> wrote:

> Hi!
>
> We are importing C++ code in Moose and are bumping into problem when using Chef.
> packageScope is missing on FAMIXFunction. We could have something like:
>
> FAMIXFunction>>packageScope
>    ^ self declatedType
>        ifNotNil: [ self declatedType packageScope ]
>        ifNil: [ nil ]
>
> Any better idea?
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: FAMIXFunction>>packageScope is missing

Santiago Vidal
We are importing MSE files generated with inFusion.
Cheers,
 Santiago

2011/12/9 Tudor Girba <[hidden email]>
*scope methods are supposed to return a scope of the entity, and not a dependency. Declared type is a dependency, so it does not fit the purpose.

But, how are you importing c++?

Cheers,
Doru



On Dec 9, 2011, at 17:21, Alexandre Bergel <[hidden email]> wrote:

> Hi!
>
> We are importing C++ code in Moose and are bumping into problem when using Chef.
> packageScope is missing on FAMIXFunction. We could have something like:
>
> FAMIXFunction>>packageScope
>    ^ self declatedType
>        ifNotNil: [ self declatedType packageScope ]
>        ifNil: [ nil ]
>
> Any better idea?
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--
Santiago Vidal

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: FAMIXFunction>>packageScope is missing

abergel
In reply to this post by Tudor Girba-2
> *scope methods are supposed to return a scope of the entity, and not a dependency. Declared type is a dependency, so it does not fit the purpose.

I inspired myself from:

FAMIXMethod>>packageScope

        ^ self parentPackage ifNil:[
                |cl|
                cl := self parentType.
                cl isNil
                        ifTrue:[nil]
                        ifFalse:[cl packageScope]
        ]

So, what the definition of FAMIXFunction>>packageScope should look like?

Cheers,
Alexandre

>
>
>
> On Dec 9, 2011, at 17:21, Alexandre Bergel <[hidden email]> wrote:
>
>> Hi!
>>
>> We are importing C++ code in Moose and are bumping into problem when using Chef.
>> packageScope is missing on FAMIXFunction. We could have something like:
>>
>> FAMIXFunction>>packageScope
>>   ^ self declatedType
>>       ifNotNil: [ self declatedType packageScope ]
>>       ifNil: [ nil ]
>>
>> Any better idea?
>>
>> Cheers,
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: FAMIXFunction>>packageScope is missing

Tudor Girba-2
Hi,

On 9 Dec 2011, at 19:41, Alexandre Bergel wrote:

>> *scope methods are supposed to return a scope of the entity, and not a dependency. Declared type is a dependency, so it does not fit the purpose.
>
> I inspired myself from:
>
> FAMIXMethod>>packageScope
>
> ^ self parentPackage ifNil:[
> |cl|
> cl := self parentType.
> cl isNil
> ifTrue:[nil]
> ifFalse:[cl packageScope]
> ]

But, this is completely not the same as what you proposed for function. packageScope returns the parentPackage of the parent class. If you look for the parentPackage of what the function returns, you end up in a completely different place.

> So, what the definition of FAMIXFunction>>packageScope should look like?

There is no notion of packageScope for a Function, so it should return nil in this case.

Cheers,
Doru

> Cheers,
> Alexandre
>
>>
>>
>>
>> On Dec 9, 2011, at 17:21, Alexandre Bergel <[hidden email]> wrote:
>>
>>> Hi!
>>>
>>> We are importing C++ code in Moose and are bumping into problem when using Chef.
>>> packageScope is missing on FAMIXFunction. We could have something like:
>>>
>>> FAMIXFunction>>packageScope
>>>  ^ self declatedType
>>>      ifNotNil: [ self declatedType packageScope ]
>>>      ifNil: [ nil ]
>>>
>>> Any better idea?
>>>
>>> Cheers,
>>> Alexandre
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

Innovation comes in least expected form.
That is, if it is expected, it already happened.


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: FAMIXFunction>>packageScope is missing

abergel
>> So, what the definition of FAMIXFunction>>packageScope should look like?
>
> There is no notion of packageScope for a Function, so it should return nil in this case.

I added
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
FAMIXFunction>>packageScope
        "No package scope for functions"

        ^ nil
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

in Famix-Core-AlexandreBergel.188

This could always be adjusted in the future when one need to analyze languages that has scoped function (e.g., Racket)

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev