One more question about the transformation rules

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

One more question about the transformation rules

Uko2
Hi,

when a transformation rule checks a method, except for only checking whether it matches the rule, it also checks if

self class recursiveSelfRule executeTree: rewriteRule tree initialAnswer: false

evaluates to false. #recursiveSelfRule is

'`@methodName: `@args | `@temps | self `@methodName: `@args1'
'`@methodName: `@args | `@temps | ^ self `@methodName: `@args1’

Do I understand correctly that before signaling that method is bad the rule makes sure that the transformation will not create a recursion?

Uko
Reply | Threaded
Open this post in threaded view
|

Re: One more question about the transformation rules

Max Leske

> On 15 Oct 2015, at 15:00, Yuriy Tymchuk <[hidden email]> wrote:
>
> Hi,
>
> when a transformation rule checks a method, except for only checking whether it matches the rule, it also checks if
>
> self class recursiveSelfRule executeTree: rewriteRule tree initialAnswer: false
>
> evaluates to false. #recursiveSelfRule is
>
> '`@methodName: `@args | `@temps | self `@methodName: `@args1'
> '`@methodName: `@args | `@temps | ^ self `@methodName: `@args1’
>
> Do I understand correctly that before signaling that method is bad the rule makes sure that the transformation will not create a recursion?

Yes, I would say so. Although why that check is done to find matching methods I don’t know.

>
> Uko


Reply | Threaded
Open this post in threaded view
|

Re: One more question about the transformation rules

Thierry Goubier
In reply to this post by Uko2
Le 15/10/2015 15:00, Yuriy Tymchuk a écrit :

> Hi,
>
> when a transformation rule checks a method, except for only checking
> whether it matches the rule, it also checks if
>
> self class recursiveSelfRule executeTree: rewriteRule tree
> initialAnswer: false
>
> evaluates to false. #recursiveSelfRule is
>
> '`@methodName: `@args | `@temps | self `@methodName: `@args1'
> '`@methodName: `@args | `@temps | ^ self `@methodName: `@args1’
>
> Do I understand correctly that before signaling that method is bad
> the rule makes sure that the transformation will not create a
> recursion?

Not sure about the 'before signaling that method is bad', but the match
is on a method which creates an infinite loop by calling itself.

Thierry