Re: Tiger's ESEQ

Ken Rose <>
2 Jul 2005 20:26:13 -0400

          From comp.compilers

Related articles
Tiger's ESEQ (2005-06-30)
Re: Tiger's ESEQ (2005-07-02)
Re: Tiger's ESEQ (Ken Rose) (2005-07-02)
| List of all articles for this month |

From: Ken Rose <>
Newsgroups: comp.compilers
Date: 2 Jul 2005 20:26:13 -0400
Organization: Posted via Supernews,
References: 05-06-136
Keywords: books
Posted-Date: 02 Jul 2005 20:26:13 EDT wrote:
> I have been reading Andrew Appel's Modern Compiler Design in "C".
> I am afraid I do not understand the ESEQ completely.
> I have been looking at other literature like the Dragon book,
> Engineering a compiler, and many more. I have not found the usage of
> ESEQ kind of instructions anywhere in them. I understand the
> ide-effect part, but how do we know for sure that some instruction will
> have a side-effect. How do you define a side-effect?

It's not about the ultimate machine instruction, it's about the
operation being translated. Consider a C expression like:

        a[i++] = <something>

Consider just the i++ part. One simple way to translate that into
Appel's tree notation is something along these lines:

      ESEQ(temp <- i)
              (ESEQ(i <- i+1)

A comma expression as another natural application. It's really about
the structure of the tree, and representing it in a way that's actually
type-safe (and suitable for the ML version of the book), though if
you're writing in C you could yield to the temptation to use a SEQ instead.

    - ken

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.