0% found this document useful (0 votes)
38 views2 pages

Homework 1: Components

This document is a homework assignment for a compiler construction course. It contains 5 questions about compiler front ends, the difference between compilers and interpreters, code optimization, regular expressions, and constructing a DFA. The homework is due on January 15, 2023 and is worth a total of 10 marks.

Uploaded by

Cotton Store
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views2 pages

Homework 1: Components

This document is a homework assignment for a compiler construction course. It contains 5 questions about compiler front ends, the difference between compilers and interpreters, code optimization, regular expressions, and constructing a DFA. The homework is due on January 15, 2023 and is worth a total of 10 marks.

Uploaded by

Cotton Store
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Course

Name: Compiler Construction


Kingdom of Saudi Arabia
Course ID: 23163109-3
Ministry of Education
Assignment: Homework 1
Umm Al-Qura University
10
Due Date: 15/1/2023 – 22/6/1444
Jamoum University Collage
Computers Department
Academic Year: 2022/2023 - 1444
Total
Semester: o 1 þ 2nd o 3rd
st
Marks

(‫اﺳم اﻟطﺎﻟب)ة‬
(........) ‫رﻗم اﻟﺷﻌﺑﺔ‬ ‫اﻟرﻗم اﻟﺟﺎﻣﻌﻲ‬


Homework 1
Q1: What are the components of the compiler front end? Explain, one of those
components.
Answer: 2

Q2: What is the main difference between the “Compiler” and “Interpreter”?
Answer:
2

Q3: Improve the code on the right using the “Code Optimization” concept.

Answer: 2

P a g e 1 | 2
4. Q4: Write a regular expression for a language with Σ ={0,1) and all words contains
010
Answer: 2

5. Q5: Construct a DFA that accept the following language:


{ w ∈ Σ∗| w ends with the substring 010, i.e., w = x010 for some x ∈ Σ∗ }
2
Answer:

End

P a g e 2 | 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy