1. This document discusses the concepts of programming languages including evaluation criteria, influences on language design, categories, and implementation methods.
2. Key evaluation criteria are readability, writability, reliability, and cost. Major influences are computer architecture and programming methodologies.
3. Major language categories are imperative, functional, logic, and markup/programming hybrids. Implementation methods include compilation, pure interpretation, and hybrid systems.
2. Concepts Of Programming Languages
Pre-Requisite : CSI 222(Discrete Mathematics2)
 Sub Code : CSI 513
 Group : 485/486
 IA Marks : 60
 No. of Lecture Hrs. /week : 03
 Exam Hrs. : 02
 Total No. of Lecture Hrs. : 45
 Exam Marks : 40
3. Syllabus
1. Introduction 1:
Programming languages spectrum, programming environments,
evolution of major programming languages, Zuse’s Plankalkül,
Functional programming, computerizing business records, time
Sharing.
2. Introduction 2:
Describing Syntax & Semantics, Names, Bindings, and Scopes.
3. Control Flow:
Expressions and Assignment Statements, Statement-Level Control
Structures.
4. Data Types:
Introduction, different data types and their scope in programming.
5. Subprograms & Control Abstraction:
fundamentals, parameter passing, Exception handling
6. Data Abstraction and Object oriented Orientation:
concept of data abstraction, design issues of object oriented
programming languages, inheritance, and encapsulation.
7. Functional languages and Logical Languages:
Functional Languages: Origins; Concepts, A review/overview of
scheme, comparison of functional and imperative languages,
Logic Languages: Concepts; Prolog; Logic programming in
perspective, applications.
8. Concurrency:
Introduction, Semaphores, Monitors, Message Passing, Concurrency in
Functional Languages, Statement-Level Concurrency.
4. Book Type Title and Author Edition Publication Year
Main Text Book (T1)
Robert W. Sebesta, Concepts of
Programming languages
10th Ed
Addison-Wesley edition 2013
Reference Books:
Reference Text Book (R1)
David A. Watt, Programming Language
Design Concepts
Wiley
May
2004
Reference Text Book (R2)
Sara Baase and Allen Van Gelder,
Computer Algorithms: Introduction to
Design & Analysis
3rd Ed Addison-Wesley edition 2000
Text Books
5. Self learning
20-30%
Exam
Course Name
NO
Mid Term / Quizzes
30-40%
Final
40%
Skills
10-15%
Homework
10-20%
Lab
Elec.
Oral
Written
Others
(group Project)
Participation
(Lab tests)
Presentation
Q
M
Q
M
Q
M
Q
M
05
05
05
05
-
10
5
10
-
-
5
10
40%
Concepts of
Programming
Languages
1
Participation: exercise, activities, workshops, field visits,……………
Others: reports, problem sheets, group projects, posters, articles, researches,………………
Portfolio: Students should provide evidence for their achievement of learning outcomes,………………
1. Participation includes:
a. Exercise programs in c++ programming language to understand the concepts of programming
followed by lab assessment for cycle 1 + cycle 2 of programs executed during regular lab sessions.
2. Others includes:
a. Group Project.
3. Homework + Assignment includes:
a. Analysis of different programming languages with programming perspective.
6. Scheme of Evaluation
Component Duration Weight age
Test 1(written) 60 Minutes 10+05 Marks
Test 2 (Online) 60 Minutes 10+05 Marks
Laboratory Work(Attendance + Participation)
During regular class hours
10 Marks
Lab – Group projects(others) 05 Marks
Others(Participation- field visit) 05 Marks
Homework + Assignment 05 Marks
Seminar / Presentation 05 Marks
Final Examination 2 Hours 40 Marks
Total 100 Marks
Marks required to Pass the Course 60 Marks
7. Upon completion of this course, the student should be able to:
Increased ability to express ideas
Improved background for choosing appropriate
languages
Increased ability to learn new languages
Better understanding of significance of
implementation
Better use of languages that are already known
Overall advancement of computing
COURSE OBJECTIVES
8. Week 1 & 2
Topics to be Discussed:
Introduction 1:
1. Reasons for Studying Concepts of Programming Languages
2. Programming Domains
3. Language Evaluation Criteria
4. Influences on Language Design
5. Language Categories
6. Language Design Trade-Offs
7. Implementation Methods
8. Programming Environments
9. Zuse’s Plankalkül
10. Minimal Hardware Programming: Pseudocodes
11. The IBM 704 and Fortran
12. Functional Programming: LISP
13. The First Step Toward Sophistication: ALGOL 60
14. Computerizing Business Records: COBOL
15. The Beginnings of Timesharing: BASIC
9. Programming Domains
 Scientific applications
