CS606_ppt_vuanswer.com.pptx

Verified academic study resource for CS606 (Compiler Design & Construction) under the Computer Science at Virtual University of Pakistan. This PPT document (Official Lecture Handouts & Highlighted Notes compiled by VUAnswer) covers Complete Course Handouts (Lectures 1 to 45) spanning approximately 450 pages across 8 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS606 – Compiler Design & Construction
Faculty
Computer Science
Format
PPT
Type
Handout
Coverage
Complete Course Handouts (Lectures 1 to 45)
Compiled by
VUAnswer
Tags
SLIDES

Virtual University examiners construct 100% of objective MCQs and subjective marking schemes directly from the official CS606 handouts.

What this file covers — CS606 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
  5. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  6. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  7. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  8. Final-Term Examination Dossier & Capstone Synthesis — Lectures 42 to 45 (Pages 511 to 585). Final-Term Exam Synthesis (Lectures 23–45 Scope)

Frequently asked questions

Where can I download CS606_ppt_vuanswer.com.pptx for free?

You can preview and download "CS606_ppt_vuanswer.com.pptx" (CS606 PPT, ~450 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs606-ppt-vuanswer-com-pptx) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS606 file?

This document covers Complete Course Handouts (Lectures 1 to 45) across 8 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22, Lectures 23 to 29, Lectures 30 to 36, Lectures 37 to 41, Lectures 42 to 45), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS606 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS606 solved past papers and handouts verified for 2026 exams?

Yes. All CS606 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

                                                                                          1

L Le ec ct tu ur re e 1 1

Course Organization
The course is organized around theory and significant amount of practice. The practice
will be in the form of home works and a project. The project is the highlight of the
course: you will build a full compiler for subset of Java-like language. The
implementation will in C++ and you will generate Intel x86 assembly language code. The
project will be done in six parts; each will be a programming assignment.

The grade distribution will be

         Theory     Homeworks            10%
                    Exams                50%
         Practice Project                40%

The primary text for the course is Compilers – Principles, Techniques and Tools by Aho,
Sethi and Ullman. This is also called the Dragon Book; here is the image on the cover of
the book:

Sohail Aslam                                                Compiler Construction Notes

                                                                                            2

Why Take this Course
There are number of reason for why you should take this course. Let’s go through a few

Reason #1: understand compilers and languages
We all have used one or computer languages to write programs. We have used compilers
to “compile” our code and eventually turn it into an executable. While we worry about
data structures, algorithms and all the functionality that our application is supposed to
provide, we perhaps overlook the programming language, the structure of the code and
the language semantics. In this course, we will attempt to understand the code structure,
understand language semantics and understand relation between source code and
generated machine code. This will allow you to become a better programmer

Reason #2: nice balance of theory and practice
We have studied a lot of theory in various CS courses related to languages and grammar.
We have covered mathematical models: regular expressions, automata, grammars and
graph algorithms that use these models. We will now have an opportunity to put this
theory into practice by building a real compiler.

Reason #3: programming experience
Creating a compiler entails writing a large computer program which manipulates
complex data structures and implement sophisticated algorithm. In the process, we will
learn more about C++ and Intel x86 assembly language. The experience, however, will
be applicable if we desire to use another programming language, say Java, and generate
code for architecture other than Intel.

What are Compilers
Compilers translate information from one representation to another. Thus, a tool that
translates, say, Russian into English could be labeled as a compiler. In this course,
however, information = program in a computer language. In this context, we will talk of
compilers such as VC, VC++, GCC, JavaC FORTRAN, Pascal, VB. Application that
convert, for example, a Word file to PDF or PDF to Postscript will be called
“translators”. In this course we will study typical compilation: from programs written in
high-level languages to low-level object code and machine code.

Sohail Aslam                                                 Compiler Construction Notes

                                                                                         3

Typical Compilation
Consider the source code of C function

int expr( int n )
{
     int d;
     d = 4*n*n*(n+1)*(n+1);
     return d;
}

Expressing an algorithm or a task in C is optimized for human readability and
comprehension. This presentation matches human notions of grammar of a programming
language. The function uses named constructs such as variables and procedures which aid
human readability. Now consider the assembly code that the C compiler gcc generates
for the Intel platform:

.globl     _expr
_expr:
     pushl %ebp
     movl %esp,%ebp
     subl $24,%esp
     movl 8(%ebp),%eax
     movl %eax,%edx
     leal 0(,%edx,4),%eax
     movl %eax,%edx
     imull 8(%ebp),%edx
     movl 8(%ebp),%eax
     incl %eax
     imull %eax,%edx
     movl 8(%ebp),%eax
     incl %eax
     imull %eax,%edx
     movl %edx,-4(%ebp)
     movl -4(%ebp),%edx
     movl %edx,%eax
     jmp L2
     .align 4
L2:
     leave
     ret

The assembly code is optimized for hardware it is to run on. The code consists of
machine instructions, uses registers and unnamed memory locations. This version is
much harder to understand by humans

Sohail Aslam                                               Compiler Construction Notes

                                                                                            4

Issues in Compilation
The translation of code from some human readable form to machine code must be
“correct”, i.e., the generated machine code must execute precisely the same computation
as the source code. In general, there is no unique translation from source language to a
destination language. No algorithm exists for an “ideal translation”.

Translation is a complex process. The source language and generated code are very
different. To manage this complex process, the translation is carried out in multiple
passes.

Sohail Aslam                                                  Compiler Construction Notes

                                                                                             1

L Le ec ct tu ur re e 2 2

Two-pass Compiler

The figure above shows the structure of a two-pass compiler. The front end maps legal
source code into an intermediate representation (IR). The back end maps IR into target
machine code. An immediate advantage of this scheme is that it admits multiple front
ends and multiple passes.

The algorithms employed in the front end have polynomial time complexity while
majority of those in the backend are NP-complete. This makes compiler writing a
challenging task.

Let us look at the details of the front and back ends.

Front End

          source                                         IR
                    scanner               parser
           code

More CS606 files

All CS606 files · Midterm Prep 2026 · MCQs Bank