Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A subset of the rules necessary to eliminate all ESEQs from expressions.Show the right-hand side for each of the following incomplete rules ESEQ ESEQ s!

A subset of the rules necessary to eliminate all ESEQs from expressions.Show the right-hand side for each of the following incomplete rulesimage text in transcribedimage text in transcribed

ESEQ ESEQ s! (1) ESEQ SEQ 52 si 52 ESEQ(S), ESEQ(S2, e)) ESEQ(SEQ(S1, S2), e) BINOP ESEQ (2) ESEQ e2 S BINOP el el e2 BINOP(op, ESEQ(s, ei), e) MEMESEQ(s, e)) JUMP(ESEQ(s, e)) CJUMP(op, ESEQ(s, ei), e2,11,12) ESEQ(S, BINOP (op, ei, ea)) ESEQ(S, MEM(e)) SEQ(S, JUMP()) SEQ(S, CJUMP(op, e1, 22,11,12) = ESEQ BINOP el ESEQ MOVE ESEQ TEMP el BINOP e2 TEMP 1 t BINOP(op, e, ESEQ(s, e)) = t is a new temporary ESEQ(MOVE(TEMP 1, e), ESEQ(S, BINOP (op, TEMP 1, C2))) SEQ(MOVE(TEMP 1, e), SEQ(S, CJUMP(op, TEMP 1, 22,11,1))) CJUMP(op, e1, ESEQ(s, e2), 11, 12) BINOP ESEQ el ESEQ BINOP ( (4) ifs, e, commute e2 el ifs, e, commute BINOP(op, ej, ESEQ(S, ez)) ESEQ(S, BINOP(op, el, ez)) CJUMP(op, ej, ESEQ(s, e), 11, 12) = SEQ(S, CJUMP (op, ej, c2,1,1) 8.1 The rewriting rules in Figure 8.1 are a subset of the rules necessary to eliminate all Eseos from expressions. Show the right-hand side for each of the following incomplete rules: a. MOVE(TEMP 1, ESEQ(s, e)) = b. MOVE(MEMESEQ(s, e)), e2) C. MOVE(MEM(ei), ESEQ(s, e2)) d. EXP(ESEQ(s, e)) ESEQ ESEQ s! (1) ESEQ SEQ 52 si 52 ESEQ(S), ESEQ(S2, e)) ESEQ(SEQ(S1, S2), e) BINOP ESEQ (2) ESEQ e2 S BINOP el el e2 BINOP(op, ESEQ(s, ei), e) MEMESEQ(s, e)) JUMP(ESEQ(s, e)) CJUMP(op, ESEQ(s, ei), e2,11,12) ESEQ(S, BINOP (op, ei, ea)) ESEQ(S, MEM(e)) SEQ(S, JUMP()) SEQ(S, CJUMP(op, e1, 22,11,12) = ESEQ BINOP el ESEQ MOVE ESEQ TEMP el BINOP e2 TEMP 1 t BINOP(op, e, ESEQ(s, e)) = t is a new temporary ESEQ(MOVE(TEMP 1, e), ESEQ(S, BINOP (op, TEMP 1, C2))) SEQ(MOVE(TEMP 1, e), SEQ(S, CJUMP(op, TEMP 1, 22,11,1))) CJUMP(op, e1, ESEQ(s, e2), 11, 12) BINOP ESEQ el ESEQ BINOP ( (4) ifs, e, commute e2 el ifs, e, commute BINOP(op, ej, ESEQ(S, ez)) ESEQ(S, BINOP(op, el, ez)) CJUMP(op, ej, ESEQ(s, e), 11, 12) = SEQ(S, CJUMP (op, ej, c2,1,1) 8.1 The rewriting rules in Figure 8.1 are a subset of the rules necessary to eliminate all Eseos from expressions. Show the right-hand side for each of the following incomplete rules: a. MOVE(TEMP 1, ESEQ(s, e)) = b. MOVE(MEMESEQ(s, e)), e2) C. MOVE(MEM(ei), ESEQ(s, e2)) d. EXP(ESEQ(s, e))

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

Money And Capital Markets

Authors: Peter Rose, Milton Marquis

10th Edition

0077235800, 9780077235802

More Books

Students also viewed these Finance questions

Question

What is the meaning and definition of E-Business?

Answered: 1 week ago