Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged ullman
0
votes
1
answer
1
compiler design tcompiler-design-timothy-g-griffin
6. Generate code for the following C program using any code generation algorithm. [3 Marks] main() { int x, a, b, c, d, e; x= a + b -( c + d ) * e }
Ebrahim
asked
in
Compiler Design
Feb 1
by
Ebrahim
109
views
compiler-design
syntax-directed-translation
code-optimization
parsing
ullman
0
votes
1
answer
2
Compiler-design
Q1. For the following grammar N -> AB | BA A -> a | CAC B -> b | CBC C -> a | b Find the FIRST and FOLLOW
Ebrahim
asked
in
Compiler Design
Jan 13
by
Ebrahim
129
views
compiler-design
syntax-directed-translation
lexical-analysis
ullman
parsing
0
votes
0
answers
3
compiler-design-timothy-g-griffin
Find the FIRST and FOLLOW of the grammar to check whether it is LL (1) parser or not. N → AB | BA A → a | CAC B → b | CBC C → a | b
Ebrahim
asked
in
Compiler Design
Jan 12
by
Ebrahim
77
views
compiler-design
parsing
ullman
syntax-directed-translation
code-optimization
1
vote
0
answers
4
Ullman (Compiler Design) Edition 2 Exercise 6.5 Question 2 (Page No. 399)
As in Ada, suppose that each expression must have a unique type, but that from a subexpression, by itself, all we can deduce is a set of possible types. That is, the application of function ... of the overall expression is determined, proceeds top-down to determine attribute $unique$ for the type of each subexpression.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
1.0k
views
ullman
compiler-design
intermediate-code
three-address-code
descriptive
0
votes
0
answers
5
Ullman (Compiler Design) Edition 2 Exercise 6.5 Question 1 (Page No. 398)
Assuming that function $widen$ in Fig. $6.26$ can handle any of the types in the hierarchy of Fig. $6.25(a)$, translate the expressions below. Assume that c and d are characters, $s$ and $t$ are short integers, $i$ and $j$ are integers, and $x$ is a float. $x=s+c$ $i=s+c$ $x=(s+c)\ast(t+d)$
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
678
views
ullman
compiler-design
intermediate-code
three-address-code
descriptive
0
votes
0
answers
6
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 9 (Page No. 386)
$A$ real array $A[i, j, k]$ has index $i$ ranging from $1$ to $4$, index $j$ ranging from $0$ to $4$, and index $k$ ranging from $5$ to $10$. Reals take $8$ bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of: $A[3,4,5]$ $A[1,2,7]$ $A[4,3,9]$ if $A$ is stored in column-major order.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
514
views
ullman
compiler-design
intermediate-code
three-address-code
descriptive
0
votes
1
answer
7
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 8 (Page No. 386)
$A$ real array $A[i, j, k]$ has index $i$ ranging from $1$ to $4$, index $j$ ranging from $0$ to $4$, and index $k$ ranging from $5$ to $10$. Reals take $8$ bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of: $A[3,4,5]$ $A[1,2,7]$ $A[4,3,9]$
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
817
views
ullman
compiler-design
intermediate-code
three-address-code
descriptive
0
votes
0
answers
8
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 7 (Page No. 386)
An integer array $A[i, j]$ has index $i$ ranging from $1$ to $10$ and index $j$ ranging from $1$ to $20$. Integers take $4$ bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of: $A[4,5]$ $A[10,8]$ $A[3,17]$ if A is stored in column-major order.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
891
views
ullman
compiler-design
intermediate-code
three-address-code
descriptive
0
votes
1
answer
9
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 6 (Page No. 386)
An integer array $A[i, j]$ has index $i$ ranging from $1$ to $10$ and index $j$ ranging from $1$ to $20$. Integers take $4$ bytes each. Suppose array $A$ is stored starting at byte $0$. Find the location of: $A[4,5]$ $A[10,8]$ $A[3,17]$
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
515
views
ullman
compiler-design
intermediate-code
three-address-code
descriptive
0
votes
0
answers
10
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 5 (Page No. 385 - 386)
Generalize formula $(6.7)$ to multidimensional arrays, and indicate what values can be stored in the symbol table and used to compute offsets. Consider the following cases: An array $A$ of two dimensions, in row-major form. The first ... $h_{j}$.The same as $(c)$ but with the array stored in column-major form.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
337
views
ullman
compiler-design
intermediate-code
three-address-code
descriptive
0
votes
0
answers
11
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 4 (Page No. 385)
Revise the translation of Fig. $6.22$ for array references of the Fortran style, that is, $id[E_{1}, E_{2},\cdot\cdot\cdot,E_{n}]$ for an $n-$dimensional array.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
350
views
ullman
compiler-design
intermediate-code
three-address-code
descriptive
0
votes
0
answers
12
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 3 (Page No. 385)
Use the translation of Fig. $6.22$ to translate the following assignments: $x=a[i]+b[j]$ $x=a[i][j]+b[i][j]$ $x=a[b[i][j]][c[[k]]$
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
672
views
ullman
compiler-design
intermediate-code
three-address-code
descriptive
0
votes
0
answers
13
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 2 (Page No. 384)
Add to the translation of Fig. $6.19$ rules for the following productions: $E\rightarrow E_{1}\ast E_{2}$ $E\rightarrow + E_{1}\:$(unary plus)
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
427
views
ullman
compiler-design
intermediate-code
three-address-code
descriptive
0
votes
0
answers
14
Ullman (Compiler Design) Edition 2 Exercise 6.4 Question 1 (Page No. 384)
Add to the translation of Fig. $6.19$ rules for the following productions: $E\rightarrow E_{1}\ast E_{2}$ $E\rightarrow + E_{1}\:$(unary plus)
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
566
views
ullman
compiler-design
intermediate-code
three-address-code
descriptive
0
votes
0
answers
15
Ullman (Compiler Design) Edition 2 Exercise 6.3 Question 2 (Page No. 378)
Extend the handling of field names in Fig. $6.18$ to classes and single-inheritance class hierarchies. Give an implementation of class $Enu$ that allows linked symbol tables, so that a subclass can ... inherited fields. Inherited fields must maintain the relative addresses they were assigned in the layout for the superclass.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
466
views
ullman
compiler-design
three-address-code
intermediate-code
descriptive
0
votes
0
answers
16
Ullman (Compiler Design) Edition 2 Exercise 6.3 Question 1 (Page No. 378)
Determine the types and relative addresses for the identifiers in the following sequence of declarations: float x; record { float x; float y; } p; record { int tag; float x; float y; } q;
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
1.2k
views
ullman
compiler-design
three-address-code
intermediate-code
descriptive
0
votes
1
answer
17
Ullman (Compiler Design) Edition 2 Exercise 6.2 Question 3 (Page No. 370)
Show how to transform a three-address code sequence into one in which each defined variable gets a unique variable name.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
1.6k
views
ullman
compiler-design
three-address-code
intermediate-code
descriptive
1
vote
1
answer
18
Ullman (Compiler Design) Edition 2 Exercise 6.2 Question 2 (Page No. 370)
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
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
7.8k
views
ullman
compiler-design
three-address-code
intermediate-code
descriptive
0
votes
1
answer
19
Ullman (Compiler Design) Edition 2 Exercise 6.2 Question 1 (Page No. 370)
Translate the arithmetic expression $a + -(b + c)$ into: A syntax tree. Quadruples. Triples. Indirect triples
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
10.5k
views
ullman
compiler-design
three-address-code
intermediate-code
descriptive
0
votes
1
answer
20
Ullman (Compiler Design) Edition 2 Exercise 6.1 Question 2 (Page No. 363)
Construct the DAG and identify the value numbers for the subexpressions of the following expressions, assuming $+$ associates from the left. $a+b+(a+b)$ $a+b+a+b$ $a+a+((a+a+a+(a+a+a+a))$
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
4.7k
views
ullman
compiler-design
three-address-code
directed-acyclic-graph
descriptive
1
vote
2
answers
21
Ullman (Compiler Design) Edition 2 Exercise 6.1 Question 1 (Page No. 362)
Construct the DAG for the expression $((x + y)-((x + y)\ast(x -y))) + ((x+y)\ast(x-y))$
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
2.4k
views
ullman
compiler-design
three-address-code
directed-acyclic-graph
descriptive
0
votes
0
answers
22
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 7 (Page No. 337)
Modify the SDD of Fig. $5.25$ to include superscripts denoted by operator sup between boxes. If box $B_{2}$ is a superscript of box $B_{1}$, then position the baseline of $B_{2}\:0.6$ times the point size of $B_{1}$ above the baseline of $B_{1}.\text{Add}$ the new production and rules to the SDT of Fig. $5.26$.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
580
views
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
0
votes
0
answers
23
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 6 (Page No. 337)
Modify the SDD of Fig. $5.25$ to include a synthesized attribute $B.le$, the length of a box. The length of the concatenation of two boxes is the sum of the lengths of each. Then add your new rules to the proper positions in the SDT of Fig. $5.26$.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
609
views
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
0
votes
0
answers
24
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 5 (Page No. 337)
Write L-attributed SDT's analogous to that of Example $5.19$ for the following productions, each of which represents a familiar flow-of-control construct, as in the programming language C. You may need to generate a ... middle to the next statement, so it is not sufficient simply to generate code for each statement in order.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 7, 2019
by
Lakshman Bhaiya
468
views
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
0
votes
0
answers
25
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 4 (Page No. 337)
Write L-attributed SDD's analogous to that of Example $5.19$ for the following productions, each of which represents a familiar flow-of-control construct, as in the programming language C. You may need to generate a ... middle to the next statement, so it is not sufficient simply to generate code for each statement in order.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 6, 2019
by
Lakshman Bhaiya
427
views
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
1
vote
1
answer
26
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 3 (Page No. 337)
The following SDT computes the value of a string of $0's$ and $1's$ ... SDT so the underlying grammar is not left recursive, and yet the same value of $B.val$ is computed for the entire input string.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 6, 2019
by
Lakshman Bhaiya
2.1k
views
ullman
compiler-design
syntax-directed-translation
grammar
left-recursion
descriptive
1
vote
1
answer
27
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 2 (Page No. 336 - 337)
Rewrite the following SDT: $A\rightarrow A\{a\}B\mid AB\{b\}\mid 0$ $B\rightarrow B\{c\}A\mid BA\{d\}\mid 1$ so that the underlying grammar becomes non-left-recursive. Here, $a, b, c$, and $d$ are actions, and $0$ and $1$ are terminals.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 6, 2019
by
Lakshman Bhaiya
751
views
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
0
votes
0
answers
28
Ullman (Compiler Design) Edition 2 Exercise 5.4 Question 1 (Page No. 336)
We mentioned in Section $5.4.2$ that it is possible to deduce, from the LR state on the parsing stack, what grammar symbol is represented by the state. How would we discover this information?
Lakshman Bhaiya
asked
in
Compiler Design
Sep 6, 2019
by
Lakshman Bhaiya
498
views
ullman
compiler-design
syntax-directed-translation
grammar
descriptive
0
votes
0
answers
29
Ullman (Compiler Design) Edition 2 Exercise 5.3 Question 3 (Page No. 323)
Give an SDD to differentiate expressions such as $x\ast(3\ast x + x\ast x)$ involving the operators $+$ and $\ast,$ the variable $x$, and constants. Assume that no simplification occurs, so that, for example, $3\ast x$ will be translated into $3\ast 1+0\ast x$.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 6, 2019
by
Lakshman Bhaiya
474
views
ullman
compiler-design
syntax-directed-translation
0
votes
0
answers
30
Ullman (Compiler Design) Edition 2 Exercise 5.3 Question 2 (Page No. 323)
Give an SDD to translate infix expressions with $+$ and $\ast$ into equivalent expressions without redundant parentheses. For example, since both operators associate from the left, and $\ast$ takes precedence over $+, ((a\ast(b+c))\ast(d))$ translates into $a\ast(b + c)\ast d$.
Lakshman Bhaiya
asked
in
Compiler Design
Sep 6, 2019
by
Lakshman Bhaiya
717
views
ullman
compiler-design
syntax-directed-translation
infix-expressions
Page:
1
2
3
4
5
6
...
11
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(683)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
243k
comments
79.7k
users
Recent questions tagged ullman
Recent Blog Comments
Hlo I'm Rupesh I got AIR 3485 in gate CS and AIR...
@Ajay Sasank here is the direct link...
Thank you for the post didi My GATE 2023 & 2024...
I Hope it helps 😊
Today's best post I seen thank you for motivation