Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8.1 The rewriting rules in Figure 8.1 are a subset of the rules necessary to eliminate all ESEQs from expressions. Show the right-hand side for

image text in transcribed

8.1 The rewriting rules in Figure 8.1 are a subset of the rules necessary to eliminate all ESEQs from expressions. Show the right-hand side for each of the following incomplete rules: a. MOVE(TEMP t, ESEQ(s, e)) - b. MOVE(MEM(ESEQ(s, el), e2)- C. MOVE (MEM (e1), ESEQ(s, e2))- d. EXP(ESEQ(s, e))- e. EXP(CALL(ESEQ(s, e), args)) f. MOVE(TEMP t, CALL(ESEQ(s, e), args))- g. EXP(CALL(e1, [e2, ESEQ(s, es), e4))- In some cases, you may need two different right-hand sides depending on whether something commutes (just as parts (3) and (4) of Figure 8.1 have different right- hand sides for the same left-hand sides) 8.2 Draw each of the following expressions as a tree dia gram, and then apply the rewriting rules of Figure 8.1 and Exercise 8.1, as well as the CALL rule on page 168 a. MOVE(MEM(ESEQ(SEQ(CJUMP(LT, TEMP?, CONST0, Lout, Lok), LABELok), TEMP?.)), CONST 1 b. MOVE (MEM (MEM (NAMEa)), MEM(CALL(TEMPf, I) c. BINOP(PLUs, CALL(NAME/, [teMPxl), CALL(NAME ESEQ MOVE(TEMP, CONSTo), TEMPx)I) 8.1 The rewriting rules in Figure 8.1 are a subset of the rules necessary to eliminate all ESEQs from expressions. Show the right-hand side for each of the following incomplete rules: a. MOVE(TEMP t, ESEQ(s, e)) - b. MOVE(MEM(ESEQ(s, el), e2)- C. MOVE (MEM (e1), ESEQ(s, e2))- d. EXP(ESEQ(s, e))- e. EXP(CALL(ESEQ(s, e), args)) f. MOVE(TEMP t, CALL(ESEQ(s, e), args))- g. EXP(CALL(e1, [e2, ESEQ(s, es), e4))- In some cases, you may need two different right-hand sides depending on whether something commutes (just as parts (3) and (4) of Figure 8.1 have different right- hand sides for the same left-hand sides) 8.2 Draw each of the following expressions as a tree dia gram, and then apply the rewriting rules of Figure 8.1 and Exercise 8.1, as well as the CALL rule on page 168 a. MOVE(MEM(ESEQ(SEQ(CJUMP(LT, TEMP?, CONST0, Lout, Lok), LABELok), TEMP?.)), CONST 1 b. MOVE (MEM (MEM (NAMEa)), MEM(CALL(TEMPf, I) c. BINOP(PLUs, CALL(NAME/, [teMPxl), CALL(NAME ESEQ MOVE(TEMP, CONSTo), TEMPx)I)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago