Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question In Theory of Compilers 2 . Implement the statement a: = - b + c * ( d - e ) + f *

Question In Theory of Compilers
2. Implement the statement a:=-b + c*(d-e)+ f *(c*(d-e)) into following Intermediate code representation.
a) Quadruple
b) Triple
c) Indirect Triple
.
Solve it like this Example
.
.
Problem Based on Representation of Three Address code
Problem-01:
Translate the following expression to quadruple, triple and indirect triple-
a+bceuarrf+bc
Solution-
Three Address Code for the given expression is-
T1=euarrf
T2=bc
T3=T2T1
T4=ba
T5=a+T3
T6=T5+T4
Quadruple Representation-
\table[[Location,op,Arg1,Arg2,Result],[(0),uarr,e,f,T1],[(1),x,b,c,T2],[(2),??,T2,T1,T3],[(3),x,b,a,T4],[(4),+,a,T3,T5],[(5),+,T5,T4,T6]]
Now, we write the required representations-
Shabbir Alam
COMP 433
Chapter -5- Intermediate Code Generation
Problem Based on Representation of Three Address code
Triple Representation-
\table[[Location,Op,Arg1,Arg2],[(0),uarr,e,f
image text in transcribed

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

Simplify the following expressions. d. J. dx Vt4 + 1 dt

Answered: 1 week ago

Question

1. How might volunteering help the employer and the employee?

Answered: 1 week ago