(a) What is Directed Acyclic Graph (DAG)? Draw DAG and three - addres…

Previous year question for Compiler Design.

Question

(a) What is Directed Acyclic Graph (DAG)? Draw DAG and three - address - code for the expression, $a+a*(b-c) +(b-c)*d$. Show the steps for constructing the same.

(b) (i) List and explain various intermediate code form with an example.

(ii) What do you mean by Postfix Notation? Evaluate the postfix expression $ab+c*$ using a stack. Assume that $a = 1, b = 2,$ and $c = 3$.

Related pages

More PYQs on DAG Representation of Basic Blocks

Open on CachedInfo