hasClassScope derived?

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

hasClassScope derived?

Anne Etien
Hi,

Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived.

Same question for timeStamp.

Thanks in advance.

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

Re: hasClassScope derived?

Andre Hora
No, because they (#hasClassScope and #timeStamp) are not derived properties.
See the method SmalltalkImporter>>createMethod:. This is the place where we set such properties.


On Wed, Apr 3, 2013 at 5:43 PM, Anne Etien <[hidden email]> wrote:
Hi,

Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived.

Same question for timeStamp.

Thanks in advance.

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



--
Andre Hora

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

Re: hasClassScope derived?

Tudor Girba-2
In reply to this post by Anne Etien
No, it is not.

privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo.

Cheers,
Doru


On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote:

> Hi,
>
> Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived.
>
> Same question for timeStamp.
>
> Thanks in advance.
>
> Anne
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Presenting is storytelling."


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

Re: hasClassScope derived?

Anne Etien
Thank you (both) for your answer.

In these conditions, why hasClassScope and kind are differently implemented? (kind is an instance variable of the FAMIXMethod). Except from the implementation, is there a way to differentiate properties like hasClassScope from the ones like kind?

Thanks,
Anne
Le 3 avr. 2013 à 17:55, Tudor Girba a écrit :

> No, it is not.
>
> privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo.
>
> Cheers,
> Doru
>
>
> On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote:
>
>> Hi,
>>
>> Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived.
>>
>> Same question for timeStamp.
>>
>> Thanks in advance.
>>
>> Anne
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Presenting is storytelling."
>
>
> _______________________________________________
> 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: hasClassScope derived?

Nicolas Anquetil
In reply to this post by Tudor Girba-2

then another question:

is there a logic behind the decision to use privateState or instance
variables?

is it to save memory (as I understood from the mooseBook: "MinimalState")

But if so, is it really needed for something like a boolean (hasClassScope)?

nicolas

On 04/03/2013 05:55 PM, Tudor Girba wrote:

> No, it is not.
>
> privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo.
>
> Cheers,
> Doru
>
>
> On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote:
>
>> Hi,
>>
>> Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived.
>>
>> Same question for timeStamp.
>>
>> Thanks in advance.
>>
>> Anne
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> --
> www.tudorgirba.com
>
> "Presenting is storytelling."
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
Nicolas Anquetil -- RMod research team (Inria)

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

Re: hasClassScope derived?

Andre Hora



On Wed, Apr 3, 2013 at 7:36 PM, Nicolas Anquetil <[hidden email]> wrote:

then another question:

is there a logic behind the decision to use privateState or instance variables?
Instance variables are used for properties of the "basic" Famix meta-model. 
privateState are used for properties that are related to meta-model extensions such as Famix-Java, Famix-Smalltalk, Famix-Extensions, etc. Also, with privateState you can easily integrate your meta-model extension without the need to change the original meta-model (since you don't create instance variables).
For example, in FAMIXMethod we have just 2 instance variables: kind and parentType. All the other properties, which are related to meta-model extensions, use privateState.


is it to save memory (as I understood from the mooseBook: "MinimalState")

But if so, is it really needed for something like a boolean (hasClassScope)?
 #hasClassScope and #timeStamp for example are properties related to the Smalltalk meta-model. That's why it is better to use privateState.

nicolas


On 04/03/2013 05:55 PM, Tudor Girba wrote:
No, it is not.

privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo.

Cheers,
Doru


On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote:

Hi,

Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived.

Same question for timeStamp.

Thanks in advance.

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

"Presenting is storytelling."


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

--
Nicolas Anquetil -- RMod research team (Inria)


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



--
Andre Hora

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

Re: hasClassScope derived?

Tudor Girba-2
In reply to this post by Nicolas Anquetil
privateState is meant to be used for FAMIX extensions.

hasClassScope should be used through an instance variable. There is no real benefit of not having it.

Could you please open an issue?

Cheers,
Doru


On Apr 3, 2013, at 7:36 PM, Nicolas Anquetil <[hidden email]> wrote:

>
> then another question:
>
> is there a logic behind the decision to use privateState or instance variables?
>
> is it to save memory (as I understood from the mooseBook: "MinimalState")
>
> But if so, is it really needed for something like a boolean (hasClassScope)?
>
> nicolas
>
> On 04/03/2013 05:55 PM, Tudor Girba wrote:
>> No, it is not.
>>
>> privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo.
>>
>> Cheers,
>> Doru
>>
>>
>> On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote:
>>
>>> Hi,
>>>
>>> Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived.
>>>
>>> Same question for timeStamp.
>>>
>>> Thanks in advance.
>>>
>>> Anne
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>> --
>> www.tudorgirba.com
>>
>> "Presenting is storytelling."
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> Nicolas Anquetil -- RMod research team (Inria)
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Things happen when they happen,
not when you talk about them happening."


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

Re: hasClassScope derived?

Andre Hora



On Thu, Apr 4, 2013 at 2:48 AM, Tudor Girba <[hidden email]> wrote:
privateState is meant to be used for FAMIX extensions.

hasClassScope should be used through an instance variable. There is no real benefit of not having it.
 hasClassScope is a FAMIX extension, so why should we use instance variable?

Could you please open an issue?

Cheers,
Doru


On Apr 3, 2013, at 7:36 PM, Nicolas Anquetil <[hidden email]> wrote:

>
> then another question:
>
> is there a logic behind the decision to use privateState or instance variables?
>
> is it to save memory (as I understood from the mooseBook: "MinimalState")
>
> But if so, is it really needed for something like a boolean (hasClassScope)?
>
> nicolas
>
> On 04/03/2013 05:55 PM, Tudor Girba wrote:
>> No, it is not.
>>
>> privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo.
>>
>> Cheers,
>> Doru
>>
>>
>> On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote:
>>
>>> Hi,
>>>
>>> Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived.
>>>
>>> Same question for timeStamp.
>>>
>>> Thanks in advance.
>>>
>>> Anne
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>> --
>> www.tudorgirba.com
>>
>> "Presenting is storytelling."
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> Nicolas Anquetil -- RMod research team (Inria)
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Things happen when they happen,
not when you talk about them happening."


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



--
Andre Hora

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

Re: hasClassScope derived?

Tudor Girba-2
Indeed, but I think it should not be an extension, given that it is present as a concept in any oo language.

Doru

On Apr 4, 2013, at 10:41 AM, Andre Hora <[hidden email]> wrote:

>
>
>
> On Thu, Apr 4, 2013 at 2:48 AM, Tudor Girba <[hidden email]> wrote:
> privateState is meant to be used for FAMIX extensions.
>
> hasClassScope should be used through an instance variable. There is no real benefit of not having it.
>  hasClassScope is a FAMIX extension, so why should we use instance variable?
>
> Could you please open an issue?
>
> Cheers,
> Doru
>
>
> On Apr 3, 2013, at 7:36 PM, Nicolas Anquetil <[hidden email]> wrote:
>
> >
> > then another question:
> >
> > is there a logic behind the decision to use privateState or instance variables?
> >
> > is it to save memory (as I understood from the mooseBook: "MinimalState")
> >
> > But if so, is it really needed for something like a boolean (hasClassScope)?
> >
> > nicolas
> >
> > On 04/03/2013 05:55 PM, Tudor Girba wrote:
> >> No, it is not.
> >>
> >> privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo.
> >>
> >> Cheers,
> >> Doru
> >>
> >>
> >> On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote:
> >>
> >>> Hi,
> >>>
> >>> Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived.
> >>>
> >>> Same question for timeStamp.
> >>>
> >>> Thanks in advance.
> >>>
> >>> Anne
> >>> _______________________________________________
> >>> Moose-dev mailing list
> >>> [hidden email]
> >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >> --
> >> www.tudorgirba.com
> >>
> >> "Presenting is storytelling."
> >>
> >>
> >> _______________________________________________
> >> Moose-dev mailing list
> >> [hidden email]
> >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >
> > --
> > Nicolas Anquetil -- RMod research team (Inria)
> >
> > _______________________________________________
> > Moose-dev mailing list
> > [hidden email]
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Things happen when they happen,
> not when you talk about them happening."
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> --
> Andre Hora
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Yesterday is a fact.
 Tomorrow is a possibility.
 Today is a challenge."




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