Large numbers of floating point computations; use of
arrays
Fortran
 Business applications
Produce reports, use decimal numbers and characters
COBOL
 Artificial intelligence
Symbols rather than numbers manipulated; use of
linked lists
LISP
 Systems programming
Need efficiency because of continuous use
C
 Web Software
Eclectic collection of languages: markup (e.g., HTML),
scripting (e.g., PHP), general-purpose (e.g., Java)
10. Language Evaluation Criteria
 Readability:
The ease with which programs can be read and
understood
 Writability:
The ease with which a language can be used to
create programs
 Reliability:
Conformance to specifications (i.e., performs
to its specifications)
 Cost:
The ultimate total cost
11. Evaluation Criteria: Readability
A. Overall simplicity
I. A manageable set of features and constructs
II. Minimal feature multiplicity
III. Minimal operator overloading
B. Orthogonality
I. A relatively small set of primitive constructs can be combined in a relatively
II. small number of ways
III. Every possible combination is legal
C. Data types
I. Adequate predefined data types
D. Syntax considerations
I. Identifier forms: flexible composition
II. Special words and methods of forming compound statements
III. Form and meaning: self-descriptive constructs, meaningful keywords
12. Evaluation Criteria: Writability
A. Simplicity and orthogonality
Few constructs, a small number of primitives, a small set of rules for
combining them
B. Support for abstraction
The ability to define and use complex structures or operations in
ways that allow details to be ignored
C. Expressivity
i. A set of relatively convenient ways of specifying operations
ii. Strength and number of operators and predefined functions
13. Evaluation Criteria: Reliability
A. Type checking
Testing for type errors
B. Exception handling
Intercept run-time errors and take corrective measures
C. Aliasing
Presence of two or more distinct referencing methods for the
same memory location
D. Readability and Writability
A language that does not support “natural” ways of
expressing an algorithm will require the use of “unnatural”
approaches, and hence reduced reliability
14. Evaluation Criteria: Cost
1. Training Programmers to use the language
2. Writing Programs (closeness to particular applications)
3. Compiling Programs
4. Executing Programs
5. Language Implementation System:
Availability of free compilers
6. Reliability:
Poor reliability leads to high costs
7. Maintaining Programs
15. Evaluation Criteria: Others
A. Portability
The ease with which programs can be moved from one
implementation to another
B. Generality
The applicability to a wide range of applications
C.Well-defined ness
The completeness and precision of the language’s official
definition
16. Influences on Language Design
Computer Architecture:
Languages are developed around the prevalent computer
architecture, known as the Von Neumann architecture
Program Design Methodologies:
New software development methodologies (e.g., object-
oriented software development) led to new programming
paradigms and by extension, new programming languages
17. Computer Architecture Influence
1. Well-known computer architecture: Von Neumann
2. Imperative languages, most dominant, because of von
Neumann computers
i. Data and programs stored in memory
ii. Memory is separate from CPU
iii. Instructions and data are piped from memory to CPU
3. Basis for imperative languages
i. Variables model memory cells
ii. Assignment statements model piping
iii. Iteration is efficient
19. The Von Neumann Architecture
Fetch-execute-cycle (on a von Neumann architecture computer)
initialize the program counter
repeat forever
fetch the instruction pointed by the counter
increment the counter
decode the instruction
execute the instruction
end repeat
20. Programming Methodologies Influences
A. 1950s and early 1960s:
Simple applications; worry about machine efficiency
B. Late 1960s:
People efficiency became important; readability, better control structures
i. Structured programming
ii. Top-down design and step-wise refinement
C. Late 1970s: Process-oriented to data-oriented
Data abstraction
D. Middle 1980s: Object-oriented programming
Data abstraction + Inheritance + Polymorphism
21. Language Categories
A. Imperative (An imperative language uses a sequence of statements to determine how to reach a certain goal)
i. Central features are variables, assignment statements, and iteration
ii. Include languages that support object-oriented programming
iii. Include scripting languages
iv. Include the visual languages
Examples: C, Java, Perl, JavaScript, Visual BASIC .NET, C++
B. Functional
Main means of making computations is by applying functions to given parameters
Examples: LISP, Scheme, ML, F#
C. Logic
Rule-based (rules are specified in no particular order)
Example: Prolog
D. Markup/programming hybrid
Markup languages extended to support some programming
Examples:
JSTL(Java Standard Tag Library),
XSLT(Extensible Stylesheet Language Transformations)
22. Language Design Trade-Offs
A. Reliability vs. cost of execution
Example:
Java demands all references to array elements be checked for proper
indexing, which leads to increased execution costs
B. Readability vs. Writability
Example:
APL provides many powerful operators (and a large number of new symbols),
allowing complex computations to be written in a compact program but at the
cost of poor readability
C. Writability (flexibility) vs. reliability
Example:
C++ pointers are powerful and very flexible but are unreliable
23. Implementation Methods
A. Compilation
i. Programs are translated into machine language; includes JIT systems
Use: Large commercial applications
B. Pure Interpretation
i. Programs are interpreted by another program known as an
interpreter
Use: Small programs or when efficiency is not an issue
C. Hybrid Implementation Systems
i. A compromise between compilers and pure interpreters
Use: Small and medium systems when efficiency is not the first concern
24. Layered View of Computer
The operating system and language implementation
are layered over machine interface of a computer
25. Compilation
A. Translate high-level program (source language) into machine code
(machine language)
B. Slow translation, fast execution
C. Compilation process has several phases:
i. Lexical analysis:
converts characters in the source program into lexical units
ii. Syntax analysis:
Transforms lexical units into parse trees which represent the
syntactic structure of program
iii. Semantics analysis: generate intermediate code
iv. Code generation: machine code is generated
27. Additional Compilation Terminologies
A. Load module (executable image):
The user and system code together
B. Linking and loading:
The process of collecting system program units and
linking them to a user program
28. Von Neumann Bottleneck
• Connection speed between a computer’s memory and its
processor determines the Speed of a computer.
• Program instructions often can be executed much faster than
the speed of the connection; the connection speed thus results
in a bottleneck.
• Known as the Von Neumann bottleneck;
It is the primary limiting factor in the speed of
computers.
29. Pure Interpretation
1. No translation.
2. Easier implementation of programs
(run-time errors can easily and immediately be displayed)
3. Slower execution.
(10 to 100 times slower than compiled programs)
4. Often requires more space
5. Now rare for traditional high-level languages.
6. Significant comeback with some Web scripting languages.
(e.g., JavaScript, PHP)
31. Hybrid Implementation Systems
1. A compromise between compilers and pure interpreters.
2. A high-level language program is translated to an intermediate language
that allows easy interpretation.
3. Faster than pure interpretation.
Examples:
i. Perl programs are partially compiled to detect errors before
interpretation.
ii. Initial implementations of Java were hybrid.
iii. The intermediate form, byte code, provides portability to any
machine that has a byte code interpreter and a run-time system
(together, these are called Java Virtual Machine)
33. Just-in-Time Implementation Systems
1. Initially translate programs to an intermediate language.
2. Then compile the intermediate language of the subprograms
into machine code when they are called.
3. Machine code version is kept for subsequent calls.
4. JIT systems are widely used for Java programs.
5. .NET languages are implemented with a JIT system.
6. In essence, JIT systems are delayed compilers.
34. Preprocessors
I. Preprocessor macros (instructions) are commonly used to
specify that code from another file is to be included.
II. A preprocessor processes a program immediately before
the program is compiled to expand embedded
preprocessor macros.
III. A well-known example:
C preprocessor
– expands #include, #define, and similar macros
35. Programming Environments
A. A Collection of tools used in software development.
B. UNIX
i. An older operating system and tool collection.
ii. Nowadays often used through a GUI (e.g., CDE, KDE, or GNOME)
that runs on top of UNIX.
C. Microsoft Visual Studio.NET
A large, complex visual environment.
D. Used to build Web applications and non-Web applications in any .NET
language.
E. NetBeans
Related to Visual Studio .NET, except for applications in Java.
36. Summary
1. The study of programming languages is valuable for a number of reasons:
i. Increase our capacity to use different constructs
ii. Enable us to choose languages more intelligently
iii. Makes learning new languages easier
2. Most important criteria for evaluating programming languages include:
a. Readability,
b. Writability,
c. Reliability,
d. Cost.
3. Major influences on language design have been machine architecture and
software development methodologies
4. The major methods of implementing programming languages are:
a. Compilation,
b. Pure Interpretation,
c. Hybrid Implementation.