1 votes 1 votes Translate the following arithmetic expression into: $a=b[i]+c[j]$ $a[i]=b\ast c-b\ast d$ $x=f(y+1)+2$ $x=\ast p + \&y$ A Syntax tree Quadruples Triples Indirect triples Compiler Design ullman compiler-design three-address-code intermediate-code descriptive + – admin asked Sep 7, 2019 admin 7.8k views answer comment Share Follow See 1 comment See all 1 1 comment reply DEBANJAN DAS2k commented May 7, 2023 reply Follow Share http://dragon-book.jcf94.com/book/ch06/6.2/6.2.html answers link. 0 votes 0 votes Please log in or register to add a comment.
2 votes 2 votes 1. a=b[i]+c[j] Quadruples Operator Argument1 Argument2 Result 0 =[] b i t1 1 =[] c j t2 2 + t1 t2 t3 3 = t3 a Triples Operator Argument1 Argument2 0 =[] b i 1 =[] c j 2 + (0) (1) 3 = a (2) Indirect Triples 0 (0) 1 (1) 2 (2) 3 (3) 2. a[i]=b∗c−b∗d Quadruples Operator Argument1 Argument2 Result 0 * b c t1 1 * b d t2 2 - t1 t2 t3 3 []= a i t4 4 = t3 t4 Triples Operator Argument1 Argument2 0 * b c 1 * b d 2 - (0) (1) 3 []= a i 4 = (3) (2) aditi19 answered Oct 10, 2019 edited Oct 10, 2019 by aditi19 aditi19 comment Share Follow See all 4 Comments See all 4 4 Comments reply logan1x commented Nov 7, 2019 reply Follow Share Is it right for equation 3 & 4? 0 votes 0 votes aditi19 commented Nov 7, 2019 reply Follow Share i'm not sure of representing function calls in DAG 0 votes 0 votes logan1x commented Nov 7, 2019 reply Follow Share @Lakshman Patel RJIT Do you know the answers? 0 votes 0 votes Lakshman Bhaiya commented Nov 7, 2019 i edited by Lakshman Bhaiya Nov 7, 2019 reply Follow Share I don't have answers. You can download the solution of this book and cross verify it. 0 votes 0 votes Please log in or register to add a comment.