|Q: Side effect removal transformations (Source to source) firstname.lastname@example.org (1995-04-12)|
|Re: Q: Side effect removal transformations (Source to source) email@example.com (1995-04-18)|
|Re: Q: Side effect removal transformations (Source to source) firstname.lastname@example.org (1995-04-28)|
|From:||email@example.com (Seth LaForge)|
|Organization:||California Institute of Technology, Pasadena, CA|
|Date:||Tue, 18 Apr 1995 20:12:04 GMT|
Mark Harman <firstname.lastname@example.org> wrote:
>The transformations I'm looking for would transform a C program with side
>effects in its expressions into a semantically equivelent program (in C) with
>no side effects.
>For example, the program fragment:-
>x = y++ ;
>if (z=++i>2) x++ ;
>could be transformed to
>x = y;
>y = y+1;
>i = i+1;
>z = i;
Umm, x=x+1 is a side effect; it changes the value of x as a result of
evaluating x=x+1. If you want to do the above with truly no side
effects, you'd have to use recursion.
Return to the
Search the comp.compilers archives again.