0% found this document useful (0 votes)
51 views

Chapter 1 2

The document discusses the concepts of programming languages including reasons for studying programming languages, programming domains, language evaluation criteria, influences on language design, language categories, language design trade-offs, implementation methods, and programming environments. It also discusses the evolution of major programming languages.
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)
51 views

Chapter 1 2

The document discusses the concepts of programming languages including reasons for studying programming languages, programming domains, language evaluation criteria, influences on language design, language categories, language design trade-offs, implementation methods, and programming environments. It also discusses the evolution of major programming languages.
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/ 20

CHAPTER 1

❑ Reasons for Studying Concepts of Programming Languages


❑ Programming Domains
❑ Language Evaluation Criteria
❑ Influences on Language Design
❑ Language Categories
❑ Language Design Trade-Offs
❑ Implementation Methods
❑ Programming Environments

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 2


REASONS FOR STUDYING CONCEPTS OF
PROGRAMMING LANGUAGES
1. Increased capacity to express programming concepts

2. Improved background for choosing appropriate languages

3. Increased ability to learn new languages

4. Understanding the significance of implementation

5. Increased ability to design new languages

6. Overall advancement of computing

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 3


PROGRAMMING DOMAINS
1. Scientific applications

2. Business applications

3. Artificial intelligence

4. Systems programming

5. Scripting languages

6. Special purpose languages

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 4


LANGUAGE EVALUATION CRITERIA
1. Readability: the ease with which programs can be read and
understood
2. Writability: the ease with which a language can be used to create
programs
3. Reliability: conformance to specifications (i.e., performs to its
specifications). Type checking and Exception handling
4. Cost: the ultimate total cost
5. Others: portability, generality, well-definedness

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 5


INFLUENCES ON LANGUAGE DESIGN
1. Computer Architecture
▪ Due to the use of von Neumann machine architecture,
imperative languages are processed through the fetch-execute-
cycle.

2. Programming Methodologies
▪ 1950s and early 1960s: Simple applications; worry about
machine efficiency
▪ Late 1960s: Programmers efficiency became important;
readability, better control structures
▪ Late 1970s: Data abstraction; inheritance; dynamic method
binding
▪ Middle 1980s: Object-oriented programming

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 6


LANGUAGE CATEGORIES
1. Imperative
▪ Central features are variables, assignment statements, and iteration
▪ Include languages that support object-oriented programming
▪ Include scripting languages
▪ Examples: C, Java, C++, and Perl, JavaScript, Ruby
2. Functional
▪ Main means of making computations is by applying functions to given
parameters
▪ Examples: LISP, Scheme
3. Logic
▪ Rule-based: rules are specified in no particular order
▪ Example: Prolog
4. Markup/programming hybrid
▪ Markup languages extended to support some programming
▪ Examples: JSTL, XSLT

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 7


LANGUAGE DESIGN TRADE-OFFS
❑ Reliability vs. cost of execution
Example: Java demands all references to array elements be checked
for their legal ranges, which leads to increased execution costs
❑ 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
❑ Writability (flexibility) vs. reliability
Example: C++ pointers are powerful and very flexible but are
unreliable

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 8


IMPLEMENTATION METHODS
1. Compilation
▪ Translate high-level program to machine code
▪ Slow translation
▪ Fast execution

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 9


COMPILATION
❑ Compilation process has several
phases:
1. Lexical analyzer: converts
characters of the source program
into lexical units
2. Syntax analyzer: transforms lexical
units into parse trees which
represent the syntactic structure of
program
3. Intermediate code generator:
produces a program in a different
language
4. Semantics analyzer: checks for
errors (type errors)
5. Code generation: generates the
machine language program (code)

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 10


IMPLEMENTATION METHODS
1. Compilation
▪ Translate high-level program to machine code
▪ Slow translation
▪ Fast execution
2. Pure interpretation
▪ Use of Interpreter program
▪ Easy implementation
▪ Slow execution and requires more space

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 11


PURE INTERPRETATION

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 12


IMPLEMENTATION METHODS
1. Compilation
▪ Translate high-level program to machine code
▪ Slow translation
▪ Fast execution
2. Pure interpretation
▪ Use of Interpreter program
▪ Easy implementation
▪ Slow execution and requires more space
3. Hybrid implementation systems
▪ Translate high-level program to intermediate code
▪ Interpret the intermediate code to machine code

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 13


HYBRID IMPLEMENTATION
SYSTEMS

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 14


IMPLEMENTATION METHODS
1. Compilation
▪ Translate high-level program to machine code
▪ Slow translation
▪ Fast execution
2. Pure interpretation
▪ Use of Interpreter program
▪ Easy implementation
▪ Slow execution and requires more space
3. Hybrid implementation systems
▪ Translate high-level program to intermediate code
▪ Interpret the intermediate code to machine code
4. Preprocessors
▪ Include another file within the code (#include in C)

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 15


PROGRAMMING ENVIRONMENTS
❑ The collection of tools used in the process of software
development
1. UNIX
▪ An old operating system and tool collection
▪ Nowadays often used through a GUI (e.g., CDE, KDE, or
GNOME) that runs on top of UNIX

2. Microsoft Visual Studio .NET


▪ a large and elaborate collection of software development
tools, all used through a windowed interface.

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 16


CHAPTER 2

Evolution of the Major Programming Languages

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 17


MAJOR PROGRAMMING LANGUAGES
1. Zuse’s Plankalkül – 1945
2. Pseudocodes – 1949
3. Laning and Zierler System – 1953
4. FORTRAN I – 1957
5. FORTRAN II – 1958
6. FORTRAN IV – 1960 – 62
7. FORTRAN 77 – 1978
8. FORTRAN 90 – 1990
9. LISP – 1959

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 18


MAJOR PROGRAMMING LANGUAGES
10. ALGOL 58 – 1958
11. ALGOL 60 – 1960
12. COBOL – 1960
13. BASIC – 1964
14. PL/I – 1965
15. APL – 1962
16. SNOBOL – 1964
17. SIMULA 67 – 1967
18.ALGOL 68 – 1968

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 19


MAJOR PROGRAMMING LANGUAGES
19. Pascal – 1971
20. C – 1972
21. Other descendants of ALGOL
22. Prolog – 1972
23. Ada – 1983
24. Smalltalk – 1972
25. C++ – 1985
26. Java – 1995

PRINCIPLES OF PROG. LANG., DR. DALIA RIZK 20

You might also like